mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
add citationKey to quicksearch-titleCreatorYear (#5814)
So quicksearch and citation dialog in list mode search by the citation key, in addition to title,creator,etc. https://forums.zotero.org/discussion/130090/zotero-picker-i-cant-search-item-by-citation-key
This commit is contained in:
parent
0abf2b455f
commit
b80bcea184
2 changed files with 11 additions and 1 deletions
|
|
@ -335,7 +335,16 @@ export class CitationDialogSearchHandler {
|
|||
// Generate a string to search for each item
|
||||
let itemStr = item.getCreators()
|
||||
.map(creator => creator.firstName + " " + creator.lastName)
|
||||
.concat([item.getField("title"), item.getField("date", true, true).substr(0, 4)])
|
||||
.concat([
|
||||
// conditions from quicksearch-titleCreatorYear
|
||||
item.getField("title"),
|
||||
item.getField("date", true, true).substr(0, 4),
|
||||
item.getField("publicationTitle"),
|
||||
item.getField("shortTitle"),
|
||||
item.getField("court"),
|
||||
item.getField("year"),
|
||||
item.getField("citationKey")
|
||||
])
|
||||
.join(" ")
|
||||
.toLowerCase();
|
||||
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ Zotero.Search.prototype.addCondition = function (condition, operator, value, req
|
|||
this.addCondition('shortTitle', operator, part.text, false);
|
||||
this.addCondition('court', operator, part.text, false);
|
||||
this.addCondition('year', operator, part.text, false);
|
||||
this.addCondition('citationKey', operator, part.text, false);
|
||||
}
|
||||
else {
|
||||
this.addCondition('field', operator, part.text, false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue