2014-03-08 07:47:15 -05:00
|
|
|
$.fn.ready(function() {
|
|
|
|
|
|
|
|
var $listmode = $('#listmode'),
|
2014-03-27 12:21:30 -04:00
|
|
|
$listentries = $("#list-entries");
|
2014-03-08 07:47:15 -05:00
|
|
|
|
|
|
|
/* ==========================================================================
|
|
|
|
Menu
|
|
|
|
========================================================================== */
|
2014-02-27 09:11:37 -05:00
|
|
|
|
|
|
|
$("#menu").click(function(){
|
2014-11-03 13:32:20 -05:00
|
|
|
$("#links").toggleClass('menu--open');
|
2014-10-31 15:38:25 -04:00
|
|
|
if ($('#content').hasClass('opacity03')) {
|
|
|
|
$('#content').removeClass('opacity03');
|
|
|
|
}
|
2014-02-27 09:11:37 -05:00
|
|
|
});
|
|
|
|
|
2014-03-08 07:47:15 -05:00
|
|
|
/* ==========================================================================
|
|
|
|
List mode or Table Mode
|
|
|
|
========================================================================== */
|
2014-02-27 09:11:37 -05:00
|
|
|
|
2014-03-08 07:47:15 -05:00
|
|
|
$listmode.click(function(){
|
2014-02-27 09:11:37 -05:00
|
|
|
if ( $.cookie("listmode") == 1 ) {
|
2014-03-08 07:47:15 -05:00
|
|
|
// Cookie
|
2014-02-27 09:11:37 -05:00
|
|
|
$.removeCookie("listmode");
|
2014-03-08 07:47:15 -05:00
|
|
|
|
|
|
|
$listentries.removeClass("listmode");
|
|
|
|
$listmode.removeClass("tablemode");
|
|
|
|
$listmode.addClass("listmode");
|
2014-02-12 15:58:40 -05:00
|
|
|
}
|
2014-02-27 09:11:37 -05:00
|
|
|
else {
|
2014-03-08 07:47:15 -05:00
|
|
|
// Cookie
|
2014-02-27 09:11:37 -05:00
|
|
|
$.cookie("listmode", 1, {expires: 365});
|
|
|
|
|
2014-03-08 07:47:15 -05:00
|
|
|
$listentries.addClass("listmode");
|
|
|
|
$listmode.removeClass("listmode");
|
|
|
|
$listmode.addClass("tablemode");
|
2014-02-27 09:11:37 -05:00
|
|
|
}
|
|
|
|
|
2014-02-12 15:58:40 -05:00
|
|
|
});
|
2014-02-27 09:11:37 -05:00
|
|
|
|
2014-03-08 07:47:15 -05:00
|
|
|
/* ==========================================================================
|
|
|
|
Cookie listmode
|
|
|
|
========================================================================== */
|
|
|
|
|
2014-02-27 09:11:37 -05:00
|
|
|
if ( $.cookie("listmode") == 1 ) {
|
2014-03-08 07:47:15 -05:00
|
|
|
$listentries.addClass("listmode");
|
|
|
|
$listmode.removeClass("listmode");
|
|
|
|
$listmode.addClass("tablemode");
|
2014-02-27 09:11:37 -05:00
|
|
|
}
|
|
|
|
|
2014-03-12 07:00:37 -04:00
|
|
|
});
|