@@ -20,6 +20,9 @@ |
||
| 20 | 20 | protected $_tabsType="tabs"; |
| 21 | 21 | protected $stacked=""; |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $identifier |
|
| 25 | + */ |
|
| 23 | 26 | public function __construct($identifier, $tagName="ul") { |
| 24 | 27 | parent::__construct($identifier, $tagName); |
| 25 | 28 | $this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%"; |
@@ -676,6 +676,9 @@ discard block |
||
| 676 | 676 | return $this->_create_json($json_result, $match_array_type); |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | + /** |
|
| 680 | + * @param boolean $match_array_type |
|
| 681 | + */ |
|
| 679 | 682 | private function _create_json($json_result, $match_array_type) { |
| 680 | 683 | $json=array (); |
| 681 | 684 | $_is_assoc=TRUE; |
@@ -699,7 +702,7 @@ discard block |
||
| 699 | 702 | * Checks for an associative array |
| 700 | 703 | * |
| 701 | 704 | * @param type |
| 702 | - * @return type |
|
| 705 | + * @return boolean |
|
| 703 | 706 | */ |
| 704 | 707 | public function _is_associative_array($arr) { |
| 705 | 708 | foreach ( array_keys($arr) as $key => $val ) { |
@@ -939,7 +942,7 @@ discard block |
||
| 939 | 942 | * @param string $jqueryCall the JQuery callback |
| 940 | 943 | * @param mixed $param array or string parameters |
| 941 | 944 | * @param string $jsCallback javascript code to execute after the jquery call |
| 942 | - * @return mixed |
|
| 945 | + * @return string |
|
| 943 | 946 | */ |
| 944 | 947 | public function doJQuery($element, $jqueryCall, $param="", $jsCallback="") { |
| 945 | 948 | return $this->js->_doJQuery($element, $jqueryCall, $param, $jsCallback, true); |
@@ -951,7 +954,7 @@ discard block |
||
| 951 | 954 | * @param string $jqueryCall the JQuery callback |
| 952 | 955 | * @param mixed $param array or string parameters |
| 953 | 956 | * @param string $jsCallback javascript code to execute after the jquery call |
| 954 | - * @return mixed |
|
| 957 | + * @return string |
|
| 955 | 958 | */ |
| 956 | 959 | public function doJQueryDeferred($element, $jqueryCall, $param="", $jsCallback="") { |
| 957 | 960 | return $this->js->_doJQuery($element, $jqueryCall, $param, $jsCallback, false); |
@@ -20,6 +20,10 @@ discard block |
||
| 20 | 20 | protected $attr; |
| 21 | 21 | |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $identifier |
|
| 25 | + * @param string $tagName |
|
| 26 | + */ |
|
| 23 | 27 | public function __construct($identifier,$tagName){ |
| 24 | 28 | parent::__construct($identifier,$tagName); |
| 25 | 29 | $this->root=""; |
@@ -30,7 +34,6 @@ discard block |
||
| 30 | 34 | * Associate an ajax get to the elements, displayed in $targetSelector |
| 31 | 35 | * $attr member is used to build each element url |
| 32 | 36 | * @param string $targetSelector the target of the get |
| 33 | - * @param string $attr the html attribute used to build the elements url |
|
| 34 | 37 | * @return HtmlNavElement |
| 35 | 38 | */ |
| 36 | 39 | public function autoGetOnClick($targetSelector){ |
@@ -14,6 +14,11 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | class HtmlGridRow extends HtmlDoubleElement { |
| 16 | 16 | private $cols; |
| 17 | + |
|
| 18 | + /** |
|
| 19 | + * @param string $identifier |
|
| 20 | + * @param integer $numCols |
|
| 21 | + */ |
|
| 17 | 22 | public function __construct($identifier,$numCols=NULL){ |
| 18 | 23 | parent::__construct($identifier,"div"); |
| 19 | 24 | $this->setProperty("class", "row"); |
@@ -85,6 +90,11 @@ discard block |
||
| 85 | 90 | $this->delete($size,$start+1, $width); |
| 86 | 91 | } |
| 87 | 92 | } |
| 93 | + |
|
| 94 | + /** |
|
| 95 | + * @param integer $start |
|
| 96 | + * @param integer $width |
|
| 97 | + */ |
|
| 88 | 98 | public function delete($size=CssSize::SIZE_MD,$start,$width){ |
| 89 | 99 | while($start<sizeof($this->cols)+1 && $width>0){ |
| 90 | 100 | $col=$this->getColAt($start,false); |
@@ -16,6 +16,10 @@ |
||
| 16 | 16 | class HtmlGridSystem extends HtmlDoubleElement { |
| 17 | 17 | private $rows; |
| 18 | 18 | |
| 19 | + /** |
|
| 20 | + * @param string $identifier |
|
| 21 | + * @param integer $numCols |
|
| 22 | + */ |
|
| 19 | 23 | public function __construct($identifier,$numRows=1,$numCols=NULL){ |
| 20 | 24 | parent::__construct($identifier,"div"); |
| 21 | 25 | $this->setProperty("class", "container-fluid"); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * Outputs a jQuery click event |
| 160 | 160 | * |
| 161 | 161 | * @param string $element The element to attach the event to |
| 162 | - * @param mixed $js The code to execute |
|
| 162 | + * @param string $js The code to execute |
|
| 163 | 163 | * @param boolean $ret_false whether or not to return false |
| 164 | 164 | * @return string |
| 165 | 165 | */ |
@@ -235,6 +235,8 @@ discard block |
||
| 235 | 235 | * @param string - element |
| 236 | 236 | * @param string - Javascript code for mouse over |
| 237 | 237 | * @param string - Javascript code for mouse out |
| 238 | + * @param string $over |
|
| 239 | + * @param string $out |
|
| 238 | 240 | * @return string |
| 239 | 241 | */ |
| 240 | 242 | public function _hover($element='this', $over, $out) { |
@@ -768,7 +770,7 @@ discard block |
||
| 768 | 770 | * |
| 769 | 771 | * @param string $element |
| 770 | 772 | * @param array $options |
| 771 | - * @return void |
|
| 773 | + * @return string |
|
| 772 | 774 | */ |
| 773 | 775 | public function sortable($element, $options=array()) { |
| 774 | 776 | if (count($options)>0) { |
@@ -904,6 +906,7 @@ discard block |
||
| 904 | 906 | /** |
| 905 | 907 | * A wrapper for writing document.ready() |
| 906 | 908 | * |
| 909 | + * @param string $js |
|
| 907 | 910 | * @return string |
| 908 | 911 | */ |
| 909 | 912 | public function _document_ready($js) { |
@@ -958,7 +961,7 @@ discard block |
||
| 958 | 961 | /** |
| 959 | 962 | * Ensures the speed parameter is valid for jQuery |
| 960 | 963 | * |
| 961 | - * @param string|int $speed |
|
| 964 | + * @param string $speed |
|
| 962 | 965 | * @return string |
| 963 | 966 | */ |
| 964 | 967 | private function _validate_speed($speed) { |
@@ -973,6 +976,10 @@ discard block |
||
| 973 | 976 | return $speed; |
| 974 | 977 | } |
| 975 | 978 | // ------------------------------------------------------------------------ |
| 979 | + |
|
| 980 | + /** |
|
| 981 | + * @param string $retour |
|
| 982 | + */ |
|
| 976 | 983 | protected function addLoading(&$retour, $responseElement) { |
| 977 | 984 | $loading_notifier='<div class="ajax-loader">'; |
| 978 | 985 | if ($this->ajaxLoader=='') { |
@@ -985,13 +992,25 @@ discard block |
||
| 985 | 992 | $retour.="\t\t$({$responseElement}).prepend('{$loading_notifier}');\n"; |
| 986 | 993 | } |
| 987 | 994 | |
| 995 | + /** |
|
| 996 | + * @param string $url |
|
| 997 | + * @param string $jsCallback |
|
| 998 | + */ |
|
| 988 | 999 | public function _get($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
| 989 | 1000 | return $this->_ajax("get", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
| 990 | 1001 | } |
| 1002 | + |
|
| 1003 | + /** |
|
| 1004 | + * @param string $url |
|
| 1005 | + * @param string $jsCallback |
|
| 1006 | + */ |
|
| 991 | 1007 | public function _post($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
| 992 | 1008 | return $this->_ajax("post", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
| 993 | 1009 | } |
| 994 | 1010 | |
| 1011 | + /** |
|
| 1012 | + * @param string $method |
|
| 1013 | + */ |
|
| 995 | 1014 | protected function _ajax($method,$url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
| 996 | 1015 | if(JString::isNull($params)){$params="{}";} |
| 997 | 1016 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
@@ -1008,6 +1027,9 @@ discard block |
||
| 1008 | 1027 | return $retour; |
| 1009 | 1028 | } |
| 1010 | 1029 | |
| 1030 | + /** |
|
| 1031 | + * @param string $attr |
|
| 1032 | + */ |
|
| 1011 | 1033 | protected function _getAjaxUrl($url,$attr){ |
| 1012 | 1034 | $url=$this->_correctAjaxUrl($url); |
| 1013 | 1035 | $retour="url='".$url."';\n"; |
@@ -1139,6 +1161,12 @@ discard block |
||
| 1139 | 1161 | return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $attr, $context), $event, $preventDefault, $stopPropagation,$immediatly); |
| 1140 | 1162 | } |
| 1141 | 1163 | |
| 1164 | + /** |
|
| 1165 | + * @param string $url |
|
| 1166 | + * @param string $form |
|
| 1167 | + * @param string $responseElement |
|
| 1168 | + * @param string $jsCallback |
|
| 1169 | + */ |
|
| 1142 | 1170 | public function _postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
| 1143 | 1171 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
| 1144 | 1172 | $retour=$this->_getAjaxUrl($url, $attr); |
@@ -1252,7 +1280,7 @@ discard block |
||
| 1252 | 1280 | * @param string $element |
| 1253 | 1281 | * @param string $elementToModify |
| 1254 | 1282 | * @param string $jqueryCall |
| 1255 | - * @param string|array $param |
|
| 1283 | + * @param string $param |
|
| 1256 | 1284 | * @param boolean $preventDefault |
| 1257 | 1285 | * @param boolean $stopPropagation |
| 1258 | 1286 | * @param string $jsCallback javascript code to execute after the jquery call |
@@ -1290,6 +1318,9 @@ discard block |
||
| 1290 | 1318 | return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation,$immediatly); |
| 1291 | 1319 | } |
| 1292 | 1320 | |
| 1321 | + /** |
|
| 1322 | + * @param string $input |
|
| 1323 | + */ |
|
| 1293 | 1324 | private function minify($input) { |
| 1294 | 1325 | if(trim($input) === "") return $input; |
| 1295 | 1326 | return preg_replace( |