Refactor image diff (#31444)

And remove some jQuery functions
This commit is contained in:
wxiaoguang 2024-06-22 12:52:09 +08:00 committed by GitHub
parent b3ed1e0e62
commit 1a811c0bd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 208 additions and 184 deletions

View file

@ -1,7 +1,9 @@
import $ from 'jquery';
import {initAreYouSure} from '../vendor/jquery.are-you-sure.js';
import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.js';
export function initGlobalFormDirtyLeaveConfirm() {
initAreYouSure(window.jQuery);
// Warn users that try to leave a page after entering data into a form.
// Except on sign-in pages, and for forms marked as 'ignore-dirty'.
if (!$('.user.signin').length) {