|
180 | 180 | /** |
181 | 181 | * Closes all error prompts on the page |
182 | 182 | */ |
183 | | - hidePrompt: function(fade) { |
| 183 | + hidePrompt: function() { |
184 | 184 | var promptClass = "."+ methods._getClassName($(this).attr("id")) + "formError"; |
185 | | - if(fade) { |
186 | | - $(promptClass).fadeTo("fast", 0.3, function() { |
187 | | - $(this).parent('.formErrorOuter').remove(); |
188 | | - $(this).remove(); |
189 | | - }); |
190 | | - } else { |
191 | | - $(promptClass).parent('.formErrorOuter').remove(); |
192 | | - $(promptClass).remove(); |
193 | | - } |
| 185 | + $(promptClass).fadeTo("fast", 0.3, function() { |
| 186 | + $(this).parent('.formErrorOuter').remove(); |
| 187 | + $(this).remove(); |
| 188 | + }); |
194 | 189 | return this; |
195 | 190 | }, |
196 | 191 | /** |
197 | 192 | * Closes form error prompts, CAN be invidual |
198 | 193 | */ |
199 | | - hide: function(fade) { |
| 194 | + hide: function() { |
200 | 195 | var closingtag; |
201 | 196 | if($(this).is("form")){ |
202 | 197 | closingtag = "parentForm"+methods._getClassName($(this).attr("id")); |
203 | 198 | }else{ |
204 | 199 | closingtag = methods._getClassName($(this).attr("id")) +"formError"; |
205 | 200 | } |
206 | | - if(fade) { |
207 | | - $('.'+closingtag).fadeTo("fast", 0.3, function() { |
208 | | - $(this).parent('.formErrorOuter').remove(); |
209 | | - $(this).remove(); |
210 | | - }); |
211 | | - } else { |
212 | | - $('.'+closingtag).parent('.formErrorOuter').remove(); |
213 | | - $('.'+closingtag).remove(); |
214 | | - } |
| 201 | + $('.'+closingtag).fadeTo("fast", 0.3, function() { |
| 202 | + $(this).parent('.formErrorOuter').remove(); |
| 203 | + $(this).remove(); |
| 204 | + }); |
215 | 205 | return this; |
216 | 206 | }, |
217 | 207 | /** |
218 | 208 | * Closes all error prompts on the page |
219 | 209 | */ |
220 | | - hideAll: function(fade) { |
221 | | - if(fade) { |
222 | | - $('.formError').fadeTo("fast", 0.3, function() { |
223 | | - $(this).parent('.formErrorOuter').remove(); |
224 | | - $(this).remove(); |
225 | | - }); |
226 | | - } else { |
227 | | - $('.formError').parent('.formErrorOuter').remove(); |
228 | | - $('.formError').remove(); |
229 | | - } |
| 210 | + hideAll: function() { |
| 211 | + $('.formError').fadeTo("fast", 0.3, function() { |
| 212 | + $(this).parent('.formErrorOuter').remove(); |
| 213 | + $(this).remove(); |
| 214 | + }); |
230 | 215 | return this; |
231 | 216 | }, |
232 | 217 | /** |
|
0 commit comments