Commit 8efab2c9 by Valera Rozuvan Committed by Alexander Kryklia

Minor edits.

parent 6caddad6
...@@ -86,11 +86,11 @@ define('Inputs', [], function () { ...@@ -86,11 +86,11 @@ define('Inputs', [], function () {
// Set the current constant to the text input. It will be visible // Set the current constant to the text input. It will be visible
// to the user. // to the user.
inputEl.val(constValue); inputEl.val(constValue);
// Before binding a 'change' event, we will check if this text // Before binding a 'change' event, we will check if this text
// input is specified as 'read only'. // 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. // value in the text input.
readonly = false; readonly = false;
if (typeof obj['@readonly'] === 'string') { if (typeof obj['@readonly'] === 'string') {
...@@ -100,7 +100,7 @@ define('Inputs', [], function () { ...@@ -100,7 +100,7 @@ define('Inputs', [], function () {
} }
if (readonly === true) { if (readonly === true) {
// In the case of a readonly config option, configure the text // In the case of a readonly config option, configure the text
// inputit as read-only, and NOT bind an event to it. // inputit as read-only, and NOT bind an event to it.
inputEl.attr('readonly', 'readonly'); inputEl.attr('readonly', 'readonly');
......
...@@ -26,14 +26,17 @@ define('State', [], function () { ...@@ -26,14 +26,17 @@ define('State', [], function () {
if ((typeof config.inputs !== 'undefined') && if ((typeof config.inputs !== 'undefined') &&
(typeof config.inputs.input !== 'undefined')) { (typeof config.inputs.input !== 'undefined')) {
if ($.isArray(config.inputs.input)) { 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++) { for (c1 = 0; c1 < config.inputs.input.length; c1++) {
addConstFromInput(config.inputs.input[c1]); addConstFromInput(config.inputs.input[c1]);
} }
} else if ($.isPlainObject(config.inputs.input)) { } else if ($.isPlainObject(config.inputs.input)) {
// config.inputs.input is an object // config.inputs.input is an object
addConstFromInput(config.inputs.input); addConstFromInput(config.inputs.input);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment