mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-03-08 04:28:10 +00:00
Refactor AdvancedSearch/Filter to make buttons extensible
This commit is contained in:
parent
147dc128bc
commit
8bc0633b6f
@ -3,35 +3,13 @@ tags: $:/tags/AdvancedSearch
|
||||
caption: {{$:/language/Search/Filter/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/Search/
|
||||
<$linkcatcher to="$:/temp/advancedsearch">
|
||||
|
||||
<<lingo Filter/Hint>>
|
||||
|
||||
<div class="tc-search tc-advanced-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/>
|
||||
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||
</$reveal>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
||||
</div>
|
||||
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/filterDropdown">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Filter]]"><$link to={{!!filter}}><$transclude field="description"/></$link>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$set name="resultCount" value="""<$count filter={{$:/temp/advancedsearch}}/>""">
|
||||
<div class="tc-search-results">
|
||||
|
9
core/ui/AdvancedSearch/FilterButtons/clear.tid
Normal file
9
core/ui/AdvancedSearch/FilterButtons/clear.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/clear
|
||||
tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
19
core/ui/AdvancedSearch/FilterButtons/dropdown.tid
Normal file
19
core/ui/AdvancedSearch/FilterButtons/dropdown.tid
Normal file
@ -0,0 +1,19 @@
|
||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown
|
||||
tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
<span class="tc-popup-keep">
|
||||
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
</span>
|
||||
|
||||
<$reveal state=<<qualify "$:/state/filterDropdown">> type="popup" position="belowleft" animate="yes">
|
||||
<$linkcatcher to="$:/temp/advancedsearch">
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Filter]]"><$link to={{!!filter}}><$transclude field="description"/></$link>
|
||||
</$list>
|
||||
</div>
|
||||
</div>
|
||||
</$linkcatcher>
|
||||
</$reveal>
|
6
core/ui/AdvancedSearch/FilterButtons/export.tid
Normal file
6
core/ui/AdvancedSearch/FilterButtons/export.tid
Normal file
@ -0,0 +1,6 @@
|
||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/export
|
||||
tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||
</$reveal>
|
Loading…
x
Reference in New Issue
Block a user