]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fix topic issues and resizing.
authorChris Porter <redacted>
Wed, 15 Oct 2008 07:56:41 +0000 (08:56 +0100)
committerChris Porter <redacted>
Wed, 15 Oct 2008 07:56:41 +0000 (08:56 +0100)
TODO.txt
js/ui/qui.js
run.bat
static/css/qui.css

index 411b4a166ac0bb4affe14f1efee1b5469ee91de1..20a214cd11dab44c3a74aea293d449f565d1aede 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,8 +1,4 @@
-TODO:
-  - isp transparent proxy issue
-  - tidy up UI
-  - better colour scheme
-  - IE6
-  - IE
-  - Safari
-  - Opera
+IE7\r
+IE6\r
+ping timeout bug?\r
+opera weirdness\r
index 7ad907f8ff9a0dfb483dfe019c85a9bfd0adc56d..483d0f6614833bc474ea5f98ab7914153cc6d60c 100644 (file)
@@ -42,6 +42,7 @@ var QUIWindow = new Class({
     
     var formdiv = new Element("div");
     this.window.appendChild(formdiv);  
+    this.formdiv = formdiv;
     
     var form = new Element("form");
     var inputbox = new Element("input");
@@ -83,24 +84,23 @@ var QUIWindow = new Class({
       this.topic = new Element("div");
       this.topic.addClass("topic");
       this.topic.set("html", "&nbsp;");
-      this.topic.setStyle("right", "0px");
+      
       this.window.appendChild(this.topic);
       
-      toppos = this.topic.getSize().y;
-
       this.nicklist = new Element("div");
       this.nicklist.addClass("nicklist");
-      this.nicklist.setStyle("top", toppos + "px");
-      this.nicklist.setStyle("bottom", (bottompos - 1) + "px");
       
       this.window.appendChild(this.nicklist);
       rightpos = this.nicklist.getSize().x;
     }
 
-    this.lines.setStyle("top", toppos + "px");
-    this.lines.setStyle("bottom", bottompos + "px");
-    this.lines.setStyle("right", rightpos + "px");
     this.lines.addClass("lines");
+    if(type == WINDOW_CHANNEL) {
+      /* calls reflow */
+      this.updateTopic("");
+    } else {
+      this.reflow();
+    }
     
     this.lines.addEvent("scroll", function() {
       this.scrolleddown = this.scrolledDown();
@@ -109,8 +109,25 @@ var QUIWindow = new Class({
     window.addEvent("resize", function() {
       if(this.scrolleddown)
         this.scrollToBottom();
+      this.reflow();
     }.bind(this));
   },
+  reflow: function() {
+    var toppos = 0;
+    var rightpos = 0;
+    var bottompos = this.formdiv.getSize().y;
+    
+    if(this.type == WINDOW_CHANNEL) {
+      toppos = this.topic.getSize().y;
+
+      this.nicklist.setStyle("top", toppos + "px");
+      this.nicklist.setStyle("bottom", (bottompos - 1) + "px");
+    }
+    
+    this.lines.setStyle("top", toppos + "px");
+    this.lines.setStyle("bottom", bottompos + "px");
+    this.lines.setStyle("right", rightpos + "px");
+  },
   updateNickList: function(nicks) {
     this.parent(nicks);
     
@@ -133,17 +150,21 @@ var QUIWindow = new Class({
       t.removeChild(t.firstChild);
 
     if(topic) {
-      Colourise(topic, "[" + topic + "]");
+      Colourise("[" + topic + "]", t);
     } else {
-      var e = new Element("(no topic set)");
+      var e = new Element("div");
+      e.set("text", "(no topic set)");
       e.addClass("emptytopic");
-      topic.appendChild(e);
+      t.appendChild(e);
     }
+    this.reflow();
   },
   select: function() {
     this.window.removeClass("tab-invisible");
     this.tab.removeClass("tab-unselected");
     this.tab.addClass("tab-selected");
+    this.reflow();
+
     this.parent();
     
     this.inputbox.focus();
diff --git a/run.bat b/run.bat
index 027985ac74cb3220d0d9a92a5233a7b1a5dcecd2..1a46eb06e626b00eedd5f5a145b47cdf72d720a4 100644 (file)
--- a/run.bat
+++ b/run.bat
@@ -1,3 +1,3 @@
 set PYTHONPATH=.;c:\python25\lib\site-packages\r
-c:\python25\scripts\twistd.py qwebirc -n\r
+c:\python25\python.exe c:\python25\scripts\twistd.py qwebirc -n\r
 pause\r
index 8f13965fad0e9ef2e614839b19b8d663543595ea..b1c507044a3c9995457021fa76645bd4b42e9ae4 100644 (file)
@@ -98,6 +98,7 @@
   position: absolute;
   left: 0px;
   top: 0px;
+  right: 0px;
   background-color: #F2F0FF;
   border-bottom: 1px dashed #c8d2dc;
 }
   color: grey;
 }
 
+.qwebirc-qui .topic {
+  color: grey;
+  font-family: Verdana, sans-serif;
+  padding-left: 5px;
+  font-size: 0.7em;
+}
+
 .qwebirc-qui .lines {
   overflow: auto;
   position: absolute;
   vertical-align: top;
   text-align: center;
 }
+
+.qwebirc-qui form {
+  margin: 0px;
+  padding: 0px;
+}
\ No newline at end of file