Bugfix. Make sure group toggle state is persisted to browser storage.

updates #83
This commit is contained in:
JC Brand 2014-08-04 19:12:03 +02:00
parent be1d1f6652
commit d5b9af7558

View File

@ -3280,11 +3280,11 @@
var $el = $(ev.target); var $el = $(ev.target);
this.$el.nextUntil('dt').slideToggle(); this.$el.nextUntil('dt').slideToggle();
if ($el.hasClass("icon-opened")) { if ($el.hasClass("icon-opened")) {
this.model.set({state: CLOSED}); this.model.save({state: CLOSED});
$el.removeClass("icon-opened").addClass("icon-closed"); $el.removeClass("icon-opened").addClass("icon-closed");
} else { } else {
$el.removeClass("icon-closed").addClass("icon-opened"); $el.removeClass("icon-closed").addClass("icon-opened");
this.model.set({state: OPENED}); this.model.save({state: OPENED});
} }
}, },