]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
add spinner to connect dialog 324/head
authorChris Porter <redacted>
Sun, 30 Jul 2017 01:27:43 +0000 (02:27 +0100)
committerChris Porter <redacted>
Sun, 30 Jul 2017 02:21:18 +0000 (03:21 +0100)
css/qui.mcss
js/ui/baseui.js
js/ui/frontends/qui.js
static/images/spinner.png [new file with mode: 0644]

index 39424135ae400debcaecc0db92a5673438d64015..e1503be292409948f2957dc29eba2154a06cf9f9 100644 (file)
@@ -365,3 +365,8 @@ div#noscript {
 iframe {
   border: none;
 }
+
+.qwebirc-qui .spinner {
+  background: url(../images/spinner.png) no-repeat $(lines_background);
+  background-position: top 5px right 5px;
+}
index e0bf197390fc5c727bfb9eec2684841249cdc56c..0f5f84e9f8a1325202190da6e36e7e655565e7be 100644 (file)
@@ -117,9 +117,12 @@ qwebirc.ui.BaseUI = new Class({
   getActiveWindow: function() {
     return this.active;
   },
+  getStatusWindow: function(client) {
+    return this.windows.get(this.getClientId(client)).get(this.getWindowIdentifier(client, qwebirc.ui.WINDOW_STATUS));
+  },
   getActiveIRCWindow: function(client) {
     if(!this.active || this.active.type == qwebirc.ui.WINDOW_CUSTOM) {
-      return this.windows.get(this.getClientId(client)).get(this.getWindowIdentifier(client, qwebirc.ui.WINDOW_STATUS));
+      return this.getStatusWindow(client);
     } else {
       return this.active;
     }
index eb71d79ec99bff881c8eb8a36431a72ae2456b89..2893de7db7228f8eeace0b469dd0c6cc965b3e3d 100644 (file)
@@ -140,7 +140,8 @@ qwebirc.ui.QUI = new Class({
     form.addClass("input");
     
     var inputbox = new Element("input");
-    this.addEvent("signedOn", function() {
+    this.addEvent("signedOn", function(client) {
+      this.getStatusWindow(client).lines.removeClass("spinner");
       inputbox.placeholder = "chat here! you can also use commands, like /JOIN";
       var d = function() { inputbox.addClass("input-flash"); }.delay(250);
       var d = function() { inputbox.removeClass("input-flash"); }.delay(500);
@@ -450,6 +451,10 @@ qwebirc.ui.QUI.Window = new Class({
     this.lines = new Element("div");
     this.parentObject.qjsui.applyClasses("middle", this.lines);
     this.lines.addClass("lines");
+
+    if(type == qwebirc.ui.WINDOW_STATUS)
+      this.lines.addClass("spinner");
+
     if(type != qwebirc.ui.WINDOW_CUSTOM && type != qwebirc.ui.WINDOW_CONNECT)
       this.lines.addClass("ircwindow");
     
diff --git a/static/images/spinner.png b/static/images/spinner.png
new file mode 100644 (file)
index 0000000..656b1c1
Binary files /dev/null and b/static/images/spinner.png differ