14 parent::__construct(
$identifier,
"div",
"ui progress");
20 $this->_states=[ State::SUCCESS,State::WARNING,State::ERROR,State::ACTIVE,State::DISABLED ];
25 $this->content[
"label"]=
new HtmlSemDoubleElement(
"lbl-" . $this->identifier,
"div",
"label", $label);
31 $this->content[
"bar"]=$bar;
66 $this->content=JArray::sortAssociative($this->content, [
"bar",
"label" ]);
67 return parent::compile($js, $view);
71 return '$("#' . $this->identifier .
'").progress({value:' . $value .
'});';
75 return '$("#' . $this->identifier .
'").progress("increment");';
79 return '$("#' . $this->identifier .
'").progress("decrement");';
92 public function setTextValues($active=
false, $error=
false, $success=
false, $warning=
false, $percent=
"{percent}%", $ratio=
"{value} of {total}") {
93 if (\is_array($active)) {
95 $active=JArray::getDefaultValue($array,
"active",
false);
96 $success=JArray::getDefaultValue($array,
"success", $success);
97 $warning=JArray::getDefaultValue($array,
"warning", $warning);
98 $percent=JArray::getDefaultValue($array,
"percent", $percent);
99 $ratio=JArray::getDefaultValue($array,
"ratio", $ratio);
101 $this->_params[
"text"]=
"%{active : " . \var_export($active,
true) .
",error: " . \var_export($error,
true) .
",success : " . \var_export($success,
true) .
",warning : " . \var_export($warning,
true) .
",percent : " . \var_export($percent,
true) .
",ratio : " . \var_export($ratio,
true) .
"}%";
106 $this->
addBehavior($this->_params,
"onChange", $jsCode,
"%function(percent, value, total){",
"}%");
115 if (isset($this->_bsComponent) ===
false)
116 $this->_bsComponent=$js->
semantic()->progress(
"#" . $this->identifier, $this->_params);
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
addEventsOnRun(JsUtils $js=NULL)
Base class for Semantic double elements.
addBehavior(&$array, $key, $value, $before="", $after="")
addToProperty($name, $value, $separator=" ")
setProperty($name, $value)
static create($identifier, $value=NULL, $label=NULL, $attributes=array())
run(JsUtils $js)
{{SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()}HtmlDoubleElement:...
setTextValues($active=false, $error=false, $success=false, $warning=false, $percent="{percent}%", $ratio="{value} of {total}")
compile(JsUtils $js=NULL, &$view=NULL)
{}BaseHtml::compile()
__construct($identifier, $value=NULL, $label=NULL, $attributes=array())