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