silverstripe-subsites/client/dist/js/LeftAndMain_Subsites.js

1 line
2.0 KiB
JavaScript
Raw Normal View History

2023-07-12 01:05:10 +02:00
!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(`<input type=hidden name="SubsiteID" value="${s}" >`)})))}})}))}()}();