26 $this->_template=include
'templates/tplPanel.php';
28 $this->_collapsable=
false;
29 $this->_showOnStartup=
false;
62 $header->setClass(
"panel-heading");
71 $headerH->setTagName(
"h".$niveau);
72 $headerH->setClass(
"panel-title");
79 $footer->setClass(
"panel-footer");
92 if (!JString::startsWith($cssStyle,
"panel"))
93 $cssStyle=
"panel".$cssStyle;
102 if ($this->_collapsable) {
103 $this->_bsComponent=$js->
bootstrap()->collapse(
"#lnk-".$this->identifier);
104 $this->_bsComponent->setCollapsed(
"#collapse-".$this->identifier);
105 if ($this->_showOnStartup===
true) {
106 $this->_bsComponent->show();
115 $this->header->setRole(
"tab");
116 $lnk=
new HtmlLink(
"lnk-".$this->identifier);
117 $lnk->setHref(
"#collapse-".$this->identifier);
118 $lnk->setContent($this->header->getContent());
119 $this->header->setContent($lnk);
120 $this->collapseBegin=
'<div id="collapse-'.$this->identifier.
'" class="panel-collapse collapse" role="tabpanel" aria-labelledby="header-'.$this->identifier.
'">';
121 $this->collapseEnd=
"</div>";
123 $this->collapseBegin=
"";
124 $this->collapseEnd=
"";
135 if ($this->_collapsable)
136 $this->_showOnStartup=$value;
bootstrap(Bootstrap $bootstrap=NULL)
getter or setter of the Twitter Bootstrap variable
Composant Twitter Bootstrap panel.
__construct($identifier, $content=NULL, $header=NULL, $footer=NULL)
run(JsUtils $js)
SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()
setStyle($cssStyle)
define the Panel style avaible values : "panel-default","panel-primary","panel-success",...
setCollapsable($_collapsable)
show($value)
Shows the panel body on startup if panel is collapsable.
addHeaderH($content, $niveau="1")
Default HTML values for Twitter Bootstrap HTML components.
addToPropertyCtrl($name, $value, $typeCtrl)
setProperty($name, $value)