QualityCell editing cleanup

This commit is contained in:
Mark McDowall 2013-08-21 08:24:09 -07:00
commit 5327068557
3 changed files with 9 additions and 16 deletions

View file

@ -8,18 +8,19 @@ define(
_originalInit: Backgrid.Cell.prototype.initialize,
initialize: function () {
this._originalInit.apply(this, arguments);
this.cellValue = this._getValue();
this.listenTo(this.model, 'change', this._refresh);
this.listenTo(this.model, "backgrid:edit", function (model, column, cell, editor) {
if (column.get("name") == this.column.get("name")) {
this._startEditing(model, column, cell, editor);
}
});
if (this._onEdit) {
this.listenTo(this.model, "backgrid:edit", function (model, column, cell, editor) {
if (column.get("name") == this.column.get("name")) {
this._onEdit(model, column, cell, editor);
}
});
}
},
_refresh: function () {