N°3657 - Replace calls to deprecate jQuery methods (".click(callback)" to ".on('click', callback)")

This commit is contained in:
Molkobain
2021-03-15 09:29:09 +01:00
parent e143fa5e33
commit 370c08cd68
30 changed files with 61 additions and 62 deletions

View File

@@ -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 = "<div style=\"background: #fff; border:0; text-align:center; vertical-align:middle;\"><p>Use the search form above to search for objects to be added.</p></div>";
$("#$sPredefinedBtnId").click(function () {
$("#$sPredefinedBtnId").on('click', function () {
oACWidget_{$iId}.Search();
});
@@ -1970,7 +1970,7 @@ JS
);
$oTestQueryButton->AddCSSClass('ibo-action-button');
$oPage->add_ready_script(<<<JS
$("#$sTestResId").click(function () {
$("#$sTestResId").on('click', function () {
var sQueryRaw = $("#$iId").val(),
sQueryEncoded = encodeURI(sQueryRaw);
window.open('$sBaseUrl' + sQueryEncoded, '_blank');
@@ -2713,7 +2713,7 @@ EOF
// Hook the cancel button via jQuery so that it can be unhooked easily as well if needed
$sDefaultUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=cancel&'.$oAppContext->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);

View File

@@ -1190,7 +1190,7 @@ EOF
$oPage->add_ready_script(
<<<EOF
$('#select_layout input').click( function() {
$('#select_layout input').on('click', function() {
var sLayoutClass = $(this).val();
$('.itop-dashboard').runtimedashboard('option', {layout_class: sLayoutClass});
} );

View File

@@ -12320,7 +12320,7 @@ class AttributeRedundancySettings extends AttributeDBField
$sEditValue = $bSelected ? $iCurrentValue : '';
$sValue = '<input class="redundancy-min-up-count" type="string" size="3" name="'.$sName.'" value="'.$sEditValue.'">';
// 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 = '<input class="redundancy-min-up-percent" type="string" size="3" name="'.$sName.'" value="'.$sEditValue.'">';
// 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
{

View File

@@ -1464,7 +1464,7 @@ EOF
);
$oP->add_ready_script(
<<<EOF
$("#dh_flash > .sf_title").click( function() {
$("#dh_flash > .sf_title").on('click', function() {
$("#dh_flash").toggleClass('closed');
});
$('#ReloadMovieBtn').button().button('disable');

View File

@@ -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('<div id="debug"></div>');
}

View File

@@ -351,7 +351,7 @@
});
// Auto collapse item actions popup
$('body').click(function(){
$('body').on('click', function(){
$('table .item-action-wrapper.collapse.in').collapse('hide');
});
});

View File

@@ -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');
});

View File

@@ -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');
});

View File

@@ -364,7 +364,7 @@
});
// Auto collapse item actions popup
$('body').click(function () {
$('body').on('click', function () {
$('table .item-action-wrapper.collapse.in').collapse('hide');
});
});

View File

@@ -32,7 +32,7 @@ $(function()
this.closeBox = $('<div class="ibo-dashlet--delete close-box"/>').append('<i class="fas fa-trash ibo-button--icon"></i>');
this.closeBox
.click(function() { me._remove_dashlet(); })
.on('click', function() { me._remove_dashlet(); })
.prependTo(this.element);
if (this.element.hasClass('dashlet-selected'))
{

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -28,10 +28,10 @@ $(function()
this.movedown_btn = $('<button type="button" disabled class="ibo-button ibo-button--vertical-align">'+this.options.labels.movedown+'</button>');
columnWithButtons = $('<div class="ibo-mini-column"></div>');
this.element.parent().parent().append(columnWithButtons.append(this.moveup_btn).append('<br>').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 = $('<li name="' + k + '" alias="' + f.alias + '" code="' + f.code + '"><input type="checkbox"' + sChecked + sDisabled + '/>&nbsp;' + f.label + sSortOrder + '</li>');
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);
}
}

View File

@@ -46,7 +46,7 @@ $(function()
this.oLabel = $('<span>'+sLabel+'</span>');
this.oButton = $('<button type="button" class="icon-select icon-select-dropdown ibo-input ibo-input-select-icon"><div style="display: inline-block;vertical-align: middle;"><span class="ui-icon ui-icon-triangle-1-s"/></div></button>');
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 = $('<button class="icon-select icon-select-upload" type="button" title="'+this.options.labels['upload']+'"><div style="display: inline-block;position: relative;vertical-align:middle;height:48px; line-height:48px; width:16px"><span style="height:16px;display:block;position:absolute;top:50%;margin-top:-8px" class="ui-icon ui-icon-circle-plus"/></div></button>');
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');

View File

@@ -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();
});

View File

@@ -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(){

View File

@@ -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()
{

View File

@@ -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;

View File

@@ -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('<li><b>'.$oLicense->product.'</b>, &copy; '.$oLicense->author.' is licensed under the <b>'.$oLicense->license_type.' license</b>. (<a id="toggle_'.$index.'" class="CollapsibleLabel" style="cursor:pointer;">Details</a>)');
$oPage->add('<div id="license_'.$index.'" class="license_text" style="display:none;overflow:auto;max-height:10em;font-size:small;border:1px #696969 solid;margin-bottom:1em; margin-top:0.5em;padding:0.5em;">'.$oLicense->text.'</div>');
$oPage->add_ready_script(<<<JS
$("#toggle_$index").click( function() {
$("#toggle_$index").on('click', function() {
$(this).toggleClass('open');
$("#license_$index").slideToggle("normal");
});

View File

@@ -254,7 +254,7 @@ try
$oDownloadButton = ButtonUIBlockFactory::MakeForAlternativePrimaryAction('fas fa-chevron-left', Dict::S('Back to audit results'), "./audit.php?".$oAppContext->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;

View File

@@ -143,7 +143,7 @@ class SetupPage extends NiceWebPage
$this->p("<li>$sItem</li>\n");
}
$this->p('</ul>');
$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");

View File

@@ -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);
});

View File

@@ -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'))

View File

@@ -633,7 +633,7 @@ HTML
$oPage->add_ready_script(
<<<EOF
$("#changes_summary .title").click(function() { $(this).parent().toggleClass('closed'); } );
$("#changes_summary .title").on('click', function() { $(this).parent().toggleClass('closed'); } );
$('input[name=upgrade_type]').bind('click change', function() { WizardUpdateButtons(); });
EOF
);
@@ -726,7 +726,7 @@ EOF
$oPage->add('<li><b>'.$oLicense->product.'</b>, &copy; '.$oLicense->author.' is licensed under the <b>'.$oLicense->license_type.' license</b>. (<span class="toggle" id="toggle_'.$index.'">Details</span>)');
$oPage->add('<div id="license_'.$index.'" class="license_text" style="display:none;overflow:auto;max-height:10em;font-size:small;border:1px #696969 solid;margin-bottom:1em; margin-top:0.5em;padding:0.5em;">'.$oLicense->text.'</div>');
$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('</ul>');
@@ -1012,7 +1012,7 @@ class WizStepMiscParams extends WizardStep
<<<EOF
$('#application_url').bind('change keyup', function() { WizardUpdateButtons(); } );
$('#graphviz_path').bind('change keyup init', function() { WizardUpdateButtons(); WizardAsyncAction('check_graphviz', { graphviz_path: $('#graphviz_path').val(), authent: $('#authent_token').val()}); } ).trigger('init');
$('#btn_next').click(function() {
$('#btn_next').on('click', function() {
bRet = true;
if ($(this).attr('data-graphviz') != 'ok')
{
@@ -1151,7 +1151,7 @@ class WizStepUpgradeMiscParams extends WizardStep
<<<EOF
$('#application_url').bind('change keyup', function() { WizardUpdateButtons(); } );
$('#graphviz_path').bind('change keyup init', function() { WizardUpdateButtons(); WizardAsyncAction('check_graphviz', { graphviz_path: $('#graphviz_path').val(), authent: $('#authent_token').val() }); } ).trigger('init');
$('#btn_next').click(function() {
$('#btn_next').on('click', function() {
bRet = true;
if ($(this).attr('data-graphviz') != 'ok')
{
@@ -2318,7 +2318,7 @@ CSS
$oPage->add_ready_script(
<<<JS
$("#params_summary div").addClass('closed');
$("#params_summary .title").click(function() { $(this).parent().toggleClass('closed'); } );
$("#params_summary .title").on('click', function() { $(this).parent().toggleClass('closed'); } );
$("#btn_next").bind("click.install", function(event) {
$('#summary').hide();
$('#installation_progress').show();

View File

@@ -272,7 +272,7 @@ JS
});
}
// Remove button handler
$('#display_attachment_'+data.result.att_id+' :button').click(function(oEvent){
$('#display_attachment_'+data.result.att_id+' :button').on('click', function(oEvent){
oEvent.preventDefault();
RemoveAttachment(data.result.att_id);
});
@@ -320,7 +320,7 @@ JS
});
});
// Remove button handler
$('.attachments_container table#$sAttachmentTableId>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());
});

View File

@@ -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

View File

@@ -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");

View File

@@ -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');

View File

@@ -12,7 +12,7 @@ sHiddeableChapters += '</ul>';
$('#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('<span></span>').prepend(jLegend);
});
$('legend').css('cursor', 'pointer').click(function(){
$('legend').css('cursor', 'pointer').on('click', function(){
$(this).parent('fieldset').toggleClass('not-printable strikethrough');
});