mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-28 21:02:04 +03:00
web: more ui tweaks, all accounts -> general journal, move edit links to sidebar
This commit is contained in:
parent
bc83e1fba5
commit
64f0c22e25
@ -9,8 +9,8 @@ $(document).ready(function() {
|
||||
if ($.url.param('accounts')=='0') $('#accounts').hide();
|
||||
|
||||
/* set up sidebar account mouse-over handlers */
|
||||
$('.balancereport td.account').mouseenter(function(){ $(this).addClass('mouseover'); });
|
||||
$('.balancereport td.account').mouseleave(function(){ $(this).removeClass('mouseover'); });
|
||||
$('.balancereport td').mouseenter(function(){ $(this).addClass('mouseover'); });
|
||||
$('.balancereport td').mouseleave(function(){ $(this).removeClass('mouseover'); });
|
||||
|
||||
/* set up various show/hide toggles */
|
||||
$('#search-help-link').click(function() { $('#search-help').slideToggle('fast'); event.preventDefault(); });
|
||||
|
@ -23,14 +23,18 @@ body { backgroun
|
||||
.negative { color:#800; }
|
||||
.help { }
|
||||
|
||||
.balancereport .inacct { background-color:#ddd; font-weight:bold; }
|
||||
.notinacct, .notinacct :link, .notinacct :visited, .notinacct .negative { /*color:#aaa;*/ }
|
||||
.balancereport .inacct { /*background-color:#ddd;*/ font-weight:bold; }
|
||||
.notinacct, .notinacct :link, .notinacct :visited, .notinacct .negative { color:#aaa; }
|
||||
.balancereport .numpostings { padding-left:1em; color:#aaa; }
|
||||
.balancereport .accountextralinks { visibility:hidden; }
|
||||
.balancereport .hoverlinks { visibility:hidden; }
|
||||
.balancereport td.add.mouseover { background-color:rgba(208,208,208,0.5); }
|
||||
.balancereport td.journal.mouseover { background-color:rgba(208,208,208,0.5); }
|
||||
.balancereport td.journal.mouseover .hoverlinks { visibility:visible; }
|
||||
.balancereport .hoverlinks { visibility:hidden; }
|
||||
.balancereport td.account.mouseover { background-color:rgba(208,208,208,0.5); }
|
||||
.balancereport td.account.mouseover .accountextralinks { visibility:visible; }
|
||||
.balancereport .accountextralinks { margin-left:0em; font-weight:normal; font-size:smaller; display:inline-block; text-align:right; }
|
||||
.balancereport .accountextralinks a { margin-left:0.5em; }
|
||||
.balancereport td.account.mouseover .hoverlinks { visibility:visible; }
|
||||
.balancereport .hoverlinks { margin-left:0em; font-weight:normal; font-size:smaller; display:inline-block; text-align:right; }
|
||||
.balancereport .hoverlinks a { margin-left:0.5em; }
|
||||
|
||||
/*------------------------------------------------------------------------------------------*/
|
||||
/* 2. font families & sizes */
|
||||
@ -120,7 +124,7 @@ tr.firstposting td { }
|
||||
tr.newday td { border-top: 1px solid black; }
|
||||
tr.newmonth td { border-top: 2px solid black; }
|
||||
/* tr.newyear td { border-top: 3px solid black; } */
|
||||
#accountsheading { white-space:nowrap; margin-bottom:1em; }
|
||||
#accountsheading { white-space:nowrap; }
|
||||
|
||||
|
||||
#addform input.textinput, #addform .dhx_combo_input, .dhx_combo_list { padding:4px; }
|
||||
|
@ -1,12 +1,26 @@
|
||||
<div#accountsheading
|
||||
accounts
|
||||
\ #
|
||||
<a#accounts-toggle-link.togglelink href="#" title="Toggle accounts sidebar">[+/-]
|
||||
|
||||
<a#accounts-toggle-link.togglelink href="#" title="Toggle sidebar">[+/-]
|
||||
<div#accounts
|
||||
<table.balancereport>
|
||||
<tr
|
||||
<td.add colspan=3
|
||||
<br>
|
||||
<a#addformlink href onclick="return addformToggle(event)" title="Add a new transaction to the journal">Add a transaction..
|
||||
|
||||
<tr.item :allaccts:.inacct
|
||||
<td.account colspan=3><a href=@{here} title="Show all accounts and postings">all accounts
|
||||
<td.journal colspan=3
|
||||
<br>
|
||||
<a href=@{RegisterR} title="Show all transactions">General journal
|
||||
<span.hoverlinks
|
||||
|
||||
<a href=@{JournalR} title="Show journal source text">source</a>
|
||||
|
||||
<a#editformlink href onclick="return editformToggle(event)" title="Edit the journal">edit
|
||||
|
||||
<tr
|
||||
<td colspan=3
|
||||
<br>
|
||||
Accounts
|
||||
|
||||
$forall i <- items
|
||||
^{itemAsHtml vd i}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<td.account.#{depthclass}
|
||||
#{indent}
|
||||
<a href="@?{acctquery}" title="Focus on this account">#{adisplay}
|
||||
<span.accountextralinks
|
||||
<span.hoverlinks
|
||||
|
||||
<a href="@?{acctsquery}" title="Focus on this account and sub-accounts">+subs
|
||||
<!--
|
||||
|
@ -3,9 +3,6 @@
|
||||
<div#sidebar
|
||||
^{sidecontent}
|
||||
<div#main.journal
|
||||
<div#navlinks
|
||||
^{navlink vd "transactions" JournalR "View the transaction register"} | #
|
||||
^{editlinks}
|
||||
<div#maincontent
|
||||
^{searchform vd}
|
||||
^{maincontent}
|
||||
|
@ -3,9 +3,6 @@
|
||||
<div#sidebar
|
||||
^{sidecontent}
|
||||
<div#main.register
|
||||
<div#navlinks
|
||||
^{navlink vd "transactions" RegisterR "View the transaction register"} | #
|
||||
^{editlinks}
|
||||
<div#maincontent
|
||||
^{searchform vd}
|
||||
^{maincontent}
|
||||
|
@ -133,7 +133,7 @@ accountUrl r a = (r, [("q",pack $ accountQuery a)])
|
||||
|
||||
-- | Render a balance report as HTML.
|
||||
balanceReportAsHtml :: [Opt] -> ViewData -> BalanceReport -> Hamlet AppRoute
|
||||
balanceReportAsHtml _ vd@VD{here=here,m=m,qopts=qopts,j=j} (items',total) = $(Settings.hamletFile "balancereport")
|
||||
balanceReportAsHtml _ vd@VD{here=here,m=m,q=q,qopts=qopts,j=j} (items',total) = $(Settings.hamletFile "balancereport")
|
||||
where
|
||||
l = journalToLedger nullfilterspec j
|
||||
inacctmatcher = inAccountMatcher qopts
|
||||
@ -149,9 +149,9 @@ balanceReportAsHtml _ vd@VD{here=here,m=m,qopts=qopts,j=j} (items',total) = $(Se
|
||||
Just m -> if m `matchesAccount` acct then "inacct" else "notinacct"
|
||||
Nothing -> "" :: String
|
||||
indent = preEscapedString $ concat $ replicate (2 * aindent) " "
|
||||
acctquery = (here, [("q", pack $ accountQuery acct)])
|
||||
acctsquery = (here, [("q", pack $ accountsQuery acct)])
|
||||
acctsonlyquery = (here, [("q", pack $ accountsOnlyQuery acct)])
|
||||
acctquery = (RegisterR, [("q", pack $ accountQuery acct)])
|
||||
acctsquery = (RegisterR, [("q", pack $ accountsQuery acct)])
|
||||
acctsonlyquery = (RegisterR, [("q", pack $ accountsOnlyQuery acct)])
|
||||
|
||||
-- | Render a journal report as HTML.
|
||||
journalReportAsHtml :: [Opt] -> ViewData -> JournalReport -> Hamlet AppRoute
|
||||
|
Loading…
Reference in New Issue
Block a user