diff --git a/hledger-web/.hledger/web/static/hledger.js b/hledger-web/.hledger/web/static/hledger.js index f0723bf8a..0c0a93e1b 100644 --- a/hledger-web/.hledger/web/static/hledger.js +++ b/hledger-web/.hledger/web/static/hledger.js @@ -3,17 +3,18 @@ $(document).ready(function() { - /* maybe show forms */ + /* show/hide things based on request parameters */ if ($.url.param('add')) addformToggle(); else if ($.url.param('edit')) editformToggle(); + 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'); }); /* set up various show/hide toggles */ - $('#search-help-link').click(function() { $('#search-help').slideToggle('fast'); }); - $('#accounts-toggle-link').click(function() { $('#accounts').slideToggle('fast'); }); + $('#search-help-link').click(function() { $('#search-help').slideToggle('fast'); event.preventDefault(); }); + $('#accounts-toggle-link').click(function() { $('#accounts').slideToggle('fast'); event.preventDefault(); }); $('.postings-toggle-link').click(function() { $(this).parent().parent().nextUntil(':not(.posting)').toggle(); event.preventDefault(); }); }); diff --git a/hledger-web/.hledger/web/static/style.css b/hledger-web/.hledger/web/static/style.css index 3231401ad..2912c2dd2 100644 --- a/hledger-web/.hledger/web/static/style.css +++ b/hledger-web/.hledger/web/static/style.css @@ -44,7 +44,7 @@ input.textinput, .dhx_combo_input, .dhx_combo_list { font-size:small; } .topleftlink { font-size:small; } .toprightlink { font-size:small; } #journaldesc { font-size:small; } -.togglelink { font-size:small; } +.togglelink { font-size:smaller; white-space:nowrap } .help { font-size:smaller; } .form { font-size:small; } .journalreport { font-size:small; }