From c466a4e9ab2805f98dc458e2d02adf31c43b0db4 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 21 Feb 2023 17:55:17 +0100 Subject: [PATCH] Do not run splitter resize control for mobile theme --- mail/js/app.js | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 1e96dcbaf4..4c16d126ca 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -253,33 +253,35 @@ app.classes.mail = AppJS.extend( // Show vacation notice on load for the current profile (if not called by mail_searchtype_change()) var alreadyrefreshed = this.mail_searchtype_change(); if (!alreadyrefreshed) this.mail_callRefreshVacationNotice(); - - let splitter = this.et2.getWidgetById('mailSplitter'); - let composeBtn = this.et2.getWidgetById('button[mailcreate]'); - let composeBtnLabel = composeBtn.label; - if (splitter && !splitter.vertical) + if (!egwIsMobile()) { - splitter.addEventListener('sl-reposition', function(){ - if (this.position < 44) - { - this.classList.add('limitted'); - if (this.position < 30) + let splitter = this.et2.getWidgetById('mailSplitter'); + let composeBtn = this.et2.getWidgetById('button[mailcreate]'); + let composeBtnLabel = composeBtn.label; + if (splitter && !splitter.vertical) + { + splitter.addEventListener('sl-reposition', function(){ + if (this.position < 44) { - this.classList.add('squeezed'); - composeBtn.label = ''; + this.classList.add('limitted'); + if (this.position < 30) + { + this.classList.add('squeezed'); + composeBtn.label = ''; + } + else + { + this.classList.remove('squeezed'); + } } else { + this.classList.remove('limitted'); this.classList.remove('squeezed'); + composeBtn.label = composeBtnLabel; } - } - else - { - this.classList.remove('limitted'); - this.classList.remove('squeezed'); - composeBtn.label = composeBtnLabel; - } - }); + }); + } } break; case 'mail.display':