mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +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)$
|
image/$(imageType)$
|
||||||
\end
|
\end
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||||
|
\whitespace trim
|
||||||
<$vars imageType={{$:/config/NewImageType}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}}>
|
<$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>>/>
|
<$action-sendmessage $message="tm-new-tiddler" type=<<get-type>> tags=<<get-tags>>/>
|
||||||
</$vars>
|
</$vars>
|
||||||
|
@ -3,8 +3,9 @@ tags: $:/tags/Actions
|
|||||||
description: create a new journal tiddler
|
description: create a new journal tiddler
|
||||||
|
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
\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}}>
|
<$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="">
|
<$reveal type="nomatch" state=<<journalTitle>> text="">
|
||||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}}/>
|
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}}/>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
@ -3,6 +3,7 @@ tags: $:/tags/Actions
|
|||||||
description: create a new empty tiddler
|
description: create a new empty tiddler
|
||||||
|
|
||||||
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
|
||||||
|
\whitespace trim
|
||||||
<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
|
<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
|
||||||
<$action-sendmessage $message="tm-new-tiddler" tags=<<get-tags>>/>
|
<$action-sendmessage $message="tm-new-tiddler" tags=<<get-tags>>/>
|
||||||
</$vars>
|
</$vars>
|
||||||
|
@ -3,31 +3,71 @@ tags: $:/tags/AdvancedSearch
|
|||||||
caption: {{$:/language/Search/Filter/Caption}}
|
caption: {{$:/language/Search/Filter/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\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>>
|
<<lingo Filter/Hint>>
|
||||||
|
|
||||||
<div class="tc-search tc-advanced-search">
|
<div class="tc-search tc-advanced-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
<$macrocall $name="keyboard-driven-input"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/temp/advancedsearch]]" firstSearchFilterField="text"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
inputAcceptActions=<<input-accept-actions>> inputAcceptVariantActions=<<input-accept-variant-actions>>
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
inputCancelActions=<<cancel-search-actions>>/>
|
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>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
|
 
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$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">
|
<div class="tc-search-results">
|
||||||
<<lingo Filter/Matches>>
|
<<lingo Filter/Matches>>
|
||||||
<$list filter={{$:/temp/advancedsearch}}>
|
<$list filter={{$:/temp/advancedsearch}}>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/clear
|
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/clear
|
||||||
tags: $:/tags/AdvancedSearch/FilterButton
|
tags: $:/tags/AdvancedSearch/FilterButton
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<<cancel-search-actions>>
|
<<cancel-search-actions>>
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown
|
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown
|
||||||
tags: $:/tags/AdvancedSearch/FilterButton
|
tags: $:/tags/AdvancedSearch/FilterButton
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<span class="tc-popup-keep">
|
<span class="tc-popup-keep">
|
||||||
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
||||||
{{$:/core/images/down-arrow}}
|
{{$:/core/images/down-arrow}}
|
||||||
@ -9,10 +11,11 @@ tags: $:/tags/AdvancedSearch/FilterButton
|
|||||||
|
|
||||||
<$reveal state=<<qualify "$:/state/filterDropdown">> type="popup" position="belowleft" animate="yes">
|
<$reveal state=<<qualify "$:/state/filterDropdown">> type="popup" position="belowleft" animate="yes">
|
||||||
<$set name="tv-show-missing-links" value="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-wrapper">
|
||||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
<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>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/export
|
title: $:/core/ui/AdvancedSearch/Filter/FilterButtons/export
|
||||||
tags: $:/tags/AdvancedSearch/FilterButton
|
tags: $:/tags/AdvancedSearch/FilterButton
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
@ -5,26 +5,68 @@ first-search-filter: [all[shadows]search<userInput>sort[title]limit[250]] -[[$:/
|
|||||||
|
|
||||||
\define lingo-base() $:/language/Search/
|
\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>>
|
<<lingo Shadows/Hint>>
|
||||||
|
|
||||||
<div class="tc-search">
|
<div class="tc-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
<$macrocall $name="keyboard-driven-input"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item" type="search"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/Shadows]]"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
inputAcceptVariantActions=<<input-accept-variant-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
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>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
|
 
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<<cancel-search-actions>>
|
<<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="">
|
<$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">
|
<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]]
|
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 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>>
|
<<lingo System/Hint>>
|
||||||
|
|
||||||
<div class="tc-search">
|
<div class="tc-search">
|
||||||
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
|
||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler="$:/temp/advancedsearch/input" storeTitle="$:/temp/advancedsearch"
|
<$macrocall $name="keyboard-driven-input"
|
||||||
refreshTitle="$:/temp/advancedsearch/refresh" selectionStateTitle="$:/temp/advancedsearch/selected-item"
|
tiddler="$:/temp/advancedsearch/input"
|
||||||
type="search" tag="input" focus={{$:/config/Search/AutoFocus}} configTiddlerFilter="[[$:/core/ui/AdvancedSearch/System]]"
|
storeTitle="$:/temp/advancedsearch"
|
||||||
inputCancelActions=<<cancel-search-actions>> inputAcceptActions=<<input-accept-actions>>
|
refreshTitle="$:/temp/advancedsearch/refresh"
|
||||||
inputAcceptVariantActions=<<input-accept-variant-actions>> filterMinLength={{$:/config/Search/MinLength}}/>
|
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>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
|
 
|
||||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<<cancel-search-actions>>
|
<<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="">
|
<$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">
|
<div class="tc-search-results">
|
||||||
|
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
title: $:/core/ui/AlertTemplate
|
title: $:/core/ui/AlertTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-alert">
|
<div class="tc-alert">
|
||||||
<div class="tc-alert-toolbar">
|
<div class="tc-alert-toolbar">
|
||||||
<$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/cancel-button}}</$button>
|
<$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/cancel-button}}</$button>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-alert-subtitle">
|
<div class="tc-alert-subtitle">
|
||||||
<$wikify name="format" text=<<lingo Tiddler/DateFormat>>>
|
<$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>
|
</$wikify>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-alert-body">
|
<div class="tc-alert-body">
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
title: $:/core/ui/Components/tag-link
|
title: $:/core/ui/Components/tag-link
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$link>
|
<$link>
|
||||||
<$set name="backgroundColor" value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
<$set name="backgroundColor" value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
||||||
<span style=<<tag-styles>> class="tc-tag-label">
|
<span style=<<tag-styles>> class="tc-tag-label">
|
||||||
|
Loading…
Reference in New Issue
Block a user