From 30a427ae35eb551b18b708e0acf68f682df047cd Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Wed, 17 Feb 2016 07:36:53 +0100 Subject: [PATCH] prefs refactoring: partial implementation (wip) --- web/prefs.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/prefs.js b/web/prefs.js index 93b50c6..dcd4930 100644 --- a/web/prefs.js +++ b/web/prefs.js @@ -46,15 +46,15 @@ function Prefsn(obj) var fields = { listen: { type: 'radio', cb: Prefsn.listen_change_cb } }; if (is_supp_custom) { fields.fg = { - type: 'fields', fields: { r: { type: 'value' }, - g: { type: 'value' }, - b: { type: 'value' } + type: 'fields', fields: { r: { type: 'value', cb: Prefsn.supp_change_cb }, + g: { type: 'value', cb: Prefsn.supp_change_cb }, + b: { type: 'value', cb: Prefsn.supp_change_cb } } }; fields.bg = { - type: 'fields', fields: { r: { type: 'value' }, - g: { type: 'value' }, - b: { type: 'value' } + type: 'fields', fields: { r: { type: 'value', cb: Prefsn.supp_change_cb }, + g: { type: 'value', cb: Prefsn.supp_change_cb }, + b: { type: 'value', cb: Prefsn.supp_change_cb } } }; } @@ -98,8 +98,8 @@ Prefsn.supp_change_cb = function(field) var i; var prefs_new; var relo = false; - // console.log("prefs_update("+field+")"); - + console.log("prefs_update("+field+")"); + return; if (typeof(g_prefsn) == 'undefined') return false; -- 2.17.1