Require exact 8-character, uppercase item key for quick search
This commit is contained in:
parent
f6e7cf83fa
commit
7dad7bcd5a
1 changed files with 3 additions and 2 deletions
|
@ -411,8 +411,9 @@ Zotero.Search.prototype.addCondition = function(condition, operator, value, requ
|
||||||
for each(var part in parts) {
|
for each(var part in parts) {
|
||||||
this.addCondition('blockStart');
|
this.addCondition('blockStart');
|
||||||
|
|
||||||
if (operator == 'contains' && part.text.length > 1) {
|
// If search string is 8 characters, see if this is a item key
|
||||||
this.addCondition('key', 'beginsWith', part.text, false);
|
if (operator == 'contains' && part.text.length == 8) {
|
||||||
|
this.addCondition('key', 'is', part.text, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (condition == 'quicksearch-titleCreatorYear') {
|
if (condition == 'quicksearch-titleCreatorYear') {
|
||||||
|
|
Loading…
Reference in a new issue