Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Porter <slug@qwebirc.org>2011-02-19 23:39:49 (GMT)
committer Chris Porter <slug@qwebirc.org>2011-02-19 23:39:49 (GMT)
commit903f4124d2188947023695ad67543bf2f9ccf64c (patch)
treeb599b70ab18cc63eab828bdc881d993f3fabf5a3
parent11e5e98cd1340b7ee9340f6886a88dc2ea80ab42 (diff)
Add option to hide timestamp.
-rw-r--r--css/qui.mcss11
-rw-r--r--js/ui/baseuiwindow.js7
-rw-r--r--js/ui/panes/options.js3
3 files changed, 17 insertions, 4 deletions
diff --git a/css/qui.mcss b/css/qui.mcss
index 4b4492c..a0eabc4 100644
--- a/css/qui.mcss
+++ b/css/qui.mcss
@@ -19,6 +19,9 @@ menu_border=c,c8d2dc
menu_background=c,f2f0ff
menu_hover_background=c,FFFFFE
lastpositionbar=c,C8D2DC
+timestamp_display=o,SHOW_TIMESTAMPS,inline,none
+timestamp_padding_left=o,SHOW_TIMESTAMPS,7px,11px
+timestamp_text_indent=o,SHOW_TIMESTAMPS,-7px,-9px
body {
margin: 0;
@@ -67,10 +70,14 @@ html {
background: $(lines_background);
}
+.qwebirc-qui .lines .timestamp {
+ display: $(timestamp_display);
+}
+
.qwebirc-qui .ircwindow div {
font-family: Consolas, "Lucida Console", monospace;
- text-indent: -4px;
- padding-left: 1px;
+ text-indent: $(timestamp_text_indent);
+ padding-left: $(timestamp_padding_left);
word-wrap: break-word;
}
diff --git a/js/ui/baseuiwindow.js b/js/ui/baseuiwindow.js
index 080d93c..feda6dd 100644
--- a/js/ui/baseuiwindow.js
+++ b/js/ui/baseuiwindow.js
@@ -129,7 +129,12 @@ qwebirc.ui.Window = new Class({
if(type)
line = this.parentObject.theme.message(type, line, lhilight);
- qwebirc.ui.Colourise(qwebirc.irc.IRCTimestamp(new Date()) + " " + line, element, this.client.exec, this.parentObject.urlDispatcher.bind(this.parentObject), this);
+ var tsE = document.createElement("span");
+ tsE.className = "timestamp";
+ tsE.appendChild(document.createTextNode(qwebirc.irc.IRCTimestamp(new Date()) + " "));
+ element.appendChild(tsE);
+
+ qwebirc.ui.Colourise(line, element, this.client.exec, this.parentObject.urlDispatcher.bind(this.parentObject), this);
this.scrollAdd(element);
},
errorMessage: function(message) {
diff --git a/js/ui/panes/options.js b/js/ui/panes/options.js
index c407110..ff50c0f 100644
--- a/js/ui/panes/options.js
+++ b/js/ui/panes/options.js
@@ -50,7 +50,8 @@ qwebirc.config.DEFAULT_OPTIONS = [
}
}],
[12, "QUERY_ON_NICK_CLICK", "Query on nickname click in channel", false],
- [13, "SHOW_NICKLIST", "Show nickname list in channels", true]
+ [13, "SHOW_NICKLIST", "Show nickname list in channels", true],
+ [14, "SHOW_TIMESTAMPS", "Show timestamps", true] /* we rely on the hue update */
];
qwebirc.config.DefaultOptions = null;