diff --git a/chrome/content/zotero/bindings/zoterosearch.xml b/chrome/content/zotero/bindings/zoterosearch.xml index fc009ce06..31adfe758 100644 --- a/chrome/content/zotero/bindings/zoterosearch.xml +++ b/chrome/content/zotero/bindings/zoterosearch.xml @@ -50,6 +50,7 @@ switch (conditions[id]['condition']) { case 'recursive': case 'noChildren': + case 'includeParentsAndChildren': var checkbox = conditions[id]['condition'] + 'Checkbox'; this.id(checkbox).setAttribute('condition',id); this.id(checkbox).checked = (conditions[id]['operator']=='true'); @@ -145,7 +146,7 @@ ]]> - + + @@ -238,19 +240,20 @@ @@ -705,7 +707,6 @@ break; } } - switch (button.popup){ case 'textbox-fulltext-menu': switch (selectedIndex){ @@ -762,7 +763,6 @@ break; } } - menu.childNodes[selectedIndex].setAttribute('checked', true); break; @@ -820,7 +820,7 @@ - + diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index e0375dc56..8919d1980 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -77,7 +77,7 @@ Zotero.DBConnection.prototype.query = function (sql,params) { while (statement.executeStep()) { var row = new Array(); - for(var i=0; i0; k--) { + condSQL += ')'; + } + // Little hack to support multiple quicksearch words if (condition['name'] == 'blockStart') { var inQS = true; @@ -1110,6 +1265,7 @@ Zotero.SearchConditions = new function(){ // Standard -- these need to match those in zoterosearch.xml is: true, isNot: true, + beginsWith: true, contains: true, doesNotContain: true, isLessThan: true, @@ -1148,6 +1304,30 @@ Zotero.SearchConditions = new function(){ } }, + { + name: 'includeParentsAndChildren', + operators: { + true: true, + false: true + } + }, + + { + name: 'includeParents', + operators: { + true: true, + false: true + } + }, + + { + name: 'includeChildren', + operators: { + true: true, + false: true + } + }, + // Search recursively within collections { name: 'recursive', @@ -1278,10 +1458,7 @@ Zotero.SearchConditions = new function(){ doesNotContain: true }, table: 'itemTags', - field: 'tag', - flags: { - leftbound: true - } + field: 'tag' }, { diff --git a/chrome/locale/en-US/zotero/searchbox.dtd b/chrome/locale/en-US/zotero/searchbox.dtd index d122ca935..8f0843502 100644 --- a/chrome/locale/en-US/zotero/searchbox.dtd +++ b/chrome/locale/en-US/zotero/searchbox.dtd @@ -7,6 +7,7 @@ + diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 6632b2add..541a86b0d 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -375,6 +375,7 @@ searchInProgress = Search in progress — please wait. searchOperator.is = is searchOperator.isNot = is not +searchOperator.beginsWith = begins with searchOperator.contains = contains searchOperator.doesNotContain = does not contain searchOperator.isLessThan = is less than