@@ -11,45 +11,45 @@ |
||
| 11 | 11 | use Ajax\semantic\traits\SemanticWidgetsTrait; |
| 12 | 12 | |
| 13 | 13 | class Semantic extends BaseGui { |
| 14 | - use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait, |
|
| 15 | - SemanticHtmlModulesTrait,SemanticHtmlViewsTrait,SemanticWidgetsTrait; |
|
| 16 | - |
|
| 17 | - private $language; |
|
| 18 | - |
|
| 19 | - private $inverted; |
|
| 20 | - |
|
| 21 | - public function __construct($autoCompile=true) { |
|
| 22 | - parent::__construct($autoCompile); |
|
| 23 | - } |
|
| 24 | - |
|
| 25 | - |
|
| 26 | - public function setLanguage($language){ |
|
| 27 | - if($language!==$this->language){ |
|
| 28 | - $file=\realpath(dirname(__FILE__)."/semantic/components/validation/languages/".$language.".js"); |
|
| 29 | - if(\file_exists($file)){ |
|
| 30 | - $script=\file_get_contents($file); |
|
| 31 | - $this->js->exec($script,true); |
|
| 32 | - $this->language=$language; |
|
| 33 | - } |
|
| 34 | - } |
|
| 35 | - } |
|
| 36 | - |
|
| 37 | - public function compileHtml(JsUtils $js = NULL, &$view = NULL) { |
|
| 38 | - if($this->inverted==null){ |
|
| 39 | - parent::compileHtml($js,$view); |
|
| 40 | - }else { |
|
| 41 | - foreach ($this->htmlComponents as $htmlComponent) { |
|
| 42 | - $htmlComponent->setInverted(true); |
|
| 43 | - $htmlComponent->compile($js, $view); |
|
| 44 | - } |
|
| 45 | - } |
|
| 46 | - } |
|
| 47 | - |
|
| 48 | - public function setInverted($inverted='inverted'){ |
|
| 49 | - $this->inverted=$inverted; |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - public function getInverted(){ |
|
| 53 | - return $this->inverted; |
|
| 54 | - } |
|
| 14 | + use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait, |
|
| 15 | + SemanticHtmlModulesTrait,SemanticHtmlViewsTrait,SemanticWidgetsTrait; |
|
| 16 | + |
|
| 17 | + private $language; |
|
| 18 | + |
|
| 19 | + private $inverted; |
|
| 20 | + |
|
| 21 | + public function __construct($autoCompile=true) { |
|
| 22 | + parent::__construct($autoCompile); |
|
| 23 | + } |
|
| 24 | + |
|
| 25 | + |
|
| 26 | + public function setLanguage($language){ |
|
| 27 | + if($language!==$this->language){ |
|
| 28 | + $file=\realpath(dirname(__FILE__)."/semantic/components/validation/languages/".$language.".js"); |
|
| 29 | + if(\file_exists($file)){ |
|
| 30 | + $script=\file_get_contents($file); |
|
| 31 | + $this->js->exec($script,true); |
|
| 32 | + $this->language=$language; |
|
| 33 | + } |
|
| 34 | + } |
|
| 35 | + } |
|
| 36 | + |
|
| 37 | + public function compileHtml(JsUtils $js = NULL, &$view = NULL) { |
|
| 38 | + if($this->inverted==null){ |
|
| 39 | + parent::compileHtml($js,$view); |
|
| 40 | + }else { |
|
| 41 | + foreach ($this->htmlComponents as $htmlComponent) { |
|
| 42 | + $htmlComponent->setInverted(true); |
|
| 43 | + $htmlComponent->compile($js, $view); |
|
| 44 | + } |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | + |
|
| 48 | + public function setInverted($inverted='inverted'){ |
|
| 49 | + $this->inverted=$inverted; |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + public function getInverted(){ |
|
| 53 | + return $this->inverted; |
|
| 54 | + } |
|
| 55 | 55 | } |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | use Ajax\semantic\traits\SemanticWidgetsTrait; |
| 12 | 12 | |
| 13 | 13 | class Semantic extends BaseGui { |
| 14 | - use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait, |
|
| 15 | - SemanticHtmlModulesTrait,SemanticHtmlViewsTrait,SemanticWidgetsTrait; |
|
| 14 | + use SemanticComponentsTrait, SemanticHtmlElementsTrait, SemanticHtmlCollectionsTrait, |
|
| 15 | + SemanticHtmlModulesTrait, SemanticHtmlViewsTrait, SemanticWidgetsTrait; |
|
| 16 | 16 | |
| 17 | 17 | private $language; |
| 18 | 18 | |
@@ -23,21 +23,21 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
| 26 | - public function setLanguage($language){ |
|
| 27 | - if($language!==$this->language){ |
|
| 26 | + public function setLanguage($language) { |
|
| 27 | + if ($language!==$this->language) { |
|
| 28 | 28 | $file=\realpath(dirname(__FILE__)."/semantic/components/validation/languages/".$language.".js"); |
| 29 | - if(\file_exists($file)){ |
|
| 29 | + if (\file_exists($file)) { |
|
| 30 | 30 | $script=\file_get_contents($file); |
| 31 | - $this->js->exec($script,true); |
|
| 31 | + $this->js->exec($script, true); |
|
| 32 | 32 | $this->language=$language; |
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - public function compileHtml(JsUtils $js = NULL, &$view = NULL) { |
|
| 38 | - if($this->inverted==null){ |
|
| 39 | - parent::compileHtml($js,$view); |
|
| 40 | - }else { |
|
| 37 | + public function compileHtml(JsUtils $js=NULL, &$view=NULL) { |
|
| 38 | + if ($this->inverted==null) { |
|
| 39 | + parent::compileHtml($js, $view); |
|
| 40 | + } else { |
|
| 41 | 41 | foreach ($this->htmlComponents as $htmlComponent) { |
| 42 | 42 | $htmlComponent->setInverted(true); |
| 43 | 43 | $htmlComponent->compile($js, $view); |
@@ -45,11 +45,11 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - public function setInverted($inverted='inverted'){ |
|
| 48 | + public function setInverted($inverted='inverted') { |
|
| 49 | 49 | $this->inverted=$inverted; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - public function getInverted(){ |
|
| 52 | + public function getInverted() { |
|
| 53 | 53 | return $this->inverted; |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | public function compileHtml(JsUtils $js = NULL, &$view = NULL) { |
| 38 | 38 | if($this->inverted==null){ |
| 39 | 39 | parent::compileHtml($js,$view); |
| 40 | - }else { |
|
| 40 | + } else { |
|
| 41 | 41 | foreach ($this->htmlComponents as $htmlComponent) { |
| 42 | 42 | $htmlComponent->setInverted(true); |
| 43 | 43 | $htmlComponent->compile($js, $view); |