Made TextArea and TextBox views compatable with disabled property

This commit is contained in:
Jonathan Frederic 2013-10-30 22:38:23 +00:00
parent 49662a61ba
commit 9f3450448e

View File

@ -46,6 +46,9 @@ require(["notebook/js/widget"], function(){
this.$textbox.val(this.model.get('value'));
}
var disabled = this.model.get('disabled');
this.$textbox.prop('disabled', disabled);
var description = this.model.get('description');
if (description.length == 0) {
this.$label.hide();
@ -96,6 +99,9 @@ require(["notebook/js/widget"], function(){
this.$textbox.val(this.model.get('value'));
}
var disabled = this.model.get('disabled');
this.$textbox.prop('disabled', disabled);
var description = this.model.get('description');
if (description.length == 0) {
this.$label.hide();