mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
Use setElement to set the view's element properly.
This commit is contained in:
parent
0cd4226fde
commit
00f72487c5
@ -24,13 +24,12 @@ define(["notebook/js/widget"], function(widget_manager){
|
||||
// Called when view is rendered.
|
||||
render : function(){
|
||||
var that = this;
|
||||
this.$el = $("<button />")
|
||||
this.setElement($("<button />")
|
||||
.addClass('btn')
|
||||
.click(function() {
|
||||
that.model.set('clicks', that.model.get('clicks') + 1);
|
||||
that.model.update_other_views(that);
|
||||
});
|
||||
this._ensureElement();
|
||||
}));
|
||||
|
||||
this.update(); // Set defaults.
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user