web: highlight whatever is in the url hash, i.e. transactions
This commit is contained in:
parent
8a725e7e61
commit
b6c3ba1caf
@ -60,13 +60,14 @@ journalTransactionsReportAsHtml _ vd (_,items) = [hamlet|
|
|||||||
-- .#{datetransition}
|
-- .#{datetransition}
|
||||||
itemAsHtml :: ViewData -> (Int, Bool, Bool, Bool, TransactionsReportItem) -> HtmlUrl AppRoute
|
itemAsHtml :: ViewData -> (Int, Bool, Bool, Bool, TransactionsReportItem) -> HtmlUrl AppRoute
|
||||||
itemAsHtml VD{..} (n, _, _, _, (torig, _, split, _, amt, _)) = [hamlet|
|
itemAsHtml VD{..} (n, _, _, _, (torig, _, split, _, amt, _)) = [hamlet|
|
||||||
<tr ##{tindex torig} .item.#{evenodd}.#{firstposting} style="vertical-align:top;" title="#{show torig}">
|
<tbody ##{tindex torig}>
|
||||||
|
<tr .item.#{evenodd}.#{firstposting} style="vertical-align:top;" title="#{show torig}">
|
||||||
<td.date>#{date}
|
<td.date>#{date}
|
||||||
<td.description colspan=2>#{elideRight 60 desc}
|
<td.description colspan=2>#{elideRight 60 desc}
|
||||||
<td.amount style="text-align:right;">
|
<td.amount style="text-align:right;">
|
||||||
$if showamt
|
$if showamt
|
||||||
\#{mixedAmountAsHtml amt}
|
\#{mixedAmountAsHtml amt}
|
||||||
$forall p' <- tpostings torig
|
$forall p' <- tpostings torig
|
||||||
<tr .item.#{evenodd}.posting title="#{show torig}">
|
<tr .item.#{evenodd}.posting title="#{show torig}">
|
||||||
<td.date>
|
<td.date>
|
||||||
<td.description>
|
<td.description>
|
||||||
@ -74,7 +75,7 @@ $forall p' <- tpostings torig
|
|||||||
|
|
||||||
<a href="@?{acctlink (paccount p')}##{tindex torig}" title="#{paccount p'}">#{elideAccountName 40 $ paccount p'}
|
<a href="@?{acctlink (paccount p')}##{tindex torig}" title="#{paccount p'}">#{elideAccountName 40 $ paccount p'}
|
||||||
<td.amount style="text-align:right;">#{mixedAmountAsHtml $ pamount p'}
|
<td.amount style="text-align:right;">#{mixedAmountAsHtml $ pamount p'}
|
||||||
<tr.#{evenodd}>
|
<tr.#{evenodd}>
|
||||||
<td>
|
<td>
|
||||||
<td>
|
<td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -25,6 +25,9 @@ a:link, a:visited { color:#00e; }
|
|||||||
#editform textarea { background-color:#eee; }
|
#editform textarea { background-color:#eee; }
|
||||||
.negative { color:#800; }
|
.negative { color:#800; }
|
||||||
.help { }
|
.help { }
|
||||||
|
.highlighted {
|
||||||
|
background-color: #F4F466 !important;
|
||||||
|
}
|
||||||
|
|
||||||
#sidebar .hoverlinks { visibility:hidden; }
|
#sidebar .hoverlinks { visibility:hidden; }
|
||||||
/* #sidebar .mouseover { background-color:rgba(208,208,208,0.5); } */
|
/* #sidebar .mouseover { background-color:rgba(208,208,208,0.5); } */
|
||||||
@ -119,7 +122,9 @@ body { margin:0; }
|
|||||||
.description { padding-left:1em; white-space:normal; }
|
.description { padding-left:1em; white-space:normal; }
|
||||||
.account { padding-left:1em; white-space:normal; }
|
.account { padding-left:1em; white-space:normal; }
|
||||||
.amount { padding-left:1em; white-space:nowrap; }
|
.amount { padding-left:1em; white-space:nowrap; }
|
||||||
.balance { padding-left:1em; padding-right:0.3em; white-space:nowrap; }
|
.balance { padding-left:1em; white-space:nowrap; }
|
||||||
|
tr td:last-child { padding-right:0.3em; }
|
||||||
|
tr td:first-child { padding-left:0.3em; }
|
||||||
.amount, .balance { width:2em; } /* minimise width */
|
.amount, .balance { width:2em; } /* minimise width */
|
||||||
.positive { }
|
.positive { }
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,11 @@ $(document).ready(function() {
|
|||||||
$('body, #addform input, #addform select').bind('keydown', 'ctrl+-', addformDeletePosting);
|
$('body, #addform input, #addform select').bind('keydown', 'ctrl+-', addformDeletePosting);
|
||||||
$('#addform tr.posting:last > td:first input').bind('keydown', 'tab', addformAddPostingWithTab);
|
$('#addform tr.posting:last > td:first input').bind('keydown', 'tab', addformAddPostingWithTab);
|
||||||
|
|
||||||
|
|
||||||
|
// highlight the entry from the url hash
|
||||||
|
if (window.location.hash && $(window.location.hash)[0]) {
|
||||||
|
$(window.location.hash).addClass('highlighted');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user