web: more ui tweaks, all accounts -> general journal, move edit links to sidebar

This commit is contained in:
Simon Michael 2011-06-29 23:11:15 +00:00
parent bc83e1fba5
commit 64f0c22e25
7 changed files with 37 additions and 25 deletions

View File

@ -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(); });

View File

@ -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; }

View File

@ -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
&nbsp;
<a href=@{JournalR} title="Show journal source text">source</a>
&nbsp;
<a#editformlink href onclick="return editformToggle(event)" title="Edit the journal">edit
<tr
<td colspan=3
<br>
Accounts
$forall i <- items
^{itemAsHtml vd i}

View File

@ -2,7 +2,7 @@
<td.account.#{depthclass}
#{indent}
<a href="@?{acctquery}" title="Focus on this account">#{adisplay}
<span.accountextralinks
<span.hoverlinks
&nbsp;
<a href="@?{acctsquery}" title="Focus on this account and sub-accounts">+subs
<!--

View File

@ -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}

View File

@ -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}

View File

@ -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) "&nbsp;"
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