2012-02-05 00:06:53 +00:00
|
|
|
/*
|
|
|
|
* Beware of fadeIn/fadeOut jQuery animations; they add an inline
|
|
|
|
* "display: block" which overrides display: none in the stylesheet. Sneaky!
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-12-13 18:22:40 +00:00
|
|
|
var $j = jQuery.noConflict();
|
2012-02-05 00:06:53 +00:00
|
|
|
|
|
|
|
$j(document).ready(function() {
|
|
|
|
$j('#toggle-list').click(toggleList);
|
|
|
|
$j('#toggle-panel').click(togglePanel);
|
2012-03-03 01:47:13 +00:00
|
|
|
if($j.cookie('view')=='panel') {togglePanel();}
|
2011-11-18 03:11:11 +00:00
|
|
|
});
|
2012-02-05 00:06:53 +00:00
|
|
|
|
|
|
|
function toggleList() {
|
2012-03-03 01:47:13 +00:00
|
|
|
$j.cookie('view', 'list', {path: '/'});
|
2012-02-07 18:41:21 +00:00
|
|
|
$j('div.panelview').addClass("listview").removeClass("panelview");
|
2014-11-19 02:54:47 +00:00
|
|
|
$j('#toggle-list').addClass("chosen");
|
|
|
|
$j('#toggle-panel').removeClass("chosen");
|
2012-02-05 00:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function togglePanel() {
|
2012-03-03 01:47:13 +00:00
|
|
|
$j.cookie('view', 'panel', {path: '/'});
|
2012-02-07 18:41:21 +00:00
|
|
|
$j('div.listview').addClass("panelview").removeClass("listview");
|
2014-11-19 02:54:47 +00:00
|
|
|
$j('#toggle-panel').addClass("chosen");
|
|
|
|
$j('#toggle-list').removeClass("chosen");
|
2012-02-05 00:06:53 +00:00
|
|
|
}
|