commit dad84abe979021946fa7604417580d7f9f0ed3de
parent ebeb9976d2ece32c6cee03f17a889e610ae713a3
Author: Simon Kornblith <simon@simonster.com>
Date: Sat, 11 Apr 2009 04:00:31 +0000
- adds "Lookup by Identifier..." option under add item. currently works for DOIs and PMIDs, but not ISBNs, since our Open WorldCat search translator is broken. with a working ISBN search translator, ISBNs would work, too.
- fixes NCBI PubMed translator type (should be 12, since it's a search translator as well as a web translator)
- fixes a bug passing multiple translators to translate.setTranslator()
- increases priority of CrossRef translator
- makes sync animated arrow progress indicator into a general CSS class (zotero-small-progress-indicator) so that the same progress indicator can be used for lookup. if this is confusing, we could use something else instead.
Diffstat:
8 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/chrome/content/zotero/overlay.xul b/chrome/content/zotero/overlay.xul
@@ -181,6 +181,7 @@
<!-- New Item drop-down built in overlay.js::onLoad() -->
<menupopup>
<menuseparator/>
+ <menuitem label="&zotero.toolbar.lookup;" oncommand="window.openDialog('chrome://zotero/content/lookup.xul', 'lookup', 'chrome,modal')"/>
<menuitem label="&zotero.toolbar.attachment.linked;" oncommand="ZoteroPane.addAttachmentFromDialog(true);" tooltiptext=""/>
<menuitem label="&zotero.toolbar.attachment.add;" oncommand="ZoteroPane.addAttachmentFromDialog();" tooltiptext=""/>
<menuseparator/>
@@ -347,7 +348,7 @@
</grid>
</tooltip>
</hbox>
- <toolbarbutton id="zotero-tb-sync" tooltip="_child"
+ <toolbarbutton id="zotero-tb-sync" class="zotero-small-progress-indicator" tooltip="_child"
oncommand="Zotero.Sync.Runner.sync()">
<tooltip
onpopupshowing="ZoteroPane.setLastSyncStatus(this)"
diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js
@@ -441,9 +441,9 @@ Zotero.Translate.prototype.setTranslator = function(translator) {
this.translator = [];
for(var i in translator) {
if(typeof(translator[i]) == "object") {
- this.translator.push([translator[i]]);
+ this.translator.push(translator[i]);
} else {
- this.translator.push([Zotero.Translators.get(translator[i])]);
+ this.translator.push(Zotero.Translators.get(translator[i]));
}
}
}
diff --git a/chrome/locale/en-US/zotero/zotero.dtd b/chrome/locale/en-US/zotero/zotero.dtd
@@ -84,6 +84,7 @@
<!ENTITY zotero.item.textTransform.titlecase "Title Case">
<!ENTITY zotero.toolbar.note.standalone "New Standalone Note">
+<!ENTITY zotero.toolbar.lookup "Lookup by Identifier...">
<!ENTITY zotero.toolbar.attachment.linked "Link to File...">
<!ENTITY zotero.toolbar.attachment.add "Store Copy of File...">
<!ENTITY zotero.toolbar.attachment.weblink "Save Link to Current Page">
@@ -99,6 +100,8 @@
<!ENTITY zotero.tagSelector.renameTag "Rename Tag...">
<!ENTITY zotero.tagSelector.deleteTag "Delete Tag...">
+<!ENTITY zotero.lookup.description "Enter the DOI or PMID to look up in the box below.">
+
<!ENTITY zotero.selectitems.title "Select Items">
<!ENTITY zotero.selectitems.intro.label "Select which items you'd like to add to your library">
<!ENTITY zotero.selectitems.cancel.label "Cancel">
diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties
@@ -530,4 +530,7 @@ recognizePDF.noMatches = No matching references found.
recognizePDF.fileNotFound = File not found.
recognizePDF.limit = Query limit reached. Try again later.
recognizePDF.complete.label = Metadata Retrieval Complete.
-recognizePDF.close.label = Close
-\ No newline at end of file
+recognizePDF.close.label = Close
+
+lookup.failure.title = Lookup Failed
+lookup.failure.description = Zotero could not find a record for the specified identifier. Please verify the identifier and try again.
+\ No newline at end of file
diff --git a/chrome/skin/default/zotero/overlay.css b/chrome/skin/default/zotero/overlay.css
@@ -221,21 +221,6 @@ window[active="true"] #zotero-pane[fullscreenmode="true"][platform="mac"]
list-style-image: url(chrome://zotero/skin/drive_network.png);
}
-#zotero-tb-sync {
- list-style-image: url(chrome://zotero/skin/arrow_rotate_static.png);
- margin-left: -2px;
- margin-right: -2px;
-}
-
-#zotero-tb-sync[status=animate] {
- list-style-image: url(chrome://zotero/skin/arrow_rotate_animated.png);
-}
-
-#zotero-tb-sync[status=error] {
- list-style-image: url(chrome://zotero/skin/arrow_rotate_error.png);
-}
-
-
#zotero-tb-sync #zotero-last-sync-time
{
color: gray;
diff --git a/chrome/skin/default/zotero/zotero.css b/chrome/skin/default/zotero/zotero.css
@@ -221,4 +221,19 @@ zoteromergepane {
font-weight: bold;
font-size: 1.25em;
margin-bottom: 1em;
+}
+
+
+.zotero-small-progress-indicator {
+ list-style-image: url(chrome://zotero/skin/arrow_rotate_static.png);
+ margin-left: -2px;
+ margin-right: -2px;
+}
+
+.zotero-small-progress-indicator[status=animate] {
+ list-style-image: url(chrome://zotero/skin/arrow_rotate_animated.png);
+}
+
+.zotero-small-progress-indicator[status=error] {
+ list-style-image: url(chrome://zotero/skin/arrow_rotate_error.png);
}
\ No newline at end of file
diff --git a/translators/CrossRef.js b/translators/CrossRef.js
@@ -6,7 +6,7 @@
"target":"http://partneraccess.oclc.org/",
"minVersion":"1.0.0b3.r1",
"maxVersion":"",
- "priority":100,
+ "priority":90,
"inRepository":true,
"lastUpdated":"2007-09-15 21:00:00"
}
diff --git a/translators/NCBI PubMed.js b/translators/NCBI PubMed.js
@@ -1,6 +1,6 @@
{
"translatorID":"fcf41bed-0cbc-3704-85c7-8062a0068a7a",
- "translatorType":4,
+ "translatorType":12,
"label":"NCBI PubMed",
"creator":"Simon Kornblith and Michael Berkowitz",
"target":"http://[^/]*www\\.ncbi\\.nlm\\.nih\\.gov[^/]*/(pubmed|sites/entrez|entrez/query\\.fcgi\\?.*db=PubMed)",