From: Michael M Slusarz Date: Tue, 2 Feb 2010 07:47:09 +0000 (-0700) Subject: Add logVisible() and logSize() functions to Growler. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=02eb51b3149ff94ad0ea156a6582a0baa95c83f4;p=horde.git Add logVisible() and logSize() functions to Growler. --- diff --git a/horde/js/Growler.js b/horde/js/Growler.js index b3334435d..eff6bc8b4 100644 --- a/horde/js/Growler.js +++ b/horde/js/Growler.js @@ -225,10 +225,7 @@ return; } - var tmp = this.growlerlog.down('DIV'), - v = !tmp.visible(); - - Effect.toggle(tmp, 'blind', { + Effect.toggle(this.growlerlog.down('DIV'), 'blind', { duration: 0.5, queue: { position: 'end', @@ -237,7 +234,19 @@ } }); - return v; + this.logvisible = !this.logvisible; + }, + + logVisible: function() + { + return this.growlerlog && this.logvisible; + }, + + logSize: function() + { + return (this.growlerlog && this.growlerlog.down('.NoAlerts')) + ? 0 + : this.growlerlog.down('UL').childElements().size(); } });