@@ -286,15 +286,15 @@ asyncTest('ctrl-clicking on a link does not disables the link', 6, function() {
286
286
asyncTest ( 'button[data-remote][data-disable-with] disables and re-enables' , 6 , function ( ) {
287
287
var button = $ ( 'button[data-remote][data-disable-with]' ) ;
288
288
289
- checkEnabledState ( button , 'Click me' ) ;
289
+ App . checkEnabledState ( button , 'Click me' ) ;
290
290
291
291
button
292
292
. bind ( 'ajax:send' , function ( ) {
293
- checkDisabledState ( button , 'clicking...' ) ;
293
+ App . checkDisabledState ( button , 'clicking...' ) ;
294
294
} )
295
295
. bind ( 'ajax:complete' , function ( ) {
296
296
setTimeout ( function ( ) {
297
- checkEnabledState ( button , 'Click me' ) ;
297
+ App . checkEnabledState ( button , 'Click me' ) ;
298
298
start ( ) ;
299
299
} , 15 ) ;
300
300
} )
@@ -304,52 +304,52 @@ asyncTest('button[data-remote][data-disable-with] disables and re-enables', 6, f
304
304
asyncTest ( 'button[data-remote][data-disable-with] re-enables when `ajax:before` event is cancelled' , 6 , function ( ) {
305
305
var button = $ ( 'button[data-remote][data-disable-with]' ) ;
306
306
307
- checkEnabledState ( button , 'Click me' ) ;
307
+ App . checkEnabledState ( button , 'Click me' ) ;
308
308
309
309
button
310
310
. bind ( 'ajax:before' , function ( ) {
311
- checkDisabledState ( button , 'clicking...' ) ;
311
+ App . checkDisabledState ( button , 'clicking...' ) ;
312
312
return false ;
313
313
} )
314
314
. trigger ( 'click' ) ;
315
315
316
316
setTimeout ( function ( ) {
317
- checkEnabledState ( button , 'Click me' ) ;
317
+ App . checkEnabledState ( button , 'Click me' ) ;
318
318
start ( ) ;
319
319
} , 30 ) ;
320
320
} ) ;
321
321
322
322
asyncTest ( 'button[data-remote][data-disable-with] re-enables when `ajax:beforeSend` event is cancelled' , 6 , function ( ) {
323
323
var button = $ ( 'button[data-remote][data-disable-with]' ) ;
324
324
325
- checkEnabledState ( button , 'Click me' ) ;
325
+ App . checkEnabledState ( button , 'Click me' ) ;
326
326
327
327
button
328
328
. bind ( 'ajax:beforeSend' , function ( ) {
329
- checkDisabledState ( button , 'clicking...' ) ;
329
+ App . checkDisabledState ( button , 'clicking...' ) ;
330
330
return false ;
331
331
} )
332
332
. trigger ( 'click' ) ;
333
333
334
334
setTimeout ( function ( ) {
335
- checkEnabledState ( button , 'Click me' ) ;
335
+ App . checkEnabledState ( button , 'Click me' ) ;
336
336
start ( ) ;
337
337
} , 30 ) ;
338
338
} ) ;
339
339
340
340
asyncTest ( 'button[data-remote][data-disable-with] re-enables when `ajax:error` event is triggered' , 6 , function ( ) {
341
341
var button = $ ( 'a[data-disable-with]' ) . attr ( 'data-remote' , true ) . attr ( 'href' , '/error' ) ;
342
342
343
- checkEnabledState ( button , 'Click me' ) ;
343
+ App . checkEnabledState ( button , 'Click me' ) ;
344
344
345
345
button
346
346
. bind ( 'ajax:send' , function ( ) {
347
- checkDisabledState ( button , 'clicking...' ) ;
347
+ App . checkDisabledState ( button , 'clicking...' ) ;
348
348
} )
349
349
. trigger ( 'click' ) ;
350
350
351
351
setTimeout ( function ( ) {
352
- checkEnabledState ( button , 'Click me' ) ;
352
+ App . checkEnabledState ( button , 'Click me' ) ;
353
353
start ( ) ;
354
354
} , 30 ) ;
355
355
} ) ;
0 commit comments