Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/diff/DiffChangeset.js
Show First 20 Lines • Show All 448 Lines • ▼ Show 20 Lines | getSelectableItems: function() { | ||||
return items; | return items; | ||||
} | } | ||||
var rows = JX.DOM.scry(this._node, 'tr'); | var rows = JX.DOM.scry(this._node, 'tr'); | ||||
var blocks = []; | var blocks = []; | ||||
var block; | var block; | ||||
var ii; | var ii; | ||||
var parent_node = null; | |||||
for (ii = 0; ii < rows.length; ii++) { | for (ii = 0; ii < rows.length; ii++) { | ||||
var type = this._getRowType(rows[ii]); | var type = this._getRowType(rows[ii]); | ||||
// This row might be part of a diff inside an inline comment, showing | |||||
// an inline edit suggestion. Before we accept it as a possible target | |||||
// for selection, make sure it's a child of the right parent. | |||||
if (parent_node === null) { | |||||
parent_node = rows[ii].parentNode; | |||||
} | |||||
if (type !== null) { | |||||
if (rows[ii].parentNode !== parent_node) { | |||||
type = null; | |||||
} | |||||
} | |||||
if (!block || (block.type !== type)) { | if (!block || (block.type !== type)) { | ||||
block = { | block = { | ||||
type: type, | type: type, | ||||
items: [] | items: [] | ||||
}; | }; | ||||
blocks.push(block); | blocks.push(block); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 613 Lines • Show Last 20 Lines |