mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-13 00:45:49 +01:00
(refs #549) Selecting lines in diff without line numbers.
This commit is contained in:
@@ -84,7 +84,7 @@ diffview = {
|
||||
b.appendChild(document.createTextNode("+"));
|
||||
b.style.display = "none";
|
||||
b.className = "add-comment";
|
||||
e.appendChild(b);
|
||||
e.insertBefore(b, e.firstChild);
|
||||
e.style.position = "relative";
|
||||
return e;
|
||||
}
|
||||
@@ -117,9 +117,12 @@ diffview = {
|
||||
* to the given row.
|
||||
*/
|
||||
function addCells (row, tidx, tend, textLines, change, thclass) {
|
||||
var tmp;
|
||||
if (tidx < tend) {
|
||||
row.appendChild(addButton(ctelt("th", thclass, (tidx + 1).toString())));
|
||||
row.appendChild(ctelt("td", change, textLines[tidx].replace(/\t/g, "\u00a0\u00a0\u00a0\u00a0")));
|
||||
tmp = ctelt("th", thclass, "");
|
||||
tmp.setAttribute("line-number", (tidx + 1).toString());
|
||||
row.appendChild(tmp);
|
||||
row.appendChild(addButton(ctelt("td", change, textLines[tidx].replace(/\t/g, "\u00a0\u00a0\u00a0\u00a0"))));
|
||||
return tidx + 1;
|
||||
} else {
|
||||
row.appendChild(document.createElement("th"));
|
||||
@@ -129,9 +132,13 @@ diffview = {
|
||||
}
|
||||
|
||||
function addCellsInline (row, tidx, tidx2, textLines, change) {
|
||||
row.appendChild(ctelt("th", "oldline", tidx == null ? "" : (tidx + 1).toString()));
|
||||
row.appendChild(addButton(ctelt("th", "newline", tidx2 == null ? "" : (tidx2 + 1).toString())));
|
||||
row.appendChild(ctelt("td", change, textLines[tidx != null ? tidx : tidx2].replace(/\t/g, "\u00a0\u00a0\u00a0\u00a0")));
|
||||
var tmp = ctelt("th", "oldline", "");
|
||||
tmp.setAttribute("line-number", tidx == null ? "" : (tidx + 1).toString());
|
||||
row.appendChild(tmp);
|
||||
tmp = ctelt("th", "newline", "");
|
||||
tmp.setAttribute("line-number", tidx2 == null ? "" : (tidx2 + 1).toString());
|
||||
row.appendChild(tmp);
|
||||
row.appendChild(addButton(ctelt("td", change, textLines[tidx != null ? tidx : tidx2].replace(/\t/g, "\u00a0\u00a0\u00a0\u00a0"))));
|
||||
}
|
||||
|
||||
for (var idx = 0; idx < opcodes.length; idx++) {
|
||||
|
||||
Reference in New Issue
Block a user