]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Merge.
authorChris Porter <redacted>
Fri, 5 Jun 2009 00:27:45 +0000 (01:27 +0100)
committerChris Porter <redacted>
Fri, 5 Jun 2009 00:27:45 +0000 (01:27 +0100)
1  2 
js/ui/frontends/qui.js

diff --combined js/ui/frontends/qui.js
index 4efc974ccd7e4e9ae9b405f18f07ab7c114b5988,a5557029d3a6414d327db0516708253cb667b79c..5e3255e62e56fd233a4075cefcd47d254822ad66
@@@ -1,5 -1,5 +1,5 @@@
  qwebirc.ui.QUI = new Class({
-   Extends: qwebirc.ui.NewLoginUI,
+   Extends: qwebirc.ui.RootUI,
    initialize: function(parentElement, theme, options) {
      this.parent(parentElement, qwebirc.ui.QUI.Window, "qui", options);
      this.theme = theme;
@@@ -423,19 -423,15 +423,19 @@@ qwebirc.ui.QUI.Window = new Class(
      parent.appendChild(e);
      e.addClass("menu");
      
 +    var nickArray = [nick];
      qwebirc.ui.MENU_ITEMS.forEach(function(x) {
 +      if(!x.predicate || x.predicate !== true && !x.predicate.apply(this, nickArray))
 +        return;
 +      
        var e2 = new Element("a");
        e.appendChild(e2);
 -      
 +
        e2.href = "#";
 -      e2.set("text", "- " + x[0]);
 -      
 +      e2.set("text", "- " + x.text);
 +
        e2.addEvent("focus", function() { this.blur() }.bind(e2));
 -      e2.addEvent("click", function(ev) { new Event(ev.stop()); this.menuClick(x[1]); }.bind(this));
 +      e2.addEvent("click", function(ev) { new Event(ev.stop()); this.menuClick(x.fn); }.bind(this));
      }.bind(this));
      return e;
    },
        this.prevNick = e;
        e.addClass("selected");
        this.moveMenuClass();
 -      e.menu = this.createMenu(x.realNick, e);
 +      e.menu = this.createMenu(e.realNick, e);
        new Event(x).stop();
      }.bind(this));