1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

[file edit] improved draft autosave

This commit is contained in:
llj
2013-10-19 15:29:05 +08:00
parent 49b733a55f
commit 75372ce351
2 changed files with 71 additions and 111 deletions

View File

@@ -57,7 +57,15 @@ $(document).click(function(e) {
// clear repo enc info when log out
$('#logout').click(function() {
if ('localStorage' in window && window['localStorage'] !== null) {
localStorage.clear();
if (localStorage.length > 0) {
for (var key in localStorage) {
if (key.lastIndexOf('_decrypt_t') == 36 ||
key.lastIndexOf('_enc_key') == 36 ||
key.lastIndexOf('_enc_iv') == 36) { // key: {{repo_id}}_xx
localStorage.removeItem(key);
}
}
}
}
});
if ($.browser.mozilla || $.browser.msie) {