mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-19 08:14:50 +00:00
39 lines
1.9 KiB
Plaintext
39 lines
1.9 KiB
Plaintext
title: $:/plugins/tiddlywiki/menubar/items/search
|
|
custom-menu-content: {{$:/plugins/tiddlywiki/menubar/items/search}}
|
|
description: Search
|
|
caption: Search
|
|
tags: $:/tags/MenuBar
|
|
|
|
\define cancel-search-actions() <$action-deletetiddler $filter="[<__storeTitle__>] [<__tiddler__>] [<__selectionStateTitle__>]"/>
|
|
|
|
\define input-accept-actions() <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
|
|
|
\whitespace trim
|
|
<$vars searchTiddler="$:/temp/menubarsearch/input" searchListState=<<qualify "$:/state/search-list/selected-item">> titleSearchFilter="[!is[system]search:title<userInput>sort[title]limit[250]]" allSearchFilter="[!is[system]search<userInput>sort[title]limit[250]]">
|
|
<span style="margin: 0 0.5em;">
|
|
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/menubarsearch" storeTitle=<<searchTiddler>> selectionStateTitle=<<searchListState>>
|
|
refreshTitle="$:/temp/menubarsearch/refresh" tag="input" type="search" focusPopup="$:/state/popup/menubar-search-dropdown"
|
|
class="tc-popup-handle tc-menu-show-when-wide" placeholder="Search..." default="" cancelPopups="yes"
|
|
primaryListFilter=<<titleSearchFilter>> secondaryListFilter=<<allSearchFilter>> inputAcceptActions=<<input-accept-actions>>
|
|
inputCancelActions=<<cancel-search-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
|
</span>
|
|
<$reveal tag="div" class="tc-block-dropdown-wrapper" state="$:/state/popup/menubar-search-dropdown" type="nomatch" text="" default="">
|
|
|
|
<div class="tc-block-dropdown tc-search-drop-down">
|
|
|
|
<$list filter="[<searchTiddler>get[text]minlength[1]]" emptyMessage="""<div class="tc-search-results">Type your search terms</div>""" variable="ignore">
|
|
|
|
<$list filter="[<searchTiddler>get[text]minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
|
|
|
{{$:/core/ui/SearchResults}}
|
|
|
|
</$list>
|
|
|
|
</$list>
|
|
|
|
</div>
|
|
|
|
</$reveal>
|
|
|
|
</$vars>
|