+
+ var d = this.newCustomWindow(windowName, true);
+ this.customWindows[windowName] = d;
+
+ d.addEvent("close", function() {
+ this.customWindows[windowName] = null;
+ }.bind(this));
+
+ if(cssClass)
+ d.lines.addClass("qwebirc-" + cssClass);
+
+ var ew = new class_(d.lines, options);
+ ew.addEvent("close", function() {
+ d.close();
+ }.bind(this));
+
+ d.setSubWindow(ew);
+ },
+ embeddedWindow: function() {
+ this.addCustomWindow("Add webchat to your site", qwebirc.ui.EmbedWizard, "embeddedwizard", {baseURL: this.options.baseURL, uiOptions: this.uiOptions, optionsCallback: function() {
+ this.optionsWindow();
+ }.bind(this)});
+ },
+ optionsWindow: function() {
+ this.addCustomWindow("Options", qwebirc.ui.OptionsPane, "optionspane", this.uiOptions);
+ },
+ aboutWindow: function() {
+ this.addCustomWindow("About", qwebirc.ui.AboutPane, "aboutpane", this.uiOptions);
+ },
+ privacyWindow: function() {
+ this.addCustomWindow("Privacy policy", qwebirc.ui.PrivacyPolicyPane, "privacypolicypane", this.uiOptions);
+ },
+ feedbackWindow: function() {
+ this.addCustomWindow("Feedback", qwebirc.ui.FeedbackPane, "feedbackpane", this.uiOptions);
+ },
+ faqWindow: function() {
+ this.addCustomWindow("FAQ", qwebirc.ui.FAQPane, "faqpane", this.uiOptions);
+ },
+ urlDispatcher: function(name, window) {
+ if(name == "embedded")
+ return ["a", this.embeddedWindow.bind(this)];
+
+ if(name == "options")
+ return ["a", this.optionsWindow.bind(this)];
+
+ /* doesn't really belong here */
+ if(name == "whois") {
+ return ["span", function(nick) {
+ if(this.uiOptions.QUERY_ON_NICK_CLICK) {
+ window.client.exec("/QUERY " + nick);
+ } else {
+ window.client.exec("/WHOIS " + nick);
+ }
+ }.bind(this)];
+ }