From 3cc130d2c86efd95ccedbd3bf1e16eaf8c6eeec5 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 13 Nov 2024 17:53:24 +0100 Subject: [PATCH 1/8] * Mail: if Sieve editheader extension is available forward with a From header matching the recipient to avoid SPF and DKIM problems/misalignment (need to be enabled in Dovecot) --- api/src/Mail/Script.php | 123 +++++++++++++++----------- mail/templates/default/sieve.edit.xet | 2 +- 2 files changed, 73 insertions(+), 52 deletions(-) diff --git a/api/src/Mail/Script.php b/api/src/Mail/Script.php index 3ea68a2b2d..763f57352b 100644 --- a/api/src/Mail/Script.php +++ b/api/src/Mail/Script.php @@ -73,21 +73,6 @@ class Script $this->extensions = []; } - private function _setExtensionsStatus(Sieve $connection) - { - $this->extensions = [ - 'vacation' => $connection->hasExtension('vacation'), - 'vacation-seconds' => $connection->hasExtension('vacation-seconds'), - 'regex' => $connection->hasExtension('regex'), - 'enotify' => $connection->hasExtension('enotify'), - 'body' => $connection->hasExtension('body'), - 'variables' => $connection->hasExtension('variables'), - 'date' => $connection->hasExtension('date'), - 'imap4flags' => $connection->hasExtension('imap4flags'), - 'relational' => $connection->hasExtension('relational'), - ]; - } - // get sieve script rules for this user /** * Retrieve the rules @@ -103,7 +88,6 @@ class Script $anyofbit = 4; $keepbit = 8; $regexbit = 128; - $this->_setExtensionsStatus($connection); if (!isset($this->name)){ $this->errstr = 'retrieveRules: no script name specified'; @@ -273,19 +257,17 @@ class Script //include "$default->lib_dir/version.php"; - // set extensions status - $this->_setExtensionsStatus($connection); - - if (!$this->extensions['vacation']) $this->vacation = false; + if (!$connection->hasExtension('vacation')) $this->vacation = false; // for vacation with redirect we need to keep track were the mail goes, to add an explicit keep - if ($this->extensions['variables'] && $this->vacation) + if ($connection->hasExtension('variables') && $this->vacation) { $newscriptbody = 'set "action" "inbox";'."\n\n"; } $continue = 1; - foreach ($this->rules as $rule) { + foreach ($this->rules as $rule) + { $newruletext = ""; // don't print this rule if disabled. @@ -302,7 +284,13 @@ class Script } $started = 0; - if (empty($rule['unconditional'])) { + if (!isset($rule['unconditional'])) + { + $rule['unconditional'] = $rule['action'] && !$rule['from'] && !$rule['to'] && !$rule['subject'] && + !$rule['field'] && !$rule['size'] && !$rule['field_bodytransform'] && !$rule['ctype']; + } + if (empty($rule['unconditional'])) + { if (!$continue) $newruletext .= "els"; $newruletext .= "if " . $anyall . " ("; if ($rule['from']) { @@ -363,7 +351,7 @@ class Script $newruletext .= "size " . $xthan . $rule['size'] . "K"; $started = 1; } - if ($this->extensions['body']){ + if ($connection->hasExtension('body')){ if (!empty($rule['field_bodytransform'])){ if ($started) $newruletext .= ", "; $btransform = " :raw "; @@ -389,21 +377,52 @@ class Script // actions - if (empty($rule['unconditional'])) $newruletext .= ") {\n\t"; + if (empty($rule['unconditional'])) $newruletext .= ") {\n"; + $newruletext .= "\t"; if (preg_match("/folder/i",$rule['action'])) { $newruletext .= "fileinto \"" . ($utf7imap_fileinto ? Translation::convert($rule['action_arg'],'utf-8', 'utf7-imap') : $rule['action_arg']) . "\";"; } - if (preg_match("/reject/i",$rule['action'])) { + if (preg_match("/reject/i",$rule['action'])) + { $newruletext .= "reject text: \n" . $rule['action_arg'] . "\n.\n;"; $rejectused = 1; } - if (preg_match("/address/i",$rule['action'])) { - foreach(preg_split('/, ?/',$rule['action_arg']) as $addr) + if (preg_match("/address/i",$rule['action'])) + { + // forward with recipients address as envelope and header From, to avoid SPF and DKIM problems, + // if editheader Sieve extension is available (needs to be enabled for Dovecot!) + // From header of forwarded mail will be "'sender-address' ", so original sender is still visible + if ($connection->hasExtension('editheader')) + { + $newruletext .= 'if header :matches "From" "*" { set "from_header" "${1}"; }'."\n"; + $newruletext .= "\t".'if address :matches "From" "*" { set "from" "${1}"; }'."\n"; + // we don't delete ReplyTo header to keep it, if it was already set + $newruletext .= "\t".'addheader "ReplyTo" "${from}";'."\n"; + if ($connection->hasExtension('envelope')) { - $newruletext .= "\tredirect \"".trim($addr)."\";\n"; + $newruletext .= "\t".'if envelope :matches "to" "*" { set "user_email" "${1}"; }'."\n"; } + else + { + $newruletext .= "\t".'if address :matches "to" "*" { set "user_email" "${1}"; }'."\n"; + } + // we need to delete From header, to be able to overwrite it! + $newruletext .= "\t".'deleteheader "from";'."\n"; + $newruletext .= "\t".'addheader "From" "\'${from}\' <${user_email}>";'."\n\n"; + } + + foreach(preg_split('/, ?/',$rule['action_arg']) as $addr) + { + $newruletext .= "\tredirect \"".trim($addr)."\";\n"; + } + if ($connection->hasExtension('editheader')) + { + // we restore the From header, in case we keep the mail, or other rules + $newruletext .= "\n\t".'deleteheader "from";'."\n"; + $newruletext .= "\t".'addheader "From" "${from_header}";'."\n"; + } } if (preg_match("/discard/i",$rule['action'])) { $newruletext .= "discard;"; @@ -416,7 +435,7 @@ class Script $newruletext .= "\n\tkeep;"; } // for vacation with redirect we need to keep track were the mail goes, to NOT add an explicit keep - elseif ($this->extensions['variables'] && $this->vacation && + elseif ($connection->hasExtension('variables') && $this->vacation && preg_match('/(folder|reject|address|discard)/', $rule['action'])) { $newruletext .= "\n\tset \"action\" \"$rule[action]\";"; @@ -458,7 +477,7 @@ class Script $vac_rule = ''; if ($vacation['text']) { - if ($this->extensions['regex']) + if ($connection->hasExtension('regex')) { $vac_rule .= "if header :regex " . '"X-Spam-Status" ' . '"\\\\bYES\\\\b"' . "{\n\tstop;\n}\n"; //stop vacation reply if it is spam $regexused = 1; @@ -484,9 +503,9 @@ class Script $vac_rule .= "\tredirect \"" . trim($addr) . "\";\n"; } // if there is no other action e.g. fileinto before, we need to add an explicit keep, as the implicit on is canceled by the vaction redirect! - if ($this->extensions['variables']) $vac_rule .= "\tif string :is \"\${action}\" \"inbox\" {\n"; + if ($connection->hasExtension('variables')) $vac_rule .= "\tif string :is \"\${action}\" \"inbox\" {\n"; $vac_rule .= "\t\tkeep;\n"; - if ($this->extensions['variables']) $vac_rule .= "\t}\n"; + if ($connection->hasExtension('variables')) $vac_rule .= "\t}\n"; $vac_rule .= "}\n"; } if (!isset($vacation['modus']) || $vacation['modus'] !== 'store') @@ -527,7 +546,7 @@ class Script { $vac_rule .= "discard;\n"; } - if ($vacation['status'] === 'by_date' && $this->extensions['date'] && $vacation['start_date'] && $vacation['end_date']) + if ($vacation['status'] === 'by_date' && $connection->hasExtension('date') && $vacation['start_date'] && $vacation['end_date']) { $vac_rule = "if allof (\n". "currentdate :value \"ge\" \"date\" \"". date('Y-m-d', $vacation['start_date']) ."\",\n". @@ -549,10 +568,10 @@ class Script // format notification body $egw_site_title = $GLOBALS['egw_info']['server']['site_title']; - if ($this->extensions['enotify']==true) + if ($connection->hasExtension('enotify')==true) { $notification_body = lang("You have received a new message on the")." {$egw_site_title}"; - if ($this->extensions['variables']) + if ($connection->hasExtension('variables')) { $notification_body .= ", "; $notification_body .= 'From: ${from}'; @@ -595,18 +614,20 @@ class Script if ($activerules) { $newscripthead .= "require [\"fileinto\""; - if ($this->extensions['regex'] && $regexused) $newscripthead .= ",\"regex\""; + if ($connection->hasExtension('regex') && $regexused) $newscripthead .= ",\"regex\""; if ($rejectused) $newscripthead .= ",\"reject\""; if ($this->vacation && $vacation_active) { $newscripthead .= (string)$this->vacation['days'] === '0' ? ',"vacation-seconds"' : ',"vacation"'; } - if ($this->extensions['body']) $newscripthead .= ",\"body\""; - if ($this->extensions['date']) $newscripthead .= ",\"date\""; - if ($this->extensions['relational']) $newscripthead .= ",\"relational\""; - if ($this->extensions['variables']) $newscripthead .= ",\"variables\""; - if ($this->extensions['imap4flags']) $newscripthead .= ",\"imap4flags\""; + if ($connection->hasExtension('body')) $newscripthead .= ",\"body\""; + if ($connection->hasExtension('date')) $newscripthead .= ",\"date\""; + if ($connection->hasExtension('relational')) $newscripthead .= ",\"relational\""; + if ($connection->hasExtension('variables')) $newscripthead .= ",\"variables\""; + if ($connection->hasExtension('imap4flags')) $newscripthead .= ",\"imap4flags\""; + if ($connection->hasExtension('envelope')) $newscripthead .= ",\"envelope\""; + if ($connection->hasExtension('editheader')) $newscripthead .= ",\"editheader\""; - if ($this->emailNotification && $this->emailNotification['status'] == 'on') $newscripthead .= ',"'.($this->extensions['enotify']?'e':'').'notify"'.($this->extensions['variables']?',"variables"':''); // Added email notifications + if ($this->emailNotification && $this->emailNotification['status'] == 'on') $newscripthead .= ',"'.($connection->hasExtension('enotify')?'e':'').'notify"'.($connection->hasExtension('variables')?',"variables"':''); // Added email notifications $newscripthead .= "];\n\n"; } else { // no active rules, but might still have an active vacation rule @@ -614,10 +635,10 @@ class Script if ($this->vacation) { $newscripthead .= 'require['.((string)$this->vacation['days'] === '0' ? '"vacation-seconds"' : '"vacation"'); - if ($this->extensions['variables']) $newscripthead .= ',"variables"'; - if ($this->extensions['regex'] && $regexused) $newscripthead .= ",\"regex\""; - if ($this->extensions['date']) $newscripthead .= ",\"date\""; - if ($this->extensions['relational']) $newscripthead .= ",\"relational\""; + if ($connection->hasExtension('variables')) $newscripthead .= ',"variables"'; + if ($connection->hasExtension('regex') && $regexused) $newscripthead .= ",\"regex\""; + if ($connection->hasExtension('date')) $newscripthead .= ",\"date\""; + if ($connection->hasExtension('relational')) $newscripthead .= ",\"relational\""; $closeRequired=true; } @@ -625,11 +646,11 @@ class Script { if ($this->vacation && $vacation_active) { - $newscripthead .= ",\"".($this->extensions['enotify']?'e':'')."notify\"".($this->extensions['variables']?',"variables"':'')."];\n\n"; // Added email notifications + $newscripthead .= ",\"".($connection->hasExtension('enotify')?'e':'')."notify\"".($connection->hasExtension('variables')?',"variables"':'')."];\n\n"; // Added email notifications } else { - $newscripthead .= "require [\"".($this->extensions['enotify']?'e':'')."notify\"".($this->extensions['variables']?',"variables"':'')."];\n\n"; // Added email notifications + $newscripthead .= "require [\"".($connection->hasExtension('enotify')?'e':'')."notify\"".($connection->hasExtension('variables')?',"variables"':'')."];\n\n"; // Added email notifications } } if ($closeRequired) $newscripthead .= "];\n\n"; @@ -652,7 +673,7 @@ class Script $newscriptfoot .= "#rule&&" . $rule['priority'] . "&&" . $rule['status'] . "&&" . addslashes($rule['from']) . "&&" . addslashes($rule['to']) . "&&" . addslashes($rule['subject']) . "&&" . $rule['action'] . "&&" . $rule['action_arg'] . "&&" . $rule['flg'] . "&&" . addslashes($rule['field']) . "&&" . addslashes($rule['field_val']) . "&&" . $rule['size']; - if ($this->extensions['body'] && (!empty($rule['field_bodytransform']) || ($rule['ctype']!= '0' && !empty($rule['ctype'])))) $newscriptfoot .= "&&" . $rule['bodytransform'] . "&&" . $rule['field_bodytransform']. "&&" . $rule['ctype'] . "&&" . $rule['field_ctype_val']; + if ($connection->hasExtension('body') && (!empty($rule['field_bodytransform']) || ($rule['ctype']!= '0' && !empty($rule['ctype'])))) $newscriptfoot .= "&&" . $rule['bodytransform'] . "&&" . $rule['field_bodytransform']. "&&" . $rule['ctype'] . "&&" . $rule['field_ctype_val']; $newscriptfoot .= "\n"; $pcount = $pcount+2; //error_log(__CLASS__."::".__METHOD__.__LINE__.array2string($newscriptfoot)); @@ -704,7 +725,7 @@ class Script throw $e; } $this->errstr = 'updateScript: putscript failed: ' . $e->getMessage().($e->details?': '.$e->details:''); - if ($regexused && !$this->extensions['regex']) $this->errstr .= " REGEX is not an supported CAPABILITY"; + if ($regexused && !$connection->hasExtension('regex')) $this->errstr .= " REGEX is not an supported CAPABILITY"; error_log(__METHOD__.__LINE__.' # Error: ->'.$this->errstr); error_log(__METHOD__.__LINE__.' # ScriptName:'.$this->name.' Script:'.$newscript); error_log(__METHOD__.__LINE__.' # Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid']); diff --git a/mail/templates/default/sieve.edit.xet b/mail/templates/default/sieve.edit.xet index 1c481a77f2..e320e58214 100644 --- a/mail/templates/default/sieve.edit.xet +++ b/mail/templates/default/sieve.edit.xet @@ -12,7 +12,7 @@ - + From 457cf3e34872afd0d4c949aa5f0f68261704cb61 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 13 Nov 2024 19:31:07 +0100 Subject: [PATCH 2/8] translate "unconditional", "continue" and "keep a copy" in Sieve rules --- mail/inc/class.mail_sieve.inc.php | 6 +++--- mail/lang/egw_de.lang | 3 +++ mail/lang/egw_en.lang | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mail/inc/class.mail_sieve.inc.php b/mail/inc/class.mail_sieve.inc.php index 2ba3dac6b0..c6496d9ba1 100644 --- a/mail/inc/class.mail_sieve.inc.php +++ b/mail/inc/class.mail_sieve.inc.php @@ -1019,7 +1019,7 @@ class mail_sieve $complete = lang('IF').' '; if ($rule['unconditional']) { - $complete = "[Unconditional] "; + $complete = '['.lang('Unconditional').'] '; } if ($rule['from']) { @@ -1121,11 +1121,11 @@ class mail_sieve } if ($rule['continue']) { - $complete .= " [Continue]"; + $complete .= ' ['.lang('Continue').']'; } if ($rule['keep']) { - $complete .= " [Keep a copy]"; + $complete .= ' ['.lang('Keep a copy').']'; } return $complete; } diff --git a/mail/lang/egw_de.lang b/mail/lang/egw_de.lang index 7f45736a3a..610873c048 100644 --- a/mail/lang/egw_de.lang +++ b/mail/lang/egw_de.lang @@ -115,6 +115,7 @@ connection status mail de Verbindungsstatus contact label mail de Anzeige Kontakt contains mail de beinhaltet contains(*) mail de enthält(*) +continue mail de Fortsetzen convert mail to item and attach its attachments to this item (standard) mail de Konvertiere E-Mail zum Eintrag und füge die E-Mail-Anhänge hinzu (Standard) convert mail to item, attach its attachments and add raw message (message/rfc822 (.eml)) as attachment mail de Konvertiere E-Mail zum Eintrag und füge die Anhänge sowie die original E-Mail (als .eml) hinzu convert only mail to item (ignore possible attachments) mail de Konvertiere nur den E-Mail-Text zum Eintrag (keine Anhänge und keine E-Mail als .eml) @@ -324,6 +325,7 @@ insert the signature at top of the new (or reply) message when opening compose d job mail de Dienstlich junk mail de Spam junk folder mail de Ordner für Spam-Nachrichten +keep a copy mail de Eine Kopie behalten keep a copy of the message in your inbox mail de Eine Kopie der Nachricht im Posteingang behalten kilobytes mail de Kilobyte later mail de Später @@ -650,6 +652,7 @@ trust the server when retrieving the folder status. if you select no, we will se trying to recover from session data mail de Versuch der Wiederherstellung aus den gespeicherten Session-Daten turn off horizontal line between signature and composed message (this is not according to rfc).
if you use templates, this option is only applied to the text part of the message. mail de Deaktivieren Sie die horizontale Trennlinie zwischen dem Text Ihrer E-Mail und der Signatur. unable to fetch vacation! mail de Abwesenheitsnotiz konnte nicht gelesen werden! +unconditional mail de immer undelete mail de Als gelöscht markiert entfernen unflagged mail de Markierung entfernen unread mail de ungelesen diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index 7864498648..e01c6361d0 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -115,6 +115,7 @@ connection status mail en Connection status contact label mail en Contact label contains mail en contains contains(*) mail en contains(*) +continue mail en Continue convert mail to item and attach its attachments to this item (standard) mail en Convert email to item and attach its attachments to this item (standard) convert mail to item, attach its attachments and add raw message (message/rfc822 (.eml)) as attachment mail en Convert email to item, attach its attachments and add raw message (.eml) as attachment convert only mail to item (ignore possible attachments) mail en Convert only email to item (ignore possible attachments) @@ -324,6 +325,7 @@ insert the signature at top of the new (or reply) message when opening compose d job mail en Job junk mail en Junk junk folder mail en Junk folder +keep a copy mail en Keep a copy keep a copy of the message in your inbox mail en Keep a copy of the message in your inbox kilobytes mail en kilobytes later mail en Later @@ -650,6 +652,7 @@ trust the server when retrieving the folder status. if you select no, we will se trying to recover from session data mail en Trying to recover from session data turn off horizontal line between signature and composed message (this is not according to rfc).
if you use templates, this option is only applied to the text part of the message. mail en Turn off horizontal line between signature and composed message.
If you use templates, this option is only applied to the text part of the message. unable to fetch vacation! mail en Unable to fetch vacation! +unconditional mail en Unconditional undelete mail en Undelete unflagged mail en Unflagged unread mail en unread From bda2c62e58006efd01551b4ed5c21524ed4539c7 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 13 Nov 2024 19:54:01 +0100 Subject: [PATCH 3/8] remove DKIM-Signature before forward, as we change From, and restore it after --- api/src/Mail/Script.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Mail/Script.php b/api/src/Mail/Script.php index 763f57352b..0923bce476 100644 --- a/api/src/Mail/Script.php +++ b/api/src/Mail/Script.php @@ -411,6 +411,9 @@ class Script // we need to delete From header, to be able to overwrite it! $newruletext .= "\t".'deleteheader "from";'."\n"; $newruletext .= "\t".'addheader "From" "\'${from}\' <${user_email}>";'."\n\n"; + // we need to delete the DKIM-Signature header, as we change the from + $newruletext .= 'if header :matches "DKIM-Signature" "*" { set "dkim_signature" "${1}"; }'."\n"; + $newruletext .= "\t".'deleteheader "dkim-signature";'."\n"; } foreach(preg_split('/, ?/',$rule['action_arg']) as $addr) @@ -422,6 +425,8 @@ class Script // we restore the From header, in case we keep the mail, or other rules $newruletext .= "\n\t".'deleteheader "from";'."\n"; $newruletext .= "\t".'addheader "From" "${from_header}";'."\n"; + // we restore the DKIM-Signature header + $newruletext .= "\t".'addheader "DKIM-Signature" "${dkim_signature}";'."\n"; } } if (preg_match("/discard/i",$rule['action'])) { From f9fe680478f7caee7c42baffb5ba724490dc0d91 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 13 Nov 2024 19:58:29 +0100 Subject: [PATCH 4/8] fix indention and newlines --- api/src/Mail/Script.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/Mail/Script.php b/api/src/Mail/Script.php index 0923bce476..32b5ab83c6 100644 --- a/api/src/Mail/Script.php +++ b/api/src/Mail/Script.php @@ -410,10 +410,10 @@ class Script } // we need to delete From header, to be able to overwrite it! $newruletext .= "\t".'deleteheader "from";'."\n"; - $newruletext .= "\t".'addheader "From" "\'${from}\' <${user_email}>";'."\n\n"; + $newruletext .= "\t".'addheader "From" "\'${from}\' <${user_email}>";'."\n"; // we need to delete the DKIM-Signature header, as we change the from - $newruletext .= 'if header :matches "DKIM-Signature" "*" { set "dkim_signature" "${1}"; }'."\n"; - $newruletext .= "\t".'deleteheader "dkim-signature";'."\n"; + $newruletext .= "\t".'if header :matches "DKIM-Signature" "*" { set "dkim_signature" "${1}"; }'."\n"; + $newruletext .= "\t".'deleteheader "dkim-signature";'."\n\n"; } foreach(preg_split('/, ?/',$rule['action_arg']) as $addr) From 7605ba529f2319ff59e19ab2b50e214adf3d387b Mon Sep 17 00:00:00 2001 From: milan Date: Thu, 14 Nov 2024 15:03:33 +0100 Subject: [PATCH 5/8] mail view toolbar menu scrollable on mobile Regarding Ticket #100541 --- pixelegg/mobile/fw_mobile.css | 1 + pixelegg/mobile/fw_mobile.less | 1 + 2 files changed, 2 insertions(+) diff --git a/pixelegg/mobile/fw_mobile.css b/pixelegg/mobile/fw_mobile.css index e88d5175b4..0c90c13478 100644 --- a/pixelegg/mobile/fw_mobile.css +++ b/pixelegg/mobile/fw_mobile.css @@ -9138,6 +9138,7 @@ table.egwGridView_grid img.et2_appicon { } body .et2_toolbar .ui-toolbar-menulist { width: 100%; + max-height: 90vh; left: 0px; overflow-y: auto !important; box-shadow: 2px 3px 13px #666666; diff --git a/pixelegg/mobile/fw_mobile.less b/pixelegg/mobile/fw_mobile.less index bd800f4a5f..9a34bed6ce 100644 --- a/pixelegg/mobile/fw_mobile.less +++ b/pixelegg/mobile/fw_mobile.less @@ -1352,6 +1352,7 @@ .ui-toolbar-menulist { width: 100%; + max-height: 90vh; left:0px; overflow-y: auto !important; box-shadow: 2px 3px 13px #666666; From 0e98fb40fdbe9e66b837824d0f81d26e9016569f Mon Sep 17 00:00:00 2001 From: milan Date: Thu, 14 Nov 2024 15:28:54 +0100 Subject: [PATCH 6/8] tab size fix Regarding Ticket #100501 --- api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts b/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts index a780731ce8..8d3d8cef17 100644 --- a/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts +++ b/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts @@ -269,9 +269,11 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab const initial = firstTab.hasAttribute("active"); firstTab.setAttribute("active", ''); const tabHeight = getComputedStyle(firstTab).height; - if (parseInt(maxHeight) > 50 && parseInt(maxHeight) < parseInt(tabHeight)) + if (parseInt(maxHeight) > 50 && parseInt(maxHeight) < parseInt(tabHeight)) //there was a reasonable max height set { this.tabHeight = maxHeight; + } else if(maxHeight != '0px'){ //max height was set but is unreasonable small + this.tabHeight = '86vh' // use most of available space, but not all so Tabbox header fits too, and does not need second scrollbar } else { this.tabHeight = tabHeight; From 36fd86b312c36f51e50c83c36ac5fd120fdfaa2d Mon Sep 17 00:00:00 2001 From: milan Date: Thu, 14 Nov 2024 17:29:51 +0100 Subject: [PATCH 7/8] --fix rc status select box to be full width -- timezone select also has rounded corners in fancy theme Regarding Ticket #100461 --- pixelegg/css/fancy.css | 6 +++++- pixelegg/css/fancy.less | 7 +++++++ pixelegg/css/mobile.css | 3 ++- pixelegg/css/monochrome.css | 3 ++- pixelegg/css/pixelegg.css | 2 +- pixelegg/less/layout_raster_header.less | 3 ++- pixelegg/mobile/fw_mobile.css | 3 ++- 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/pixelegg/css/fancy.css b/pixelegg/css/fancy.css index 72be757388..4825d7c71a 100644 --- a/pixelegg/css/fancy.css +++ b/pixelegg/css/fancy.css @@ -4319,8 +4319,9 @@ body.scrollVertical { font-size: 120%; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select { - width: 50% !important; + width: auto; margin-left: 10px; + margin-right: 10px; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select sl-menu-item::part(checked-icon) { border-radius: 50%; @@ -7341,3 +7342,6 @@ div.flatpickr-calendar .shortcut-buttons-flatpickr-buttons button:last-child { #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_content .egw_fw_ui_category ul li { border-radius: var(--sl-border-radius-medium); } +select { + border-radius: var(--sl-border-radius-medium); +} diff --git a/pixelegg/css/fancy.less b/pixelegg/css/fancy.less index db7b84e0d4..8265058125 100644 --- a/pixelegg/css/fancy.less +++ b/pixelegg/css/fancy.less @@ -174,6 +174,7 @@ div.flatpickr-calendar .shortcut-buttons-flatpickr-buttons button:last-child { right: 0px; top: 2px } +//end tabs header styling //sidebox @@ -195,3 +196,9 @@ div.flatpickr-calendar .shortcut-buttons-flatpickr-buttons button:last-child { border-radius: var(--sl-border-radius-medium); } } +//end sidebox + +//not et2-select should also have rounded corners +select{ + border-radius: var(--sl-border-radius-medium); +} diff --git a/pixelegg/css/mobile.css b/pixelegg/css/mobile.css index f0515627ab..b4b51cdd6b 100644 --- a/pixelegg/css/mobile.css +++ b/pixelegg/css/mobile.css @@ -4322,8 +4322,9 @@ body.scrollVertical { font-size: 120%; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select { - width: 50% !important; + width: auto; margin-left: 10px; + margin-right: 10px; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select sl-menu-item::part(checked-icon) { border-radius: 50%; diff --git a/pixelegg/css/monochrome.css b/pixelegg/css/monochrome.css index ffad8ca482..b8fae63bdf 100644 --- a/pixelegg/css/monochrome.css +++ b/pixelegg/css/monochrome.css @@ -4301,8 +4301,9 @@ body.scrollVertical { font-size: 120%; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select { - width: 50% !important; + width: auto; margin-left: 10px; + margin-right: 10px; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select sl-menu-item::part(checked-icon) { border-radius: 50%; diff --git a/pixelegg/css/pixelegg.css b/pixelegg/css/pixelegg.css index b7fa5da7f7..9c88190646 100644 --- a/pixelegg/css/pixelegg.css +++ b/pixelegg/css/pixelegg.css @@ -4312,7 +4312,7 @@ body.scrollVertical { font-size: 120%; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select { - width: 50% !important; + width: 70% !important; margin-left: 10px; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select sl-menu-item::part(checked-icon) { diff --git a/pixelegg/less/layout_raster_header.less b/pixelegg/less/layout_raster_header.less index 4319aba7c6..54e3ede56e 100644 --- a/pixelegg/less/layout_raster_header.less +++ b/pixelegg/less/layout_raster_header.less @@ -108,8 +108,9 @@ font-size: 120%; } #rc_status_select { - width: 50% !important; + width: auto; margin-left: 10px; + margin-right: 10px; sl-menu-item::part(checked-icon) { border-radius: 50%; width: 12px; diff --git a/pixelegg/mobile/fw_mobile.css b/pixelegg/mobile/fw_mobile.css index 0c90c13478..4c9cce28aa 100644 --- a/pixelegg/mobile/fw_mobile.css +++ b/pixelegg/mobile/fw_mobile.css @@ -4332,8 +4332,9 @@ body.scrollVertical { font-size: 120%; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select { - width: 50% !important; + width: auto; margin-left: 10px; + margin-right: 10px; } #egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select sl-menu-item::part(checked-icon) { border-radius: 50%; From 1b3f6ea95dae48c684aabe2687f7b1dac72fe090 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 14 Nov 2024 10:03:37 -0700 Subject: [PATCH 8/8] Et2Tree: Stop doubled onclick call --- api/js/etemplate/Et2Tree/Et2Tree.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index 44498d3545..375841c38b 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -940,14 +940,6 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin { this.selectedNodes = event.detail.selection }*/ - if(typeof this.onclick == "function") - { - // wait for the update, so app founds DOM in the expected state - this._tree.updateComplete.then(() => - { - this.onclick(nodes[0].id, this, event.detail.previous) - }); - } } protected async finishedLazyLoading()