diff --git a/core/wiki/macros/image-picker.tid b/core/wiki/macros/image-picker.tid index 5f09ced0d..5bda45bca 100644 --- a/core/wiki/macros/image-picker.tid +++ b/core/wiki/macros/image-picker.tid @@ -1,39 +1,36 @@ -created: 20170715180840889 -modified: 20170715180914005 tags: $:/tags/Macro title: $:/core/macros/image-picker type: text/vnd.tiddlywiki -\define image-picker-thumbnail(actions) -<$button tag="a" tooltip="""$(imageTitle)$"""><$transclude $variable="__actions__"/><$transclude tiddler=<>/> +\procedure image-picker-thumbnail(actions) +<$button tag="a" tooltip=<>><$transclude $variable="actions"/><$transclude tiddler=<>/> \end -\define image-picker-list(filter,actions) +\procedure image-picker-list(filter,actions) \whitespace trim -<$list filter="""$filter$""" variable="imageTitle"> -<$macrocall $name="image-picker-thumbnail" actions=<<__actions__>>/> +<$list filter=<> variable="imageTitle"> +<$transclude $variable="image-picker-thumbnail" actions=<>/> \end -\define image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"") +\procedure image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"") \whitespace trim
-<$vars state-system=<>> +<$let state-system=<> tv-filter={{{ [search-replace[$subfilter$],] }}}> <$checkbox tiddler=<> field="text" checked="show" unchecked="hide" default="hide"> - -{{$:/language/SystemTiddlers/Include/Prompt}} +{{$:/language/SystemTiddlers/Include/Prompt}} <$reveal state=<> type="match" text="hide" default="hide" tag="div"> -<$macrocall $name="image-picker-list" filter="""$filter$ +[!is[system]]""" actions=<<__actions__>>/> +<$transclude $variable="image-picker-list" filter=`$(tv-filter)$ +[!is[system]]` actions=<>/> <$reveal state=<> type="nomatch" text="hide" default="hide" tag="div"> -<$macrocall $name="image-picker-list" filter="""$filter$""" actions=<<__actions__>>/> +<$transclude $variable="image-picker-list" filter=<> actions=<>/> - +
\end -\define image-picker-include-tagged-images(actions) -<$macrocall $name="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions=<<__actions__>>/> +\procedure image-picker-include-tagged-images(actions) +<$transclude $variable="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions=<>/> \end