38 $this->_baseClass = $baseClass;
52 if (isset($this->_popup))
53 $this->_popup->setAttributes($variation, $popupEvent);
65 public function addPopup($title =
"",
$content =
"", $variation = NULL, $params = array()) {
78 public function addPopupHtml($html =
"", $variation = NULL, $params = array()) {
80 $this->_popup->setHtml($html);
81 $this->_popup->setAttributes($variation, $params);
94 $dimmer->setParams($params);
95 $dimmer->setContainer($this);
108 public function addLabel($label, $before =
false, $icon = NULL) {
110 if (\is_object($label) ===
false) {
111 $labelO =
new HtmlLabel(
"label-" . $this->identifier, $label);
113 $labelO->addIcon($icon);
115 $labelO->addToPropertyCtrl(
"class",
"label", array(
133 $label = $this->
addLabel($label,
true, $icon);
134 $label->setAttached($side, $direction);
143 public function asLink($href = NULL, $target = NULL) {
161 return '$("#.' . $this->identifier .
').dimmer("' . $status .
'");';
170 if (isset($this->_popup)) {
171 $this->_popup->compile($js);
173 return parent::compile($js, $view);
182 $this->_bsComponent = $js->
semantic()->generic(
"#" . $this->identifier);
185 if (isset($this->_popup)) {
186 $this->_popup->run($js);
188 if (isset($this->_toast)) {
189 $this->_toast->setJs($js);
200 public function addList($items, $ordered =
false) {
201 $list =
new HtmlList(
"list-" . $this->identifier, $items);
202 $list->setOrdered($ordered);
203 $list->setClass(
"ui list");
214 $this->_toast =
new Toast();
215 $this->_toast->attach(
'#' . $this->_identifier);
217 if (isset($params)) {
218 $this->_toast->setParams($params);
220 $this->_toast->setParam(
'onShow',
'$(".toast-box *").show();');
230 $this->_sidebar =
new Sidebar();
addDimmer($params=array(), $content=NULL)
Adds a Dimmer to the element.
addList($items, $ordered=false)
compile(JsUtils $js=NULL, &$view=NULL)
{}
addToProperty($name, $value, $separator=" ")
jsShowDimmer($show=true)
Returns the script displaying the dimmer.
addPopupHtml($html="", $variation=NULL, $params=array())
Adds an html popup to the element.
Semantic Label component.
addContent($content, $before=false)
addEventsOnRun(JsUtils $js=NULL)
asLink($href=NULL, $target=NULL)
Transforms the element into a link.
setProperty($name, $value)
addPopup($title="", $content="", $variation=NULL, $params=array())
Adds a popup to the element.
attachLabel($label, $side=Side::TOP, $direction=Direction::NONE, $icon=NULL)
Adds an attached label to the element.
addLabel($label, $before=false, $icon=NULL)
Adds a label to the element.
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
Base class for Semantic double elements.
__construct($identifier, $tagName="p", $baseClass="ui", $content=NULL)
Ajax$Toast This class is part of phpMv-ui.
setPopupAttributes($variation=NULL, $popupEvent=NULL)
Defines the popup attributes.