Added some small comments to widget code

pull/37/head
Jonathan Frederic 12 years ago
parent 80c3339791
commit c5e48c0b75

@ -166,6 +166,7 @@
};
WidgetManager.prototype.get_model = function (model_id) {
// Look-up a model instance by its id.
var model = this._models[model_id];
if (model !== undefined && model.id == model_id) {
return model;
@ -174,6 +175,7 @@
};
WidgetManager.prototype._handle_comm_open = function (comm, msg) {
// Handle when a comm is opened.
var model_id = comm.comm_id;
var widget_type_name = msg.content.target_name;
var widget_model = new WidgetManager._model_types[widget_type_name](this, model_id, comm);

@ -132,6 +132,7 @@ function(WidgetManager, Underscore, Backbone){
},
sync: function (method, model, options) {
// Handle sync to the back-end. Called when a model.save() is called.
// Make sure a comm exists.
var error = options.error || function() {
@ -315,7 +316,6 @@ function(WidgetManager, Underscore, Backbone){
touch: function () {
this.model.save_changes(this.callbacks());
},
});

Loading…
Cancel
Save