Prompt confirmation when deleting annotations in PDF reader

This commit is contained in:
Martynas Bagdonas 2022-01-28 17:15:04 +02:00
parent ae7bfe7f48
commit f8d7eb8ed7
3 changed files with 7 additions and 1 deletions

View file

@ -825,6 +825,10 @@ class ReaderTab extends ReaderInstance {
this._iframeWindow.addEventListener('error', (event) => { this._iframeWindow.addEventListener('error', (event) => {
Zotero.logError(event.error); Zotero.logError(event.error);
}); });
this._iframeWindow.wrappedJSObject.zoteroConfirmDeletion = function (plural) {
return Services.prompt.confirm(null, '', Zotero.getString('pdfReader.deleteAnnotation.' + (plural ? 'plural' : 'singular')));
};
} }
}); });

View file

@ -1376,6 +1376,8 @@ pdfReader.thisPage = This page
pdfReader.thisPageAndLaterPages = This page and later pages pdfReader.thisPageAndLaterPages = This page and later pages
pdfReader.allPages = All pages pdfReader.allPages = All pages
pdfReader.autoDetect = Auto-Detect pdfReader.autoDetect = Auto-Detect
pdfReader.deleteAnnotation.singular = Delete the selected annotation?
pdfReader.deleteAnnotation.plural = Delete selected annotations?
spellCheck.checkSpelling = Check Spelling spellCheck.checkSpelling = Check Spelling
spellCheck.addRemoveDictionaries = Add/Remove Dictionaries… spellCheck.addRemoveDictionaries = Add/Remove Dictionaries…

@ -1 +1 @@
Subproject commit b451e53a13b918c49da4937cbbdd3d62424dff73 Subproject commit 99bd30047e866836d91230db64703157dce275f6