Remove stop sync button
This commit is contained in:
parent
df80c7573a
commit
b18a47b0d2
4 changed files with 14 additions and 30 deletions
|
@ -1414,17 +1414,11 @@ Zotero.Sync.Runner_Module = function (options = {}) {
|
|||
|
||||
// Update sync icon
|
||||
var syncIcon = doc.getElementById('zotero-tb-sync');
|
||||
var stopIcon = doc.getElementById('zotero-tb-sync-stop');
|
||||
if (state == 'animate') {
|
||||
syncIcon.setAttribute('status', state);
|
||||
// Disable button while spinning
|
||||
syncIcon.disabled = true;
|
||||
stopIcon.hidden = false;
|
||||
}
|
||||
else {
|
||||
syncIcon.removeAttribute('status');
|
||||
syncIcon.disabled = false;
|
||||
stopIcon.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -238,18 +238,12 @@ var ZoteroPane = new function()
|
|||
}
|
||||
return document.getElementById('zotero-tb-collection-add');
|
||||
},
|
||||
ShiftTab: () => document.getElementById('zotero-tb-sync-stop')
|
||||
},
|
||||
'zotero-tb-sync-stop': {
|
||||
ArrowRight: () => null,
|
||||
ArrowLeft: () => null,
|
||||
Tab: () => document.getElementById('zotero-tb-sync'),
|
||||
ShiftTab: () => document.getElementById('zotero-tb-sync-error')
|
||||
},
|
||||
'zotero-tb-sync-error': {
|
||||
ArrowRight: () => null,
|
||||
ArrowLeft: () => null,
|
||||
Tab: () => document.getElementById('zotero-tb-sync-stop'),
|
||||
Tab: () => document.getElementById('zotero-tb-sync'),
|
||||
ShiftTab: () => document.getElementById('zotero-tb-opened-tabs'),
|
||||
Enter: () => document.getElementById("zotero-tb-sync-error")
|
||||
.dispatchEvent(new MouseEvent("click", { target: event.target })),
|
||||
|
@ -423,14 +417,14 @@ var ZoteroPane = new function()
|
|||
// Uncomment to test
|
||||
//isDevBuild = isDevBuild || Zotero.version.includes('.SOURCE');
|
||||
if (isDevBuild) {
|
||||
let label = document.createElement('span');
|
||||
let label = document.createXULElement('label');
|
||||
label.setAttribute('style', 'font-weight: bold; color: red; cursor: pointer; margin-right: .5em');
|
||||
label.onclick = function () {
|
||||
Zotero.launchURL('https://www.zotero.org/support/kb/test_builds');
|
||||
};
|
||||
label.textContent = 'TEST BUILD — DO NOT USE';
|
||||
let syncStop = document.getElementById('zotero-tb-sync-stop');
|
||||
syncStop.parentNode.insertBefore(label, syncStop);
|
||||
label.value = 'TEST BUILD — DO NOT USE';
|
||||
let syncError = document.getElementById('zotero-tb-sync-error');
|
||||
syncError.parentNode.insertBefore(label, syncError);
|
||||
}
|
||||
else if (Services.appinfo.inSafeMode) {
|
||||
let label = document.createElement('span');
|
||||
|
@ -2787,11 +2781,16 @@ var ZoteroPane = new function()
|
|||
|
||||
|
||||
this.sync = function () {
|
||||
this.hideSyncReminder();
|
||||
if (Zotero.Sync.Runner.syncInProgress) {
|
||||
Zotero.Sync.Runner.stop();
|
||||
}
|
||||
else {
|
||||
this.hideSyncReminder();
|
||||
|
||||
Zotero.Sync.Server.canAutoResetClient = true;
|
||||
Zotero.Sync.Server.manualSyncRequired = false;
|
||||
Zotero.Sync.Runner.sync();
|
||||
Zotero.Sync.Server.canAutoResetClient = true;
|
||||
Zotero.Sync.Server.manualSyncRequired = false;
|
||||
Zotero.Sync.Runner.sync();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -759,14 +759,6 @@
|
|||
<hbox id="zotero-tabs-toolbar" align="center">
|
||||
<toolbarbutton id="zotero-tb-opened-tabs" class="zotero-tb-button" tabindex="-1" data-l10n-id="zotero-toolbar-opened-tabs-menu" type="panel" />
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" class="zotero-tb-separator"></div>
|
||||
<hbox id="zotero-tb-sync-progress-box" align="center" pack="end">
|
||||
<toolbarbutton id="zotero-tb-sync-stop"
|
||||
tooltiptext="&zotero.sync.stop;"
|
||||
tabindex="-1"
|
||||
style="-moz-user-focus: normal;"
|
||||
oncommand="this.hidden = true; Zotero.Sync.Runner.stop()"
|
||||
hidden="true"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="zotero-pq-buttons">
|
||||
</hbox>
|
||||
|
|
|
@ -72,7 +72,6 @@ $toolbarbutton-icons: (
|
|||
attachment-add: "add-file",
|
||||
note-add: "note",
|
||||
opened-tabs: "chevron",
|
||||
sync-stop: "stop-sync",
|
||||
sync-error: "error",
|
||||
sync: "sync",
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue