From 43143de52f085b986c0c8fa14e43baee055b77d5 Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Fri, 30 Jun 2023 09:39:31 +1200 Subject: [PATCH] FIX ESLint issues --- client/dist/js/LeftAndMain_Subsites.js | 2 +- client/src/js/LeftAndMain_Subsites.js | 21 +++++++++++---------- client/src/js/SubsitesTreeDropdownField.js | 5 +++-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/client/dist/js/LeftAndMain_Subsites.js b/client/dist/js/LeftAndMain_Subsites.js index 248cc619..56980aa1 100644 --- a/client/dist/js/LeftAndMain_Subsites.js +++ b/client/dist/js/LeftAndMain_Subsites.js @@ -1 +1 @@ -!function(){"use strict";var t={311:function(t){t.exports=jQuery}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}!function(){var t,e=i(311);(t=e).entwine("ss",(t=>{t("#SubsitesSelect").entwine({onadd(){this.on("change",(function(){window.location.search=t.query.set("SubsiteID",t(this).val())}))}}),t(".cms-container .cms-menu-list li a").entwine({onclick(e){t(".cms-container").loadFragment("admin/subsite_xhr","SubsiteList"),this._super(e)}}),t(".cms-container .SubsiteAdmin .cms-edit-form fieldset.ss-gridfield").entwine({onreload(e){t(".cms-container").loadFragment("admin/subsite_xhr","SubsiteList"),this._super(e)}}),t(".cms-container .tab.subsite-model").entwine({onadd(e){t(".cms-container").loadFragment("admin/subsite_xhr","SubsiteList"),this._super(e)}}),t("#Form_ItemEditForm_AccessAllSubsites").entwine({onmatch(){this.showHideSubsiteList();const e=this;t("#Form_ItemEditForm_AccessAllSubsites input").change((()=>{e.showHideSubsiteList()}))},showHideSubsiteList(){t("#Form_ItemEditForm_Subsites").parent().parent().css("display",t("#Form_ItemEditForm_AccessAllSubsites_1").is(":checked")?"none":"")}}),t(".cms-edit-form").entwine({getChangeTrackerOptions(){const e=void 0===this.entwineData("ChangeTrackerOptions");let i=this._super();return e&&(i=t.extend({},i),i.ignoreFieldSelector+=", input[name=IsSubsite]",this.setChangeTrackerOptions(i)),i}}),t(".cms-edit-form input[name=action_copytosubsite]").entwine({onclick(t){this.closest("form").trigger("submit",[this])}})})),t.entwine("ss.preview",(t=>{t(".cms-preview").entwine({onafterIframeAdjustedForPreview(e,i){const s=t(i).find("meta[name=x-subsite-id]").attr("content");s&&(t(i).find("a").each((function(){const e=t(this).attr("href");void 0===e||e.match(/^http:\/\//)||t(this).attr("href",t.path.addSearchParams(e,{SubsiteID:s}))})),t(i).find("form").each((function(){const e=t(this).attr("action");void 0===e||e.match(/^http:\/\//)||t(this).append(``)})))}})}))}()}(); \ No newline at end of file +!function(){"use strict";var t={311:function(t){t.exports=jQuery}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}!function(){var t,e=i(311);(t=e).entwine("ss",(t=>{t("#SubsitesSelect").entwine({onadd(){this.on("change",(function(){window.location.search=t.query.set("SubsiteID",t(this).val())}))}}),t(".cms-container .cms-menu-list li a").entwine({onclick(e){t(".cms-container").loadFragment("admin/subsite_xhr","SubsiteList"),this._super(e)}}),t(".cms-container .SubsiteAdmin .cms-edit-form fieldset.ss-gridfield").entwine({onreload(e){t(".cms-container").loadFragment("admin/subsite_xhr","SubsiteList"),this._super(e)}}),t(".cms-container .tab.subsite-model").entwine({onadd(e){t(".cms-container").loadFragment("admin/subsite_xhr","SubsiteList"),this._super(e)}}),t("#Form_ItemEditForm_AccessAllSubsites").entwine({onmatch(){this.showHideSubsiteList();const e=this;t("#Form_ItemEditForm_AccessAllSubsites input").change((()=>{e.showHideSubsiteList()}))},showHideSubsiteList(){t("#Form_ItemEditForm_Subsites").parent().parent().css("display",t("#Form_ItemEditForm_AccessAllSubsites_1").is(":checked")?"none":"")}}),t(".cms-edit-form").entwine({getChangeTrackerOptions(){const e=void 0===this.entwineData("ChangeTrackerOptions");let i=this._super();return e&&(i=t.extend({},i),i.ignoreFieldSelector+=", input[name=IsSubsite]",this.setChangeTrackerOptions(i)),i}}),t(".cms-edit-form input[name=action_copytosubsite]").entwine({onclick(){this.closest("form").trigger("submit",[this])}})})),t.entwine("ss.preview",(t=>{t(".cms-preview").entwine({onafterIframeAdjustedForPreview(e,i){const s=t(i).find("meta[name=x-subsite-id]").attr("content");s&&(t(i).find("a").each((function(){const e=t(this).attr("href");void 0===e||e.match(/^http:\/\//)||t(this).attr("href",t.path.addSearchParams(e,{SubsiteID:s}))})),t(i).find("form").each((function(){const e=t(this).attr("action");void 0===e||e.match(/^http:\/\//)||t(this).append(``)})))}})}))}()}(); \ No newline at end of file diff --git a/client/src/js/LeftAndMain_Subsites.js b/client/src/js/LeftAndMain_Subsites.js index c0ee6b5f..13a5e1ba 100644 --- a/client/src/js/LeftAndMain_Subsites.js +++ b/client/src/js/LeftAndMain_Subsites.js @@ -1,5 +1,6 @@ /* jslint browser: true, nomen: true */ /* global $, window, jQuery */ +/* eslint-disable func-names */ (function ($) { // eslint-disable-next-line no-shadow $.entwine('ss', ($) => { @@ -8,7 +9,7 @@ this.on('change', function () { window.location.search = $.query.set('SubsiteID', $(this).val()); }); - } + }, }); /* @@ -18,7 +19,7 @@ onclick(e) { $('.cms-container').loadFragment('admin/subsite_xhr', 'SubsiteList'); this._super(e); - } + }, }); /* @@ -28,7 +29,7 @@ onreload(e) { $('.cms-container').loadFragment('admin/subsite_xhr', 'SubsiteList'); this._super(e); - } + }, }); /* @@ -38,7 +39,7 @@ onadd(e) { $('.cms-container').loadFragment('admin/subsite_xhr', 'SubsiteList'); this._super(e); - } + }, }); // Subsite tab of Group editor @@ -57,7 +58,7 @@ showHideSubsiteList() { $('#Form_ItemEditForm_Subsites').parent().parent().css('display', ($('#Form_ItemEditForm_AccessAllSubsites_1').is(':checked') ? 'none' : '')); - } + }, }); $('.cms-edit-form').entwine({ @@ -82,14 +83,14 @@ } return opts; - } + }, }); $('.cms-edit-form input[name=action_copytosubsite]').entwine({ - onclick(e) { + onclick() { const form = this.closest('form'); form.trigger('submit', [this]); - } + }, }); }); @@ -117,7 +118,7 @@ if (typeof href !== 'undefined' && !href.match(/^http:\/\//)) { $(this).attr('href', $.path.addSearchParams(href, { - SubsiteID: subsiteId + SubsiteID: subsiteId, })); } }); @@ -130,7 +131,7 @@ $(this).append(``); } }); - } + }, }); }); }(jQuery)); diff --git a/client/src/js/SubsitesTreeDropdownField.js b/client/src/js/SubsitesTreeDropdownField.js index cddf2d5c..e428dee6 100644 --- a/client/src/js/SubsitesTreeDropdownField.js +++ b/client/src/js/SubsitesTreeDropdownField.js @@ -1,4 +1,5 @@ /* global jQuery */ +/* eslint-disable func-names */ (function ($) { // eslint-disable-next-line no-shadow $.entwine('ss', ($) => { @@ -14,7 +15,7 @@ field.setValue(0); field.refresh(); field.trigger('change'); - } + }, }); /** @@ -30,7 +31,7 @@ attributes.data.urlTree += `?${fieldName}_SubsiteID=${subsiteID}`; attributes.data.cacheKey = `${attributes.data.cacheKey.substring(0, 19)}_${subsiteID}`; return attributes; - } + }, }); }); }(jQuery));