Remove Full Sync option from preferences

This commit is contained in:
Dan Stillman 2011-01-29 01:24:47 +00:00
parent 621af3b301
commit e1c770bef7
2 changed files with 8 additions and 61 deletions

View file

@ -486,55 +486,6 @@ function handleSyncReset(action) {
break;
case 'full-sync':
var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING)
+ (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_CANCEL)
+ ps.BUTTON_POS_1_DEFAULT;
var index = ps.confirmEx(
null,
// TODO: localize
Zotero.getString('general.warning'),
"The local Zotero library will be completely merged with data belonging to user '" + account + "' on the Zotero server. "
+ "Any unsynced changes will appear as conflicts.\n\n"
+ "This option should generally be used only for troubleshooting sync errors.",
buttonFlags,
"Sync",
null, null, null, {}
);
switch (index) {
case 0:
// TODO: better error handling
Zotero.Sync.Server.resetClient();
Zotero.Sync.Server.sync(/*{
onSuccess: function () {
Zotero.Sync.Runner.setSyncIcon();
ps.alert(
null,
"Full Sync Completed",
"The local Zotero library has been merged with data from the Zotero server."
);
},
onError: function (msg) {
// TODO: combine with error dialog for regular syncs
ps.alert(
null,
"Full Sync Failed",
"An error occurred while performing the full sync.\n\n"
+ "Click the sync error icon in the Zotero toolbar "
+ "for further information."
);
Zotero.Sync.Runner.error(msg);
}
}*/);
break;
// Cancel
case 1:
return;
}
break;
case 'reset-storage-history':
var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING)

View file

@ -355,14 +355,6 @@ To add a new preference:
</columns>
<rows>
<row id="zotero-full-sync">
<radio/>
<vbox onclick="this.previousSibling.click()">
<label value="&zotero.preferences.sync.reset.fullSync;"/>
<description>&zotero.preferences.sync.reset.fullSync.desc;</description>
</vbox>
</row>
<row id="zotero-restore-from-server" selected="true">
<radio/>
<vbox onclick="this.previousSibling.click()">
@ -380,6 +372,10 @@ To add a new preference:
</row>
</rows>
</grid>
<hbox>
<button label="&zotero.preferences.sync.reset.button;" oncommand="handleSyncReset(document.getElementById('zotero-reset-sync-group').selectedItem.parentNode.id.substr(7))"/>
</hbox>
</groupbox>
<groupbox>
@ -401,12 +397,12 @@ To add a new preference:
</row>
</rows>
</grid>
<hbox>
<button label="&zotero.preferences.sync.reset.button;" oncommand="handleSyncReset(document.getElementById('zotero-reset-sync-group').selectedItem.parentNode.id.substr(7))"/>
</hbox>
</groupbox>
</radiogroup>
<hbox>
<button id="zotero-reset-button" label="&zotero.preferences.sync.reset.button;" oncommand="handleSyncReset(document.getElementById('zotero-reset-sync-group').selectedItem.parentNode.id.substr(7))"/>
</hbox>
</tabpanel>
</tabpanels>
</tabbox>