diff --git a/horizon/static/horizon/js/horizon.messages.js b/horizon/static/horizon/js/horizon.messages.js index 94d654efe2..049a94273d 100644 --- a/horizon/static/horizon/js/horizon.messages.js +++ b/horizon/static/horizon/js/horizon.messages.js @@ -100,7 +100,7 @@ horizon.addInitFunction(function () { }); // Dismiss alert messages when moving on to a new type of action. - $('a.ajax-modal').click(function() { + $('a.ajax-modal').on('click', function() { horizon.clearAllMessages(); }); diff --git a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js index f7abf562af..fc67dcc7c1 100644 --- a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js +++ b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js @@ -43,7 +43,7 @@ function link(scope, element) { //TODO(tqtran) Use angular, not jQuery - $('a[href="#"]').click(function(e) { + $('a[href="#"]').on('click', function(e) { e.preventDefault(); }); @@ -51,7 +51,7 @@ var $pre = $uibModal.find('pre'); var $button = $('
') - .click(function(){ + .on('click', function(){ var $parent = $(this).parent(); var $fragment = stripAngular($parent.clone()); diff --git a/openstack_dashboard/static/js/horizon.flatnetworktopology.js b/openstack_dashboard/static/js/horizon.flatnetworktopology.js index 33d355b93c..9bb271d1df 100644 --- a/openstack_dashboard/static/js/horizon.flatnetworktopology.js +++ b/openstack_dashboard/static/js/horizon.flatnetworktopology.js @@ -105,12 +105,12 @@ horizon.flat_network_topology = { e.stopImmediatePropagation(); var vnc_window = window.open($(this).attr('href'), vnc_window, 'width=760,height=560'); self.delete_balloon(); - }) - .click(function(){ + }); + $(document).on('click', function(){ self.delete_balloon(); }); - $('.toggle-view > .btn').click(function(){ + $('.toggle-view > .btn').on('click', function(){ self.draw_mode = $(this).data('value'); $('g.network').remove(); horizon.cookies.put('ntp_draw_mode',self.draw_mode); @@ -621,20 +621,20 @@ horizon.flat_network_topology = { 'left': x + 'px' }).show(); - $balloon.find('.delete-device').click(function(){ + $balloon.find('.delete-device').on('click', function(){ var $this = $(this); var delete_modal = horizon.datatables.confirm($this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { $this.prop('disabled', true); d3.select('#id_' + $this.data('device-id')).classed('loading',true); self.delete_device($this.data('type'),$this.data('device-id')); horizon.modals.spinner.modal('hide'); }); }); - $balloon.find('.delete-port').click(function(){ + $balloon.find('.delete-port').on('click', function(){ var $this = $(this); var delete_modal = horizon.datatables.confirm($this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { $this.prop('disabled', true); self.delete_port($this.data('router-id'),$this.data('port-id'),$this.data('network-id')); horizon.modals.spinner.modal('hide'); diff --git a/openstack_dashboard/static/js/horizon.networktopology.js b/openstack_dashboard/static/js/horizon.networktopology.js index c94da29538..02cba863d9 100644 --- a/openstack_dashboard/static/js/horizon.networktopology.js +++ b/openstack_dashboard/static/js/horizon.networktopology.js @@ -142,7 +142,7 @@ horizon.network_topology = { self.refresh_labels(); }); - angular.element('#center_topology').click(function() { + angular.element('#center_topology').on('click', function() { this.blur(); // remove btn focus after click self.delete_balloon(); // move visualization to the center and reset scale @@ -1101,19 +1101,19 @@ horizon.network_topology = { }) .addClass('leftPosition'); } - _balloon.find('.delete-device').click(function() { + _balloon.find('.delete-device').on('click', function() { var _this = angular.element(this); var delete_modal = horizon.datatables.confirm(_this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { _this.prop('disabled', true); d3.select('#id_' + _this.data('device-id')).classed('loading',true); self.delete_device(_this.data('type'),_this.data('device-id')); }); }); - _balloon.find('.delete-port').click(function() { + _balloon.find('.delete-port').on('click', function() { var _this = angular.element(this); var delete_modal = horizon.datatables.confirm(_this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { _this.prop('disabled', true); self.delete_port(_this.data('router-id'),_this.data('port-id'),_this.data('network-id')); });