diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 0ab9e2001..72bca855a 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -1,14 +1,118 @@ title: $:/core/macros/dumpvariables tags: $:/tags/Macro -\define dumpvariables() \whitespace trim + +\procedure dumpvariables() \end + + +\procedure toggleState() +<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> +\end + +\procedure toggleInfoState() +<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> +<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[] }}} /> +\end + +\procedure clearStatesButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$action-deletetiddler $filter="[prefix] [prefix[$:/temp]]"/> + {{$:/core/images/fold-all-button}} + +\end + +\procedure clearSearchButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$action-deletetiddler $tiddler=<>/> + {{$:/core/images/close-button}} + +\end + +\procedure expandAllStatesButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$list filter="[variables[]] +[search::some]" variable="varname"> + <$action-setfield $tiddler=<> text="yes"/> + + {{$:/core/images/unfold-all-button}} + +\end + +\procedure info() + +
+ <$list filter="[all[tiddlers+shadows]] :filter[search:text,tags:words] + :filter[!prefix[$:/temp]] + :filter[!prefix[$:/state]] + -[[$:/config/OriginalTiddlerPaths]] + :filter[!type[application/javascript]] + -[[$:/core]] + :filter[!plugin-type[plugin]]" + > + <$link class="tc-small-gap-left"/>
+ +
+\end + + + + +\procedure filtered-dumpvariables(subfilter) +\procedure search() :/temp/search/dump +\procedure sub-search() :/temp/search/sub-dump +\procedure state() :/state/search/var/ + +\function getSearchText() [get[text]] + +\function getSubSearch() [] [] [] +[join[/]] +\function getSubSearchText() [get[text]] + +\function getVarState() [addsuffix] [] +[join[]] +\function getToggleInfoState() [addsuffix] + +<$text text="Filtered Variable Dump -- "/><> + +<$edit-text tiddler=<> tag=input/> <> <> <> + +<$list filter="[variables[]] +[search::some]" 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=<>/> + <$text text={{{ [getvariable[]length[]] "Chars" +[join[ ]] }}}/> + + + <% if [get[text]match[yes]] %> + <$button actions=<> class="tc-btn-invisible tc-small-gap-left" disabledX={{{[is[blank]then[yes]else[no]] }}}> + <% if [get[text]match[yes]] %> + {{$:/core/images/down-arrow}} + <% else %> + {{$:/core/images/right-arrow}} + <% endif %> + + <% if [get[text]match[yes]] %> +
+ Search text, tags: + <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/> +
+ <> + <% endif %> + <$codeblock code={{{ [getvariable[]] }}}/> + <% endif %> +
+ +
+\end