| @@ 14-24 (lines=11) @@ | ||
| 11 | * @param string $value |
|
| 12 | * @param boolean $immediatly delayed if false |
|
| 13 | */ |
|
| 14 | public function _attr($element='this', $attributeName, $value="", $immediatly=false) { |
|
| 15 | $element=$this->_prep_element($element); |
|
| 16 | if (isset($value)) { |
|
| 17 | $value=$this->_prep_value($value); |
|
| 18 | $str="$({$element}).attr(\"$attributeName\",{$value});"; |
|
| 19 | } else |
|
| 20 | $str="$({$element}).attr(\"$attributeName\");"; |
|
| 21 | if ($immediatly) |
|
| 22 | $this->jquery_code_for_compile[]=$str; |
|
| 23 | return $str; |
|
| 24 | } |
|
| 25 | ||
| 26 | /** |
|
| 27 | * Insert content, specified by the parameter, after each element in the set of matched elements |
|
| @@ 90-103 (lines=14) @@ | ||
| 87 | * @param boolean $immediatly delayed if false |
|
| 88 | * @return string |
|
| 89 | */ |
|
| 90 | public function _fadeIn($element='this', $speed='', $callback='', $immediatly=false) { |
|
| 91 | $element=$this->_prep_element($element); |
|
| 92 | $speed=$this->_validate_speed($speed); |
|
| 93 | ||
| 94 | if ($callback!='') { |
|
| 95 | $callback=", function(){\n{$callback}\n}"; |
|
| 96 | } |
|
| 97 | ||
| 98 | $str="$({$element}).fadeIn({$speed}{$callback});"; |
|
| 99 | ||
| 100 | if ($immediatly) |
|
| 101 | $this->jquery_code_for_compile[]=$str; |
|
| 102 | return $str; |
|
| 103 | } |
|
| 104 | ||
| 105 | // -------------------------------------------------------------------- |
|
| 106 | ||
| @@ 116-129 (lines=14) @@ | ||
| 113 | * @param boolean $immediatly delayed if false |
|
| 114 | * @return string |
|
| 115 | */ |
|
| 116 | public function _fadeOut($element='this', $speed='', $callback='', $immediatly=false) { |
|
| 117 | $element=$this->_prep_element($element); |
|
| 118 | $speed=$this->_validate_speed($speed); |
|
| 119 | ||
| 120 | if ($callback!='') { |
|
| 121 | $callback=", function(){\n{$callback}\n}"; |
|
| 122 | } |
|
| 123 | ||
| 124 | $str="$({$element}).fadeOut({$speed}{$callback});"; |
|
| 125 | ||
| 126 | if ($immediatly) |
|
| 127 | $this->jquery_code_for_compile[]=$str; |
|
| 128 | return $str; |
|
| 129 | } |
|
| 130 | ||
| 131 | // -------------------------------------------------------------------- |
|
| 132 | ||
| @@ 142-155 (lines=14) @@ | ||
| 139 | * @param boolean $immediatly delayed if false |
|
| 140 | * @return string |
|
| 141 | */ |
|
| 142 | public function _hide($element='this', $speed='', $callback='', $immediatly=false) { |
|
| 143 | $element=$this->_prep_element($element); |
|
| 144 | $speed=$this->_validate_speed($speed); |
|
| 145 | ||
| 146 | if ($callback!='') { |
|
| 147 | $callback=", function(){\n{$callback}\n}"; |
|
| 148 | } |
|
| 149 | ||
| 150 | $str="$({$element}).hide({$speed}{$callback});"; |
|
| 151 | ||
| 152 | if ($immediatly) |
|
| 153 | $this->jquery_code_for_compile[]=$str; |
|
| 154 | return $str; |
|
| 155 | } |
|
| 156 | ||
| 157 | // -------------------------------------------------------------------- |
|
| 158 | ||
| @@ 170-183 (lines=14) @@ | ||
| 167 | * @param boolean $immediatly delayed if false |
|
| 168 | * @return string |
|
| 169 | */ |
|
| 170 | public function _slideUp($element='this', $speed='', $callback='', $immediatly=false) { |
|
| 171 | $element=$this->_prep_element($element); |
|
| 172 | $speed=$this->_validate_speed($speed); |
|
| 173 | ||
| 174 | if ($callback!='') { |
|
| 175 | $callback=", function(){\n{$callback}\n}"; |
|
| 176 | } |
|
| 177 | ||
| 178 | $str="$({$element}).slideUp({$speed}{$callback});"; |
|
| 179 | ||
| 180 | if ($immediatly) |
|
| 181 | $this->jquery_code_for_compile[]=$str; |
|
| 182 | return $str; |
|
| 183 | } |
|
| 184 | ||
| 185 | // -------------------------------------------------------------------- |
|
| 186 | ||
| @@ 196-209 (lines=14) @@ | ||
| 193 | * @param boolean $immediatly delayed if false |
|
| 194 | * @return string |
|
| 195 | */ |
|
| 196 | public function _slideDown($element='this', $speed='', $callback='', $immediatly=false) { |
|
| 197 | $element=$this->_prep_element($element); |
|
| 198 | $speed=$this->_validate_speed($speed); |
|
| 199 | ||
| 200 | if ($callback!='') { |
|
| 201 | $callback=", function(){\n{$callback}\n}"; |
|
| 202 | } |
|
| 203 | ||
| 204 | $str="$({$element}).slideDown({$speed}{$callback});"; |
|
| 205 | ||
| 206 | if ($immediatly) |
|
| 207 | $this->jquery_code_for_compile[]=$str; |
|
| 208 | return $str; |
|
| 209 | } |
|
| 210 | ||
| 211 | // -------------------------------------------------------------------- |
|
| 212 | ||
| @@ 222-235 (lines=14) @@ | ||
| 219 | * @param boolean $immediatly delayed if false |
|
| 220 | * @return string |
|
| 221 | */ |
|
| 222 | public function _slideToggle($element='this', $speed='', $callback='', $immediatly=false) { |
|
| 223 | $element=$this->_prep_element($element); |
|
| 224 | $speed=$this->_validate_speed($speed); |
|
| 225 | ||
| 226 | if ($callback!='') { |
|
| 227 | $callback=", function(){\n{$callback}\n}"; |
|
| 228 | } |
|
| 229 | ||
| 230 | $str="$({$element}).slideToggle({$speed}{$callback});"; |
|
| 231 | ||
| 232 | if ($immediatly) |
|
| 233 | $this->jquery_code_for_compile[]=$str; |
|
| 234 | return $str; |
|
| 235 | } |
|
| 236 | ||
| 237 | // -------------------------------------------------------------------- |
|
| 238 | ||
| @@ 283-296 (lines=14) @@ | ||
| 280 | * @param boolean $immediatly delayed if false |
|
| 281 | * @return string |
|
| 282 | */ |
|
| 283 | public function _show($element='this', $speed='', $callback='', $immediatly=false) { |
|
| 284 | $element=$this->_prep_element($element); |
|
| 285 | $speed=$this->_validate_speed($speed); |
|
| 286 | ||
| 287 | if ($callback!='') { |
|
| 288 | $callback=", function(){\n{$callback}\n}"; |
|
| 289 | } |
|
| 290 | ||
| 291 | $str="$({$element}).show({$speed}{$callback});"; |
|
| 292 | ||
| 293 | if ($immediatly) |
|
| 294 | $this->jquery_code_for_compile[]=$str; |
|
| 295 | return $str; |
|
| 296 | } |
|
| 297 | ||
| 298 | /** |
|
| 299 | * Places a condition |
|
| @@ 171-181 (lines=11) @@ | ||
| 168 | * @param string $param |
|
| 169 | * @param boolean $immediatly delayed if false |
|
| 170 | */ |
|
| 171 | public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) { |
|
| 172 | $element=$this->_prep_element($element); |
|
| 173 | if (isset($param)) { |
|
| 174 | $param=$this->_prep_value($param); |
|
| 175 | $str="$({$element}).{$jQueryCall}({$param});"; |
|
| 176 | } else |
|
| 177 | $str="$({$element}).{$jQueryCall}();"; |
|
| 178 | if ($immediatly) |
|
| 179 | $this->jquery_code_for_compile[]=$str; |
|
| 180 | return $str; |
|
| 181 | } |
|
| 182 | /** |
|
| 183 | * Execute a generic jQuery call with 2 elements. |
|
| 184 | * @param string $jQueryCall |
|