+qwebirc.ui.MochaUI = new Class({
+ Extends: qwebirc.ui.NewLoginUI,
+ initialize: function(parentElement, theme) {
+ this.parent(parentElement, qwebirc.ui.MochaUI.Window, "mochaui");
+ this.theme = theme;
+ this.parentElement = parentElement;
+
+ window.addEvent("domready", function() {
+ /* determine input size */
+ var l = new Element("input", {styles: {border: 0}});
+ this.parentElement.appendChild(l);
+ this.inputHeight = l.getSize().y;
+ this.parentElement.removeChild(l);
+
+ MochaUI.Desktop = new MochaUI.Desktop();
+ MochaUI.Dock = new MochaUI.Dock({
+ dockPosition: "top"
+ });
+
+ MochaUI.Modal = new MochaUI.Modal();
+ MochaUI.options.useEffects = false;
+ }.bind(this));
+
+ window.addEvent("unload", function() {
+ if(MochaUI)
+ MochaUI.garbageCleanUp();
+ });
+ },
+ postInitialize: function() {
+ return;
+ this.tabs = new Element("div");
+ this.tabs.addClass("tabbar");
+
+ this.parentElement.appendChild(this.tabs);
+
+ this.container = new Element("div");
+ this.container.addClass("container");
+
+ this.parentElement.appendChild(this.container);
+
+ var form = new Element("form");
+ var inputbox = new Element("input");
+ inputbox.addClass("input");
+
+ form.addEvent("submit", function(e) {
+ new Event(e).stop();
+
+ this.getActiveWindow().client.exec(inputbox.value);
+ inputbox.value = "";
+ }.bind(this));
+ this.parentElement.appendChild(form);
+ form.appendChild(inputbox);
+ inputbox.focus();
+ }
+});
+
+qwebirc.ui.MochaUI.Window = new Class({
+ Extends: qwebirc.ui.Window,