From e143fa5e33eb7ec36632831b003bc0a0fdaeeed9 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 15 Mar 2021 09:28:44 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B03657=20-=20Replace=20calls=20to=20deprec?= =?UTF-8?q?ate=20jQuery=20methods=20(".submit(callback)"=20to=20".on('subm?= =?UTF-8?q?it',=20callback)")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-config/config.php | 2 +- js/linkswidget.js | 2 +- js/searchformforeignkeys.js | 2 +- js/simple_graph.js | 2 +- setup/wizardcontroller.class.inc.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/datamodels/2.x/itop-config/config.php b/datamodels/2.x/itop-config/config.php index 47d91dd44..4b903cff5 100644 --- a/datamodels/2.x/itop-config/config.php +++ b/datamodels/2.x/itop-config/config.php @@ -292,7 +292,7 @@ editor.commands.addCommand({ var editorForm = EditorUtils.getEditorForm(editor); -editorForm.submit(function() { +editorForm.on('submit', function() { EditorUtils.saveEditorDisplay(editor); }); diff --git a/js/linkswidget.js b/js/linkswidget.js index 97bc7b466..a1f863565 100644 --- a/js/linkswidget.js +++ b/js/linkswidget.js @@ -38,7 +38,7 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH oInput.bind('update_value', function () { $(this).val(me.GetUpdatedValue()); }); - oInput.closest('form').submit(function () { + oInput.closest('form').on('submit', function () { return me.OnFormSubmit(); }); }; diff --git a/js/searchformforeignkeys.js b/js/searchformforeignkeys.js index df6130d89..dd997bd0f 100644 --- a/js/searchformforeignkeys.js +++ b/js/searchformforeignkeys.js @@ -60,7 +60,7 @@ function SearchFormForeignKeys(id, sTargetClass, sAttCode, oSearchWidgetElmt, sF $('#dlg_'+me.id).remove(); }); - $('#'+this.iInputId).closest('form').submit(function() { + $('#'+this.iInputId).closest('form').on('submit', function() { return me.OnFormSubmit(); }); }; diff --git a/js/simple_graph.js b/js/simple_graph.js index 8282fa13d..241727ee8 100644 --- a/js/simple_graph.js +++ b/js/simple_graph.js @@ -654,7 +654,7 @@ $(function() var me = this; if (sOperation == 'attachment') { - $('#GraphExportDlg'+this.element.attr('id')+' form').submit(function() { return me._on_export_as_attachment(); }); + $('#GraphExportDlg'+this.element.attr('id')+' form').on('submit', function() { return me._on_export_as_attachment(); }); } $('#GraphExportDlg'+this.element.attr('id')).dialog({ width: 'auto', diff --git a/setup/wizardcontroller.class.inc.php b/setup/wizardcontroller.class.inc.php index 18a026ba3..696bb028e 100644 --- a/setup/wizardcontroller.class.inc.php +++ b/setup/wizardcontroller.class.inc.php @@ -231,7 +231,7 @@ $('form').each(function () { }); $('#btn_back').click(function() { $('#wiz_form').data('back', true); }); -$('#wiz_form').submit(function() { +$('#wiz_form').on('submit', function() { if ($(this).data('back')) { return CanMoveBackward();