qwebirc.ui.CUSTOM_CLIENT = "custom";
qwebirc.ui.BaseUI = new Class({
- Implements: [Events, Options],
- options: {
- appTitle: "QuakeNet Web IRC",
- singleWindow: true
- },
+ Implements: [Events],
initialize: function(parentElement, windowClass, uiName, options) {
- this.setOptions(options);
+ this.options = options;
this.windows = {};
this.clients = {};
if(!this.firstClient) {
this.firstClient = true;
w.addLine("", "qwebirc v" + qwebirc.VERSION);
- w.addLine("", "Copyright (C) 2008 Chris Porter. All rights reserved.");
+ w.addLine("", "Copyright (C) 2008-2009 Chris Porter. All rights reserved.");
w.addLine("", "http://webchat.quakenet.org/");
w.addLine("", "This is BETA quality software, please report bugs to slug@quakenet.org");
}
tricked into getting themselves glined
*/
loginBox: function(callback, initialNickname, initialChannels, autoConnect, autoNick) {
- qwebirc.ui.GenericLoginBox(this.parentElement, callback, initialNickname, initialChannels, autoConnect, autoNick);
+ qwebirc.ui.GenericLoginBox(this.parentElement, callback, initialNickname, initialChannels, autoConnect, autoNick, this.options.networkName);
}
});
qwebirc.ui.StandardUI = new Class({
Extends: qwebirc.ui.BaseUI,
+ UICommands: [
+ ["Options", "options"],
+ ["Add webchat to your site", "embedded"],
+ ["Privacy policy", "privacy"],
+ ["Feedback", "feedback"],
+ ["About qwebirc", "about"]
+ ],
initialize: function(parentElement, windowClass, uiName, options) {
this.parent(parentElement, windowClass, uiName, options);
}.bind(this));
},
embeddedWindow: function() {
- this.addCustomWindow("Embedded Wizard", qwebirc.ui.EmbedWizard, "embeddedwizard");
+ this.addCustomWindow("Embedding wizard", qwebirc.ui.EmbedWizard, "embeddedwizard");
},
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);
+ },
urlDispatcher: function(name) {
if(name == "embedded")
return ["a", this.embeddedWindow.bind(this)];
callbackfn(args);
};
- qwebirc.ui.GenericLoginBox(w.lines, callback, initialNickname, initialChannels, autoConnect, autoNick);
+ qwebirc.ui.GenericLoginBox(w.lines, callback, initialNickname, initialChannels, autoConnect, autoNick, this.options.networkName);
}
});