Tweak notification log, again.
authorJan Schneider <jan@horde.org>
Sun, 21 Feb 2010 23:24:35 +0000 (00:24 +0100)
committerJan Schneider <jan@horde.org>
Mon, 22 Feb 2010 00:06:50 +0000 (01:06 +0100)
24 files changed:
kronolith/js/kronolith.js
kronolith/templates/index/index.inc
kronolith/themes/graphics/alerts/alarm.png [new file with mode: 0644]
kronolith/themes/graphics/alerts/error.png [new file with mode: 0644]
kronolith/themes/graphics/alerts/message.png [new file with mode: 0644]
kronolith/themes/graphics/alerts/success.png [new file with mode: 0644]
kronolith/themes/graphics/alerts/warning.png [new file with mode: 0644]
kronolith/themes/graphics/close.png [new file with mode: 0644]
kronolith/themes/sapo [new symlink]
kronolith/themes/screen.css
kronolith/themes/silver/graphics/alerts/alarm.png [new file with mode: 0644]
kronolith/themes/silver/graphics/alerts/error.png [new file with mode: 0644]
kronolith/themes/silver/graphics/alerts/message.png [new file with mode: 0644]
kronolith/themes/silver/graphics/alerts/success.png [new file with mode: 0644]
kronolith/themes/silver/graphics/alerts/warning.png [new file with mode: 0644]
kronolith/themes/silver/graphics/close.png [new file with mode: 0644]
kronolith/themes/silver/screen.css
kronolith/themes/tango-blue/graphics/alerts/alarm.png [new file with mode: 0644]
kronolith/themes/tango-blue/graphics/alerts/error.png [new file with mode: 0644]
kronolith/themes/tango-blue/graphics/alerts/message.png [new file with mode: 0644]
kronolith/themes/tango-blue/graphics/alerts/success.png [new file with mode: 0644]
kronolith/themes/tango-blue/graphics/alerts/warning.png [new file with mode: 0644]
kronolith/themes/tango-blue/graphics/close.png [new file with mode: 0644]
kronolith/themes/tango-blue/screen.css

index bd575e6..7ebd60c 100644 (file)
@@ -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;
             }
 
index 8633199..7ed8d9e 100644 (file)
         <?php endif; ?>
         <?php endforeach; ?>
       </ul>
-      <span class="kronolithSeparator">|</span>
     </div>
     <?php endif; ?>
+    <a href="#" id="kronolithNotifications" class="kronolithNotifications" title="<?php echo ("0 notifications") ?>"></a>
+    <span class="kronolithSeparator">|</span>
     <a href="#" id="kronolithOptions"><?php echo _("Options") ?></a><?php if ($help_link) echo ' <span class="kronolithSeparator">|</span> ' . $help_link; if ($logout_link) echo ' <span class="kronolithSeparator">|</span> ' . $logout_link ?>
   </div>
   <!-- end services -->
@@ -28,7 +29,6 @@
   <div class="kronolithDateChoice" <?php $todayAccessKey = Horde::getAccessKey(_("_Today")); echo Horde::getAccessKeyAndTitle(_("_Today"), true) ?>>
     <div><?php echo $today->strftime('%a, %e %b %Y') ?></div>
   </div>
-  <a href="#" id="kronolithNotifications" class="kronolithNotifications"><?php echo _("no notifications") ?></a>
   <div id="kronolithNav">
     <a id="kronolithNavDay" accesskey="1"><span><?php echo _("Day") ?></span></a>
     <a id="kronolithNavWeek" accesskey="2"><span><?php echo _("Week") ?></span></a>
diff --git a/kronolith/themes/graphics/alerts/alarm.png b/kronolith/themes/graphics/alerts/alarm.png
new file mode 100644 (file)
index 0000000..70c1e1d
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 (file)
index 0000000..d1c6785
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 (file)
index 0000000..1cae1e8
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 (file)
index 0000000..4af9076
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 (file)
index 0000000..7f6d50f
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 (file)
index 0000000..e135bc7
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 (symlink)
index 0000000..a11c114
--- /dev/null
@@ -0,0 +1 @@
+../../../calendar/kronolith/themes/sapo/
\ No newline at end of file
index bbaf3d0..c5de29c 100644 (file)
@@ -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 (file)
index 0000000..f6c56ee
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 (file)
index 0000000..84898d9
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 (file)
index 0000000..f61dc86
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 (file)
index 0000000..b3141e1
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 (file)
index 0000000..f2e2e99
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 (file)
index 0000000..9fc6a8c
Binary files /dev/null and b/kronolith/themes/silver/graphics/close.png differ
index 451066f..fd86244 100644 (file)
@@ -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 (file)
index 0000000..70c1e1d
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 (file)
index 0000000..e97bc43
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 (file)
index 0000000..ed46c3e
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 (file)
index 0000000..1e92d50
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 (file)
index 0000000..65a4d2c
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 (file)
index 0000000..4b6991e
Binary files /dev/null and b/kronolith/themes/tango-blue/graphics/close.png differ
index 51a6c89..489dd4a 100644 (file)
 .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")
+}