Added support for disabled flag to button widget.

This commit is contained in:
Jonathan Frederic 2013-12-03 19:24:11 +00:00
parent 1536c45955
commit d69e957b9a

View File

@ -42,6 +42,12 @@ define(["notebook/js/widget"], function(widget_manager){
this.$el.html(description);
}
if (this.model.get('disabled')) {
this.$el.attr('disabled','disabled');
} else {
this.$el.removeAttr('disabled');
}
return IPython.WidgetView.prototype.update.call(this);
},