Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffInline.js
Show First 20 Lines • Show All 857 Lines • ▼ Show 20 Lines | cancel: function() { | ||||
var is_empty = this._isVoidContentState(state); | var is_empty = this._isVoidContentState(state); | ||||
var is_same = this._isSameContentState(state, this._originalState); | var is_same = this._isSameContentState(state, this._originalState); | ||||
if (!is_empty && !is_same) { | if (!is_empty && !is_same) { | ||||
this._drawUneditRows(state); | this._drawUneditRows(state); | ||||
} | } | ||||
// 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._isVoidContentState(this._originalState)) { | if (this._isVoidContentState(this._originalState)) { | ||||
this.setInvisible(true); | this.setInvisible(true); | ||||
} else { | } else { | ||||
this.setInvisible(false); | this.setInvisible(false); | ||||
} | } | ||||
// If you "undo" to restore text ("AB") and then "Cancel", we put you | // If you "undo" to restore text ("AB") and then "Cancel", we put you | ||||
// back in the original text state ("A"). We also send the original | // back in the original text state ("A"). We also send the original | ||||
// text ("A") to the server as the current persistent state. | // text ("A") to the server as the current persistent state. | ||||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |