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