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