File tree 2 files changed +7
-4
lines changed 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
import $ from 'jquery' ;
2
+ import { initAreYouSure } from '../vendor/jquery.are-you-sure.js' ;
2
3
import { handleGlobalEnterQuickSubmit } from './comp/QuickSubmit.js' ;
3
4
4
5
export function initGlobalFormDirtyLeaveConfirm ( ) {
6
+ initAreYouSure ( $ ) ;
5
7
// Warn users that try to leave a page after entering data into a form.
6
8
// Except on sign-in pages, and for forms marked as 'ignore-dirty'.
7
9
if ( ! $ ( '.user.signin' ) . length ) {
Original file line number Diff line number Diff line change 1
- // Fork of the upstream module. The only changes are the addition of `const` on
2
- // lines 93 and 161 to make it strict mode compatible.
1
+ // Fork of the upstream module. The only changes are:
2
+ // * use export to make it work with ES6 modules.
3
+ // * the addition of `const` to make it strict mode compatible.
3
4
4
5
/*!
5
6
* jQuery Plugin: Are-You-Sure (Dirty Form Detection)
13
14
* Version: 1.9.0
14
15
* Date: 13th August 2014
15
16
*/
16
- ( function ( $ ) {
17
+ export function initAreYouSure ( $ ) {
17
18
18
19
$ . fn . areYouSure = function ( options ) {
19
20
192
193
initForm ( $form ) ;
193
194
} ) ;
194
195
} ;
195
- } ) ( jQuery ) ;
196
+ }
You can’t perform that action at this time.
0 commit comments