summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormanchandavishal <manchandavishal143@gmail.com>2023-04-11 22:31:02 +0530
committermanchandavishal <manchandavishal143@gmail.com>2023-04-26 19:43:42 +0530
commit6918015508c71da9a45ffec4ed41147fbe1dfa1f (patch)
treee398aff293d3d56df476874b316731dee22a7339
parent7d44796eca10fa61d4d98ab98358c5932746734e (diff)
downloadhorizon-6918015508c71da9a45ffec4ed41147fbe1dfa1f.tar.gz
Fix deprecated use of 'jQuery.fn.change()' shorthand event
This patch changed the code to use the recommended 'on()' method instead of the deprecated shorthand event. For more information about this deprecation, please refer [1]. [1] https://api.jquery.com/change-shorthand/ Change-Id: Ia580ddf2ea5b0fba7feb400db759f59c0f5d958f
-rw-r--r--horizon/static/horizon/js/horizon.users.js4
-rw-r--r--openstack_dashboard/static/js/horizon.instances.js4
-rw-r--r--openstack_dashboard/static/js/horizon.metering.js2
-rw-r--r--openstack_dashboard/static/js/horizon.networktopology.js4
4 files changed, 7 insertions, 7 deletions
diff --git a/horizon/static/horizon/js/horizon.users.js b/horizon/static/horizon/js/horizon.users.js
index 4059d6256..7e8e8588c 100644
--- a/horizon/static/horizon/js/horizon.users.js
+++ b/horizon/static/horizon/js/horizon.users.js
@@ -15,13 +15,13 @@
horizon.user = {
init: function() {
- $("#id_password").change(function () {
+ $("#id_password").on('change', function () {
if ($("#id_confirm_password").val() !== "") {
horizon.user.check_passwords_match();
}
});
- $("#id_confirm_password").change(function () {
+ $("#id_confirm_password").on('change', function () {
horizon.user.check_passwords_match();
});
},
diff --git a/openstack_dashboard/static/js/horizon.instances.js b/openstack_dashboard/static/js/horizon.instances.js
index 82ee94962..88f7af42a 100644
--- a/openstack_dashboard/static/js/horizon.instances.js
+++ b/openstack_dashboard/static/js/horizon.instances.js
@@ -78,9 +78,9 @@ horizon.addInitFunction(horizon.instances.init = function () {
update_launch_source_displayed_fields(this);
});
- $('.workflow #id_source_type').change();
+ $('.workflow #id_source_type').on('change', function() {});
horizon.modals.addModalInitFunction(function (modal) {
- $(modal).find("#id_source_type").change();
+ $(modal).find("#id_source_type").on('change', function() {});
});
/*
diff --git a/openstack_dashboard/static/js/horizon.metering.js b/openstack_dashboard/static/js/horizon.metering.js
index c33902190..e2adcf396 100644
--- a/openstack_dashboard/static/js/horizon.metering.js
+++ b/openstack_dashboard/static/js/horizon.metering.js
@@ -37,7 +37,7 @@ horizon.metering = {
}
},
add_change_event_to_period_dropdown: function() {
- $("#id_period").change(function(evt) {
+ $("#id_period").on('change', function(evt) {
if (horizon.metering.show_or_hide_date_fields()) {
evt.stopPropagation();
}
diff --git a/openstack_dashboard/static/js/horizon.networktopology.js b/openstack_dashboard/static/js/horizon.networktopology.js
index c94da2953..5d4f36e6e 100644
--- a/openstack_dashboard/static/js/horizon.networktopology.js
+++ b/openstack_dashboard/static/js/horizon.networktopology.js
@@ -131,12 +131,12 @@ horizon.network_topology = {
self.delete_balloon();
});
- angular.element('#toggle_labels').change(function() {
+ angular.element('#toggle_labels').on('change', function() {
horizon.cookies.put('show_labels', this.checked);
self.refresh_labels();
});
- angular.element('#toggle_networks').change(function() {
+ angular.element('#toggle_networks').on('change', function() {
horizon.cookies.put('are_networks_collapsed', this.checked);
self.refresh_networks();
self.refresh_labels();