diff --git a/chrome/content/zotero/bindings/attachmentbox.xml b/chrome/content/zotero/bindings/attachmentbox.xml
index 77f69f0bd5..b605238163 100644
--- a/chrome/content/zotero/bindings/attachmentbox.xml
+++ b/chrome/content/zotero/bindings/attachmentbox.xml
@@ -363,16 +363,7 @@
}
var type = Zotero.Libraries.get(this.item.libraryID).libraryType;
- var switherDeck = this._id('attachment-note-editor-switcher');
- // Note editor
- if (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild) {
- var noteEditor = this._id('attachment-note-editor-old');
- switherDeck.selectedIndex = 0;
- }
- else {
- var noteEditor = this._id('attachment-note-editor');
- switherDeck.selectedIndex = 1;
- }
+ var noteEditor = this._id('attachment-note-editor');
if (this.displayNote && (this.displayNoteIfEmpty || this.item.note != '')) {
noteEditor.linksOnTop = true;
@@ -637,10 +628,7 @@
-
-
-
-
+
diff --git a/chrome/content/zotero/bindings/merge.xml b/chrome/content/zotero/bindings/merge.xml
index f7c198319f..b35fd58fb3 100644
--- a/chrome/content/zotero/bindings/merge.xml
+++ b/chrome/content/zotero/bindings/merge.xml
@@ -340,8 +340,7 @@
case 'note':
var type = Zotero.Libraries.get(this.libraryID).libraryType;
- var useOld = type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild;
- elementName = useOld ? 'oldzoteronoteeditor' : 'zoteronoteeditor';
+ elementName = 'zoteronoteeditor';
break;
case 'annotation':
diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js
index 3fc7f418f0..b41e0bfe76 100644
--- a/chrome/content/zotero/itemPane.js
+++ b/chrome/content/zotero/itemPane.js
@@ -256,58 +256,22 @@ var ZoteroItemPane = new function() {
tree.focus();
}
}
-
-
- this.switchEditorEngine = function (useOld) {
- var switherDeck = document.getElementById('zotero-note-editor-switcher');
- switherDeck.selectedIndex = useOld ? 0 : 1;
- };
this.onNoteSelected = function (item, editable) {
_selectedNoteID = item.id;
var type = Zotero.Libraries.get(item.libraryID).libraryType;
- if (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild) {
- // If an external note window is open for this item, don't show the editor
- if (ZoteroPane.findNoteWindow(item.id)) {
- this.showNoteWindowMessage();
- return;
- }
-
- var noteEditor = document.getElementById('zotero-note-editor-old');
-
- // If loading new or different note, disable undo while we repopulate the text field
- // so Undo doesn't end up clearing the field. This also ensures that Undo doesn't
- // undo content from another note into the current one.
- var clearUndo = noteEditor.item ? noteEditor.item.id != item.id : false;
-
- noteEditor.mode = editable ? 'edit' : 'view';
- noteEditor.parent = null;
- noteEditor.item = item;
-
- if (clearUndo) {
- noteEditor.clearUndo();
- }
- }
- else {
- var noteEditor = document.getElementById('zotero-note-editor');
- noteEditor.mode = editable ? 'edit' : 'view';
- noteEditor.viewMode = 'library';
- noteEditor.parent = null;
- noteEditor.item = item;
- }
+ var noteEditor = document.getElementById('zotero-note-editor');
+ noteEditor.mode = editable ? 'edit' : 'view';
+ noteEditor.viewMode = 'library';
+ noteEditor.parent = null;
+ noteEditor.item = item;
- document.getElementById('zotero-view-note-button').hidden = !editable || (type == 'user' || Zotero.enablePDFBuildForGroups) && Zotero.isPDFBuild;
document.getElementById('zotero-item-pane-content').selectedIndex = 2;
};
- this.showNoteWindowMessage = function () {
- ZoteroPane.setItemPaneMessage(Zotero.getString('pane.item.notes.editingInWindow'));
- };
-
-
/**
* Select the parent item and open the note editor
*/
@@ -315,19 +279,6 @@ var ZoteroItemPane = new function() {
var selectedNote = Zotero.Items.get(_selectedNoteID);
var type = Zotero.Libraries.get(selectedNote.libraryID).libraryType;
- if (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild) {
- // We don't want to show the note in two places, since it causes unnecessary UI updates
- // and can result in weird bugs where note content gets lost.
- //
- // If this is a child note, select the parent
- if (selectedNote.parentID) {
- await ZoteroPane.selectItem(selectedNote.parentID);
- }
- // Otherwise, hide note and replace with a message that we're editing externally
- else {
- this.showNoteWindowMessage();
- }
- }
ZoteroPane.openNoteWindow(selectedNote.id);
};
diff --git a/chrome/content/zotero/itemPane.xul b/chrome/content/zotero/itemPane.xul
index f0201db1c7..8d48762550 100644
--- a/chrome/content/zotero/itemPane.xul
+++ b/chrome/content/zotero/itemPane.xul
@@ -117,16 +117,8 @@
'onerror' handler crashes the app on a save error to prevent typing in notes
while they're not being saved
-->
-
-
-
-
-
+
diff --git a/chrome/content/zotero/note.js b/chrome/content/zotero/note.js
index 68f0a30a82..291029bf4c 100644
--- a/chrome/content/zotero/note.js
+++ b/chrome/content/zotero/note.js
@@ -27,11 +27,6 @@ var noteEditor;
var notifierUnregisterID;
var type;
-function switchEditorEngine(useOld) {
- var switherDeck = document.getElementById('zotero-note-editor-switcher');
- switherDeck.selectedIndex = useOld ? 0 : 1;
-}
-
async function onLoad() {
if (window.arguments) {
var io = window.arguments[0];
@@ -58,13 +53,7 @@ async function onLoad() {
}
}
type = Zotero.Libraries.get(libraryID).libraryType;
- switchEditorEngine(type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild);
- if (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild) {
- noteEditor = document.getElementById('zotero-note-editor-old');
- }
- else {
- noteEditor = document.getElementById('zotero-note-editor');
- }
+ noteEditor = document.getElementById('zotero-note-editor');
noteEditor.mode = 'edit';
noteEditor.viewMode = 'window';
@@ -107,14 +96,7 @@ function onError() {
function onUnload() {
Zotero.Notifier.unregisterObserver(notifierUnregisterID);
- if (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild) {
- if (noteEditor.item) {
- window.opener.ZoteroPane.onNoteWindowClosed(noteEditor.item.id, noteEditor.value);
- }
- }
- else {
- noteEditor.saveSync();
- }
+ noteEditor.saveSync();
}
var NotifyCallback = {
diff --git a/chrome/content/zotero/note.xul b/chrome/content/zotero/note.xul
index 3a3c4f79b9..22d30616ba 100644
--- a/chrome/content/zotero/note.xul
+++ b/chrome/content/zotero/note.xul
@@ -22,8 +22,5 @@
-
-
-
-
+
diff --git a/chrome/content/zotero/preferences/preferences_general.js b/chrome/content/zotero/preferences/preferences_general.js
index 2d851ffe90..f9863004ee 100644
--- a/chrome/content/zotero/preferences/preferences_general.js
+++ b/chrome/content/zotero/preferences/preferences_general.js
@@ -43,7 +43,6 @@ Zotero_Preferences.General = {
this.updateAutoRenameFilesUI();
this._updateFileHandlerUI();
- this._updateZotero6BetaCheckbox();
},
updateAutoRenameFilesUI: function () {
@@ -60,7 +59,7 @@ Zotero_Preferences.General = {
var currentPath = Zotero.Prefs.get(pref);
var fp = new FilePicker();
- if (currentPath) {
+ if (currentPath && currentPath != 'system') {
fp.displayDirectory = OS.Path.dirname(currentPath);
}
fp.init(
@@ -78,12 +77,7 @@ Zotero_Preferences.General = {
setFileHandler: function (type, handler) {
var pref = this._getFileHandlerPref(type);
- if (handler) {
- Zotero.Prefs.set(pref, handler);
- }
- else {
- Zotero.Prefs.clear(pref);
- }
+ Zotero.Prefs.set(pref, handler);
this._updateFileHandlerUI();
},
@@ -92,16 +86,13 @@ Zotero_Preferences.General = {
var menulist = document.getElementById('fileHandler-pdf');
var customMenuItem = document.getElementById('fileHandler-custom');
- // TEMP: Use separate checkbox for now
- /*if (handler == 'zotero') {
- let menuitem = document.getElementById('fileHandler-internal');
- menulist.selectedIndex = 0;
+ // System default
+ if (handler == 'system') {
customMenuItem.hidden = true;
- return;
- }*/
-
+ menulist.selectedIndex = 1;
+ }
// Custom handler
- if (handler) {
+ else if (handler) {
let icon;
try {
let fph = Services.io.getProtocolHandler("file")
@@ -126,13 +117,14 @@ Zotero_Preferences.General = {
customMenuItem.className = '';
}
customMenuItem.hidden = false;
- menulist.selectedIndex = 1;
- }
- // System default
- else {
- customMenuItem.hidden = true;
menulist.selectedIndex = 2;
}
+ // Zotero
+ else {
+ let menuitem = document.getElementById('fileHandler-internal');
+ menulist.selectedIndex = 0;
+ customMenuItem.hidden = true;
+ }
},
_getFileHandlerPref: function (type) {
@@ -140,38 +132,5 @@ Zotero_Preferences.General = {
throw new Error(`Unknown file type ${type}`);
}
return 'fileHandler.pdf';
- },
-
-
- handleZotero6BetaChange: function (event) {
- var ps = Services.prompt;
- var buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING
- + ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL;
- var index = ps.confirmEx(
- window,
- Zotero.getString('general.restartRequired'),
- Zotero.getString('general.restartRequiredForChange', Zotero.appName),
- buttonFlags,
- Zotero.getString('general.restartApp', Zotero.appName),
- null, null, null, {}
- );
- if (index == 0) {
- Zotero.Prefs.set('beta.zotero6', !event.target.checked);
- Zotero.Utilities.Internal.quitZotero(true);
- return;
- }
- // Set to opposite so the click changes it back to what it was before
- event.target.checked = !event.target.checked;
- },
-
-
- _updateZotero6BetaCheckbox: function () {
- var checkbox = document.getElementById('zotero6-checkbox');
- if (Zotero.Prefs.get('beta.zotero6')) {
- checkbox.setAttribute('checked', true);
- }
- else {
- checkbox.removeAttribute('checked');
- }
}
}
diff --git a/chrome/content/zotero/preferences/preferences_general.xul b/chrome/content/zotero/preferences/preferences_general.xul
index 34ee288ffe..4e5c402420 100644
--- a/chrome/content/zotero/preferences/preferences_general.xul
+++ b/chrome/content/zotero/preferences/preferences_general.xul
@@ -67,23 +67,15 @@
-
+ oncommand="Zotero_Preferences.General.setFileHandler('pdf', '')"/>
+ oncommand="Zotero_Preferences.General.setFileHandler('pdf', 'system')"/>
+
-
-
diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js
index b229dee234..f5640b0ea4 100644
--- a/chrome/content/zotero/standalone/standalone.js
+++ b/chrome/content/zotero/standalone/standalone.js
@@ -87,13 +87,6 @@ const ZoteroStandalone = new function() {
ZoteroStandalone.DebugOutput.init();
- // TEMP: Remove tab bar if not PDF build
- if (Zotero.isMac && !Zotero.isPDFBuild) {
- document.documentElement.removeAttribute('drawintitlebar');
- document.documentElement.removeAttribute('tabsintitlebar');
- document.documentElement.removeAttribute('chromemargin');
- }
-
Zotero.hideZoteroPaneOverlays();
ZoteroPane.init();
ZoteroPane.makeVisible();
diff --git a/chrome/content/zotero/xpcom/connector/server_connector.js b/chrome/content/zotero/xpcom/connector/server_connector.js
index adfa112b0b..c50d4bc135 100644
--- a/chrome/content/zotero/xpcom/connector/server_connector.js
+++ b/chrome/content/zotero/xpcom/connector/server_connector.js
@@ -1702,7 +1702,7 @@ Zotero.Server.Connector.Ping.prototype = {
let response = {
prefs: {
automaticSnapshots: Zotero.Prefs.get('automaticSnapshots'),
- googleDocsAddNoteEnabled: Zotero.isPDFBuild
+ googleDocsAddNoteEnabled: true
}
};
if (Zotero.QuickCopy.hasSiteSettings()) {
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js
index 982bce8684..736e2c7d38 100644
--- a/chrome/content/zotero/xpcom/data/item.js
+++ b/chrome/content/zotero/xpcom/data/item.js
@@ -1273,19 +1273,6 @@ Zotero.Item.prototype._saveData = Zotero.Promise.coroutine(function* (env) {
env.sqlValues.push({ int: itemTypeID });
}
- // TEMP: Don't allow annotations or embedded images in group libraries
- // TODO: Enable test in annotations.js after removing
- if (libraryType == 'group' && !Zotero.enablePDFBuildForGroups) {
- if (this._changed.primaryData && this._changed.primaryData.itemTypeID
- && Zotero.ItemTypes.getName(itemTypeID) == 'annotation') {
- throw new Error("Annotations can currently be created only in user libraries");
- }
- if (this._changed.attachmentData
- && this.attachmentLinkMode == Zotero.Attachments.LINK_MODE_EMBEDDED_IMAGE) {
- throw new Error("Embedded-image attachments can currently be created only in user libraries");
- }
- }
-
if (isNew || (this._changed.primaryData && this._changed.primaryData.dateAdded)) {
env.sqlColumns.push('dateAdded');
env.sqlValues.push(this.dateAdded ? this.dateAdded : Zotero.DB.transactionDateTime);
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
index 49314ed2f4..3929d5c5af 100644
--- a/chrome/content/zotero/xpcom/integration.js
+++ b/chrome/content/zotero/xpcom/integration.js
@@ -666,13 +666,6 @@ Zotero.Integration.Interface.prototype.addEditCitation = async function (docFiel
* @return {Promise}
*/
Zotero.Integration.Interface.prototype.addNote = async function () {
- if (!Zotero.isPDFBuild) {
- let ps = Services.prompt;
- let errorMessage = "To add notes to your document, you must enable the beta PDF reader "
- + "and note editor in the Zotero preferences.";
- let index = ps.alert(null, Zotero.getString('general.error'), errorMessage);
- throw new Zotero.Exception.UserCancelled('Cannot add notes with note editor disabled');
- }
await this._session.init(false, false);
if ((!await this._doc.canInsertField(this._session.data.prefs['fieldType']))) {
diff --git a/chrome/content/zotero/xpcom/openPDF.js b/chrome/content/zotero/xpcom/openPDF.js
index 6e99cc68aa..c3e4183b47 100644
--- a/chrome/content/zotero/xpcom/openPDF.js
+++ b/chrome/content/zotero/xpcom/openPDF.js
@@ -27,6 +27,8 @@
Zotero.OpenPDF = {
openToPage: async function (pathOrItem, page, annotationKey) {
+ var handler = Zotero.Prefs.get("fileHandler.pdf");
+
var path;
if (pathOrItem == 'string') {
Zotero.logError("Zotero.OpenPDF.openToPage() now takes a Zotero.Item rather than a path "
@@ -36,8 +38,8 @@ Zotero.OpenPDF = {
else {
let item = pathOrItem;
let library = Zotero.Libraries.get(item.libraryID);
- // TEMP
- if (Zotero.isPDFBuild && (library.libraryType == 'user' || Zotero.enablePDFBuildForGroups)) {
+ // Zotero PDF reader
+ if (!handler) {
let location = {
annotationKey,
pageIndex: page && page - 1
@@ -53,10 +55,9 @@ Zotero.OpenPDF = {
}
}
- var handler = Zotero.Prefs.get("fileHandler.pdf");
var opened = false;
- if (handler) {
+ if (handler != 'system') {
Zotero.debug(`Custom handler is ${handler}`);
}
@@ -72,7 +73,7 @@ Zotero.OpenPDF = {
opened = true;
}
else if (Zotero.isWin) {
- if (!handler) {
+ if (handler == 'system') {
handler = this._getPDFHandlerWindows();
if (handler) {
Zotero.debug(`Default handler is ${handler}`);
@@ -92,7 +93,7 @@ Zotero.OpenPDF = {
}
}
else if (Zotero.isLinux) {
- if (!handler) {
+ if (handler == 'system') {
handler = await this._getPDFHandlerLinux();
if (handler) {
Zotero.debug(`Resolved handler is ${handler}`);
diff --git a/chrome/content/zotero/xpcom/prefs.js b/chrome/content/zotero/xpcom/prefs.js
index 688c9f18c1..d0e81e46c4 100644
--- a/chrome/content/zotero/xpcom/prefs.js
+++ b/chrome/content/zotero/xpcom/prefs.js
@@ -49,7 +49,7 @@ Zotero.Prefs = new function(){
if (!fromVersion) {
fromVersion = 0;
}
- var toVersion = 3;
+ var toVersion = 4;
if (fromVersion < toVersion) {
for (var i = fromVersion + 1; i <= toVersion; i++) {
switch (i) {
@@ -78,10 +78,9 @@ Zotero.Prefs = new function(){
this.clear('note.fontSize');
break;
- // TEMP: Uncomment and set toVersion above to 3 when adding to prefs drop-down
- //case 3:
- // this.clear('fileHandler.pdf');
- // break;
+ case 4:
+ this.clear('fileHandler.pdf');
+ break;
}
}
this.set('prefVersion', toVersion);
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
index b8abcefe87..47b17866ee 100644
--- a/chrome/content/zotero/xpcom/zotero.js
+++ b/chrome/content/zotero/xpcom/zotero.js
@@ -260,9 +260,6 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
return;
}
- Zotero.isPDFBuild = Zotero.Prefs.get('beta.zotero6');
- Zotero.enablePDFBuildForGroups = false;
-
try {
yield Zotero.DataDirectory.init();
if (this.restarting) {
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
index 63389adc3e..a2b529db42 100644
--- a/chrome/content/zotero/zoteroPane.js
+++ b/chrome/content/zotero/zoteroPane.js
@@ -69,13 +69,6 @@ var ZoteroPane = new function()
this.init = function () {
Zotero.debug("Initializing Zotero pane");
- if (!Zotero.isPDFBuild) {
- let win = document.getElementById('main-window')
- win.setAttribute('legacytoolbar', 'true');
- document.getElementById('titlebar').hidden = true;
- document.getElementById('tab-bar-container').hidden = true;
- }
-
// Set key down handler
document.addEventListener('keydown', ZoteroPane_Local.handleKeyDown, true);
document.addEventListener('blur', ZoteroPane.handleBlur);
@@ -1224,12 +1217,9 @@ var ZoteroPane = new function()
}
// Rename tab
- if (Zotero.isPDFBuild) {
- Zotero_Tabs.rename('zotero-pane', collectionTreeRow.getName());
- }
+ Zotero_Tabs.rename('zotero-pane', collectionTreeRow.getName());
let type = Zotero.Libraries.get(collectionTreeRow.ref.libraryID).libraryType;
- ZoteroItemPane.switchEditorEngine(type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild);
// Clear quick search and tag selector when switching views
document.getElementById('zotero-tb-search').value = "";
@@ -3334,7 +3324,7 @@ var ZoteroPane = new function()
this.openNoteWindow = function (itemID, col, parentKey) {
var item = Zotero.Items.get(itemID);
var type = Zotero.Libraries.get(item.libraryID).libraryType;
- if (!this.canEdit() && (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild)) {
+ if (!this.canEdit()) {
this.displayCannotEditLibraryMessage();
return;
}
@@ -3371,25 +3361,12 @@ var ZoteroPane = new function()
}
}
};
-
-
- this.onNoteWindowClosed = async function (itemID, noteText) {
- var item = Zotero.Items.get(itemID);
- item.setNote(noteText);
- await item.saveTx();
-
- // If note is still selected, show the editor again when the note window closes
- var selectedItems = this.getSelectedItems(true);
- if (selectedItems.length == 1 && itemID == selectedItems[0]) {
- ZoteroItemPane.onNoteSelected(item, this.collectionsView.editable);
- }
- };
this.openBackupNoteWindow = function (itemID) {
var item = Zotero.Items.get(itemID);
var type = Zotero.Libraries.get(item.libraryID).libraryType;
- if (!this.canEdit() && (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild)) {
+ if (!this.canEdit()) {
this.displayCannotEditLibraryMessage();
return;
}
@@ -3866,10 +3843,10 @@ var ZoteroPane = new function()
}
else if (item.isNote()) {
var type = Zotero.Libraries.get(item.libraryID).libraryType;
- if (!this.collectionsView.editable && (type == 'group' && !Zotero.enablePDFBuildForGroups || !Zotero.isPDFBuild)) {
+ if (!this.collectionsView.editable) {
continue;
}
- document.getElementById('zotero-view-note-button').doCommand();
+ ZoteroItemPane.openNoteWindow();
}
else if (item.isAttachment()) {
yield this.viewAttachment(item.id, event);
@@ -3899,12 +3876,12 @@ var ZoteroPane = new function()
await item.saveTx();
}
}
- // Custom PDF handler
if (contentType === 'application/pdf') {
let item = await Zotero.Items.getAsync(itemID);
let library = Zotero.Libraries.get(item.libraryID);
- // TEMP
- if (Zotero.isPDFBuild && (library.libraryType == 'user' || Zotero.enablePDFBuildForGroups)) {
+ let pdfHandler = Zotero.Prefs.get("fileHandler.pdf");
+ // Zotero PDF reader
+ if (!pdfHandler) {
await Zotero.Reader.open(
itemID,
extraData && extraData.location,
@@ -3912,15 +3889,18 @@ var ZoteroPane = new function()
);
return;
}
- let pdfHandler = Zotero.Prefs.get("fileHandler.pdf");
- if (pdfHandler) {
- if (await OS.File.exists(pdfHandler)) {
- Zotero.launchFileWithApplication(path, pdfHandler);
- return;
+ // Custom PDF handler
+ if (pdfHandler != 'system') {
+ try {
+ if (await OS.File.exists(pdfHandler)) {
+ Zotero.launchFileWithApplication(path, pdfHandler);
+ return;
+ }
}
- else {
- Zotero.logError(`${pdfHandler} not found -- launching file normally`);
+ catch (e) {
+ Zotero.logError(e);
}
+ Zotero.logError(`${pdfHandler} not found -- launching file normally`);
}
}
Zotero.launchFile(path);
diff --git a/chrome/locale/en-US/zotero/zotero.dtd b/chrome/locale/en-US/zotero/zotero.dtd
index c569e7f912..76b635175a 100644
--- a/chrome/locale/en-US/zotero/zotero.dtd
+++ b/chrome/locale/en-US/zotero/zotero.dtd
@@ -50,7 +50,6 @@
-
diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties
index 60fb77b0dd..20263a26a5 100644
--- a/chrome/locale/en-US/zotero/zotero.properties
+++ b/chrome/locale/en-US/zotero/zotero.properties
@@ -394,7 +394,6 @@ pane.item.notes.allNotes = All Notes
pane.item.notes.untitled = Untitled Note
pane.item.notes.delete.confirm = Are you sure you want to delete this note?
pane.item.notes.count = %1$S note;%1$S notes
-pane.item.notes.editingInWindow = Editing in separate window
pane.item.notes.ignoreMissingImage = Some note images are missing and cannot be copied.
pane.item.attachments.rename.title = New title:
pane.item.attachments.rename.renameAssociatedFile = Rename associated file
diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js
index 15477bb46a..8e011d74e5 100644
--- a/defaults/preferences/zotero.js
+++ b/defaults/preferences/zotero.js
@@ -178,7 +178,6 @@ pref("extensions.zotero.pane.persist", "");
// Custom file handlers
pref("extensions.zotero.fileHandler.pdf", "");
-pref("extensions.zotero.beta.zotero6", false);
// File/URL opening executable if launch() fails
pref("extensions.zotero.fallbackLauncher.unix", "/usr/bin/xdg-open");
diff --git a/test/content/support.js b/test/content/support.js
index d1a7ce83d0..89db1c77e6 100644
--- a/test/content/support.js
+++ b/test/content/support.js
@@ -935,6 +935,10 @@ async function importPDFAttachment(parentItem, options = {}) {
async function createAnnotation(type, parentItem, options = {}) {
var annotation = new Zotero.Item('annotation');
+ annotation.libraryID = parentItem.libraryID;
+ if (options.version != undefined) {
+ annotation.version = options.version;
+ }
annotation.parentID = parentItem.id;
annotation.annotationType = type;
if (type == 'highlight') {
@@ -958,13 +962,21 @@ async function createAnnotation(type, parentItem, options = {}) {
[314.4, 412.8, 556.2, 609.6]
]
});
+ if (options.createdByUserID) {
+ annotation.createdByUserID = options.createdByUserID;
+ }
if (options.isExternal) {
annotation.annotationIsExternal = options.isExternal;
}
if (options.tags) {
annotation.setTags(options.tags);
}
- await annotation.saveTx();
+ if (options.synced !== undefined) {
+ annotation.synced = options.synced;
+ }
+ await annotation.saveTx({
+ skipEditCheck: true
+ });
return annotation;
}
diff --git a/test/runtests.sh b/test/runtests.sh
index a0d39b9a94..90fdf321f9 100755
--- a/test/runtests.sh
+++ b/test/runtests.sh
@@ -159,7 +159,6 @@ user_pref("dom.max_chrome_script_run_time", 0);
// It would be better to leave this on and handle it in Sinon's FakeXMLHttpRequest
user_pref("extensions.zotero.sync.server.compressData", false);
user_pref("extensions.zotero.automaticScraperUpdates", false);
-user_pref("extensions.zotero.beta.zotero6", true);
user_pref("extensions.zotero.debug.log", $DEBUG);
user_pref("extensions.zotero.debug.level", $DEBUG_LEVEL);
user_pref("extensions.zotero.debug.time", $DEBUG);
diff --git a/test/tests/annotationsTest.js b/test/tests/annotationsTest.js
index 8c563b2d7d..0e7d1a12fb 100644
--- a/test/tests/annotationsTest.js
+++ b/test/tests/annotationsTest.js
@@ -126,14 +126,13 @@ describe("Zotero.Annotations", function() {
exampleNote.libraryID = item.libraryID;
exampleImage.libraryID = item.libraryID;
- // Disabled while group annotations are disabled
- /*group = await getGroup();
+ group = await getGroup();
exampleGroupHighlight.libraryID = group.libraryID;
groupItem = await createDataObject('item', { libraryID: group.libraryID });
groupAttachment = await importFileAttachment(
'test.pdf',
{ libraryID: group.libraryID, parentID: groupItem.id }
- );*/
+ );
});
describe("#toJSON()", function () {
@@ -236,11 +235,11 @@ describe("Zotero.Annotations", function() {
await annotation.eraseTx();
});
- it.skip("should generate an object for a highlight by another user in a group library", async function () {
- await Zotero.Users.setName(12345, 'Kate Smith');
+ it("should generate an object for a highlight by another user in a group library", async function () {
+ await Zotero.Users.setName(12345, 'First Last');
var annotation = new Zotero.Item('annotation');
- annotation.libraryID = group.libraryID;
+ annotation.libraryID = groupAttachment.libraryID;
annotation.key = exampleGroupHighlight.key;
await annotation.loadPrimaryData();
annotation.createdByUserID = 12345;
@@ -250,13 +249,17 @@ describe("Zotero.Annotations", function() {
let itemProp = 'annotation' + prop[0].toUpperCase() + prop.substr(1);
annotation[itemProp] = exampleGroupHighlightAlt[prop];
}
- await annotation.saveTx();
+ await annotation.saveTx({
+ skipEditCheck: true
+ });
var json = await Zotero.Annotations.toJSON(annotation);
assert.isFalse(json.isAuthor);
- assert.equal(json.authorName, 'Kate Smith');
+ assert.equal(json.authorName, 'First Last');
- await annotation.eraseTx();
+ await annotation.eraseTx({
+ skipEditCheck: true
+ });
});
});