File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11import $ from 'jquery' ;
2+ import { initAreYouSure } from '../vendor/jquery.are-you-sure.js' ;
23import { handleGlobalEnterQuickSubmit } from './comp/QuickSubmit.js' ;
34
45export function initGlobalFormDirtyLeaveConfirm ( ) {
6+ initAreYouSure ( $ ) ;
57 // Warn users that try to leave a page after entering data into a form.
68 // Except on sign-in pages, and for forms marked as 'ignore-dirty'.
79 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.
34
45/*!
56 * jQuery Plugin: Are-You-Sure (Dirty Form Detection)
1314 * Version: 1.9.0
1415 * Date: 13th August 2014
1516 */
16- ( function ( $ ) {
17+ export function initAreYouSure ( $ ) {
1718
1819 $ . fn . areYouSure = function ( options ) {
1920
192193 initForm ( $form ) ;
193194 } ) ;
194195 } ;
195- } ) ( jQuery ) ;
196+ }
You can’t perform that action at this time.
0 commit comments