From 8efab2c953175619c1d59da2b2655af87310f4d7 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Tue, 11 Dec 2012 18:28:19 +0200 Subject: [PATCH] Minor edits. --- .../xmodule/xmodule/js/src/graphical_slider_tool/inputs.js | 6 +++--- .../xmodule/xmodule/js/src/graphical_slider_tool/state.js | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/inputs.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/inputs.js index d7789cb000..595021023f 100644 --- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/inputs.js +++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/inputs.js @@ -86,11 +86,11 @@ define('Inputs', [], function () { // Set the current constant to the text input. It will be visible // to the user. inputEl.val(constValue); - + // Before binding a 'change' event, we will check if this text // input is specified as 'read only'. // - // By default, this setting is false - the user can change the + // By default, this setting is false - the user can change the // value in the text input. readonly = false; if (typeof obj['@readonly'] === 'string') { @@ -100,7 +100,7 @@ define('Inputs', [], function () { } if (readonly === true) { - + // In the case of a readonly config option, configure the text // inputit as read-only, and NOT bind an event to it. inputEl.attr('readonly', 'readonly'); diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js index 6e878e120f..996384fe74 100644 --- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js +++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js @@ -26,14 +26,17 @@ define('State', [], function () { if ((typeof config.inputs !== 'undefined') && (typeof config.inputs.input !== 'undefined')) { if ($.isArray(config.inputs.input)) { - // config.inputs.input is an array + // config.inputs.input is an array for (c1 = 0; c1 < config.inputs.input.length; c1++) { addConstFromInput(config.inputs.input[c1]); } + } else if ($.isPlainObject(config.inputs.input)) { + // config.inputs.input is an object addConstFromInput(config.inputs.input); + } }