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