Commit 3a876caa by Roman Shevchuk

Rewrited showLineNumbersInTables based on CSS numbering. Closed #5

parent 9477b06b
......@@ -3,7 +3,7 @@
*/
html.salesforceuiimprover-enabledScript-showLineNumbersInTables #bodyCell table.list > * > tr > th:first-child::before,
html.salesforceuiimprover-enabledScript-showLineNumbersInTables #bodyCell table.list > * > tr > td:first-child::before {
content: attr(line-number);
content: '#';
display: inline-block;
color: #aaa;
text-align: right;
......@@ -17,6 +17,15 @@ html.salesforceuiimprover-enabledScript-showLineNumbersInTables #bodyCell table.
padding-left: 2.8em;
}
html.salesforceuiimprover-enabledScript-showLineNumbersInTables #bodyCell table.list {
counter-reset: showLineNumbersInTables-counter;
}
html.salesforceuiimprover-enabledScript-showLineNumbersInTables #bodyCell table.list > * > tr:not(.headerRow) > th:first-child::before,
html.salesforceuiimprover-enabledScript-showLineNumbersInTables #bodyCell table.list > * > tr:not(.headerRow) > td:first-child::before {
content: counter(showLineNumbersInTables-counter);
counter-increment: showLineNumbersInTables-counter;
}
/*
* checkAllCheckboxes
......
......@@ -163,19 +163,6 @@ var salesforceuiimprover_scripts = {
},
showLineNumbersInTables: function () {
var $bodyCell = $('#bodyCell');
$bodyCell.find('table.list > tbody').each(function () {
var index = 1;
$(this).children('tr:not(.headerRow)').children('*:first-child').each(function () {
$(this).attr('line-number', index);
index++;
});
});
$bodyCell.find('table.list > thead, table.list > tbody').children('tr.headerRow').children('th:first-child').each(function () {
$(this).attr('line-number', '#');
});
},
checkAllCheckboxes : function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment