From 02eb51b3149ff94ad0ea156a6582a0baa95c83f4 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 2 Feb 2010 00:47:09 -0700 Subject: [PATCH] Add logVisible() and logSize() functions to Growler. --- horde/js/Growler.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) 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(); } }); -- 2.11.0