mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-26 18:10:27 +00:00
72941f3e9a
The dropdown can be summoned by clicking on the search field. It will only appear if the search field is not empty. When the search field is not empty the dropdown can be also be summoned by clicking on the arrow or search result count. There are still some wrinkles where the dropdown doesn’t appear when expected; I’d appreciate feedback to help reproduce those cases. This change should still work with custom search result tabs.
51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
title: $:/core/ui/SideBarLists
|
|
|
|
<div class="tc-sidebar-lists">
|
|
|
|
<$set name="searchTiddler" value="$:/temp/search">
|
|
<div class="tc-search">
|
|
<$edit-text tiddler="$:/temp/search" type="search" tag="input" focus={{$:/config/Search/AutoFocus}} focusPopup=<<qualify "$:/state/popup/search-dropdown">> class="tc-popup-handle"/>
|
|
<$reveal state="$:/temp/search" type="nomatch" text="">
|
|
<$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="tc-btn-invisible">
|
|
<$action-setfield $tiddler="$:/temp/advancedsearch" text={{$:/temp/search}}/>
|
|
<$action-setfield $tiddler="$:/temp/search" text=""/>
|
|
<$action-navigate $to="$:/AdvancedSearch"/>
|
|
{{$:/core/images/advanced-search-button}}
|
|
</$button>
|
|
<$button class="tc-btn-invisible">
|
|
<$action-setfield $tiddler="$:/temp/search" text="" />
|
|
{{$:/core/images/close-button}}
|
|
</$button>
|
|
<$button popup=<<qualify "$:/state/popup/search-dropdown">> class="tc-btn-invisible">
|
|
<$set name="resultCount" value="""<$count filter="[!is[system]search{$(searchTiddler)$}]"/>""">
|
|
{{$:/core/images/down-arrow}} {{$:/language/Search/Matches}}
|
|
</$set>
|
|
</$button>
|
|
</$reveal>
|
|
<$reveal state="$:/temp/search" type="match" text="">
|
|
<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="tc-btn-invisible">
|
|
{{$:/core/images/advanced-search-button}}
|
|
</$button>
|
|
</$reveal>
|
|
</div>
|
|
|
|
<$reveal state="$:/temp/search" type="nomatch" text="">
|
|
|
|
<$reveal state=<<qualify "$:/state/popup/search-dropdown">> type="nomatch" text="" default="">
|
|
|
|
<div class="tc-drop-down tc-search-drop-down tc-popup-handle">
|
|
|
|
{{$:/core/ui/SearchResults}}
|
|
|
|
</div>
|
|
|
|
</$reveal>
|
|
|
|
</$reveal>
|
|
|
|
</$set>
|
|
|
|
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]" default={{$:/config/DefaultSidebarTab}} state="$:/state/tab/sidebar" />
|
|
|
|
</div>
|