diff options
Diffstat (limited to 'hyperkitty/static')
-rw-r--r-- | hyperkitty/static/css/hyperkitty.css | 12 | ||||
-rw-r--r-- | hyperkitty/static/js/hyperkitty.js | 25 |
2 files changed, 29 insertions, 8 deletions
diff --git a/hyperkitty/static/css/hyperkitty.css b/hyperkitty/static/css/hyperkitty.css index b8f56b4..5381e86 100644 --- a/hyperkitty/static/css/hyperkitty.css +++ b/hyperkitty/static/css/hyperkitty.css @@ -373,29 +373,29 @@ form.likeform { } -/* Month view header */ +/* Threads view header */ -#month-view .month-header { +#thread-list .thread-list-header { margin-bottom: 4em; } -#month-view .month-header .month-info { +#thread-list .thread-list-header .thread-list-info { display: inline; list-style-type: none; margin: 0; padding: 0; } -#month-view .month-header .month-info li { +#thread-list .thread-list-header .thread-list-info li { display: inline; margin-right: 2em; } -#month-view .month-header .month-info li.list-address { +#thread-list .thread-list-header .thread-list-info li.list-address { font-size: 120%; margin-right: 4em; } -/* Thread list */ +/* Thread view */ .thread { margin: 2em 0 2em 0; diff --git a/hyperkitty/static/js/hyperkitty.js b/hyperkitty/static/js/hyperkitty.js index 6fb7ef8..d5898dc 100644 --- a/hyperkitty/static/js/hyperkitty.js +++ b/hyperkitty/static/js/hyperkitty.js @@ -296,8 +296,28 @@ function setup_quotes() { function setup_months_list() { var current = $("#months-list li.current").parent().prev(); - if (!current.length) { current = 0; } // overview - $("#months-list").accordion({ active: current }); + if (!current.length) { + current = false; // overview or search + } else { + current = current.prevAll("h3").length; + } + $("#months-list").accordion({ collapsible: true, active: current }); +} + +function setup_expander() { + $('span.expander').expander({ + slicePoint: 500, + userCollapseText : '\n[-]', + expandText : '\n[+]', + beforeExpand: function() { + $(this).removeClass("collapsed"); + $(this).addClass("expanded"); + }, + onCollapse: function() { + $(this).removeClass("expanded"); + $(this).addClass("collapsed"); + } + }); } @@ -313,4 +333,5 @@ $(document).ready(function() { setup_months_list(); setup_favorites(); setup_replies(); + setup_expander(); }); |