Closes #514, Search checkbox for noChildren condition ("Only show top-level items")

This commit is contained in:
Dan Stillman 2007-01-31 09:02:46 +00:00
parent 2b1fbf5e9a
commit c33da4ff73
3 changed files with 15 additions and 5 deletions

View File

@ -117,20 +117,21 @@
]]>
</body>
</method>
<method name="updateRecursive">
<method name="updateCheckbox">
<parameter name="condition"/>
<body>
<![CDATA[
var checkbox = this.id('recursiveCheckbox');
var checkbox = this.id(condition + 'Checkbox');
var value = checkbox.checked ? 'true' : 'false';
if(checkbox.hasAttribute('condition'))
{
this.search.updateCondition(checkbox.getAttribute('condition'),
'recursive', value, null);
condition, value, null);
}
else
{
checkbox.setAttribute('condition',
this.search.addCondition('recursive', value, null));
this.search.addCondition(condition, value, null));
}
]]>
</body>
@ -203,7 +204,10 @@
</xul:caption>
<xul:vbox id="conditions"/>
</xul:groupbox>
<xul:checkbox id="recursiveCheckbox" label="&zotero.search.recursive.label;" oncommand="this.parentNode.parentNode.updateRecursive(); event.stopPropagation()"/>
<xul:hbox>
<xul:checkbox id="recursiveCheckbox" label="&zotero.search.recursive.label;" oncommand="this.parentNode.parentNode.parentNode.updateCheckbox('recursive'); event.stopPropagation()"/>
<xul:checkbox id="noChildrenCheckbox" label="&zotero.search.noChildren;" oncommand="this.parentNode.parentNode.parentNode.updateCheckbox('noChildren'); event.stopPropagation()"/>
</xul:hbox>
</xul:vbox>
</content>
</binding>

View File

@ -6,6 +6,7 @@
<!ENTITY zotero.search.joinMode.suffix "of the following:">
<!ENTITY zotero.search.recursive.label "Search subfolders">
<!ENTITY zotero.search.noChildren "Only show top-level items">
<!ENTITY zotero.search.textModes.phrase "Phrase">
<!ENTITY zotero.search.textModes.phraseBinary "Phrase (incl. binary files)">

View File

@ -207,6 +207,11 @@ zoterosearchagefield textbox
margin: 3px 0;
}
#zotero-advanced-search-dialog checkbox
{
margin-right: .5em;
}
#zotero-advanced-search-dialog #zotero-items-tree
{
min-height: 170px;