Skip to content

Commit

Permalink
Merge pull request #58 from Multiplicom/feature/55/disabled_state
Browse files Browse the repository at this point in the history
add function to modify enabled/disabled closes #55
  • Loading branch information
MichaelVyverman committed Jun 21, 2019
2 parents 855db5a + 93fff28 commit 396919d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Controls/Controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,15 @@ define([
return true;
};

/**
* Modifies the enabled state of the droplist
* @param {boolean} newStatus - new enabled status
*/
control.setEnabled = function(newStatus) {
control._disabled = !newStatus;
control._getSub$El('').prop("disabled", control._disabled);
};

return control;
};

Expand Down Expand Up @@ -1319,7 +1328,7 @@ define([
*/
control.setValid = function(valid) {
control._valid = valid;
$el = $("#" + control._getSubId(''));
var $el = $("#" + control._getSubId(''));
if (valid)
$el.removeClass('invalid');
else
Expand Down Expand Up @@ -1437,6 +1446,15 @@ define([
control.performNotify();
};

/**
* Modifies the enabled state of the edit control
* @param {boolean} newStatus - new enabled status
*/
control.setEnabled = function(newStatus) {
control._disabled = !newStatus;
control._getSub$El('').prop("disabled", control._disabled);
};

return control;
};

Expand Down

0 comments on commit 396919d

Please sign in to comment.