Closes #294, Checkbox in search dialog to search subfolders recursively
Addresses #155, Localize strings - Added "Search subfolders" - Localized strings in search dialog Known issue: #342, "Search subfolders" checkbox should be greyed out until applicable
This commit is contained in:
parent
e2e5d59f61
commit
eff310c5c9
|
@ -21,6 +21,8 @@
|
||||||
***** END LICENSE BLOCK *****
|
***** END LICENSE BLOCK *****
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE bindings SYSTEM "chrome://zotero/locale/searchbox.dtd">
|
||||||
|
|
||||||
<bindings xmlns="http://www.mozilla.org/xbl"
|
<bindings xmlns="http://www.mozilla.org/xbl"
|
||||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
@ -44,6 +46,11 @@
|
||||||
this.id('joinModeMenu').setAttribute('condition',id);
|
this.id('joinModeMenu').setAttribute('condition',id);
|
||||||
this.id('joinModeMenu').value = conditions[id]['operator'];
|
this.id('joinModeMenu').value = conditions[id]['operator'];
|
||||||
}
|
}
|
||||||
|
else if(conditions[id]['condition'] == 'recursive')
|
||||||
|
{
|
||||||
|
this.id('recursiveCheckbox').setAttribute('condition',id);
|
||||||
|
this.id('recursiveCheckbox').checked = (conditions[id]['operator']=='true');
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.addCondition(conditions[id]);
|
this.addCondition(conditions[id]);
|
||||||
|
@ -106,6 +113,24 @@
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="updateRecursive">
|
||||||
|
<body>
|
||||||
|
<![CDATA[
|
||||||
|
var checkbox = this.id('recursiveCheckbox');
|
||||||
|
var value = checkbox.checked ? 'true' : 'false';
|
||||||
|
if(checkbox.hasAttribute('condition'))
|
||||||
|
{
|
||||||
|
this.search.updateCondition(checkbox.getAttribute('condition'),
|
||||||
|
'recursive', value, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
checkbox.setAttribute('condition',
|
||||||
|
this.search.addCondition('recursive', value, null));
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</body>
|
||||||
|
</method>
|
||||||
<method name="save">
|
<method name="save">
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@ -133,19 +158,22 @@
|
||||||
<handlers>
|
<handlers>
|
||||||
</handlers>
|
</handlers>
|
||||||
<content>
|
<content>
|
||||||
|
<xul:vbox flex="1">
|
||||||
<xul:groupbox xbl:inherits="flex">
|
<xul:groupbox xbl:inherits="flex">
|
||||||
<xul:caption align="center">
|
<xul:caption align="center">
|
||||||
<xul:label value="Match"/>
|
<xul:label value="&zotero.search.joinMode.match;"/>
|
||||||
<xul:menulist id="joinModeMenu" oncommand="this.parentNode.parentNode.parentNode.updateJoinMode();">
|
<xul:menulist id="joinModeMenu" oncommand="this.parentNode.parentNode.parentNode.parentNode.updateJoinMode()">
|
||||||
<xul:menupopup>
|
<xul:menupopup>
|
||||||
<xul:menuitem label="any" value="any"/>
|
<xul:menuitem label="&zotero.search.joinMode.any;" value="any"/>
|
||||||
<xul:menuitem label="all" value="all" selected="true"/>
|
<xul:menuitem label="&zotero.search.joinMode.all;" value="all" selected="true"/>
|
||||||
</xul:menupopup>
|
</xul:menupopup>
|
||||||
</xul:menulist>
|
</xul:menulist>
|
||||||
<xul:label value="of the following:"/>
|
<xul:label value="&zotero.search.joinMode.ofTheFollowing;:"/>
|
||||||
</xul:caption>
|
</xul:caption>
|
||||||
<xul:vbox id="conditions"/>
|
<xul:vbox id="conditions"/>
|
||||||
</xul:groupbox>
|
</xul:groupbox>
|
||||||
|
<xul:checkbox id="recursiveCheckbox" label="&zotero.search.recursive.label;" oncommand="this.parentNode.parentNode.updateRecursive()"/>
|
||||||
|
</xul:vbox>
|
||||||
</content>
|
</content>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
<!ENTITY zotero.search.joinMode.match "Match">
|
||||||
|
<!ENTITY zotero.search.joinMode.any "any">
|
||||||
|
<!ENTITY zotero.search.joinMode.all "all">
|
||||||
|
<!ENTITY zotero.search.joinMode.ofTheFollowing "of the following">
|
||||||
|
|
||||||
|
<!ENTITY zotero.search.recursive.label "Search subfolders">
|
||||||
|
|
||||||
<!ENTITY zotero.search.textModes.phrase "Phrase">
|
<!ENTITY zotero.search.textModes.phrase "Phrase">
|
||||||
<!ENTITY zotero.search.textModes.phraseBinary "Phrase (incl. binary files)">
|
<!ENTITY zotero.search.textModes.phraseBinary "Phrase (incl. binary files)">
|
||||||
<!ENTITY zotero.search.textModes.regexp "Regexp">
|
<!ENTITY zotero.search.textModes.regexp "Regexp">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user