From: Jan Schneider Date: Sun, 21 Feb 2010 23:24:35 +0000 (+0100) Subject: Tweak notification log, again. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=32b79a30e28ece95c59a5a548465d76da945342e;p=horde.git Tweak notification log, again. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index bd575e65b..7ebd60cb3 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -193,13 +193,15 @@ KronolithCore = { }); var notify = $('kronolithNotifications'), className = m.type.replace(/\./, '-'), - order = 'horde-error,horde-warning,horde-message,horde-success,kronolithNotifications'; - if (!notify.className || - order.indexOf(notify.className) > order.indexOf(className)) { + order = 'horde-error,horde-warning,horde-message,horde-success,kronolithNotifications', + open = notify.hasClassName('kronolithClose'); + notify.removeClassName('kronolithClose'); + if (order.indexOf(notify.className) > order.indexOf(className)) { notify.className = className; } - notify.update(Kronolith.text.alerts.interpolate({ count: ++this.growls })); - notify.up().show(); + if (open) { + notify.addClassName('kronolithClose'); + } break; } }, this); @@ -2815,11 +2817,16 @@ KronolithCore = { break; case 'kronolithNotifications': + var img = elt.down('img'), iconName; if (this.Growler.toggleLog()) { - elt.update(Kronolith.text.hidelog); + elt.title = Kronolith.text.hidelog; + elt.addClassName('kronolithClose'); } else { - $('kronolithNotifications').update(Kronolith.text.alerts.interpolate({ count: this.growls })); + elt.title = Kronolith.text.alerts.interpolate({ count: this.growls }); + elt.removeClassName('kronolithClose'); } + Horde_ToolTips.detach(elt); + Horde_ToolTips.attach(elt); break; } diff --git a/kronolith/templates/index/index.inc b/kronolith/templates/index/index.inc index 8633199c8..7ed8d9e6f 100644 --- a/kronolith/templates/index/index.inc +++ b/kronolith/templates/index/index.inc @@ -16,9 +16,10 @@ - | + "> + | | ' . $help_link; if ($logout_link) echo ' | ' . $logout_link ?> @@ -28,7 +29,6 @@
>
strftime('%a, %e %b %Y') ?>
-
diff --git a/kronolith/themes/graphics/alerts/alarm.png b/kronolith/themes/graphics/alerts/alarm.png new file mode 100644 index 000000000..70c1e1d2c Binary files /dev/null and b/kronolith/themes/graphics/alerts/alarm.png differ diff --git a/kronolith/themes/graphics/alerts/error.png b/kronolith/themes/graphics/alerts/error.png new file mode 100644 index 000000000..d1c6785ec Binary files /dev/null and b/kronolith/themes/graphics/alerts/error.png differ diff --git a/kronolith/themes/graphics/alerts/message.png b/kronolith/themes/graphics/alerts/message.png new file mode 100644 index 000000000..1cae1e8af Binary files /dev/null and b/kronolith/themes/graphics/alerts/message.png differ diff --git a/kronolith/themes/graphics/alerts/success.png b/kronolith/themes/graphics/alerts/success.png new file mode 100644 index 000000000..4af9076c7 Binary files /dev/null and b/kronolith/themes/graphics/alerts/success.png differ diff --git a/kronolith/themes/graphics/alerts/warning.png b/kronolith/themes/graphics/alerts/warning.png new file mode 100644 index 000000000..7f6d50fab Binary files /dev/null and b/kronolith/themes/graphics/alerts/warning.png differ diff --git a/kronolith/themes/graphics/close.png b/kronolith/themes/graphics/close.png new file mode 100644 index 000000000..e135bc7bf Binary files /dev/null and b/kronolith/themes/graphics/close.png differ diff --git a/kronolith/themes/sapo b/kronolith/themes/sapo new file mode 120000 index 000000000..a11c11486 --- /dev/null +++ b/kronolith/themes/sapo @@ -0,0 +1 @@ +../../../calendar/kronolith/themes/sapo/ \ No newline at end of file diff --git a/kronolith/themes/screen.css b/kronolith/themes/screen.css index bbaf3d04f..c5de29c60 100644 --- a/kronolith/themes/screen.css +++ b/kronolith/themes/screen.css @@ -463,20 +463,30 @@ body.kronolithAjax { margin-right: 10px; text-align: right; } +.kronolithNotifications { + background-color: #d9d9d9 +} #kronolithNotifications { float: left; - padding: 0 10px; + width: 23px; height: 23px; line-height: 23px; border: 1px solid #999; - -moz-border-radius: 0 5px 5px 0; - -webkit-border-radius: 0 5px 5px 0; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #d9d9d9 url("graphics/alerts/message.png") no-repeat center center; } -.kronolithNotifications { - background-color: #d9d9d9; +#kronolithNotifications.horde-error { + background-image: url("graphics/alerts/error.png") } -#kronolithNotifications.kronolithNotifications { - background-color: #f0f0f0; +#kronolithNotifications.horde-success { + background-image: url("graphics/alerts/success.png") +} +#kronolithNotifications.horde-warning { + background-image: url("graphics/alerts/warning.png") +} +#kronolithNotifications.kronolithClose { + background-image: url("graphics/close.png") } /* Main area */ @@ -649,8 +659,8 @@ a.kronolithFormCancel { margin-right: 1px; background: #d6d6d6; border: 1px solid #999; - -moz-border-radius: 5px 0 0 5px; - -webkit-border-radius: 5px 0 0 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; font-weight: bold; cursor: pointer; } @@ -1224,7 +1234,7 @@ table.kronolithView td.kronolithFirstCol { line-height: 15px; padding: 2px; text-align: center; - background: transparent url("graphics/new_small_fade.png") 3px 5px no-repeat; + background: transparent url("graphics/new_small_fade.png") no-repeat 3px 5px; } .kronolithAddEvent:hover { background-image: url("graphics/new_small.png"); @@ -1308,10 +1318,10 @@ table.kronolithView td.kronolithToday { cursor: move; } .kronolithEvent.kronolithEditable .kronolithDragger { - background: transparent url("graphics/drag-handle.png") center center no-repeat; + background: transparent url("graphics/drag-handle.png") no-repeat center center; } .kronolithDragger.drag { - background: transparent url("graphics/drag-handle.png") center center no-repeat; + background: transparent url("graphics/drag-handle.png") no-repeat center center; opacity: .8; filter: alpha(opacity=80); } diff --git a/kronolith/themes/silver/graphics/alerts/alarm.png b/kronolith/themes/silver/graphics/alerts/alarm.png new file mode 100644 index 000000000..f6c56ee55 Binary files /dev/null and b/kronolith/themes/silver/graphics/alerts/alarm.png differ diff --git a/kronolith/themes/silver/graphics/alerts/error.png b/kronolith/themes/silver/graphics/alerts/error.png new file mode 100644 index 000000000..84898d94b Binary files /dev/null and b/kronolith/themes/silver/graphics/alerts/error.png differ diff --git a/kronolith/themes/silver/graphics/alerts/message.png b/kronolith/themes/silver/graphics/alerts/message.png new file mode 100644 index 000000000..f61dc8681 Binary files /dev/null and b/kronolith/themes/silver/graphics/alerts/message.png differ diff --git a/kronolith/themes/silver/graphics/alerts/success.png b/kronolith/themes/silver/graphics/alerts/success.png new file mode 100644 index 000000000..b3141e1f1 Binary files /dev/null and b/kronolith/themes/silver/graphics/alerts/success.png differ diff --git a/kronolith/themes/silver/graphics/alerts/warning.png b/kronolith/themes/silver/graphics/alerts/warning.png new file mode 100644 index 000000000..f2e2e991a Binary files /dev/null and b/kronolith/themes/silver/graphics/alerts/warning.png differ diff --git a/kronolith/themes/silver/graphics/close.png b/kronolith/themes/silver/graphics/close.png new file mode 100644 index 000000000..9fc6a8c46 Binary files /dev/null and b/kronolith/themes/silver/graphics/close.png differ diff --git a/kronolith/themes/silver/screen.css b/kronolith/themes/silver/screen.css index 451066f93..fd862442c 100644 --- a/kronolith/themes/silver/screen.css +++ b/kronolith/themes/silver/screen.css @@ -19,3 +19,18 @@ table.monthgrid { table.kronolithView td.button { border-color: #999; } +#kronolithNotifications { + background-image: url("graphics/alerts/message.png"); +} +#kronolithNotifications.horde-error { + background-image: url("graphics/alerts/error.png") +} +#kronolithNotifications.horde-success { + background-image: url("graphics/alerts/success.png") +} +#kronolithNotifications.horde-warning { + background-image: url("graphics/alerts/warning.png") +} +#kronolithNotifications.kronolithClose { + background-image: url("graphics/close.png") +} diff --git a/kronolith/themes/tango-blue/graphics/alerts/alarm.png b/kronolith/themes/tango-blue/graphics/alerts/alarm.png new file mode 100644 index 000000000..70c1e1d2c Binary files /dev/null and b/kronolith/themes/tango-blue/graphics/alerts/alarm.png differ diff --git a/kronolith/themes/tango-blue/graphics/alerts/error.png b/kronolith/themes/tango-blue/graphics/alerts/error.png new file mode 100644 index 000000000..e97bc4350 Binary files /dev/null and b/kronolith/themes/tango-blue/graphics/alerts/error.png differ diff --git a/kronolith/themes/tango-blue/graphics/alerts/message.png b/kronolith/themes/tango-blue/graphics/alerts/message.png new file mode 100644 index 000000000..ed46c3ecd Binary files /dev/null and b/kronolith/themes/tango-blue/graphics/alerts/message.png differ diff --git a/kronolith/themes/tango-blue/graphics/alerts/success.png b/kronolith/themes/tango-blue/graphics/alerts/success.png new file mode 100644 index 000000000..1e92d508d Binary files /dev/null and b/kronolith/themes/tango-blue/graphics/alerts/success.png differ diff --git a/kronolith/themes/tango-blue/graphics/alerts/warning.png b/kronolith/themes/tango-blue/graphics/alerts/warning.png new file mode 100644 index 000000000..65a4d2c72 Binary files /dev/null and b/kronolith/themes/tango-blue/graphics/alerts/warning.png differ diff --git a/kronolith/themes/tango-blue/graphics/close.png b/kronolith/themes/tango-blue/graphics/close.png new file mode 100644 index 000000000..4b6991e9f Binary files /dev/null and b/kronolith/themes/tango-blue/graphics/close.png differ diff --git a/kronolith/themes/tango-blue/screen.css b/kronolith/themes/tango-blue/screen.css index 51a6c89ee..489dd4a78 100644 --- a/kronolith/themes/tango-blue/screen.css +++ b/kronolith/themes/tango-blue/screen.css @@ -19,3 +19,19 @@ .day-eventbox { padding: 6px; } + +#kronolithNotifications { + background-image: url("graphics/alerts/message.png"); +} +#kronolithNotifications.horde-error { + background-image: url("graphics/alerts/error.png") +} +#kronolithNotifications.horde-success { + background-image: url("graphics/alerts/success.png") +} +#kronolithNotifications.horde-warning { + background-image: url("graphics/alerts/warning.png") +} +#kronolithNotifications.kronolithClose { + background-image: url("graphics/close.png") +}