]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fix floodcounter bug.
authorChris Porter <redacted>
Mon, 2 Feb 2009 22:01:53 +0000 (22:01 +0000)
committerChris Porter <redacted>
Mon, 2 Feb 2009 22:01:53 +0000 (22:01 +0000)
Add FAQ page.

bin/pages.py
css/dialogs.css
js/irc/ircconnection.js
js/ui/baseui.js
js/ui/menuitems.js
js/ui/panes/faq.js [new file with mode: 0644]
js/version.js
static/panes/feedback.html

index 03815e980de24c32ab0833fea19524b5b599a223..c5ed953f24c682c4a495a8a17349afaf4b7393e3 100644 (file)
@@ -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"]
index d8bdd0b6f5becec4a95680fc40096a646930a48b..0efb1b0d8ab78c4d6f1a35802e821845b5f3f67b 100644 (file)
@@ -72,7 +72,7 @@
 }
 
 .qwebirc-aboutpane .header .title {
-  font-size: 4em;
+  font-size: 3em;
 }
 
 .qwebirc-aboutpane .header .subtitle {
 }
 
 .qwebirc-privacypolicypane .header .title {
-  font-size: 4em;
+  font-size: 3em;
 }
 
 .qwebirc-privacypolicypane .header .subtitle {
 }
 
 .qwebirc-feedbackpane .header .title {
-  font-size: 4em;
+  font-size: 3em;
 }
 
 .qwebirc-feedbackpane .header .subtitle {
   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;
 }
+
index 6d31bedf4c01b1fb8ca094be4d01fce280579869..8bc4770542ded934eb6e094513066a3ca9119c57 100644 (file)
@@ -40,6 +40,8 @@ qwebirc.irc.IRCConnection = new Class({
             return {"send": function() { }, "cancel": function() { }};
           }
         }
+      } else {
+        this.floodCounter = 0;
       }
       this.lastActiveRequest = t;
     }
index 9ce0a4295f6531141f51b49d7a3f5186b0cc8af2..a53b817c1b2d60d450a5a82a6e69829305ec284d 100644 (file)
@@ -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)];
index 2c7e8fc2eea7454a216d5c3e2ac9f359ab08a4de..c5c05230a1b13d458222b3e8d52b283ca7dabd9b 100644 (file)
@@ -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 (file)
index 0000000..ce959e1
--- /dev/null
@@ -0,0 +1,15 @@
+qwebirc.ui.FAQPane = new Class({
+  Implements: [Events],
+  initialize: function(parent) {
+    var delayfn = function() { parent.set("html", "<div class=\"loading\">Loading. . .</div>"); };
+    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();
+  }
+});
index 42a8338912ff04e2201d37a289dce89e8e2a1021..22edf0e4dcd54c796f1f60007fd87280ae9969dc 100644 (file)
@@ -1 +1 @@
-qwebirc.VERSION = "0.80"
+qwebirc.VERSION = "0.81"
index ccc35e97b9a8aa272e11e8dc9c2a4dbcad042f92..df7901959a590985e803b579cfac7970e496c944 100644 (file)
@@ -9,7 +9,7 @@
 </div>
 <div class="mainbody">
   <div class="enterarea">
-    <p class="maintext">We'd love to hear what you think about our web IRC client:</p>
+    <p class="maintext">We'd love to hear what you think about our web IRC client (in English please):</p>
     <p><textarea cols="80" rows="10" class="mainarea"></textarea></p>
     <p>Include your name if you'd like us to get back to you!</p>