Don't show a loader for query panels
authorDarren <darren@darrenwhitlen.com>
Sun, 17 Feb 2013 18:50:17 +0000 (18:50 +0000)
committerDarren <darren@darrenwhitlen.com>
Sun, 17 Feb 2013 18:50:17 +0000 (18:50 +0000)
client/assets/dev/view.js

index 1bcbbdca2062113f625d1ec53bf9b3220edacb1c..1bc9bb295f8422e535a924b2d8f012ce01b2f5de 100644 (file)
@@ -579,7 +579,10 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({
         this.initializePanel(options);\r
         this.model.bind('change:topic', this.topic, this);\r
 \r
-        this.$el.append('<div class="initial_loader" style="margin:1em;">Joining channel.. <span class="loader"></span></div>');\r
+        // Only show the loader if this is a channel (ie. not a query)\r
+        if (this.model.isChannel()) {\r
+            this.$el.append('<div class="initial_loader" style="margin:1em;text-align:center;">Joining channel.. <span class="loader"></span></div>');\r
+        }\r
     },\r
 \r
     // Override the existing newMsg() method to remove the joining channel loader\r
@@ -587,6 +590,7 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({
         this.$el.find('.initial_loader').slideUp(function () {\r
             $(this).remove();\r
         });\r
+\r
         return this.constructor.__super__.newMsg.apply(this, arguments);\r
     },\r
 \r