Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangeset.js
Show First 20 Lines • Show All 405 Lines • ▼ Show 20 Lines | members: { | ||||
_getRoutableKey: function() { | _getRoutableKey: function() { | ||||
return 'changeset-view.' + this._ref + '.' + this._sequence; | return 'changeset-view.' + this._ref + '.' + this._sequence; | ||||
}, | }, | ||||
getInlineForRow: function(node) { | getInlineForRow: function(node) { | ||||
var data = JX.Stratcom.getData(node); | var data = JX.Stratcom.getData(node); | ||||
if (!data.inline) { | if (!data.inline) { | ||||
var inline = new JX.DiffInline(node) | var inline = new JX.DiffInline() | ||||
.setChangeset(this); | .setChangeset(this) | ||||
.bindToRow(node); | |||||
this._inlines.push(inline); | this._inlines.push(inline); | ||||
data.inline = inline; | |||||
} | } | ||||
return data.inline; | return data.inline; | ||||
}, | }, | ||||
newInlineForRange: function(data) { | |||||
var inline = new JX.DiffInline() | |||||
.setChangeset(this) | |||||
.bindToRange(data); | |||||
this._inlines.push(inline); | |||||
inline.create(); | |||||
return inline; | |||||
}, | |||||
getInlineByID: function(id) { | getInlineByID: function(id) { | ||||
// TODO: Currently, this will only find inlines which the user has | // TODO: Currently, this will only find inlines which the user has | ||||
// already interacted with! Inlines are built lazily as events arrive. | // already interacted with! Inlines are built lazily as events arrive. | ||||
// This can not yet find inlines which are passively present in the | // This can not yet find inlines which are passively present in the | ||||
// document. | // document. | ||||
for (var ii = 0; ii < this._inlines.length; ii++) { | for (var ii = 0; ii < this._inlines.length; ii++) { | ||||
var inline = this._inlines[ii]; | var inline = this._inlines[ii]; | ||||
Show All 21 Lines |