Store the userlist state when it is closed using the icon

pull/1/head
yflory 7 years ago
parent 82c87144cb
commit b56a782f01

@ -348,7 +348,10 @@ define([
var h = $ck.is(':visible') ? -$ck.height() : 0; var h = $ck.is(':visible') ? -$ck.height() : 0;
$content.css('margin-top', h+'px'); $content.css('margin-top', h+'px');
}); });
$closeIcon.click(hide); $closeIcon.click(function () {
Cryptpad.setAttribute('userlist-drawer', false);
hide();
});
$button.click(function () { $button.click(function () {
var visible = $content.is(':visible'); var visible = $content.is(':visible');
if (visible) { hide(); } if (visible) { hide(); }
@ -358,7 +361,6 @@ define([
Cryptpad.feedback(visible?'USERLIST_SHOW': 'USERLIST_HIDE'); Cryptpad.feedback(visible?'USERLIST_SHOW': 'USERLIST_HIDE');
}); });
Cryptpad.getAttribute('userlist-drawer', function (err, val) { Cryptpad.getAttribute('userlist-drawer', function (err, val) {
if (val === false || mobile) { return void hide(); } if (val === false || mobile) { return void hide(); }
show(); show();

Loading…
Cancel
Save