public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] Merge same notification types
ccc56c54
data/web/css/build/008-mailcow.css | 5 +++++
data/web/inc/footer.inc.php | 5 ++++-
data/web/inc/functions.inc.php | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
Diff
diff --git a/data/web/css/build/008-mailcow.css b/data/web/css/build/008-mailcow.css
index 3b7c051a..0f0fc462 100644
--- a/data/web/css/build/008-mailcow.css
+++ b/data/web/css/build/008-mailcow.css
@@ -182,3 +182,8 @@ nav .glyphicon {
padding: 15px 0px 15px 15px;
font-weight: bold;
}
+.alert-hr {
+ margin:3px 0px;
+ border-bottom:1px solid #f5f5f5!important;
+ opacity: 0.3;
+}
diff --git a/data/web/inc/footer.inc.php b/data/web/inc/footer.inc.php
index a30680f5..ed84baa4 100644
--- a/data/web/inc/footer.inc.php
+++ b/data/web/inc/footer.inc.php
@@ -42,8 +42,11 @@ $(document).ready(function() {
$alertbox_log_parser = alertbox_log_parser($_SESSION);
if (is_array($alertbox_log_parser)) {
foreach($alertbox_log_parser as $log) {
+ $alerts[$log['type']][] = $log['msg'];
+ }
+ foreach($alerts as $alert_type => $alert_msg) {
?>
- mailcow_alert_box(<?=$log['msg'];?>, <?=$log['type'];?>);
+ mailcow_alert_box(<?=json_encode(implode('<hr class="alert-hr">', $alert_msg));?>, <?=$alert_type;?>);
<?php
}
unset($_SESSION['return']);
diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php
index 5f324fad..43639d04 100644
--- a/data/web/inc/functions.inc.php
+++ b/data/web/inc/functions.inc.php
@@ -436,7 +436,7 @@ function alertbox_log_parser($_data){
else {
$msg = $return['msg'];
}
- $log_array[] = array('msg' => json_encode($msg), 'type' => json_encode($type));
+ $log_array[] = array('msg' => $msg, 'type' => json_encode($type));
}
if (!empty($log_array)) {
return $log_array;