mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Trim Saga: Advanced Search and actions (#6604)
* Trim Saga: Advanced Search and actions * Split up AdvancedSearch macros to be readable
This commit is contained in:
parent
7d6923f3d6
commit
eb0b2a8d8e
@ -6,6 +6,7 @@ description: create a new image tiddler
|
||||
image/$(imageType)$
|
||||
\end
|
||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||
\whitespace trim
|
||||
<$vars imageType={{$:/config/NewImageType}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}}>
|
||||
<$action-sendmessage $message="tm-new-tiddler" type=<<get-type>> tags=<<get-tags>>/>
|
||||
</$vars>
|
||||
|
@ -3,8 +3,9 @@ tags: $:/tags/Actions
|
||||
description: create a new journal tiddler
|
||||
|
||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||
\whitespace trim
|
||||
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
|
||||
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
|
||||
<$wikify name="journalTitle" text="<$macrocall $name='now' format=<<journalTitleTemplate>>/>">
|
||||
<$reveal type="nomatch" state=<<journalTitle>> text="">
|
||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}}/>
|
||||
</$reveal>
|
||||
|
@ -3,6 +3,7 @@ tags: $:/tags/Actions
|
||||
description: create a new empty tiddler
|
||||
|
||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||
\whitespace trim
|
||||
<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
|
||||
<$action-sendmessage $message="tm-new-tiddler" tags=<<get-tags>>/>
|
||||
</$vars>
|
||||
|
@ -3,31 +3,71 @@ tags: $:/tags/AdvancedSearch
|
||||
caption: {{$:/language/Search/Filter/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/Search/
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab--1498284803" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
||||
\define set-next-input-tab(beforeafter:"after")
|
||||
<$macrocall $name="change-input-tab"
|
||||
stateTitle="$:/state/tab--1498284803"
|
||||
tag="$:/tags/AdvancedSearch"
|
||||
beforeafter="$beforeafter$"
|
||||
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
||||
\end
|
||||
|
||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list>
|
||||
\define cancel-search-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]"
|
||||
emptyMessage="<$action-deletetiddler $filter='[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]' />">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/>
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define input-accept-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>"""><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
\define input-accept-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>">
|
||||
<$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define input-accept-variant-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>"""><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>
|
||||
\define input-accept-variant-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>">
|
||||
<$list filter="[<__tiddler__>get[text]minlength[1]]">
|
||||
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
||||
</$list></$list>
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
<<lingo Filter/Hint>>
|
||||
|
||||
<div class="tc-search tc-advanced-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/input" storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/temp/advancedsearch]]" firstSearchFilterField="text"
|
||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
inputCancelActions=<<cancel-search-actions>>/>
|
||||
<$macrocall $name="keyboard-driven-input"
|
||||
tiddler="$:/temp/advancedsearch/input"
|
||||
storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||
selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||
type="search"
|
||||
tag="input"
|
||||
focus={{$:/config/Search/AutoFocus}}
|
||||
configTiddlerFilter="[[$:/temp/advancedsearch]]"
|
||||
firstSearchFilterField="text"
|
||||
inputAcceptActions=<<input-accept-actions>>
|
||||
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
inputCancelActions=<<cancel-search-actions>>/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
 
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
||||
</div>
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$set name="resultCount" value="""<$count filter={{$:/temp/advancedsearch}}/>""">
|
||||
<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
|
||||
<div class="tc-search-results">
|
||||
<<lingo Filter/Matches>>
|
||||
<$list filter={{$:/temp/advancedsearch}}>
|
||||
|
@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/clear
|
||||
tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
\whitespace trim
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<<cancel-search-actions>>
|
||||
|
@ -1,6 +1,8 @@
|
||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown
|
||||
tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
\whitespace trim
|
||||
|
||||
<span class="tc-popup-keep">
|
||||
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
@ -9,10 +11,11 @@ tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
<$reveal state=<<qualify "$:/state/filterDropdown">> type="popup" position="belowleft" animate="yes">
|
||||
<$set name="tv-show-missing-links" value="yes">
|
||||
<$linkcatcher actions="""<$action-setfield $tiddler="$:/temp/advancedsearch" text=<<navigateTo>>/><$action-setfield $tiddler="$:/temp/advancedsearch/input" text=<<navigateTo>>/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/><$action-sendmessage $message="tm-focus-selector" $param='.tc-advanced-search input' />""">
|
||||
<$linkcatcher actions="<$action-setfield $tiddler='$:/temp/advancedsearch' text=<<navigateTo>>/><$action-setfield $tiddler='$:/temp/advancedsearch/input' text=<<navigateTo>>/><$action-setfield $tiddler='$:/temp/advancedsearch/refresh' text='yes'/><$action-sendmessage $message='tm-focus-selector' $param='.tc-advanced-search input' />">
|
||||
<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 filter="[all[shadows+tiddlers]tag[$:/tags/Filter]]">
|
||||
<$link to={{!!filter}}><$transclude field="description"/></$link>
|
||||
</$list>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/export
|
||||
tags: $:/tags/AdvancedSearch/FilterButton
|
||||
|
||||
\whitespace trim
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||
</$reveal>
|
||||
|
@ -5,26 +5,68 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
||||
|
||||
\define lingo-base() $:/language/Search/
|
||||
|
||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab--1498284803" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
||||
\define set-next-input-tab(beforeafter:"after")
|
||||
<$macrocall $name="change-input-tab"
|
||||
stateTitle="$:/state/tab--1498284803"
|
||||
tag="$:/tags/AdvancedSearch"
|
||||
beforeafter="$beforeafter$"
|
||||
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
||||
\end
|
||||
|
||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
||||
\define cancel-search-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]"
|
||||
emptyMessage="<$action-deletetiddler $filter='[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]' />">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/>
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
|
||||
</$list>
|
||||
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
||||
\end
|
||||
|
||||
\define input-accept-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>"""><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
\define input-accept-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>">
|
||||
<$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define input-accept-variant-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>"""><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>
|
||||
\define input-accept-variant-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>">
|
||||
<$list filter="[<__tiddler__>get[text]minlength[1]]">
|
||||
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
||||
</$list></$list>
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
|
||||
<<lingo Shadows/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/input" storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/Shadows]]"
|
||||
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
||||
inputAcceptVariantActions=<<input-accept-variant-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
<$macrocall $name="keyboard-driven-input"
|
||||
tiddler="$:/temp/advancedsearch/input"
|
||||
storeTitle="$:/temp/advancedsearch"
|
||||
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||
selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
||||
type="search"
|
||||
tag="input"
|
||||
focus={{$:/config/Search/AutoFocus}}
|
||||
configTiddlerFilter="[[$:/core/ui/AdvancedSearch/Shadows]]"
|
||||
inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<input-accept-actions>>
|
||||
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
 
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<<cancel-search-actions>>
|
||||
@ -35,9 +77,9 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
|
||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
<$list filter="[{$:/temp/advancedsearch}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="[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]"/>""">
|
||||
<$set name="resultCount" value="<$count filter='[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]]'/>">
|
||||
|
||||
<div class="tc-search-results">
|
||||
|
||||
|
@ -4,26 +4,68 @@ 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--1498284803" tag="$:/tags/AdvancedSearch" beforeafter="$beforeafter$" defaultState="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield $tiddler="$:/state/advancedsearch/currentTab" text=<<nextTab>>/>"""/>
|
||||
\define set-next-input-tab(beforeafter:"after",stateTitle,tag,defaultState,currentTabTiddler)
|
||||
<$macrocall $name="change-input-tab"
|
||||
stateTitle="$:/state/tab--1498284803"
|
||||
tag="$:/tags/AdvancedSearch"
|
||||
beforeafter="$beforeafter$"
|
||||
defaultState="$:/core/ui/AdvancedSearch/System"
|
||||
actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<<nextTab>>/>"/>
|
||||
\end
|
||||
|
||||
\define cancel-search-actions() <$list filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]" />"""><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/></$list><$action-sendmessage $message="tm-focus-selector" $param=""".tc-advanced-search input"""/>
|
||||
\define cancel-search-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/temp/advancedsearch}!match{$:/temp/advancedsearch/input}]"
|
||||
emptyMessage="<$action-deletetiddler $filter='[[$:/temp/advancedsearch]] [[$:/temp/advancedsearch/input]] [[$:/temp/advancedsearch/selected-item]]' />">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/advancedsearch}}/>
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
|
||||
</$list>
|
||||
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
|
||||
\end
|
||||
|
||||
\define input-accept-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>"""><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>
|
||||
\define input-accept-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/></$list>">
|
||||
<$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define input-accept-variant-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>"""><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>
|
||||
\define input-accept-variant-actions()
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"
|
||||
emptyMessage="<$list filter='[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]'><$list filter='[<__tiddler__>get[text]minlength[1]]'><$action-sendmessage $message='tm-edit-tiddler' $param={{{ [<__tiddler__>get[text]] }}}/></$list></$list>">
|
||||
<$list filter="[<__tiddler__>get[text]minlength[1]]">
|
||||
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
|
||||
</$list></$list>
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
|
||||
<<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/input" storeTitle="$:/temp/advancedsearch"
|
||||
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>> filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
<$macrocall $name="keyboard-driven-input"
|
||||
tiddler="$:/temp/advancedsearch/input"
|
||||
storeTitle="$:/temp/advancedsearch"
|
||||
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>>
|
||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
 
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<<cancel-search-actions>>
|
||||
@ -34,9 +76,9 @@ first-search-filter: [is[system]search<userInput>sort[title]limit[250]] -[[$:/te
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
|
||||
<$list filter="[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
<$list filter="[{$:/temp/advancedsearch}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}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]"/>""">
|
||||
<$set name="resultCount" value="<$count filter='[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]] -[[$:/temp/advancedsearch/input]] -[[$:/temp/advancedsearch/selected-item]]'/>">
|
||||
|
||||
<div class="tc-search-results">
|
||||
|
||||
|
@ -1,12 +1,21 @@
|
||||
title: $:/core/ui/AlertTemplate
|
||||
|
||||
\whitespace trim
|
||||
<div class="tc-alert">
|
||||
<div class="tc-alert-toolbar">
|
||||
<$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/cancel-button}}</$button>
|
||||
</div>
|
||||
<div class="tc-alert-subtitle">
|
||||
<$wikify name="format" text=<<lingo Tiddler/DateFormat>>>
|
||||
<$view field="component"/> - <$view field="modified" format="date" template=<<format>>/> <$reveal type="nomatch" state="!!count" text=""><span class="tc-alert-highlight">({{$:/language/Count}}: <$view field="count"/>)</span></$reveal>
|
||||
<$view field="component"/>
|
||||
 - 
|
||||
<$view field="modified" format="date" template=<<format>>/>
|
||||
 
|
||||
<$reveal type="nomatch" state="!!count" text="">
|
||||
<span class="tc-alert-highlight">
|
||||
({{$:/language/Count}}: <$view field="count"/>)
|
||||
</span>
|
||||
</$reveal>
|
||||
</$wikify>
|
||||
</div>
|
||||
<div class="tc-alert-body">
|
||||
|
@ -1,5 +1,6 @@
|
||||
title: $:/core/ui/Components/tag-link
|
||||
|
||||
\whitespace trim
|
||||
<$link>
|
||||
<$set name="backgroundColor" value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
||||
<span style=<<tag-styles>> class="tc-tag-label">
|
||||
|
Loading…
Reference in New Issue
Block a user