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 1313 * Semantic Tab component
1414 * @see http://semantic-ui.com/collections/tab.html
1515 * @author jc
16- * @version 1.001
16+ * @version 1.02
1717 */
1818class HtmlTab extends HtmlSemCollection{
1919
2020 protected $ params =[];
21+ protected $ _activated =false ;
2122
2223 public function __construct ( $ identifier , $ tabs =array ()){
2324 parent ::__construct ( $ identifier , "div " , "" );
@@ -97,6 +98,7 @@ public function setTabsContent($contents){
9798 public function activate ($ index ){
9899 $ this ->content ["menu " ]->getItem ($ index )->setActive (true );
99100 $ this ->content [$ index ]->setActive (true );
101+ $ this ->_activated =true ;
100102 return $ this ;
101103 }
102104
@@ -244,7 +246,7 @@ public function run(JsUtils $js) {
244246 }
245247
246248 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 )
248250 $ this ->activate (0 );
249251 return parent ::compile ($ js ,$ view );
250252 }
You can’t perform that action at this time.
0 commit comments