color: #555555;
}
-#kiwi, #kiwi input, #kiwi textarea {
+#kiwi, #kiwi input, #kiwi button, #kiwi textarea {
font-family:Arial, Helvetica, sans-serif;
font-size:14px; line-height:1.4em;
}
+#kiwi .settings {
+ width:900px;
+ margin:1em auto;
+}
+#kiwi .settings table td {
+ padding:0.5em 1em;
+}
+
+
+
/**
* Reusable componants
*/\r
_kiwi.global = {\r
settings: undefined,\r
- utils: undefined, // Re-usable methods\r
- gateway: undefined,\r
- user: undefined,\r
- server: undefined,\r
+ plugins: undefined,\r
+ utils: undefined, // TODO: Re-usable methods\r
+ gateway: undefined, // TODO: Access to gateway\r
+ user: undefined, // TODO: Limited user methods\r
+ server: undefined, // TODO: Limited server methods\r
command: undefined, // The control box\r
\r
// TODO: think of a better term for this as it will also refer to queries\r
- channels: undefined,\r
+ channels: undefined, // TODO: Limited access to panels list\r
\r
// Entry point to start the kiwi application\r
start: function (opts) {\r
\r
this.$el = $($('#tmpl_applet_settings').html());\r
\r
- this.$el.find('.theme').val(settings.get('theme'));\r
+ this.$el.find('.setting-theme').val(settings.get('theme'));\r
+ this.$el.find('.setting-scrollback').val(settings.get('scrollback'));\r
},\r
\r
saveSettings: function () {\r
var settings = _kiwi.global.settings;\r
\r
- settings.set('theme', $('.theme', this.$el).val());\r
+ settings.set('theme', $('.setting-theme', this.$el).val());\r
+ settings.set('scrollback', $('.setting-scrollback', this.$el).val());\r
\r
settings.save();\r
}\r
</script>\r
\r
<script type="text/html" id="tmpl_applet_settings">\r
- <div>\r
- <select class="theme">\r
- <option value="default">Default</option>\r
- <option value="relaxed">Relaxed</option>\r
- <option value="cli">CLI</option>\r
- </select>\r
- <button class="save">Save</button>\r
+ <div class="settings">\r
+ <table>\r
+ <tr>\r
+ <td>Theme</td>\r
+ <td>\r
+ <select class="setting-theme">\r
+ <option value="default">Default</option>\r
+ <option value="relaxed">Relaxed</option>\r
+ <option value="cli">CLI</option>\r
+ </select>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td>Scrollback</td>\r
+ <td><input type="text" class="setting-scrollback" value="150" /></td>\r
+ </tr>\r
+\r
+ <tr>\r
+ <td>Auto-reconnect</td>\r
+ <td><input type="checkbox" class="setting-reconnect" /></td>\r
+ </tr>\r
+ </table>\r
+\r
+ <button class="save">Save</button>\r
</div>\r
</script>\r
\r
\r
members = this.get("members");\r
members.bind("add", function (member) {\r
+ var show_message = _kiwi.global.settings.get('show_join_parts');\r
+ if (show_message === false) {\r
+ return;\r
+ }\r
+ \r
this.addMsg(' ', '== ' + member.displayNick(true) + ' has joined', 'action join');\r
}, this);\r
\r
members.bind("remove", function (member, members, options) {\r
+ var show_message = _kiwi.global.settings.get('show_join_parts');\r
+ if (show_message === false) {\r
+ return;\r
+ }\r
+\r
var msg = (options.message) ? '(' + options.message + ')' : '';\r
\r
if (options.type === 'quit') {\r