Revert alertslog changes
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 2 Feb 2010 17:31:28 +0000 (10:31 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 2 Feb 2010 17:35:36 +0000 (10:35 -0700)
Looks too much like an unseen mail count.
Tweak error display - show for longer but don't make sticky.

imp/js/DimpBase.js
imp/js/DimpCore.js

index 2b3ef01..c9923f2 100644 (file)
@@ -1682,13 +1682,6 @@ var DimpBase = {
         }
     },
 
-    /* Growler handler */
-    alertsloglinkUpdate: function()
-    {
-        var lsize = DimpCore.Growler.logSize();
-        $('alertsloglink').down('A').update((DimpCore.Growler.logVisible() ? DIMP.text.hidealog : DIMP.text.showalog) + (lsize ? (' (' + DimpCore.Growler.logSize() + ')') : ''));
-    },
-
     /* Keydown event handler */
     keydownHandler: function(e)
     {
@@ -1973,7 +1966,7 @@ var DimpBase = {
 
             case 'alertsloglink':
                 DimpCore.Growler.toggleLog();
-                this.alertsloglinkUpdate();
+                $('alertsloglink').down('A').update(DimpCore.Growler.logVisible() ? DIMP.text.hidealog : DIMP.text.showalog);
                 break;
 
             case 'applyfilterlink':
@@ -3159,9 +3152,6 @@ DimpCore.clickHandler = DimpCore.clickHandler.wrap(DimpBase.clickHandler.bind(Di
 DimpCore.contextOnClick = DimpCore.contextOnClick.wrap(DimpBase.contextOnClick.bind(DimpBase));
 DimpCore.contextOnShow = DimpCore.contextOnShow.wrap(DimpBase.contextOnShow.bind(DimpBase));
 
-/* Growler listener. */
-document.observe('Growler:created', DimpBase.alertsloglinkUpdate.bind(DimpBase));
-
 /* Extend AJAX exception handling. */
 DimpCore.doActionOpts.onException = DimpCore.doActionOpts.onException.wrap(DimpBase.onAjaxException.bind(DimpBase));
 
index 6d5a9aa..d1d1522 100644 (file)
@@ -219,9 +219,8 @@ var DimpCore = {
             case 'imp.redirect':
                 this.Growler.growl(m.message, {
                     className: m.type.replace('.', '-'),
-                    life: 8,
-                    log: log,
-                    sticky: m.type == 'horde.error'
+                    life: (m.type == 'horde.error' ? 12 : 8),
+                    log: log
                 });
             }
         }, this);