File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Ajax/semantic/html/modules Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 13
13
* Semantic Tab component
14
14
* @see http://semantic-ui.com/collections/tab.html
15
15
* @author jc
16
- * @version 1.001
16
+ * @version 1.02
17
17
*/
18
18
class HtmlTab extends HtmlSemCollection{
19
19
20
20
protected $ params =[];
21
+ protected $ _activated =false ;
21
22
22
23
public function __construct ( $ identifier , $ tabs =array ()){
23
24
parent ::__construct ( $ identifier , "div " , "" );
@@ -97,6 +98,7 @@ public function setTabsContent($contents){
97
98
public function activate ($ index ){
98
99
$ this ->content ["menu " ]->getItem ($ index )->setActive (true );
99
100
$ this ->content [$ index ]->setActive (true );
101
+ $ this ->_activated =true ;
100
102
return $ this ;
101
103
}
102
104
@@ -244,7 +246,7 @@ public function run(JsUtils $js) {
244
246
}
245
247
246
248
public function compile (JsUtils $ js =NULL , &$ view =NULL ) {
247
- if ($ this ->content ["menu " ]->count ()>0 && \sizeof ($ this ->content )>1 )
249
+ if (! $ this -> _activated && $ this ->content ["menu " ]->count ()>0 && \sizeof ($ this ->content )>1 )
248
250
$ this ->activate (0 );
249
251
return parent ::compile ($ js ,$ view );
250
252
}
You can’t perform that action at this time.
0 commit comments