@@ -65,7 +65,7 @@ |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | protected function compileEvents() { |
| 68 | - foreach ( $this->events as $event => $jsCode ) { |
|
| 68 | + foreach ($this->events as $event => $jsCode) { |
|
| 69 | 69 | $this->jquery_code_for_compile []="$( \"".$this->collapsed."\" ).on(\"".$event."\" , function (e) {".$jsCode."});"; |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | if ($value) { |
| 58 | 58 | $this->jsCodes ["draggable"]=new Draggable(); |
| 59 | 59 | $this->setBackdrop(false); |
| 60 | - } else if (array_key_exists("draggable", $this->jsCodes)) { |
|
| 60 | + }else if (array_key_exists("draggable", $this->jsCodes)) { |
|
| 61 | 61 | unset($this->jsCodes ["draggable"]); |
| 62 | 62 | unset($this->params ["backdrop"]); |
| 63 | 63 | } |
@@ -9,10 +9,10 @@ |
||
| 9 | 9 | * @see \Ajax\common\SimpleComponent::compileEvents() |
| 10 | 10 | */ |
| 11 | 11 | protected function compileEvents() { |
| 12 | - foreach ( $this->events as $event => $jsCode ) { |
|
| 12 | + foreach ($this->events as $event => $jsCode) { |
|
| 13 | 13 | if ($event==="buttonClick") { |
| 14 | 14 | $this->jquery_code_for_compile []="$( \"#split-".preg_replace('/[^a-zA-Z0-9\-.]/s', '', $this->attachTo)."\" ).on(\"click\" , function( event, data ) {".$jsCode."});"; |
| 15 | - } else { |
|
| 15 | + }else { |
|
| 16 | 16 | $this->jquery_code_for_compile []="$( \"".$this->attachTo."\" ).on(\"".$event."\" , function( event, data ) {".$jsCode."});"; |
| 17 | 17 | } |
| 18 | 18 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | public function __construct(JsUtils $js) { |
| 20 | 20 | parent::__construct($js); |
| 21 | - $this->tabs=array (); |
|
| 21 | + $this->tabs=array(); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function getTabs() { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public function getTab($index) { |
| 38 | - if ($index>0&&$index<sizeof($this->tabs)) |
|
| 38 | + if ($index>0 && $index<sizeof($this->tabs)) |
|
| 39 | 39 | return $this->tabs [$index]; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -44,13 +44,13 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function addCloseButton() { |
| 46 | 46 | $button=new HtmlButton("close-".$this->identifier); |
| 47 | - $button->setProperties(array ( |
|
| 47 | + $button->setProperties(array( |
|
| 48 | 48 | "class" => "close", |
| 49 | 49 | "data-dismiss" => "alert", |
| 50 | 50 | "aria-label" => "close" |
| 51 | 51 | )); |
| 52 | 52 | $button->setValue('<span aria-hidden="true">×</span>'); |
| 53 | - $this->addToPropertyCtrl("class", "alert-dismissible", array ( |
|
| 53 | + $this->addToPropertyCtrl("class", "alert-dismissible", array( |
|
| 54 | 54 | "alert-dismissible" |
| 55 | 55 | )); |
| 56 | 56 | $this->button=$button; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * @see \Ajax\bootstrap\html\base\BaseHtml::compile() |
| 80 | 80 | */ |
| 81 | 81 | public function compile(JsUtils $js=NULL, View $view=NULL) { |
| 82 | - if ($this->closeable&&$this->button==="") { |
|
| 82 | + if ($this->closeable && $this->button==="") { |
|
| 83 | 83 | $this->addCloseButton(); |
| 84 | 84 | } |
| 85 | 85 | return parent::compile($js, $view); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * @return \Ajax\bootstrap\html\HtmlButton |
| 72 | 72 | */ |
| 73 | 73 | public function setActive() { |
| 74 | - return $this->addToPropertyCtrl("class", "active", array ( |
|
| 74 | + return $this->addToPropertyCtrl("class", "active", array( |
|
| 75 | 75 | "active" |
| 76 | 76 | )); |
| 77 | 77 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | * @return \Ajax\bootstrap\html\HtmlButton |
| 82 | 82 | */ |
| 83 | 83 | public function setDisabled() { |
| 84 | - return $this->addToPropertyCtrl("class", "disabled", array ( |
|
| 84 | + return $this->addToPropertyCtrl("class", "disabled", array( |
|
| 85 | 85 | "disabled" |
| 86 | 86 | )); |
| 87 | 87 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function fromArray($array) { |
| 111 | 111 | $array=parent::fromArray($array); |
| 112 | - foreach ( $array as $key => $value ) { |
|
| 112 | + foreach ($array as $key => $value) { |
|
| 113 | 113 | $this->setProperty($key, $value); |
| 114 | 114 | } |
| 115 | 115 | return $array; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @return HtmlButtongroups default : "" |
| 35 | 35 | */ |
| 36 | 36 | public function setSize($size) { |
| 37 | - foreach ( $this->elements as $element ) { |
|
| 37 | + foreach ($this->elements as $element) { |
|
| 38 | 38 | $element->setSize($size); |
| 39 | 39 | } |
| 40 | 40 | if (is_int($size)) { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | public function setStyle($value) { |
| 47 | - foreach ( $this->elements as $element ) |
|
| 47 | + foreach ($this->elements as $element) |
|
| 48 | 48 | $element->setStyle($value); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | public function addElement($element) { |
| 65 | 65 | $result=$element; |
| 66 | 66 | $iid=sizeof($this->elements)+1; |
| 67 | - if (($element instanceof HtmlDropdown)||($element instanceof HtmlSplitbutton)) { |
|
| 67 | + if (($element instanceof HtmlDropdown) || ($element instanceof HtmlSplitbutton)) { |
|
| 68 | 68 | $this->addExistingDropDown($element); |
| 69 | 69 | $this->elements[]=$element; |
| 70 | 70 | } elseif ($element instanceof HtmlButton) { |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | else |
| 79 | 79 | $bt=new HtmlDropdown($this->identifier."-dropdown-".$iid); |
| 80 | 80 | $this->dropdownAsButton($bt); |
| 81 | - } else |
|
| 81 | + }else |
|
| 82 | 82 | $bt=new HtmlButton($this->identifier."-button-".$iid); |
| 83 | 83 | $bt->fromArray($element); |
| 84 | 84 | $this->elements[]=$bt; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | public function addElements($elements) { |
| 96 | - foreach ( $elements as $element ) { |
|
| 96 | + foreach ($elements as $element) { |
|
| 97 | 97 | $this->addElement($element); |
| 98 | 98 | } |
| 99 | 99 | return $this; |
@@ -110,10 +110,10 @@ discard block |
||
| 110 | 110 | public function setAlignment($value) { |
| 111 | 111 | if (is_int($value)) { |
| 112 | 112 | $value=CssRef::alignment("btn-group")[$value]; |
| 113 | - } else |
|
| 113 | + }else |
|
| 114 | 114 | $value="btn-group-".$value; |
| 115 | 115 | if (strstr($value, "justified")) { |
| 116 | - foreach ( $this->elements as $element ) { |
|
| 116 | + foreach ($this->elements as $element) { |
|
| 117 | 117 | $element->wrap('<div class="btn-group" role="group">', '</div>'); |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | * @see \Ajax\bootstrap\html\base\BaseHtml::on() |
| 145 | 145 | */ |
| 146 | 146 | public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) { |
| 147 | - foreach ( $this->elements as $element ) { |
|
| 147 | + foreach ($this->elements as $element) { |
|
| 148 | 148 | $element->on($event, $jsCode, $stopPropagation, $preventDefault); |
| 149 | 149 | } |
| 150 | 150 | return $this; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function addElement($element) { |
| 24 | 24 | if ($element instanceof HtmlButtongroups) { |
| 25 | 25 | $this->elements []=$element; |
| 26 | - } else { |
|
| 26 | + }else { |
|
| 27 | 27 | $this->getLastButtonGroup()->addElement($element); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -78,15 +78,15 @@ discard block |
||
| 78 | 78 | $element=null; |
| 79 | 79 | $i=0; |
| 80 | 80 | if (is_int($index)) { |
| 81 | - $elements=array (); |
|
| 82 | - foreach ( $this->elements as $group ) { |
|
| 81 | + $elements=array(); |
|
| 82 | + foreach ($this->elements as $group) { |
|
| 83 | 83 | $elements=array_merge($elements, $group->getElements()); |
| 84 | 84 | } |
| 85 | 85 | if ($index<sizeof($elements)) { |
| 86 | 86 | $element=$elements [$index]; |
| 87 | 87 | } |
| 88 | - } else { |
|
| 89 | - while ( $element==null&&$i<sizeof($this->elements) ) { |
|
| 88 | + }else { |
|
| 89 | + while ($element==null && $i<sizeof($this->elements)) { |
|
| 90 | 90 | $element=$this->elements [$i]->getElement($index); |
| 91 | 91 | $i++; |
| 92 | 92 | } |
@@ -16,12 +16,12 @@ discard block |
||
| 16 | 16 | * @version 1.001 |
| 17 | 17 | */ |
| 18 | 18 | class HtmlCarousel extends BaseHtml { |
| 19 | - protected $indicators=array (); |
|
| 20 | - protected $slides=array (); |
|
| 19 | + protected $indicators=array(); |
|
| 20 | + protected $slides=array(); |
|
| 21 | 21 | protected $leftControl=""; |
| 22 | 22 | protected $rightControl=""; |
| 23 | 23 | protected $_base=""; |
| 24 | - protected $_glyphs=array (); |
|
| 24 | + protected $_glyphs=array(); |
|
| 25 | 25 | |
| 26 | 26 | public function __construct($identifier, $images=NULL) { |
| 27 | 27 | parent::__construct($identifier); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function setBase($_base) { |
| 41 | - foreach ($this->slides as $slide){ |
|
| 41 | + foreach ($this->slides as $slide) { |
|
| 42 | 42 | $imgSrc=$slide->getImageSrc(); |
| 43 | 43 | $slide->setImageSrc(str_replace($this->_base.$imgSrc, $_base.$imgSrc, $imgSrc)); |
| 44 | 44 | } |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | public function addImage($imageSrc, $imageAlt="", $caption=NULL, $description=NULL) { |
| 96 | - if(is_array($imageSrc)){ |
|
| 97 | - $this->addImage($imageSrc[0],@$imageSrc[1],@$imageSrc[2],@$imageSrc[3]); |
|
| 98 | - }else{ |
|
| 96 | + if (is_array($imageSrc)) { |
|
| 97 | + $this->addImage($imageSrc[0], @$imageSrc[1], @$imageSrc[2], @$imageSrc[3]); |
|
| 98 | + }else { |
|
| 99 | 99 | $image=new HtmlCarouselItem("item-".$this->identifier); |
| 100 | 100 | $image->setImageSrc($this->_base.$imageSrc); |
| 101 | 101 | $image->setImageAlt($imageAlt); |
@@ -118,10 +118,10 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | public function fromArray($array) { |
| 120 | 120 | if (is_array($array) && sizeof($array)>0) { |
| 121 | - foreach ( $array as $value ) { |
|
| 121 | + foreach ($array as $value) { |
|
| 122 | 122 | if (is_array($value)) { |
| 123 | 123 | $this->addImage($value ["src"], @$value ["alt"], @$value ["caption"], @$value ["description"]); |
| 124 | - } else { |
|
| 124 | + }else { |
|
| 125 | 125 | $this->addImage($value); |
| 126 | 126 | } |
| 127 | 127 | } |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Ajax\semantic\html\base\HtmlSemDoubleElement; |
| 6 | 6 | use Ajax\JsUtils; |
| 7 | 7 | use Ajax\service\JArray; |
| 8 | - |
|
| 9 | 8 | use Ajax\semantic\html\base\constants\State; |
| 10 | 9 | |
| 11 | 10 | class HtmlProgress extends HtmlSemDoubleElement { |