From 6cc97d65c2b83120aa39670c4dcf00b36208ea4f Mon Sep 17 00:00:00 2001 From: flyskyko Date: Sat, 3 Nov 2012 06:43:32 +0000 Subject: [PATCH] issue 2610, remember admin gnb status git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12057 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/tpl/js/admin.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 3a1eae58f..52b275776 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -133,8 +133,22 @@ jQuery(function($){ $(this).parent('.gnb').toggleClass('open'); $xBody.toggleClass('wide'); reflow(); + + // remember status + var d = new Date(); + d.setTime(d.getTime() + 60*60*24*356); + if($(this).parent('.gnb').hasClass('open')){ + setCookie('__xe_admin_gnb_status', 'open', d); + }else{ + setCookie('__xe_admin_gnb_status', 'close', d); + } + return false; }); + if(getCookie('__xe_admin_gnb_status') == 'open'){ + $xGnb.find('>a[href="#gnbNav"]').trigger('click'); + } + // GNB Close $xGnb .prepend('