From 3dba69845883556053edcdd045fd79f63d1b98c0 Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 29 Apr 2024 14:56:46 +0200 Subject: [PATCH] allow radio-widget and checkbox-widget to be used for type-filter input --- core/wiki/macros/dumpvariables.tid | 84 ++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 28 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 4b6348c32..367e80d1d 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -4,7 +4,7 @@ tags: $:/tags/Global \whitespace trim -\procedure DV-VAR-FILTER-OPTIONS() fn var proc macro widget +\procedure DV-VAR-FILTER-OPTIONS() all fn var proc macro widget \procedure DV-FILTER-OPTIONS() $:/temp/varSearch/options \procedure DV-SORT-OPTIONS() $:/temp/varSearch/sort @@ -16,22 +16,24 @@ tags: $:/tags/Global \procedure DV-FOLDED() $:/temp/varFolded \procedure DV-SEARCH() $:/temp/varSearch \procedure DV-SEARCH-DETAILS() $:/temp/varSearch/details -\procedure DV-SEARCH-STATE() $:/state/varSearch +\procedure DV-SEARCH-STATE() $:/state/varSearch/name \procedure DV-EXCLUDE() $:/state/varExclude +\procedure DV-TYPE-STATE() $:/state/typeState \function tf.dv-filterString() [<_tf.dv-sort>match[raw]thenelse] -\function tf.dv-formattedVar() [format:variable<_tf.dv-varFormat>] +\function tf.dv-formattedVar() [format:variable<_tf.dv-varFormatStr>] \function tf.dv-foldedState() [] [] +[join[/]] - - - + + + \procedure dumpvariables(type sort subfilter:"[[]]" format) -\function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] + +\function _tf.dv-varFormatStr() [!is[blank]thenelse[$type$ $name$($params$)]] \function _tf.dv-type() [] \function _tf.dv-sort() []
    @@ -57,9 +59,12 @@ tags: $:/tags/Global text={{{ [get[text]] +[toggle[yes],[no]] }}} /> + <$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[format:variable[$type$ $name$($params$)]] }}} -/> +> +<$action-log $$filter="[prefix[tf.]]"/> + \end \procedure dv-clearStatesButton() @@ -90,8 +95,8 @@ tags: $:/tags/Global \end \procedure dv-expandAllStatesButton() -{{$:/language/Search/Variables/ExpandAll}} -<$button class="tc-btn-invisible tc-tiny-gap-left"> +{{$:/language/Search/Variables/ExpandAll}} +<$button class="tc-btn-invisible"> <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}} /> @@ -122,7 +127,7 @@ tags: $:/tags/Global \end -\procedure dv-filterOptions() + \function tf.dv-tmpTypeOptions() [] [] +[join[/]] \function tf.dv-tmpSortOptions() [] [] +[join[/]] @@ -166,13 +171,14 @@ tags: $:/tags/Global \function tf.dv-varState() [] [] [] +[join[/]] \function tf.dv-toggleInfoState() [] [] +[join[/]] - - - + + + \procedure search-variables(type sort subfilter:"[[]]" format) -\function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] + +\function _tf.dv-varFormatStr() [!is[blank]thenelse[$type$ $name$($params$)]] \function _tf.dv-type() [!is[blank]then] :else[get[text]] \function _tf.dv-sort() [!is[blank]then] :else[get[text]] :else[[alphabetical]] @@ -193,6 +199,7 @@ tags: $:/tags/Global <% endif %> <$text text=<>/> <% if [prefix[\function]] %> + <$text text={{{ [format:variable[$firstLine$]] }}}/> <% endif %> @@ -226,6 +233,7 @@ tags: $:/tags/Global + \procedure dv-search-input-box() <%if [!is[blank]] %> @@ -238,7 +246,7 @@ tags: $:/tags/Global <$edit-text tiddler=<> tag=input class="txt-input x-inp" - placeholder="filter variables by name" + placeholder={{$:/language/Search/Variables/Filter/Hint}} /> <> \end @@ -248,6 +256,7 @@ tags: $:/tags/Global <$edit-text tiddler=<> tag=input class="txt-input y-inp" + placeholder={{$:/language/Search/Variables/Exclude/Hint}} /> <> <% if [!is[blank]] %> @@ -266,11 +275,26 @@ tags: $:/tags/Global {{$:/language/Search/Variables/Option/Type}} <$list filter="[enlist]" variable="option"> - <$checkbox tiddler=<> listField="text" checked=<