Change Admin Panel "Attachment Settings" and "Cron Settings" options to be tabs, not submenu.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2025-10-12 04:50:17 +03:00
parent 0e3a17d922
commit ae2aa1f5cd
7 changed files with 200 additions and 135 deletions

View file

@ -141,6 +141,27 @@ Template.cronSettings.helpers({
}
});
Template.cronSettings.switchMenu = function(event, targetID) {
const instance = Template.instance();
// Reset all tabs
instance.showMigrations.set(false);
instance.showBoardOperations.set(false);
instance.showJobs.set(false);
instance.showAddJob.set(false);
// Set the selected tab
if (targetID === 'cron-migrations') {
instance.showMigrations.set(true);
} else if (targetID === 'cron-board-operations') {
instance.showBoardOperations.set(true);
} else if (targetID === 'cron-jobs') {
instance.showJobs.set(true);
} else if (targetID === 'cron-add') {
instance.showAddJob.set(true);
}
};
Template.cronSettings.events({
'click .js-cron-migrations'(event) {
event.preventDefault();