From 3ad6e78d98b3fc4cb4628138f731831122729618 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 1 Nov 2015 18:21:48 -0500 Subject: [PATCH] "Use"->"Keep" existing rights field for clarity in My Publications --- chrome/content/zotero/publicationsDialog.js | 28 +++++++++---------- chrome/content/zotero/publicationsDialog.xul | 6 ++-- .../zotero/xpcom/collectionTreeView.js | 4 +-- chrome/locale/en-US/zotero/zotero.properties | 4 +-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/chrome/content/zotero/publicationsDialog.js b/chrome/content/zotero/publicationsDialog.js index d58547ab15..6cd768d77e 100644 --- a/chrome/content/zotero/publicationsDialog.js +++ b/chrome/content/zotero/publicationsDialog.js @@ -31,7 +31,7 @@ var Zotero_Publications_Dialog = new function () { var _hasRights = null; var _includeFiles = true; var _includeNotes = true; - var _useRights = true; + var _keepRights = true; var _shareSettings = { sharing: 'reserved', // 'reserved', 'cc', 'cc0' adaptations: 'no', @@ -50,7 +50,7 @@ var Zotero_Publications_Dialog = new function () { _hasFiles = _io.hasFiles; _hasNotes = _io.hasNotes; _hasRights = _io.hasRights; - if (_hasRights == 'none') _useRights = false; + if (_hasRights == 'none') _keepRights = false; delete _io.hasFiles; delete _io.hasNotes; delete _io.hasRights; @@ -98,20 +98,20 @@ var Zotero_Publications_Dialog = new function () { } } else if (pageid == 'choose-sharing') { - let useRightsBox = document.getElementById('use-rights'); - let useRightsCheckbox = document.getElementById('use-rights-checkbox'); + let keepRightsBox = document.getElementById('keep-rights'); + let keepRightsCheckbox = document.getElementById('keep-rights-checkbox'); if (_hasRights == 'none') { - useRightsBox.hidden = true; + keepRightsBox.hidden = true; document.getElementById('sharing-radiogroup').focus(); } else { - let str = 'publications.sharing.useRightsField'; + let str = 'publications.sharing.keepRightsField'; if (_hasRights == 'some') { str += 'WhereAvailable'; } - useRightsCheckbox.label = Zotero.getString(str); - useRightsCheckbox.checked = _useRights; - this.updateUseRights(useRightsCheckbox.checked); + keepRightsCheckbox.label = Zotero.getString(str); + keepRightsCheckbox.checked = _keepRights; + this.updateKeepRights(keepRightsCheckbox.checked); } } // Select appropriate radio button from current license @@ -145,7 +145,7 @@ var Zotero_Publications_Dialog = new function () { // items, go to license chooser next (currentPage.pageid == 'choose-sharing' && _shareSettings.sharing == 'cc' - && !(_hasRights == 'all' && _useRights))) { + && !(_hasRights == 'all' && _keepRights))) { this.lastPage = false; finishButton.hidden = true; nextButton.hidden = false; @@ -177,11 +177,11 @@ var Zotero_Publications_Dialog = new function () { /** * Update rights setting from checkbox and hide sharing setting if necessary */ - this.updateUseRights = function (useRights) { - _useRights = useRights; + this.updateKeepRights = function (keepRights) { + _keepRights = keepRights; // If all items have rights and we're using them, the sharing page is the last page - document.getElementById('choose-sharing-options').hidden = _hasRights == 'all' && useRights; + document.getElementById('choose-sharing-options').hidden = _hasRights == 'all' && keepRights; this.updateNextButton(); } @@ -211,7 +211,7 @@ var Zotero_Publications_Dialog = new function () { this.onFinish = function () { _io.includeFiles = document.getElementById('include-files').checked; _io.includeNotes = document.getElementById('include-notes').checked; - _io.useRights = _useRights; + _io.keepRights = _keepRights; _io.license = _license; _io.licenseName = _getLicenseName(_license); } diff --git a/chrome/content/zotero/publicationsDialog.xul b/chrome/content/zotero/publicationsDialog.xul index ef0c564e72..0463a718b4 100644 --- a/chrome/content/zotero/publicationsDialog.xul +++ b/chrome/content/zotero/publicationsDialog.xul @@ -60,9 +60,9 @@ - - + + diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index b58e28589a..c195d1686a 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -1672,7 +1672,7 @@ Zotero.CollectionTreeView.prototype.drop = Zotero.Promise.coroutine(function* (r // Set Rights field for My Publications if (options.license) { - if (!options.useRights || !newItem.getField('rights')) { + if (!options.keepRights || !newItem.getField('rights')) { newItem.setField('rights', options.licenseName); } } @@ -1836,7 +1836,7 @@ Zotero.CollectionTreeView.prototype.drop = Zotero.Promise.coroutine(function* (r copyOptions.childFileAttachments = io.includeFiles; copyOptions.childLinks = true; copyOptions.tags = true; // TODO: add checkbox - ['useRights', 'license', 'licenseName'].forEach(function (field) { + ['keepRights', 'license', 'licenseName'].forEach(function (field) { copyOptions[field] = io[field]; }); } diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index db276f36ef..0284d8968b 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -1023,8 +1023,8 @@ styles.editor.output.individualCitations = Individual Citations styles.editor.output.singleCitation = Single Citation (with position "first") styles.preview.instructions = Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles. -publications.sharing.useRightsField = Use the existing Rights field -publications.sharing.useRightsFieldWhereAvailable = Use the existing Rights field where available +publications.sharing.keepRightsField = Keep the existing Rights field +publications.sharing.keepRightsFieldWhereAvailable = Keep the existing Rights field where available publications.cc.moreInfo.text = Be sure you have read the Creative Commons %S before placing your work under a CC license. Note that the license you apply cannot be revoked, even if you later choose different terms or cease publishing the work. publications.cc.moreInfo.linkText = Considerations for licensors publications.cc0.moreInfo.text = Be sure you have read the Creative Commons %S before applying CC0 to your work. Please note that dedicating your work to the public domain is irreversible, even if you later choose different terms or cease publishing the work.