Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffInline.js
Show First 20 Lines • Show All 730 Lines • ▼ Show 20 Lines | cancel: function() { | ||||
JX.DOM.remove(this._editRow); | JX.DOM.remove(this._editRow); | ||||
this._editRow = null; | this._editRow = null; | ||||
if (text && text.length && (text != this._originalText)) { | if (text && text.length && (text != this._originalText)) { | ||||
this._drawUneditRows(text); | this._drawUneditRows(text); | ||||
} | } | ||||
this.setEditing(false); | |||||
// If this was an empty box and we typed some text and then hit cancel, | // If this was an empty box and we typed some text and then hit cancel, | ||||
// don't show the empty concrete inline. | // don't show the empty concrete inline. | ||||
if (!this._originalText) { | if (!this._originalText) { | ||||
this.setInvisible(true); | this.setInvisible(true); | ||||
} else { | } else { | ||||
this.setInvisible(false); | this.setInvisible(false); | ||||
} | } | ||||
Show All 10 Lines | cancel: function() { | ||||
new JX.Request(uri, handler) | new JX.Request(uri, handler) | ||||
.setData(data) | .setData(data) | ||||
.send(); | .send(); | ||||
this._didUpdate(true); | this._didUpdate(true); | ||||
}, | }, | ||||
_onCancelResponse: function(response) { | _onCancelResponse: function(response) { | ||||
this.setEditing(false); | |||||
this.setLoading(false); | this.setLoading(false); | ||||
// If the comment was empty when we started editing it (there's no | // If the comment was empty when we started editing it (there's no | ||||
// original text) and empty when we finished editing it (there's no | // original text) and empty when we finished editing it (there's no | ||||
// undo row), just delete the comment. | // undo row), just delete the comment. | ||||
if (!this._originalText && !this.isUndo()) { | if (!this._originalText && !this.isUndo()) { | ||||
this.setDeleted(true); | this.setDeleted(true); | ||||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |