Merge pull request #539 from creative-commoners/pulls/2.8/revert

Revert "Switch to listing views of subsite-filtered sections"
This commit is contained in:
Guy Sartorelli 2023-09-07 09:44:32 +12:00 committed by GitHub
commit 4e292b8e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,13 +7,7 @@
$('#SubsitesSelect').entwine({
onadd:function(){
this.on('change', function(){
// Switch to listing views of subsite-filtered sections (eg: pages/ & assets/)
let newLocHref = window.location.href
.split('edit/show/').shift() // remove [pages/]edit/etc
.split('settings/show/').shift() // remove [pages/]settings/etc
.split('history/show/').shift() // remove [pages/]history/etc
.split('show/').shift(); // remove [assets/]show/102/edit/etc (last as 'show' is broad)
window.location.href = newLocHref + $.query.set('SubsiteID', $(this).val()).toString();
window.location.search=$.query.set('SubsiteID', $(this).val());
});
}
});