diff --git a/editions/tw5.com/tiddlers/flexible-form.tid b/editions/tw5.com/tiddlers/flexible-form.tid new file mode 100644 index 000000000..d7d317001 --- /dev/null +++ b/editions/tw5.com/tiddlers/flexible-form.tid @@ -0,0 +1,209 @@ +modified: 20240312123643000 +title: /core/template/flexible-form + +\parameters (sort, type) + +\whitespace trim + +\define FI-VAR-FILTER-OPTIONS() fn var proc macro widget + +\define FI-FOLDED() $:/temp/varFolded +\define FI-SEARCH() $:/temp/varSearch +\define FI-EXCLUDE() $:/temp/varExclude + +\function tf.fi-tmpTypeOptions() [] [] +[join[/]] +\function tf.fi-tmpSortOptions() [] [] +[join[/]] + +\function tf.fi-foldedState() [] [] +[join[/]] + +\function tf.fi-searchText() [] [] +[join[/]] +\function tf.fi-getSearchText() [get[text]] + +\function tf.fi-excludeText() [] [] +[join[/]] +\function tf.fi-getExcludeText() [get[text]] + +\procedure fi-clearSearchButton() +<$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 fi-clearExcludeButton() +<$button class="tc-btn-invisible btn-y" tooltip=`${ [{$:/language/Search/Variables/Clear}] [{$:/language/Search/Variables/Exclude}] +[join[ ]] }$`> + <$action-deletetiddler $tiddler=<>/> + {{$:/core/images/close-button}} + +\end + +\procedure fi-search-input-box() +<%if [!is[blank]] %> + sort:<<_tf.fi-sort>> +<%endif%> +<%if [!is[blank]] %> + type:<<_tf.fi-type>> +<%endif%> +<$text text={{$:/language/Search/Variables/Filter}}/> +<$edit-text tiddler=<> tag=input class="x-inp" placeholder="filter variables by name"/> <> +<% if [get[text]match[yes]] %> + <> +<% else %> + <> +<% endif %> +\end + +\procedure fi-exclude-input-box() +<$text text={{$:/language/Search/Variables/Exclude}}/> +<$edit-text tiddler=<> tag=input class="y-inp"/> <> +\end + +\function tf.fi-opt-class() "c" [