#kiwi.theme_relaxed .messages a { text-decoration:none; }
#kiwi.theme_relaxed .messages .msg { border-bottom: 1px solid #DEDEDE; padding: 1px; font-family:arial; font-size:0.9em; }
-#kiwi.theme_relaxed .messages .msg .time { width:6em; float:left; color:#777; display:none; }
+#kiwi.theme_relaxed .messages .msg .time { width:5em; float:left; color:#777; padding:5px; display:none; }
#kiwi.theme_relaxed .messages .msg .nick { width:11em; float:left; font-size:12px; font-family:Arial; text-align:right; padding: 5px; overflow:hidden; }
#kiwi.theme_relaxed .messages .msg .text { display:block; margin-left:12em; border-left: 1px solid #DEDEDE; white-space:pre-wrap; word-wrap:break-word; font-family:arial; padding:5px; }
padding:0.5em; margin-top:1em; margin-bottom:1em; margin-right:2em;
}
+#kiwi.theme_relaxed.timestamps .messages .msg .time { display:block; }
+#kiwi.theme_relaxed.timestamps .messages .msg .text { margin-left:17em; }
+
#kiwi.theme_relaxed .messages .msg.global_nick_highlight,
#kiwi.theme_relaxed .messages .msg.highlight { background:#D9D9D9; }
* and data (think: plugins)\r
*/\r
_kiwi.global = {\r
- settings: undefined,\r
+ settings: undefined, // Instance of _kiwi.model.DataStore\r
plugins: undefined,\r
utils: undefined, // TODO: Re-usable methods\r
user: undefined, // TODO: Limited user methods\r
} else {\r
this.$el.find('.setting-show_joins_parts').attr('checked', false);\r
}\r
+\r
+ if (typeof settings.get('show_timestamps') === 'undefined' || !settings.get('show_timestamps')) {\r
+ this.$el.find('.setting-show_timestamps').attr('checked', false);\r
+ } else {\r
+ this.$el.find('.setting-show_timestamps').attr('checked', true);\r
+ }\r
},\r
\r
\r
settings.set('channel_list_style', $('.setting-channel_list_style', this.$el).val());\r
settings.set('scrollback', $('.setting-scrollback', this.$el).val());\r
settings.set('show_joins_parts', $('.setting-show_joins_parts', this.$el).is(':checked'));\r
+ settings.set('show_timestamps', $('.setting-show_timestamps', this.$el).is(':checked'));\r
\r
settings.save();\r
\r
<td class="setting"><input type="checkbox" class="setting-show_joins_parts" /></td>\r
</tr>\r
\r
+ <tr>\r
+ <td class="label">Show timestamps</td>\r
+ <td class="setting"><input type="checkbox" class="setting-show_timestamps" /></td>\r
+ </tr>\r
+\r
<tr class="save">\r
<td colspan="2"><button class="save">Save</button></td>\r
</tr>\r
_kiwi.global.settings.on('change:channel_list_style', this.setTabLayout, this);\r
this.setTabLayout(_kiwi.global.settings.get('channel_list_style'));\r
\r
+ _kiwi.global.settings.on('change:show_timestamps', this.displayTimestamps, this);\r
+ this.displayTimestamps(_kiwi.global.settings.get('show_timestamps'));\r
+\r
this.doLayout();\r
\r
$(document).keydown(this.setKeyFocus);\r
},\r
\r
\r
+ displayTimestamps: function (show_timestamps) {\r
+ // If called by the settings callback, get the correct new_value\r
+ if (show_timestamps === _kiwi.global.settings) {\r
+ show_timestamps = arguments[1];\r
+ }\r
+ \r
+ if (show_timestamps) {\r
+ this.$el.addClass('timestamps');\r
+ } else {\r
+ this.$el.removeClass('timestamps');\r
+ }\r
+ },\r
+\r
+\r
// Globally shift focus to the command input box on a keypress\r
setKeyFocus: function (ev) {\r
// If we're copying text, don't shift focus\r