From 42dbba933f9bd32da84ab47179d724f60913e506 2014-01-16 10:57:06 From: Jonathan Frederic Date: 2014-01-16 10:57:06 Subject: [PATCH] Added support for disabled flag to button widget. --- diff --git a/IPython/html/static/notebook/js/widgets/button.js b/IPython/html/static/notebook/js/widgets/button.js index d450984..e8bb004 100644 --- a/IPython/html/static/notebook/js/widgets/button.js +++ b/IPython/html/static/notebook/js/widgets/button.js @@ -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); },