2016-04-22 07:36:29 +00:00
|
|
|
title: $:/core/macros/image-picker
|
|
|
|
tags: $:/tags/Macro
|
|
|
|
|
|
|
|
\define image-picker-inner(actions)
|
|
|
|
<$button tag="a" tooltip="""$(imageTitle)$""">
|
|
|
|
$actions$
|
|
|
|
<$transclude tiddler=<<imageTitle>>/>
|
|
|
|
</$button>
|
|
|
|
\end
|
|
|
|
|
2016-04-24 12:27:32 +00:00
|
|
|
\define image-picker(actions,subfilter:"")
|
2016-04-22 07:36:29 +00:00
|
|
|
<div class="tc-image-chooser">
|
2016-04-24 12:27:32 +00:00
|
|
|
<$list filter="[all[shadows+tiddlers]is[image]$subfilter$!has[draft.of]] -[type[application/pdf]] +[sort[title]]" variable="imageTitle">
|
2016-04-22 07:36:29 +00:00
|
|
|
<$macrocall $name="image-picker-inner" actions="""$actions$"""/>
|
|
|
|
</$list>
|
|
|
|
</div>
|
|
|
|
\end
|
|
|
|
|
2016-11-27 22:34:19 +00:00
|
|
|
\define image-picker-dropdown(image-tiddler,fallback,actions)
|
|
|
|
<div class="tc-image-chooser-wrapper">
|
|
|
|
<$button popup=<<qualify "$:/state/popup/image-picker">> class="tc-btn-invisible">
|
|
|
|
<$transclude tiddler="""$image-tiddler$""">
|
|
|
|
$fallback$
|
|
|
|
</$transclude>
|
|
|
|
</$button>
|
|
|
|
<div class="tc-block-dropdown-wrapper">
|
|
|
|
<$reveal state=<<qualify "$:/state/popup/image-picker">> type="nomatch" text="" default="">
|
|
|
|
<div class="tc-block-dropdown">
|
|
|
|
<$macrocall $name="image-picker" actions="""$actions$"""/>
|
|
|
|
</div>
|
|
|
|
</$reveal>
|
|
|
|
</div>
|
|
|
|
\end
|