diff --git a/chrome/content/zotero/preferences/preferences_export.js b/chrome/content/zotero/preferences/preferences_export.js index c7c5deb6f0..2f99652a97 100644 --- a/chrome/content/zotero/preferences/preferences_export.js +++ b/chrome/content/zotero/preferences/preferences_export.js @@ -142,6 +142,21 @@ Zotero_Preferences.Export = { checkbox.disabled = mode != 'bibliography'; }, + /** + * Disables UI buttons when no site-specific quick copy entries are selected + */ + disableQuickCopySiteButtons: function () { + document.getElementById('quickCopy-edit').disabled = true; + document.getElementById('quickCopy-delete').disabled = true; + }, + + /** + * Enables UI buttons when a site-specific quick copy entry is selected + */ + enableQuickCopySiteButtons: function () { + document.getElementById('quickCopy-edit').disabled = false; + document.getElementById('quickCopy-delete').disabled = false; + }, showQuickCopySiteEditor: Zotero.Promise.coroutine(function* (index) { var treechildren = document.getElementById('quickCopy-siteSettings-rows'); @@ -159,7 +174,8 @@ Zotero_Preferences.Export = { } var io = {domain: domain, format: format, ok: false}; - window.openDialog('chrome://zotero/content/preferences/quickCopySiteEditor.xul', "zotero-preferences-quickCopySiteEditor", "chrome, modal", io); + window.openDialog('chrome://zotero/content/preferences/quickCopySiteEditor.xul', + "zotero-preferences-quickCopySiteEditor", "chrome,modal,centerscreen", io); if (!io.ok) { return; @@ -207,6 +223,8 @@ Zotero_Preferences.Export = { treeitem.appendChild(treerow); treechildren.appendChild(treeitem); } + + this.disableQuickCopySiteButtons(); }), diff --git a/chrome/content/zotero/preferences/preferences_export_firefox.xul b/chrome/content/zotero/preferences/preferences_export_firefox.xul index 277ce4962b..6f913c31c8 100644 --- a/chrome/content/zotero/preferences/preferences_export_firefox.xul +++ b/chrome/content/zotero/preferences/preferences_export_firefox.xul @@ -23,7 +23,10 @@ ***** END LICENSE BLOCK ***** --> - + %preferencesDTD; + %zoteroDTD; +]> @@ -34,6 +37,7 @@