From: Chris Porter Date: Mon, 2 Feb 2009 22:01:53 +0000 (+0000) Subject: Fix floodcounter bug. X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/commitdiff_plain/f3d0c9f50a9645505d348f7b26556992053712f6 Fix floodcounter bug. Add FAQ page. --- diff --git a/bin/pages.py b/bin/pages.py index 03815e9..c5ed953 100644 --- a/bin/pages.py +++ b/bin/pages.py @@ -1,6 +1,8 @@ #!/usr/bin/env python IRC_BASE = ["ircconnection", "irclib", "numerics", "baseircclient", "irctracker", "commandparser", "commands", "ircclient", "commandhistory"] -UI_BASE = ["baseui", "baseuiwindow", "colour", "url", "theme", "hilightcontroller", "menuitems", "tabcompleter", "panes/connect", "panes/embed", "panes/options", "panes/about", "panes/privacypolicy", "panes/feedback"] +PANES = ["connect", "embed", "options", "about", "privacypolicy", "feedback", "faq"] +UI_BASE = ["menuitems", "baseui", "baseuiwindow", "colour", "url", "theme", "hilightcontroller", "tabcompleter"] +UI_BASE.extend(["panes/%s" % x for x in PANES]) DEBUG_BASE = ["qwebirc", "version", "jslib", "crypto", "md5", ["irc/%s" % x for x in IRC_BASE], ["ui/%s" % x for x in UI_BASE], "qwebircinterface", "auth", "sound"] BUILD_BASE = ["qwebirc"] diff --git a/css/dialogs.css b/css/dialogs.css index d8bdd0b..0efb1b0 100644 --- a/css/dialogs.css +++ b/css/dialogs.css @@ -72,7 +72,7 @@ } .qwebirc-aboutpane .header .title { - font-size: 4em; + font-size: 3em; } .qwebirc-aboutpane .header .subtitle { @@ -135,7 +135,7 @@ } .qwebirc-privacypolicypane .header .title { - font-size: 4em; + font-size: 3em; } .qwebirc-privacypolicypane .header .subtitle { @@ -174,7 +174,7 @@ } .qwebirc-feedbackpane .header .title { - font-size: 4em; + font-size: 3em; } .qwebirc-feedbackpane .header .subtitle { @@ -186,8 +186,51 @@ font-family: Consolas, "Lucida Console", monospace; } +/************* FAQ *****************/ + +.qwebirc-faqpane { + font-size: 1em !important; +} + +.qwebirc-faqpane .mainbody { + font-size: 0.8em; + text-align: center; + padding: 5px; + margin-left: 20px; + margin-right: 20px; +} + +.qwebirc-faqpane table { + display: inline-block; +} + +.qwebirc-faqpane div.header { + padding-top: 5px; +} + +.qwebirc-faqpane .header { + background: white; + text-align: center; + border-bottom: 1px solid gray; + padding-bottom: 5px; +} + +.qwebirc-faqpane .header .title { + font-size: 3em; +} + +.qwebirc-faqpane .header .subtitle { + text-align: center; + margin-top: 10px; +} + +.qwebirc-faqpane .monospace { + font-family: Consolas, "Lucida Console", monospace; +} + .qwebirc .loading { padding-left: 4px; padding-top: 3px; font-size: 0.8em; } + diff --git a/js/irc/ircconnection.js b/js/irc/ircconnection.js index 6d31bed..8bc4770 100644 --- a/js/irc/ircconnection.js +++ b/js/irc/ircconnection.js @@ -40,6 +40,8 @@ qwebirc.irc.IRCConnection = new Class({ return {"send": function() { }, "cancel": function() { }}; } } + } else { + this.floodCounter = 0; } this.lastActiveRequest = t; } diff --git a/js/ui/baseui.js b/js/ui/baseui.js index 9ce0a42..a53b817 100644 --- a/js/ui/baseui.js +++ b/js/ui/baseui.js @@ -148,13 +148,7 @@ qwebirc.ui.BaseUI = new Class({ 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"] - ], + UICommands: qwebirc.ui.UI_COMMANDS, initialize: function(parentElement, windowClass, uiName, options) { this.parent(parentElement, windowClass, uiName, options); @@ -275,6 +269,9 @@ qwebirc.ui.StandardUI = new Class({ 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) { if(name == "embedded") return ["a", this.embeddedWindow.bind(this)]; diff --git a/js/ui/menuitems.js b/js/ui/menuitems.js index 2c7e8fc..c5c0523 100644 --- a/js/ui/menuitems.js +++ b/js/ui/menuitems.js @@ -9,3 +9,12 @@ qwebirc.ui.MENU_ITEMS = [ this.client.exec("/ME slaps " + nick + " around a bit with a large fishbot"); }] ]; + +qwebirc.ui.UI_COMMANDS = [ + ["Options", "options"], + ["Add webchat to your site", "embedded"], + ["Privacy policy", "privacy"], + ["Feedback", "feedback"], + ["Frequently asked questions", "faq"], + ["About qwebirc", "about"] +]; diff --git a/js/ui/panes/faq.js b/js/ui/panes/faq.js new file mode 100644 index 0000000..ce959e1 --- /dev/null +++ b/js/ui/panes/faq.js @@ -0,0 +1,15 @@ +qwebirc.ui.FAQPane = new Class({ + Implements: [Events], + initialize: function(parent) { + var delayfn = function() { parent.set("html", "
Loading. . .
"); }; + var cb = delayfn.delay(500); + + var r = new Request.HTML({url: "panes/faq.html", update: parent, onSuccess: function() { + $clear(cb); + parent.getElement("input[class=close]").addEvent("click", function() { + this.fireEvent("close"); + }.bind(this)); + }.bind(this)}); + r.get(); + } +}); diff --git a/js/version.js b/js/version.js index 42a8338..22edf0e 100644 --- a/js/version.js +++ b/js/version.js @@ -1 +1 @@ -qwebirc.VERSION = "0.80" +qwebirc.VERSION = "0.81" diff --git a/static/panes/feedback.html b/static/panes/feedback.html index ccc35e9..df79019 100644 --- a/static/panes/feedback.html +++ b/static/panes/feedback.html @@ -9,7 +9,7 @@
-

We'd love to hear what you think about our web IRC client:

+

We'd love to hear what you think about our web IRC client (in English please):

Include your name if you'd like us to get back to you!