Fix "jQuery.fn.click() event shorthand is deprecated" warning

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/click/

Change-Id: I4118a241a9e588ddac8cd1863979a7c83d6f98ff
This commit is contained in:
manchandavishal 2023-05-09 15:40:29 +05:30
parent 852d5dc792
commit 24047b5056
4 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@
var hzTableCtrl = ctrls[0];
var stTableCtrl = ctrls[1];
element.click(clickHandler);
element.on('click', clickHandler);
/*
* watch the table state for changes

View File

@ -55,7 +55,7 @@
////////////////////
function link(scope, element, attrs, hzTableCtrl) {
element.click(clickHandler);
element.on('click', clickHandler);
// select or unselect row
function clickHandler() {

View File

@ -228,7 +228,7 @@ horizon.forms.add_password_fields_reveal_buttons = function (el) {
$input.closest('div').addClass("has-feedback");
$('<span>').addClass(
"form-control-feedback fa fa-eye password-icon"
).insertAfter($input).click(function () {
).insertAfter($input).on('click', function () {
var $icon = $(this);
if ($input.attr('type') === 'password') {

View File

@ -334,7 +334,7 @@ horizon.datatables.confirm = function(action) {
modal.css('z-index', child_backdrop.css('z-index')+10);
}
modal.find('.' + confirmCssClass).click(function () {
modal.find('.' + confirmCssClass).on('click', function () {
var $form = $action.closest('form');
var el = document.createElement("input");
el.type = 'hidden';