mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-07 18:39:57 +00:00
81e3ab0bc5
* Make AdvancedSearch/Shadows navigatable by keyboard * Make AdvancedSearch/System navigatable by keyboard * Make AdvancedSearch/Standard navigatable by keyboard * Update search.tid
62 lines
3.0 KiB
Plaintext
62 lines
3.0 KiB
Plaintext
title: $:/core/ui/AdvancedSearch/System
|
|
tags: $:/tags/AdvancedSearch
|
|
caption: {{$:/language/Search/System/Caption}}
|
|
first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]
|
|
|
|
\define lingo-base() $:/language/Search/
|
|
\define set-next-input-tab(beforeafter:"after",stateTitle,tag,defaultState,currentTabTiddler) <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/advanced-search-results" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
|
|
|
\define cancel-search-actions() <$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />
|
|
|
|
\define input-accept-actions() <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
|
|
|
\define input-accept-variant-actions() <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
|
|
|
<<lingo System/Hint>>
|
|
|
|
<div class="tc-search">
|
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
|
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch" storeTitle="$:/temp/advancedsearch/input"
|
|
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
|
type="search" tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/System]]"
|
|
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
|
inputAcceptVariantActions=<<input-accept-variant-actions>>/>
|
|
</$keyboard>
|
|
</$keyboard>
|
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
|
<$button class="tc-btn-invisible">
|
|
<<cancel-search-actions>>
|
|
{{$:/core/images/close-button}}
|
|
</$button>
|
|
</$reveal>
|
|
</div>
|
|
|
|
<$reveal state="$:/temp/advancedsearch/input" type="nomatch" text="">
|
|
|
|
<$list filter="[{$:/temp/advancedsearch/input}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
|
|
|
<$set name="resultCount" value="""<$count filter="[is[system]search{$:/temp/advancedsearch/input}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]"/>""">
|
|
|
|
<div class="tc-search-results">
|
|
|
|
<<lingo System/Matches>>
|
|
|
|
<$list filter="[is[system]search{$:/temp/advancedsearch/input}sort[title]limit[250]] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]">
|
|
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
|
</span>
|
|
</$list>
|
|
|
|
</div>
|
|
|
|
</$set>
|
|
|
|
</$list>
|
|
|
|
</$reveal>
|
|
|
|
<$reveal state="$:/temp/advancedsearch" type="match" text="">
|
|
|
|
</$reveal>
|