From f91134edd7b2fe07cbbd63238a610eaed41fd4c7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 5 Nov 2006 06:54:22 +0000 Subject: [PATCH] Added isInTheLast search condition and interface support --- .../content/zotero/bindings/searchtextbox.xml | 58 ++++++++++++ .../content/zotero/bindings/zoterosearch.xml | 88 ++++++++++++++----- chrome/content/zotero/xpcom/search.js | 21 +++-- chrome/locale/en-US/zotero/searchbox.dtd | 4 + chrome/locale/en-US/zotero/zotero.properties | 1 + chrome/skin/default/zotero/zotero.css | 7 ++ 6 files changed, 150 insertions(+), 29 deletions(-) diff --git a/chrome/content/zotero/bindings/searchtextbox.xml b/chrome/content/zotero/bindings/searchtextbox.xml index 9cd55fead..045d6956b 100644 --- a/chrome/content/zotero/bindings/searchtextbox.xml +++ b/chrome/content/zotero/bindings/searchtextbox.xml @@ -173,4 +173,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chrome/content/zotero/bindings/zoterosearch.xml b/chrome/content/zotero/bindings/zoterosearch.xml index 757ef4b67..262726db7 100644 --- a/chrome/content/zotero/bindings/zoterosearch.xml +++ b/chrome/content/zotero/bindings/zoterosearch.xml @@ -90,13 +90,12 @@ var conditionsBox = this.id('conditions'); this.search.removeCondition(id); - for(var i = 0, len=conditionsBox.childNodes.length; i < len; i++) - if(conditionsBox.childNodes[i].conditionID == id) - { + for (var i = 0, len=conditionsBox.childNodes.length; i < len; i++){ + if (conditionsBox.childNodes[i].conditionID == id){ conditionsBox.removeChild(conditionsBox.childNodes[i]); - - i = len; + break; } + } conditionsBox.childNodes[0].id('remove').hidden = (conditionsBox.childNodes.length == 1); ]]> @@ -188,7 +187,7 @@ + + + + + @@ -310,8 +348,6 @@ { this.id('valuemenu').value = this.value; } - this.id('valuefield').hidden = true; - this.id('valuemenu').hidden = false; ]]> @@ -372,6 +408,11 @@ } } + else if (!this.id('value-date-age').hidden) + { + var value = this.id('value-date-age').value; + } + // Handle special C1234 and S5678 form for // collections and searches else if (this.id('conditionsmenu').value=='collectionID') @@ -429,13 +470,14 @@ - + +