From da57a26c5ab67580e819d93cb1b4f3f6f0ff5695 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 9 Sep 2024 10:29:30 +0200 Subject: [PATCH] automatic close sidebox/-bar in mobile framework when tree or favorite is clicked --- admin/js/app.ts | 5 +++++ api/js/jsapi/egw_app.ts | 6 ++++++ mail/js/app.js | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/admin/js/app.ts b/admin/js/app.ts index b224150322..c0b1c224e6 100644 --- a/admin/js/app.ts +++ b/admin/js/app.ts @@ -171,6 +171,11 @@ class AdminApp extends EgwApp window.open(_url, '_blank'); return; } + // check for mobile framework and close the sidebox/-bar + if (typeof framework.toggleMenu === 'function') + { + framework.toggleMenu('on'); + } var ajax : any = false; if (_url) { diff --git a/api/js/jsapi/egw_app.ts b/api/js/jsapi/egw_app.ts index c275486f2b..fd7e15a87f 100644 --- a/api/js/jsapi/egw_app.ts +++ b/api/js/jsapi/egw_app.ts @@ -1029,6 +1029,12 @@ export abstract class EgwApp } if(this.dataset.id != 'add') { + // check for mobile framework and close the sidebox/-bar + if (typeof framework.toggleMenu === 'function') + { + framework.toggleMenu('on'); + } + event.stopImmediatePropagation(); self.setState.call(self, state); return false; diff --git a/mail/js/app.js b/mail/js/app.js index 8842cd653b..605350bc68 100755 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2420,6 +2420,12 @@ app.classes.mail = AppJS.extend( return; } + // check for mobile framework and close the sidebox/-bar + if (typeof framework.toggleMenu === 'function') + { + framework.toggleMenu('on'); + } + // Check if this is a top level node and // change profile if server has changed var server = _folder.split('::');