File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ public function __construct(JsUtils $js) {
1111 parent ::__construct ($ js );
1212 $ this ->uiName ="tab " ;
1313 }
14-
14+ public function setDebug ($ value =true ) {
15+ return $ this ->setParam ("debug " , $ value );
16+ }
1517 //TODO other events implementation
1618}
Original file line number Diff line number Diff line change 88use Ajax \JsUtils ;
99
1010class HtmlTab extends HtmlSemCollection{
11- protected $ params =array ();
11+ protected $ params =array (" debug " => true );
1212
1313 public function __construct ( $ identifier , $ tabs =array ()){
1414 parent ::__construct ( $ identifier , "div " , "" );
1515 $ menu =new HtmlMenu ("menu " .$ this ->identifier );
1616 $ menu ->asTab (false )->setAttachment (NULL ,Side::TOP );
1717 $ this ->content ["menu " ]=$ menu ;
1818 $ this ->addItems ($ tabs );
19- if (\sizeof ($ tabs )>0 )
20- $ this ->activate (0 );
2119 }
2220
2321 protected function createItem ($ value ){
@@ -80,4 +78,9 @@ public function run(JsUtils $js) {
8078 $ this ->addEventsOnRun ($ js );
8179 return $ this ->_bsComponent ;
8280 }
81+ public function compile (JsUtils $ js =NULL , &$ view =NULL ) {
82+ if ($ this ->content ["menu " ]->count ()>0 )
83+ $ this ->activate (0 );
84+ return parent ::compile ($ js ,$ view );
85+ }
8386}
You can’t perform that action at this time.
0 commit comments