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