26 $this->_template =
'<%tagName% id="%identifier%" %properties%>%close%%icon%%wrapContentBefore%%content%%wrapContentAfter%</%tagName%>';
39 if (\is_string($header)) {
41 $headerO->setClass(
"header");
42 $headerO->setContent($header);
53 $this->
wrapContent(
"<div class='content'>",
"</div>");
54 if (\is_string(
$icon)) {
55 $this->icon =
new HtmlIcon(
"icon-" . $this->identifier,
$icon);
74 public function getOnClose($url, $responseElement =
"", $parameters = array()) {
75 if (isset($this->close)) {
76 $this->close->getOnClick($url, $responseElement, $parameters);
80 public function addLoader($loaderIcon =
"notched circle") {
82 $this->icon->addToIcon(
"loading");
87 if ($dismiss ===
true)
88 $this->close =
new HtmlIcon(
"close-" . $this->identifier,
"close");
100 if (! isset($this->_bsComponent)) {
101 if (isset($this->close)) {
102 $js->
execOn(
"click",
"#" . $this->identifier .
" .close",
"$(this).closest('.message').transition({$this->_closeTransition}).trigger('close-message');");
104 if (isset($this->_timeout)) {
105 $js->
exec(
"setTimeout(function() { $('#{$this->identifier}').transition({$this->_closeTransition}).trigger('close-message'); }, {$this->_timeout});",
true);
108 return parent::run($js);
112 $visible = ($visible ===
true) ?
"visible" :
"hidden";
139 if (\is_array($this->content)) {
140 $this->content[\sizeof($this->content) - 1] = $message;
wrapContent($before, $after="")
addContent($content, $before=false)
exec($js, $immediatly=false)
Executes the code $js.
execOn($event, $element, $js, $parameters=array())
Executes the javascript code $js when $event fires on $element.
Base class for Semantic double elements.
addToPropertyCtrl($name, $value, $typeCtrl)
addToProperty($name, $value, $separator=" ")
Semantic Message component.
run(JsUtils $js)
{{SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()}HtmlDoubleElement:...
addHeader($header)
Adds an header to the message.
getOnClose($url, $responseElement="", $parameters=array())
Performs a get to $url on the click event on close button and display it in $responseElement.
addLoader($loaderIcon="notched circle")
__construct($identifier, $content="")
setDismissable($dismiss=true)
setVariation($value="floating")