Skip to content

Commit

Permalink
Merge pull request #490 from micschk/patch-1
Browse files Browse the repository at this point in the history
Switch to listing views of subsite-filtered sections
  • Loading branch information
GuySartorelli committed Sep 1, 2023
2 parents 178b521 + 8ba7070 commit 4049f7a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/javascript/LeftAndMain_Subsites.js
Expand Up @@ -7,7 +7,13 @@
$('#SubsitesSelect').entwine({
onadd:function(){
this.on('change', function(){
window.location.search=$.query.set('SubsiteID', $(this).val());
// 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();
});
}
});
Expand Down

0 comments on commit 4049f7a

Please sign in to comment.