|
|
@ -9,7 +9,6 @@ define(
|
|
|
|
return function () {
|
|
|
|
return function () {
|
|
|
|
|
|
|
|
|
|
|
|
var originalOnRender = this.prototype.onRender;
|
|
|
|
var originalOnRender = this.prototype.onRender;
|
|
|
|
var originalOnClose = this.prototype.onClose;
|
|
|
|
|
|
|
|
var originalBeforeClose = this.prototype.onBeforeClose;
|
|
|
|
var originalBeforeClose = this.prototype.onBeforeClose;
|
|
|
|
|
|
|
|
|
|
|
|
var errorHandler = function (response) {
|
|
|
|
var errorHandler = function (response) {
|
|
|
@ -65,18 +64,6 @@ define(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.prototype.onClose = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.model && this.model.isNew()) {
|
|
|
|
|
|
|
|
this.model.destroy();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (originalOnClose) {
|
|
|
|
|
|
|
|
originalBeforeClose.call(this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|