diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js
index f67ba97f7..1c18eb87f 100644
--- a/chrome/content/zotero/overlay.js
+++ b/chrome/content/zotero/overlay.js
@@ -231,6 +231,7 @@ var ZoteroPane = new function()
sep.nextSibling.nextSibling.hidden = false;
sep.nextSibling.nextSibling.nextSibling.hidden = false;
sep.nextSibling.nextSibling.nextSibling.nextSibling.hidden = false;
+ sep.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.hidden = false;
}
if (Zotero.Prefs.get('debugShowDuplicates')) {
diff --git a/chrome/content/zotero/overlay.xul b/chrome/content/zotero/overlay.xul
index 7f7f42a35..2e151ead9 100644
--- a/chrome/content/zotero/overlay.xul
+++ b/chrome/content/zotero/overlay.xul
@@ -142,7 +142,7 @@
-
+
diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js
index 577283832..3ed9d95ca 100644
--- a/chrome/content/zotero/preferences/preferences.js
+++ b/chrome/content/zotero/preferences/preferences.js
@@ -194,7 +194,6 @@ function updateStorageSettings(value) {
prefix.value = 'https://';
break;
}
- unverifyStorageServer();
}
function unverifyStorageServer() {
@@ -415,6 +414,36 @@ function handleSyncReset(action) {
break;
+ case 'reset-storage-history':
+ var buttonFlags = (pr.BUTTON_POS_0) * (pr.BUTTON_TITLE_IS_STRING)
+ + (pr.BUTTON_POS_1) * (pr.BUTTON_TITLE_CANCEL)
+ + pr.BUTTON_POS_1_DEFAULT;
+ var index = pr.confirmEx(
+ // TODO: localize
+ Zotero.getString('general.warning'),
+ "All file sync history will be cleared.\n\n"
+ + "Any local attachment files that do not exist on the storage server will be uploaded on the next sync.",
+ buttonFlags,
+ "Reset",
+ null, null, null, {}
+ );
+
+ switch (index) {
+ case 0:
+ Zotero.Sync.Storage.resetAllSyncStates();
+ pr.alert(
+ "File Sync History Cleared",
+ "The file sync history has been cleared."
+ );
+ break;
+
+ // Cancel
+ case 1:
+ return;
+ }
+
+ break;
+
default:
throw ("Invalid action '" + action + "' in handleSyncReset()");
}
diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul
index 22a5dc1ef..e17cbf34a 100644
--- a/chrome/content/zotero/preferences/preferences.xul
+++ b/chrome/content/zotero/preferences/preferences.xul
@@ -274,7 +274,7 @@ To add a new preference:
+ onsynctopreference="updateStorageSettings(this.value); unverifyStorageServer();">
@@ -330,10 +330,11 @@ To add a new preference:
-
-
-
-
+
+
+
+
+
@@ -366,12 +367,33 @@ To add a new preference:
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Force checking of the storage server for all local attachment files.
+
+
+
+
+
+
+
+
+
+
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
index 6bb023123..25ad7cf51 100644
--- a/chrome/content/zotero/xpcom/storage.js
+++ b/chrome/content/zotero/xpcom/storage.js
@@ -1291,37 +1291,36 @@ Zotero.Sync.Storage = new function () {
if (mdate) {
var mtime = Zotero.Date.toUnixTimestamp(mdate);
var smtime = Zotero.Sync.Storage.getSyncedModificationTime(item.id);
- // File has been uploaded to storage server but there's
- // no local record of the time (e.g., due to a reset),
+ // If file has been uploaded to storage server but there's
+ // no local record of the time (e.g., due to a reset?),
// use local file's time
if (!smtime) {
smtime = item.attachmentModificationTime;
- if (smtime == mtime) {
- Zotero.debug("Stored file mod time matches remote file -- skipping upload");
-
- Zotero.DB.beginTransaction();
- var syncState = Zotero.Sync.Storage.getSyncState(item.id);
- Zotero.Sync.Storage.setSyncedModificationTime(item.id, smtime, true);
- Zotero.Sync.Storage.setSyncState(item.id, Zotero.Sync.Storage.SYNC_STATE_IN_SYNC);
- Zotero.DB.commitTransaction();
- _changesMade = true;
- request.finish();
- return;
- }
}
- if (smtime != mtime) {
- var localData = { modTime: smtime };
- var remoteData = { modTime: mtime };
- Zotero.Sync.Storage.QueueManager.addConflict(
- request.name, localData, remoteData
- );
- Zotero.debug("Conflict -- last synced file mod time "
- + "does not match time on storage server"
- + " (" + smtime + " != " + mtime + ")");
+ if (smtime == mtime) {
+ Zotero.debug("Stored file mod time matches remote file -- skipping upload");
+
+ Zotero.DB.beginTransaction();
+ var syncState = Zotero.Sync.Storage.getSyncState(item.id);
+ Zotero.Sync.Storage.setSyncedModificationTime(item.id, smtime, true);
+ Zotero.Sync.Storage.setSyncState(item.id, Zotero.Sync.Storage.SYNC_STATE_IN_SYNC);
+ Zotero.DB.commitTransaction();
+ _changesMade = true;
request.finish();
return;
}
+
+ var localData = { modTime: smtime };
+ var remoteData = { modTime: mtime };
+ Zotero.Sync.Storage.QueueManager.addConflict(
+ request.name, localData, remoteData
+ );
+ Zotero.debug("Conflict -- last synced file mod time "
+ + "does not match time on storage server"
+ + " (" + smtime + " != " + mtime + ")");
+ request.finish();
+ return;
}
else {
Zotero.debug("Remote file not found for item " + item.id);
diff --git a/chrome/skin/default/zotero/preferences.css b/chrome/skin/default/zotero/preferences.css
index 44326a94a..c5cdad212 100644
--- a/chrome/skin/default/zotero/preferences.css
+++ b/chrome/skin/default/zotero/preferences.css
@@ -119,12 +119,11 @@ grid row hbox:first-child
#zotero-reset row
{
margin: 0;
- padding: 15px;
+ padding: 8px;
}
#zotero-reset row:not(:last-child)
{
- border-bottom: 1px #999 solid;
}
#zotero-reset row vbox
@@ -155,7 +154,6 @@ grid row hbox:first-child
#zotero-reset > hbox
{
margin-top: 5px;
- -moz-box-pack: center;
}