Simplify dynamic table CSS styles

This commit is contained in:
buinsky 2016-07-17 11:17:03 +03:00 committed by sledgehammer999
commit 28cfee7bd3
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
2 changed files with 21 additions and 59 deletions

View file

@ -6,74 +6,36 @@
v 0.4 v 0.4
**************************************************************/ **************************************************************/
.dynamicTable tbody tr {
#properties #torrentFiles table,
#properties #trackers table {
border: 1px solid #ccc;
width: 100%;
}
#properties #torrentFiles th,
#properties #trackers th,
#transferList th {
background-color: #eee;
padding: 4px;
}
#properties #torrentFiles tr,
#properties #trackers tr,
#transferList tr {
background-color: #fff; background-color: #fff;
padding: 4px;
} }
.dynamicTable tbody tr:nth-child(even),
#torrentsTable tr:nth-child(even), .dynamicTable tbody tr.alt {
#torrentPeersTable tr:nth-child(even),
#filesTable tr:nth-child(even),
#properties #torrentFiles tr.alt,
#properties #trackers tr.alt,
#transferList tr.alt {
background-color: #eee; background-color: #eee;
padding: 4px;
} }
#properties #torrentFiles td, #transferList .dynamicTable td {
#properties #trackers td,
#transferList td {
padding: 0 2px; padding: 0 2px;
} }
#properties #torrentFiles tr.selected, .dynamicTable tbody tr.selected {
#properties #trackers tr.selected,
#transferList tr.selected {
background-color: #415A8D;
color: #fff;
}
#torrentPeersTable tr.selected {
background-color: #354158; background-color: #354158;
color: #fff; color: #fff;
} }
#torrentsTable tr:hover, .dynamicTable tbody tr:hover {
#torrentPeersTable tr:hover,
#filesTable tr:hover,
#properties #torrentFiles tr.over,
#properties #trackers tr.over,
#transferList tr.over {
background-color: #ee6600; background-color: #ee6600;
color: #fff; color: #fff;
} }
#torrentsTable tr:hover, #transferList tr:hover {
#properties #torrentFiles tr.over,
#properties #trackers tr.over,
#transferList tr.over {
cursor: pointer; cursor: pointer;
} }
#transferList img.statusIcon { #transferList img.statusIcon {
margin-bottom: -4px; margin-bottom: -4px;
margin-bottom: -1px;
} }
tr.dynamicTableHeader { tr.dynamicTableHeader {
@ -88,12 +50,13 @@ tr.dynamicTableHeader {
} }
.dynamicTable th { .dynamicTable th {
padding: 5px 10px; background-color: #eee;
padding: 4px;
white-space: nowrap; white-space: nowrap;
} }
.dynamicTable td { .dynamicTable td {
padding: 0px 3px; padding:0px 4px;
white-space: nowrap; white-space: nowrap;
} }

View file

@ -342,7 +342,6 @@ var DynamicTable = new Class({
tr_found = false; tr_found = false;
for (j = rowPos; j < trs.length; j++) for (j = rowPos; j < trs.length; j++)
if (trs[j]['rowId'] == rowId) { if (trs[j]['rowId'] == rowId) {
trs[rowPos].removeClass('over');
tr_found = true; tr_found = true;
if (rowPos == j) if (rowPos == j)
break; break;