Client: Channel joining loader
authorDarren <darren@darrenwhitlen.com>
Sun, 17 Feb 2013 18:36:15 +0000 (18:36 +0000)
committerDarren <darren@darrenwhitlen.com>
Sun, 17 Feb 2013 18:36:15 +0000 (18:36 +0000)
client/assets/css/style.css
client/assets/dev/view.js
client/assets/img/loader.gif [new file with mode: 0644]

index 34595736b7c3dad909f3a25af3fc56051e7b5875..754c2bf142f83054926a532cfda8f2db128b2467 100644 (file)
@@ -229,6 +229,14 @@ html, body { height:100%; }
 
 
 
+#kiwi .loader {
+    background:url(../img/loader.gif) no-repeat;
+    width:43px; height:11px;
+    display:inline-block;
+}
+
+
+
 
 
 /**
index f8c173249b0230ca355034f1c57588473af7bf36..1bcbbdca2062113f625d1ec53bf9b3220edacb1c 100644 (file)
@@ -578,6 +578,16 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({
     initialize: function (options) {\r
         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
+    },\r
+\r
+    // Override the existing newMsg() method to remove the joining channel loader\r
+    newMsg: function () {\r
+        this.$el.find('.initial_loader').slideUp(function () {\r
+            $(this).remove();\r
+        });\r
+        return this.constructor.__super__.newMsg.apply(this, arguments);\r
     },\r
 \r
     topic: function (topic) {\r
diff --git a/client/assets/img/loader.gif b/client/assets/img/loader.gif
new file mode 100644 (file)
index 0000000..ecd6030
Binary files /dev/null and b/client/assets/img/loader.gif differ