diff --git a/core/language/en-GB/Search.multids b/core/language/en-GB/Search.multids index 01a3fcaa2..899057847 100644 --- a/core/language/en-GB/Search.multids +++ b/core/language/en-GB/Search.multids @@ -28,7 +28,7 @@ Variables/Exclude/Show: Show exclude input Variables/Exclude/Description: EDIT ME - Description is shown in the dropdown Variables/ExpandAll: Expand All: Variables/FoldAll: Fold All: -Variables/Filter: Filter: +Variables/Filter: Search: Variables/Filter/Hint: Text eg: .attr Variables/Hint: Filter global variables Variables/Matches: //<> matches// diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index d3184a427..4b6348c32 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -4,25 +4,32 @@ tags: $:/tags/Global \whitespace trim -\define DV-VAR-FILTER-OPTIONS() fn var proc macro widget -\define DV-TMP-FILTER-OPTIONS() $:/temp/varSearch/options -\define DV-TMP-SORT-OPTIONS() $:/temp/varSearch/sort +\procedure DV-VAR-FILTER-OPTIONS() fn var proc macro widget +\procedure DV-FILTER-OPTIONS() $:/temp/varSearch/options +\procedure DV-SORT-OPTIONS() $:/temp/varSearch/sort -\define DV-RAW-FILTER-STR() [variables:raw<_tf.dv-type>] -\define DV-FILTER-STR() [variables<_tf.dv-type>] + +\procedure DV-RAW-FILTER-STR() [variables:raw<_tf.dv-type>] +\procedure DV-FILTER-STR() [variables<_tf.dv-type>] -\define DV-TMP-SEARCH() $:/temp/varSearch -\define DV-TMP-SEARCH-DETAILS() $:/temp/varSearch/details -\define DV-SEARCH-STATE() $:/state/varSearch -\define DV-TMP-EXCLUDE() $:/state/varExclude + +\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-EXCLUDE() $:/state/varExclude + \function tf.dv-filterString() [<_tf.dv-sort>match[raw]thenelse] \function tf.dv-formattedVar() [format:variable<_tf.dv-varFormat>] +\function tf.dv-foldedState() [] [] +[join[/]] + \procedure dumpvariables(type sort subfilter:"[[]]" format) + \function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] \function _tf.dv-type() [] @@ -46,13 +53,16 @@ tags: $:/tags/Global \end \procedure dv-toggleInfoState() -<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> +<$action-setfield $tiddler=<> + text={{{ [get[text]] +[toggle[yes],[no]] }}} +/> -<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[format:variable[$type$ $name$($params$)]] }}} /> +<$action-setfield $tiddler=<> + text={{{ [!is[blank]then] :else[format:variable[$type$ $name$($params$)]] }}} +/> \end \procedure dv-clearStatesButton() -| {{$:/language/Search/Variables/FoldAll}} <$button class="tc-btn-invisible tc-tiny-gap-left"> @@ -62,26 +72,33 @@ tags: $:/tags/Global \end \procedure dv-clearSearchButton() -<$button class="tc-btn-invisible tc-tiny-gap-left"> +<$button class="tc-btn-invisible btn-x" + tooltip=`${ [{$:/language/Search/Variables/Clear}] [{$:/language/Search/Variables/Filter}] +[join[ ]] }$` +> <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} \end \procedure dv-clearExcludeButton() -<$button class="tc-btn-invisible"> +<$button class="tc-btn-invisible btn-yy" + tooltip=`${ [{$:/language/Search/Variables/Clear}] [{$:/language/Search/Variables/Exclude}] +[join[ ]] }$` +> <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} \end \procedure dv-expandAllStatesButton() -| {{$:/language/Search/Variables/ExpandAll}} <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> + <$action-setfield $tiddler=<> + text={{{ [get[text]] +[toggle[yes],[no]] }}} + /> - <$list filter="[subfilter] +[search::some] +[filter]" variable="varname"> + <$list filter="[subfilter] +[search::some] +[filter]" + variable="varname" + > <$action-setfield $tiddler=<> text="yes"/> {{$:/core/images/unfold-all-button}} @@ -134,16 +151,16 @@ tags: $:/tags/Global \end -\function tf.dv-tmpTypeOptions() [] [] +[join[/]] -\function tf.dv-tmpSortOptions() [] [] +[join[/]] +\function tf.dv-tmpTypeOptions() [] [] +[join[/]] +\function tf.dv-tmpSortOptions() [] [] +[join[/]] -\function tf.dv-searchText() [] [] +[join[/]] +\function tf.dv-searchText() [] [] +[join[/]] \function tf.dv-getSearchText() [get[text]] -\function tf.dv-excludeText() [] [] +[join[/]] +\function tf.dv-excludeText() [] [] +[join[/]] \function tf.dv-getExcludeText() [get[text]] -\function tf.dv-detailsSearch() [] [] [] +[join[/]] +\function tf.dv-detailsSearch() [] [] [] +[join[/]] \function tf.dv-getDetailsSearchText() [get[text]] \function tf.dv-varState() [] [] [] +[join[/]] @@ -153,40 +170,20 @@ tags: $:/tags/Global \procedure search-variables(type sort subfilter:"[[]]" format) + \function _tf.dv-varFormat() [!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]] -<% if [is[blank]] %> - <> -<% endif %> -<% if [is[blank]] %> - <> -<% endif %> +<> -<% if [get[text]match[yes]] %> - <> -<% else %> - <> -<% endif %> - -
- <% if [!match[$:/AdvancedSearch]] %> - <%if [!is[blank]] %>sort:<<_tf.dv-sort>><%endif%> - <%if [!is[blank]] %>type:<<_tf.dv-type>><%endif%> - <% endif %> - <$text text={{$:/language/Search/Variables/Filter}}/> - <$edit-text tiddler=<> tag=input class="tc-tiny-gap-left" placeholder={{$:/language/Search/Variables/Filter/Hint}}/> <> -
- <$text text={{$:/language/Search/Variables/Exclude}}/> - <$edit-text tiddler=<> tag=input class="tc-tiny-gap" placeholder={{$:/language/Search/Variables/Exclude/Hint}}/> - <> - <% if [!is[blank]] %> - <> - <% endif %> -
-<$list filter="[subfilter] +[search::some] +[filter] +[!filter]" variable="varname"> +<$list filter="[subfilter] + +[search::some] + +[filter] + +[!filter]" + variable="varname" +>
<$button actions=<> class="tc-small-gap-left tc-btn-invisible"> <% if [get[text]match[yes]] %> @@ -226,17 +223,131 @@ tags: $:/tags/Global \end - + + + + +\procedure dv-search-input-box() +<%if [!is[blank]] %> + sort:<<_tf.dv-sort>> +<%endif%> +<%if [!is[blank]] %> + type:<<_tf.dv-type>> +<%endif%> +<$text text={{$:/language/Search/Variables/Filter}}/> +<$edit-text tiddler=<> + tag=input + class="txt-input x-inp" + placeholder="filter variables by name" +/> +<> +\end + +\procedure dv-exclude-input-box() +<$text text={{$:/language/Search/Variables/Exclude}}/> +<$edit-text tiddler=<> + tag=input + class="txt-input y-inp" +/> +<> +<% if [!is[blank]] %> + <> +<% endif %> +\end + +\function tf.dv-opt-class() "c" [