From ddd74e86ca5bff719652c60c01dd958fec2ad818 Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 5 Nov 2012 23:02:28 +0000 Subject: [PATCH] Client: Show joins/parts in settings applet --- client/assets/dev/applet_settings.js | 7 +++++++ client/assets/dev/index.html.tmpl | 4 ++-- client/assets/dev/model_channel.js | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/client/assets/dev/applet_settings.js b/client/assets/dev/applet_settings.js index 926e498..481a1c9 100644 --- a/client/assets/dev/applet_settings.js +++ b/client/assets/dev/applet_settings.js @@ -11,6 +11,12 @@ this.$el.find('.setting-theme').val(settings.get('theme')); this.$el.find('.setting-scrollback').val(settings.get('scrollback')); + + if (typeof settings.get('show_joins_parts') === 'undefined' || settings.get('show_joins_parts')) { + this.$el.find('.setting-show_joins_parts').attr('checked', true); + } else { + this.$el.find('.setting-show_joins_parts').attr('checked', false); + } }, saveSettings: function () { @@ -18,6 +24,7 @@ settings.set('theme', $('.setting-theme', this.$el).val()); settings.set('scrollback', $('.setting-scrollback', this.$el).val()); + settings.set('show_joins_parts', $('.setting-show_joins_parts', this.$el).is(':checked')); settings.save(); } diff --git a/client/assets/dev/index.html.tmpl b/client/assets/dev/index.html.tmpl index ede9c72..054aa57 100644 --- a/client/assets/dev/index.html.tmpl +++ b/client/assets/dev/index.html.tmpl @@ -137,8 +137,8 @@ - Auto-reconnect - + Show joins/parts + diff --git a/client/assets/dev/model_channel.js b/client/assets/dev/model_channel.js index 76931d7..b698564 100644 --- a/client/assets/dev/model_channel.js +++ b/client/assets/dev/model_channel.js @@ -15,7 +15,7 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({ members = this.get("members"); members.bind("add", function (member) { - var show_message = _kiwi.global.settings.get('show_join_parts'); + var show_message = _kiwi.global.settings.get('show_joins_parts'); if (show_message === false) { return; } @@ -24,7 +24,7 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({ }, this); members.bind("remove", function (member, members, options) { - var show_message = _kiwi.global.settings.get('show_join_parts'); + var show_message = _kiwi.global.settings.get('show_joins_parts'); if (show_message === false) { return; } -- 2.25.1