From 370c08cd686c8b4d9c22f2be38ec886922b84a1e Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 15 Mar 2021 09:29:09 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B03657=20-=20Replace=20calls=20to=20deprec?= =?UTF-8?q?ate=20jQuery=20methods=20(".click(callback)"=20to=20".on('click?= =?UTF-8?q?',=20callback)")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 6 +++--- application/dashboard.class.inc.php | 2 +- core/attributedef.class.inc.php | 4 ++-- core/displayablegraph.class.inc.php | 2 +- datamodels/2.x/itop-hub-connector/land.php | 2 +- .../portal/templates/bricks/browse/mode_list.html.twig | 2 +- .../templates/bricks/browse/mode_mosaic.html.twig | 2 +- .../portal/templates/bricks/browse/mode_tree.html.twig | 2 +- .../templates/bricks/manage/layout-table.html.twig | 2 +- js/dashlet.js | 2 +- js/dataTables.settings.js | 4 ++-- js/datatable.js | 4 ++-- js/extkeywidget.js | 4 ++-- js/field_sorter.js | 10 +++++----- js/icon_select.js | 4 ++-- js/linksdirectwidget.js | 8 ++++---- js/searchformforeignkeys.js | 2 +- js/simple_graph.js | 10 +++++----- js/tabularfieldsselector.js | 8 ++++---- pages/ajax.render.php | 4 ++-- pages/audit.php | 2 +- setup/setuppage.class.inc.php | 2 +- setup/setuputils.class.inc.php | 4 ++-- setup/wizardcontroller.class.inc.php | 2 +- setup/wizardsteps.class.inc.php | 10 +++++----- .../FieldRenderer/BsFileUploadFieldRenderer.php | 4 ++-- .../FieldRenderer/ConsoleSimpleFieldRenderer.php | 5 ++--- sources/application/WebPage/WebPage.php | 2 +- sources/application/WebPage/iTopWebPage.php | 4 ++-- .../printable/block-print-header/layout.ready.js.twig | 4 ++-- 30 files changed, 61 insertions(+), 62 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 6aaf0992f..515159580 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -1936,7 +1936,7 @@ HTML oACWidget_{$iId} = new ExtKeyWidget('$iId', 'QueryOQL', 'SELECT QueryOQL WHERE is_template = \'yes\'', '$sSearchQueryLbl', true, null, null, true, true, 'oql'); // noinspection JSAnnotator oACWidget_{$iId}.emptyHtml = "

Use the search form above to search for objects to be added.

"; -$("#$sPredefinedBtnId").click(function () { +$("#$sPredefinedBtnId").on('click', function () { oACWidget_{$iId}.Search(); }); @@ -1970,7 +1970,7 @@ JS ); $oTestQueryButton->AddCSSClass('ibo-action-button'); $oPage->add_ready_script(<<GetForLink(); - $oPage->add_ready_script("$('#form_{$this->m_iFormId} button.cancel').click( function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl', $sJSToken)} );"); + $oPage->add_ready_script("$('#form_{$this->m_iFormId} button.cancel').on('click', function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl', $sJSToken)} );"); $iFieldsCount = count($aFieldsMap); $sJsonFieldsMap = json_encode($aFieldsMap); diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 393cdc8a0..6cbcd4633 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -1190,7 +1190,7 @@ EOF $oPage->add_ready_script( <<'; // To fix an issue on Firefox: focus set to the option (because the input is within the label for the option) - $oPage->add_ready_script("\$('[name=\"$sName\"]').click(function(){var me=this; setTimeout(function(){\$(me).focus();}, 100);});"); + $oPage->add_ready_script("\$('[name=\"$sName\"]').on('click', function(){var me=this; setTimeout(function(){\$(me).focus();}, 100);});"); } else { @@ -12335,7 +12335,7 @@ class AttributeRedundancySettings extends AttributeDBField $sEditValue = $bSelected ? $iCurrentValue : ''; $sValue = ''; // To fix an issue on Firefox: focus set to the option (because the input is within the label for the option) - $oPage->add_ready_script("\$('[name=\"$sName\"]').click(function(){var me=this; setTimeout(function(){\$(me).focus();}, 100);});"); + $oPage->add_ready_script("\$('[name=\"$sName\"]').on('click', function(){var me=this; setTimeout(function(){\$(me).focus();}, 100);});"); } else { diff --git a/core/displayablegraph.class.inc.php b/core/displayablegraph.class.inc.php index 717c06a0a..54fd523b4 100644 --- a/core/displayablegraph.class.inc.php +++ b/core/displayablegraph.class.inc.php @@ -1464,7 +1464,7 @@ EOF ); $oP->add_ready_script( << .sf_title").click( function() { + $("#dh_flash > .sf_title").on('click', function() { $("#dh_flash").toggleClass('closed'); }); $('#ReloadMovieBtn').button().button('disable'); diff --git a/datamodels/2.x/itop-hub-connector/land.php b/datamodels/2.x/itop-hub-connector/land.php index 031ee6852..38d102258 100644 --- a/datamodels/2.x/itop-hub-connector/land.php +++ b/datamodels/2.x/itop-hub-connector/land.php @@ -270,7 +270,7 @@ function DoInstall(WebPage $oPage) $sWidgetParams = json_encode($aWidgetParams); $oPage->add_ready_script("$('#hub_installation_widget').hub_installation($sWidgetParams);"); - $oPage->add_ready_script("$('#hub_start_installation').click(function() { $('#hub_installation_widget').hub_installation('start_installation');} );"); + $oPage->add_ready_script("$('#hub_start_installation').on('click', function() { $('#hub_installation_widget').hub_installation('start_installation');} );"); $oPage->add_ready_script("$('#hub_installation_widget').hub_installation('check_before_backup');"); $oPage->add('
'); } diff --git a/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_list.html.twig b/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_list.html.twig index 5af235678..df2374627 100644 --- a/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_list.html.twig +++ b/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_list.html.twig @@ -351,7 +351,7 @@ }); // Auto collapse item actions popup - $('body').click(function(){ + $('body').on('click', function(){ $('table .item-action-wrapper.collapse.in').collapse('hide'); }); }); diff --git a/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_mosaic.html.twig b/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_mosaic.html.twig index cca764f54..ec2ddc92c 100644 --- a/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_mosaic.html.twig +++ b/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_mosaic.html.twig @@ -400,7 +400,7 @@ $(document).ready(function(){ // Auto collapse item actions popup - $('body').click(function(){ + $('body').on('click', function(){ $('#brick_content_mosaic .item-action-wrapper.collapse.in').collapse('hide'); }); diff --git a/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_tree.html.twig b/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_tree.html.twig index 1ecd1b988..b2aa2bd35 100644 --- a/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_tree.html.twig +++ b/datamodels/2.x/itop-portal-base/portal/templates/bricks/browse/mode_tree.html.twig @@ -400,7 +400,7 @@ }); // Auto collapse item actions popup - $('body').click(function(){ + $('body').on('click', function(){ $('#brick_content_tree .item-action-wrapper.collapse.in').collapse('hide'); }); diff --git a/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig b/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig index 7f97a611d..390f08359 100644 --- a/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig +++ b/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig @@ -364,7 +364,7 @@ }); // Auto collapse item actions popup - $('body').click(function () { + $('body').on('click', function () { $('table .item-action-wrapper.collapse.in').collapse('hide'); }); }); diff --git a/js/dashlet.js b/js/dashlet.js index 4d187b84d..140be4cec 100644 --- a/js/dashlet.js +++ b/js/dashlet.js @@ -32,7 +32,7 @@ $(function() this.closeBox = $('
').append(''); this.closeBox - .click(function() { me._remove_dashlet(); }) + .on('click', function() { me._remove_dashlet(); }) .prependTo(this.element); if (this.element.hasClass('dashlet-selected')) { diff --git a/js/dataTables.settings.js b/js/dataTables.settings.js index 5e0c07b84..d120fc693 100644 --- a/js/dataTables.settings.js +++ b/js/dataTables.settings.js @@ -31,8 +31,8 @@ $(function() var me = this; var bViewLink = (this.options.sViewLink == 'true'); $('#sfl_'+me.options.sListId).fieldsorter({hasKeyColumn: bViewLink, labels: this.options.oLabels, fields: this.options.oColumns, onChange: function() { me._onSpecificSettings(); } }); - $('#datatable_dlg_'+me.options.sListId).find('input[name=page_size]').click(function() { me._onSpecificSettings(); }); - $('#datatable_dlg_'+me.options.sListId).find('input[name=save_settings]').click(function() { me._updateSaveScope(); }); + $('#datatable_dlg_'+me.options.sListId).find('input[name=page_size]').on('click', function() { me._onSpecificSettings(); }); + $('#datatable_dlg_'+me.options.sListId).find('input[name=save_settings]').on('click', function() { me._updateSaveScope(); }); this.element.find('.itop_popup > ul li').popupmenu(); this._updateSaveScope(); this._saveDlgState(); diff --git a/js/datatable.js b/js/datatable.js index d57f7c129..aea186849 100644 --- a/js/datatable.js +++ b/js/datatable.js @@ -40,8 +40,8 @@ $(function() var sListId = sId.replace('datatable_', ''); var bViewLink = (this.options.sViewLink == 'true'); $('#sfl_'+sListId).fieldsorter({hasKeyColumn: bViewLink, labels: this.options.oLabels, fields: this.options.oColumns, onChange: function() { me._onSpecificSettings(); } }); - $('#datatable_dlg_'+sListId).find('input[name=page_size]').click(function() { me._onSpecificSettings(); }); - $('#datatable_dlg_'+sListId).find('input[name=save_settings]').click(function() { me._updateSaveScope(); }); + $('#datatable_dlg_'+sListId).find('input[name=page_size]').on('click', function() { me._onSpecificSettings(); }); + $('#datatable_dlg_'+sListId).find('input[name=save_settings]').on('click', function() { me._updateSaveScope(); }); this.element.find('.itop_popup > ul li').popupmenu(); this._updateSaveScope(); this._saveDlgState(); diff --git a/js/extkeywidget.js b/js/extkeywidget.js index 88bc1bc40..860cd6fb0 100644 --- a/js/extkeywidget.js +++ b/js/extkeywidget.js @@ -197,7 +197,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper } else { $('#label_'+me.id).val($('#label_'+me.id).data('selected_value')); } - }).click( + }).on('click', function () { hasFocus++; $('#label_'+me.id).autocomplete("search"); @@ -371,7 +371,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper me.ajax_request = $.post(AddAppContext(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php'), theMap, function (data) { $(sSearchAreaId).html(data); - $('#fr_'+me.id+' input:radio').click(function () { + $('#fr_'+me.id+' input:radio').on('click', function () { me.UpdateButtons(); }); me.UpdateButtons(); diff --git a/js/field_sorter.js b/js/field_sorter.js index 6eb5bfa6f..e787a421e 100644 --- a/js/field_sorter.js +++ b/js/field_sorter.js @@ -28,10 +28,10 @@ $(function() this.movedown_btn = $(''); columnWithButtons = $('
'); this.element.parent().parent().append(columnWithButtons.append(this.moveup_btn).append('
').append(this.movedown_btn)); - this.moveup_btn.click(function () { + this.moveup_btn.on('click', function () { me._moveUp(); }); - this.movedown_btn.click(function () { + this.movedown_btn.on('click', function () { me._moveDown(); }); }, @@ -78,9 +78,9 @@ $(function() } } var field = $('
  •  ' + f.label + sSortOrder + '
  • '); - field.click(function() { me._selectItem(this); }); - field.find('input').click(function() { me._checkboxClicked(this); } ); - field.find('span').click(function() { me._sortOrderClicked(this); } ); + field.on('click', function() { me._selectItem(this); }); + field.find('input').on('click', function() { me._checkboxClicked(this); } ); + field.find('span').on('click', function() { me._sortOrderClicked(this); } ); this.element.append(field); } } diff --git a/js/icon_select.js b/js/icon_select.js index 51bc3c4f6..1e9e73ec0 100644 --- a/js/icon_select.js +++ b/js/icon_select.js @@ -46,7 +46,7 @@ $(function() this.oLabel = $(''+sLabel+''); this.oButton = $(''); this.oButton.prepend(this.oLabel).prepend(this.oImg); - this.oButton.click(function(event, ui) { + this.oButton.on('click', function(event, ui) { //me._cleanAllMenus(); me._on_button_clicked(event, ui); event.stopPropagation(); @@ -64,7 +64,7 @@ $(function() if (this.options.post_upload_to != null) { this.oUploadBtn = $(''); - this.oUploadBtn.click( function() { me._upload_dlg(); } ); + this.oUploadBtn.on('click', function() { me._upload_dlg(); } ); this.oButton.after(this.oUploadBtn); } var id = this.element.attr('id'); diff --git a/js/linksdirectwidget.js b/js/linksdirectwidget.js index 8285913b1..bc4f9f8bb 100644 --- a/js/linksdirectwidget.js +++ b/js/linksdirectwidget.js @@ -86,16 +86,16 @@ $(function() } this.element.find('.selectList'+this.id).bind('change', function() { me._updateButtons(); }); - this.oButtons['delete'].click(function() { + this.oButtons['delete'].on('click', function() { $('.selectList'+me.id+':checked', me.element).each( function() { me._deleteRow($(this)); }); }); - this.oButtons['create'].click(function() { + this.oButtons['create'].on('click', function() { me._createRow(); }); - this.oButtons['remove'].click(function() { + this.oButtons['remove'].on('click', function() { $('.selectList'+me.id+':checked', me.element).each( function() { me._removeRow($(this)); }); }); - this.oButtons['add'].click(function() { + this.oButtons['add'].on('click', function() { me._selectToAdd(); }); diff --git a/js/searchformforeignkeys.js b/js/searchformforeignkeys.js index dd997bd0f..c9f6c0dbb 100644 --- a/js/searchformforeignkeys.js +++ b/js/searchformforeignkeys.js @@ -203,7 +203,7 @@ function SearchFormForeignKeys(id, sTargetClass, sAttCode, oSearchWidgetElmt, sF function(data) { $(sSearchAreaId).html(data); - $('#fr_'+me.id+' input:radio').click(function() { me.UpdateButtons(); }); + $('#fr_'+me.id+' input:radio').on('click', function() { me.UpdateButtons(); }); me.UpdateButtons(); me.ajax_request = null; $('#count_'+me.id).change(function(){ diff --git a/js/simple_graph.js b/js/simple_graph.js index 241727ee8..ba12124e1 100644 --- a/js/simple_graph.js +++ b/js/simple_graph.js @@ -516,13 +516,13 @@ $(function() var me = this; - $('#'+sPopupMenuId+'_pdf').click(function() { me.export_as_pdf(); }); - $('#'+sPopupMenuId+'_attachment').click(function() { me.export_as_attachment(); }); + $('#'+sPopupMenuId+'_pdf').on('click', function() { me.export_as_pdf(); }); + $('#'+sPopupMenuId+'_attachment').on('click', function() { me.export_as_attachment(); }); $('#'+sId+'_zoom').slider({ min: 0, max: 5, value: 1, step: 0.25, change: function() { me._on_zoom_change( $(this).slider('value')); } }); - $('#'+sId+'_zoom_plus').click(function() { $('#'+sId+'_zoom').slider('value', 0.25 + $('#'+sId+'_zoom').slider('value')); return false; }); - $('#'+sId+'_zoom_minus').click(function() { $('#'+sId+'_zoom').slider('value', $('#'+sId+'_zoom').slider('value') - 0.25); return false; }); + $('#'+sId+'_zoom_plus').on('click', function() { $('#'+sId+'_zoom').slider('value', 0.25 + $('#'+sId+'_zoom').slider('value')); return false; }); + $('#'+sId+'_zoom_minus').on('click', function() { $('#'+sId+'_zoom').slider('value', $('#'+sId+'_zoom').slider('value') - 0.25); return false; }); $('#'+sId+'_contexts').multiselect({header: true, checkAllText: this.options.labels.check_all, uncheckAllText: this.options.labels.uncheck_all, noneSelectedText: this.options.labels.none_selected, selectedText: this.options.labels.nb_selected, selectedList: 1}); - $('#'+sId+'_refresh_btn').button().click(function() { me.reload(); }); + $('#'+sId+'_refresh_btn').button().on('click', function() { me.reload(); }); }, _build_context_menus: function() { diff --git a/js/tabularfieldsselector.js b/js/tabularfieldsselector.js index 22eb42b9d..3cd070044 100644 --- a/js/tabularfieldsselector.js +++ b/js/tabularfieldsselector.js @@ -98,13 +98,13 @@ $(function () { $(this).parent().parent().width(maxWidth).css({display: 'inline-block'}); }); - $('#'+this.sId+' .tfs_checkbox_multi').click(function () { + $('#'+this.sId+' .tfs_checkbox_multi').on('click', function () { me._on_multi_click($(this).val(), this.checked); }); - $('#'+this.sId+' .check_all').click(function () { + $('#'+this.sId+' .check_all').on('click', function () { me._on_check_all($(this).closest('.ibo-panel'), true); }); - $('#'+this.sId+' .uncheck_all').click(function () { + $('#'+this.sId+' .uncheck_all').on('click', function () { me._on_check_all($(this).closest('.ibo-panel'), false); }); @@ -273,7 +273,7 @@ $(function () { me._on_drag_columns(table); }, dragHandle: '.drag-handle' }); - $('#'+this.sId+' .ibo-table-preview table .export-field-close').click(function (event) { + $('#'+this.sId+' .ibo-table-preview table .export-field-close').on('click', function (event) { me._on_remove_column($(this).attr('data-attcode')); event.preventDefault(); return false; diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 191be1839..34e0f667f 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -1291,7 +1291,7 @@ $('#about_box').dialog({ title: '$sDialogTitle', close: function() { $(this).remove(); } }); -$("#collapse_support_details").click(function() { +$("#collapse_support_details").on('click', function() { $("#support_details").slideToggle('normal'); $("#collapse_support_details").toggleClass('open'); }); @@ -1382,7 +1382,7 @@ EOF $oPage->add('
  • '.$oLicense->product.', © '.$oLicense->author.' is licensed under the '.$oLicense->license_type.' license. (Details)'); $oPage->add(''); $oPage->add_ready_script(<<GetForLink()); $oP->add_ready_script("$('a[href*=\"webservices/export.php?expression=\"]').attr('href', '".$sExportUrl."&filename=audit.csv".$sAdvanced."');"); - $oP->add_ready_script("$('#1 :checkbox').removeAttr('onclick').click( function() { var sAdvanced = ''; if (this.checked) sAdvanced = '&advanced=1'; window.location.href='$sExportUrl'+sAdvanced; } );"); + $oP->add_ready_script("$('#1 :checkbox').removeAttr('onclick').on('click', function() { var sAdvanced = ''; if (this.checked) sAdvanced = '&advanced=1'; window.location.href='$sExportUrl'+sAdvanced; } );"); } break; diff --git a/setup/setuppage.class.inc.php b/setup/setuppage.class.inc.php index af479fd07..7cf53fd64 100644 --- a/setup/setuppage.class.inc.php +++ b/setup/setuppage.class.inc.php @@ -143,7 +143,7 @@ class SetupPage extends NiceWebPage $this->p("
  • $sItem
  • \n"); } $this->p(''); - $this->add_ready_script("$('#{$sId}').click( function() { $(this).toggleClass('open'); $('#{$sId}_list').toggle();} );\n"); + $this->add_ready_script("$('#{$sId}').on('click', function() { $(this).toggleClass('open'); $('#{$sId}_list').toggle();} );\n"); if (!$bOpen) { $this->add_ready_script("$('#{$sId}').toggleClass('open'); $('#{$sId}_list').toggle();\n"); diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 4864bbd0f..bba83fb8a 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -1089,11 +1089,11 @@ JS } $oPage->add_ready_script( <<<'JS' -$("tbody.collapsable-options>tr>th>label").click(function() { +$("tbody.collapsable-options>tr>th>label").on('click', function() { var $tbody = $(this).closest("tbody"); toggleCollapsableOptions($tbody); }); -$("#db_tls_enabled").click(function() { +$("#db_tls_enabled").on('click', function() { var bTlsEnabled = $("#db_tls_enabled").is(":checked"); $("#db_tls_ca").prop("disabled", !bTlsEnabled); }); diff --git a/setup/wizardcontroller.class.inc.php b/setup/wizardcontroller.class.inc.php index 696bb028e..eaddcf7e9 100644 --- a/setup/wizardcontroller.class.inc.php +++ b/setup/wizardcontroller.class.inc.php @@ -229,7 +229,7 @@ $('form').each(function () { width: 0 })); }); -$('#btn_back').click(function() { $('#wiz_form').data('back', true); }); +$('#btn_back').on('click', function() { $('#wiz_form').data('back', true); }); $('#wiz_form').on('submit', function() { if ($(this).data('back')) diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index dd63e790e..c323bfd9d 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -633,7 +633,7 @@ HTML $oPage->add_ready_script( <<add('
  • '.$oLicense->product.', © '.$oLicense->author.' is licensed under the '.$oLicense->license_type.' license. (Details)'); $oPage->add(''); $oPage->add_ready_script('$(".license_text a").attr("target", "_blank").addClass("no-arrow");'); - $oPage->add_ready_script('$("#toggle_'.$index.'").click( function() { $("#license_'.$index.'").toggle(); } );'); + $oPage->add_ready_script('$("#toggle_'.$index.'").on('click', function() { $("#license_'.$index.'").toggle(); } );'); $index++; } $oPage->add(''); @@ -1012,7 +1012,7 @@ class WizStepMiscParams extends WizardStep <<add_ready_script( <<tbody>tr>td :button').click(function(oEvent){ + $('.attachments_container table#$sAttachmentTableId>tbody>tr>td :button').on('click', function(oEvent){ oEvent.preventDefault(); RemoveAttachment($(this).closest('.attachment').find(':input[name="attachments[]"]').val()); }); diff --git a/sources/Renderer/Console/FieldRenderer/ConsoleSimpleFieldRenderer.php b/sources/Renderer/Console/FieldRenderer/ConsoleSimpleFieldRenderer.php index 6d6f1317c..65d610e77 100644 --- a/sources/Renderer/Console/FieldRenderer/ConsoleSimpleFieldRenderer.php +++ b/sources/Renderer/Console/FieldRenderer/ConsoleSimpleFieldRenderer.php @@ -22,13 +22,12 @@ namespace Combodo\iTop\Renderer\Console\FieldRenderer; use AttributeDate; use AttributeDateTime; use AttributeDuration; +use Combodo\iTop\Form\Field\TextAreaField; +use Combodo\iTop\Renderer\FieldRenderer; use DateTimeFormat; use Dict; use InlineImage; -use UserRights; use utils; -use Combodo\iTop\Form\Field\TextAreaField; -use Combodo\iTop\Renderer\FieldRenderer; /** * Class ConsoleSimpleFieldRenderer diff --git a/sources/application/WebPage/WebPage.php b/sources/application/WebPage/WebPage.php index 052a5c1f0..7576ff1e4 100644 --- a/sources/application/WebPage/WebPage.php +++ b/sources/application/WebPage/WebPage.php @@ -1442,7 +1442,7 @@ if (bIsSectionOpenedInitially) { $("#Collapse_"+iSectionId).toggle(); } -$("#LnkCollapse_"+iSectionId).click(function(e) { +$("#LnkCollapse_"+iSectionId).on('click', function(e) { localStorage.setItem(sSectionStateStorageKey, !($("#Collapse_"+iSectionId).is(":visible"))); $("#LnkCollapse_"+iSectionId).toggleClass("open"); $("#Collapse_"+iSectionId).slideToggle("normal"); diff --git a/sources/application/WebPage/iTopWebPage.php b/sources/application/WebPage/iTopWebPage.php index ec2a85be0..6c253ee6f 100644 --- a/sources/application/WebPage/iTopWebPage.php +++ b/sources/application/WebPage/iTopWebPage.php @@ -355,7 +355,7 @@ JS } ); // Shortcut menu actions - $('.actions_button a').click( function() { + $('.actions_button a').on('click', function() { aMatches = /#(.*)$/.exec(window.location.href); if (aMatches != null) { @@ -388,7 +388,7 @@ JS ShowDebug(); $('#logOffBtn>ul').popupmenu(); - $('.caselog_header').click( function () { $(this).toggleClass('open').next('.caselog_entry,.caselog_entry_html').toggle(); }); + $('.caselog_header').on('click', function () { $(this).toggleClass('open').next('.caselog_entry,.caselog_entry_html').toggle(); }); $(document).ajaxSend(function(event, jqxhr, options) { jqxhr.setRequestHeader('X-Combodo-Ajax', 'true'); diff --git a/templates/application/printable/block-print-header/layout.ready.js.twig b/templates/application/printable/block-print-header/layout.ready.js.twig index 126f79dac..8d6341d6b 100644 --- a/templates/application/printable/block-print-header/layout.ready.js.twig +++ b/templates/application/printable/block-print-header/layout.ready.js.twig @@ -12,7 +12,7 @@ sHiddeableChapters += ''; $('#hiddeable_chapters').html(sHiddeableChapters); -$('.hideable-chapter').click(function(){ +$('.hideable-chapter').on('click', function(){ var sChapterId = $(this).attr('chapter-id'); $('#'+sChapterId).toggle(); $(this).toggleClass('strikethrough'); @@ -25,7 +25,7 @@ $('fieldset').each(function() { $(this).wrapInner('').prepend(jLegend); }); -$('legend').css('cursor', 'pointer').click(function(){ +$('legend').css('cursor', 'pointer').on('click', function(){ $(this).parent('fieldset').toggleClass('not-printable strikethrough'); });