Manage synchronization

This commit is contained in:
benweet 2013-03-31 02:33:31 +01:00
parent 71bd87ac1e
commit b798d04989
2 changed files with 18 additions and 5 deletions

View File

@ -107,8 +107,13 @@ hr {
margin: 30px 0;
}
#file-title {
line-height: 23px;
padding: 9px 15px 11px;
}
#file-title i {
margin: 3px 5px 0;
margin: 4px 5px 0;
}
.dropdown-menu {
@ -208,7 +213,7 @@ hr {
width: 43px;
height: 11px;
background-position: 0 0;
margin: 13px 15px 0;
margin: 14px 15px 0;
}
.ui-layout-toggler-north .caret, .ui-layout-toggler-south .caret {

View File

@ -242,10 +242,18 @@ var fileManager = (function($) {
fileManager.deleteFile = function() {
var fileIndex = localStorage["file.current"];
// Remove synchronized locations
var fileSyncIndexList = localStorage[fileIndex + ".sync"].split(";");
for ( var i = 1; i < fileSyncIndexList.length - 1; i++) {
var sync = fileSyncIndexList[i];
fileManager.removeSync(sync);
}
localStorage.removeItem(fileIndex + ".sync");
localStorage.removeItem("file.current");
localStorage["file.list"] = localStorage["file.list"].replace(";"
+ fileIndex + ";", ";");
localStorage.removeItem(fileIndex + ".sync");
localStorage.removeItem(fileIndex + ".title");
localStorage.removeItem(fileIndex + ".content");
};
@ -266,7 +274,7 @@ var fileManager = (function($) {
localStorage[fileIndexSync] = localStorage[fileIndexSync].replace(";"
+ sync + ";", ";");
localStorage.removeItem(fileIndexSync + ".etag");
localStorage.removeItem(sync + ".etag");
};
function uploadGdrive() {