[ADD] highlighted table to double entry document
This commit is contained in:
+10
-5
@@ -13,8 +13,9 @@
|
||||
background-color: hsl(219, 67%, 94%);
|
||||
}
|
||||
|
||||
#chart-controls label:hover,
|
||||
#entries-control label:hover {
|
||||
label:hover,
|
||||
label:hover,
|
||||
.highlighter-list li:hover {
|
||||
background-color: hsl(0, 0%, 94%);
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -86,15 +87,19 @@
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.accounts-table {
|
||||
.accounts-table, .force-right .highlighter-target {
|
||||
font-size: 90%;
|
||||
color: #888 !important;
|
||||
}
|
||||
.accounts-table .related {
|
||||
.force-right .highlighter-target th {
|
||||
font-weight: normal;
|
||||
font-size: 110%;
|
||||
}
|
||||
.accounts-table .related, .force-right .highlighter-target .related {
|
||||
background-color: transparent !important;
|
||||
color: #eee !important;
|
||||
}
|
||||
.accounts-table .secondary {
|
||||
.accounts-table .secondary, .force-right .highlighter-target .secondary {
|
||||
background-color: transparent !important;
|
||||
color: #aaa !important;
|
||||
}
|
||||
|
||||
+19
-1
@@ -1,9 +1,27 @@
|
||||
(function () {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
alternatives()
|
||||
alternatives();
|
||||
highlight();
|
||||
checks_handling();
|
||||
});
|
||||
|
||||
function highlight() {
|
||||
$('.highlighter-list').each(function () {
|
||||
var $this = $(this),
|
||||
$target = $($this.data('target'));
|
||||
$this.on('mouseout', 'li', function (e) {
|
||||
$(e.currentTarget).removeClass('secondary');
|
||||
$target.find('.related').removeClass('related');
|
||||
}).on('mouseover', 'li', function (e) {
|
||||
if (!e.currentTarget.contains(e.target)) { return; }
|
||||
|
||||
var $li = $(e.currentTarget);
|
||||
console.log($li, $li.data('highlight'), $target.find($li.data('highlight')));
|
||||
$li.addClass('secondary');
|
||||
$target.find($li.data('highlight')).addClass('related');
|
||||
});
|
||||
});
|
||||
}
|
||||
/** alternatives display:
|
||||
* - prepend control for each <dt>
|
||||
* - radio input with link to following dd
|
||||
|
||||
Reference in New Issue
Block a user