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
This commit is contained in:
parent
7d44796eca
commit
6918015508
@ -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();
|
||||
});
|
||||
},
|
||||
|
@ -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() {});
|
||||
});
|
||||
|
||||
/*
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user