From 7959ff46eb3ba6ed55db3ded9718e803551376f9 Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 22 Apr 2024 17:01:18 +0200 Subject: [PATCH] add exclude text-input - works --- core/wiki/macros/dumpvariables.tid | 81 ++++++++++++++++++------------ 1 file changed, 50 insertions(+), 31 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 9bbfc10e6..3e2acbf85 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -12,9 +12,12 @@ tags: $:/tags/Global \define DV-FILTER-STR() [variables<_tf.dv-type>] \define DV-TMP-SEARCH() $:/temp/varSearch +\define DV-TMP-EXCLUDE() $:/temp/varExclude \define DV-TMP-SEARCH-DETAILS() $:/temp/varSearch/details \define DV-SEARCH-STATE() $:/state/varSearch +\define DV-TMP-EXCLUDE-SUBFILTER() [[]] + \function tf.dv-filterString() [<_tf.dv-sort>match[raw]thenelse] \function tf.dv-formattedVar() [format:variable<_tf.dv-varFormat>] @@ -65,6 +68,13 @@ tags: $:/tags/Global \end +\procedure dv-clearExcludeButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$action-deletetiddler $tiddler=<>/> + {{$:/core/images/close-button}} + +\end + \procedure dv-expandAllStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> @@ -128,6 +138,10 @@ tags: $:/tags/Global \function tf.dv-searchText() [] [] +[join[/]] \function tf.dv-getSearchText() [get[text]] +\function tf.dv-excludeText() [] [] +[join[/]] +\function tf.dv-getExcludeText() [get[text]else] +\function tf.dv-getExcludeText() [get[text]] + \function tf.dv-detailsSearch() [] [] [] +[join[/]] \function tf.dv-getDetailsSearchText() [get[text]] @@ -151,51 +165,56 @@ tags: $:/tags/Global <% endif %>
<% if [!match[$:/AdvancedSearch]] %> - <$text text={{$:/language/Search/Variables/Search}}/> <%if [!is[blank]] %>sort:<<_tf.dv-sort>><%endif%> <%if [!is[blank]] %>type:<<_tf.dv-type>><%endif%> <% endif %> - <$edit-text tiddler=<> tag=input/> <> + <$text text={{$:/language/Search/Variables/Filter}}/> + <$edit-text tiddler=<> tag=input class="tc-tiny-gap-left" placeholder={{$:/language/Search/Variables/Filter/Hint}}/> <> <% if [get[text]match[yes]] %> <> <% else %> <> <% endif %> +
+ <$text text={{$:/language/Search/Variables/Exclude}}/> + <$edit-text tiddler=<> tag=input class="tc-tiny-gap-left" placeholder={{$:/language/Search/Variables/Exclude/Hint}}/> <>
-<$list filter="[subfilter] +[search::some] +[filter]" variable="varname"> -
- <$button actions=<> class="tc-small-gap-left tc-btn-invisible"> - <% if [get[text]match[yes]] %> - {{$:/core/images/down-arrow}} - <% else %> - {{$:/core/images/right-arrow}} - <% endif %> - <$text text=<>/> - <% if [prefix[\function]] %> - <$text text={{{ [format:variable[$firstLine$]] }}}/> - <% endif %> - - - <% if [get[text]match[yes]] %> - <$button actions=<> class="tc-btn-invisible tc-small-gap-left"> - <% if [get[text]match[yes]] %> +<$list filter="[subfilter] +[search::some] +[filter] +[!filter]" variable="varname"> +
+ <$button actions=<> class="tc-small-gap-left tc-btn-invisible"> + <% if [get[text]match[yes]] %> {{$:/core/images/down-arrow}} <% else %> {{$:/core/images/right-arrow}} <% endif %> + <$text text=<>/> + <% if [prefix[\function]] %> + <$text text={{{ [format:variable[$firstLine$]] }}}/> + <% endif %> - <% if [get[text]match[yes]] %> -
- {{$:/language/Search/Variables/Search/Details}} - <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/> -
- <> + + <% if [get[text]match[yes]] %> + <$button actions=<> class="tc-btn-invisible tc-small-gap-left"> + <% if [get[text]match[yes]] %> + {{$:/core/images/up-arrow}} + <% else %> + {{$:/core/images/advanced-search-button}} + <% endif %> + +
+ <% if [get[text]match[yes]] %> +
+ {{$:/language/Search/Variables/Search/Details}} + <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/> +
+ <> + <% endif %> + <% if [prefix[\function]] %> + <$codeblock code={{{ [getvariable[value]] }}}/> + <% endif %> + <$codeblock code={{{ [getvariable[]] }}}/> +
<% endif %> - <% if [prefix[\function]] %> - <$codeblock code={{{ [getvariable[value]] }}}/> - <% endif %> - <$codeblock code={{{ [getvariable[]] }}}/> - <% endif %> -
+
\end