summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei MIHAI <smihai@entrouvert.com>2014-09-19 13:29:33 (GMT)
committerSerghei MIHAI <smihai@entrouvert.com>2014-09-19 15:46:36 (GMT)
commit5b391eec74220c130e24f98498c8ddc7d356a35b (patch)
tree76a239144e1c4bbcf9161a176a28de3edb49697a
parenta1ea93302ad81c7c5411c811189a4e8463af0884 (diff)
downloadcalebasse-5b391eec74220c130e24f98498c8ddc7d356a35b.zip
calebasse-5b391eec74220c130e24f98498c8ddc7d356a35b.tar.gz
calebasse-5b391eec74220c130e24f98498c8ddc7d356a35b.tar.bz2
agenda: "forget" the last open ressource if no ressources open
-rw-r--r--calebasse/static/js/calebasse.agenda.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/calebasse/static/js/calebasse.agenda.js b/calebasse/static/js/calebasse.agenda.js
index f850100..0e049c1 100644
--- a/calebasse/static/js/calebasse.agenda.js
+++ b/calebasse/static/js/calebasse.agenda.js
@@ -199,8 +199,10 @@ function toggle_ressource(ressource) {
var agendatabs = $.cookie('agenda-tabs');
if ($('#users li.item.ressource.active:last').attr('id'))
$.cookie('last-ressource', $('#users li.item.ressource.active:last').attr('id').split('-')[1], { path: COOKIE_PATH });
- else
+ else {
+ $.cookie('active-agenda', '', {path: COOKIE_PATH})
$.cookie('last-ressource', '', {path: COOKIE_PATH});
+ }
$.each(agendatabs, function (i, value) {
if (value == ressource_id) {