]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Only show nick list menu border when we're not at the top.
authorChris Porter <redacted>
Tue, 21 Oct 2008 09:56:41 +0000 (10:56 +0100)
committerChris Porter <redacted>
Tue, 21 Oct 2008 09:56:41 +0000 (10:56 +0100)
js/ui/qui.js
static/css/qui.css

index b2e8330bd81296391398dfa684ec3f34b6c1414a..2c1a95506a70bb6fc7e872c3adae0d54e646aa34 100644 (file)
@@ -283,11 +283,21 @@ qwebirc.ui.QUI.Window = new Class({
     fn.bind(this)(this.prevNick.realNick);
     this.removePrevMenu();
   },
+  moveMenuClass: function() {
+    if(!this.prevNick)
+      return;
+    if(this.nicklist.firstChild == this.prevNick) {
+      this.prevNick.removeClass("selected-middle");
+    } else {
+      this.prevNick.addClass("selected-middle");
+    }
+  },
   removePrevMenu: function() {
     if(!this.prevNick)
       return;
       
     this.prevNick.removeClass("selected");
+    this.prevNick.removeClass("selected-middle");
     if(this.prevNick.menu)
       this.prevNick.removeChild(this.prevNick.menu);
     this.prevNick = null;
@@ -310,6 +320,7 @@ qwebirc.ui.QUI.Window = new Class({
       this.removePrevMenu();
       this.prevNick = e;
       e.addClass("selected");
+      this.moveMenuClass();
       e.menu = this.createMenu(x.realNick, e);
       new Event(x).stop();
     }.bind(this));
@@ -319,11 +330,12 @@ qwebirc.ui.QUI.Window = new Class({
     }.bind(this));
     
     e.addEvent("focus", function() { this.blur() }.bind(e));
-    
+    this.moveMenuClass();
     return e;
   },
   nickListRemove: function(nick, stored) {
     this.nicklist.removeChild(stored);
+    this.moveMenuClass();
   },
   updateTopic: function(topic) {
     var t = this.topic;
index dd062f973f198689a630d09eae47d0dcbf83f6f4..040884d71a4419870b3ca80bf9b66fe220957ec0 100644 (file)
@@ -222,11 +222,14 @@ body {
   color: black;
   background: white;
   text-decoration: none;
-  border-top: #c8d2dc 1px solid;
   border-bottom: #c8d2dc 1px solid;
   cursor: default;
 }
 
+.qwebirc-qui .nicklist a.selected-middle {
+  border-top: #c8d2dc 1px solid;
+}
+
 div#noscript {
   text-align: center;
   font-family: Verdana, sans-serif;