diff --git a/core/wiki/macros/colour-picker.tid b/core/wiki/macros/colour-picker.tid index 7a607a551..3c37dc9b5 100644 --- a/core/wiki/macros/colour-picker.tid +++ b/core/wiki/macros/colour-picker.tid @@ -1,58 +1,55 @@ title: $:/core/macros/colour-picker tags: $:/tags/Macro -\define colour-picker-update-recent() +\procedure colour-picker-update-recent() <$action-listops $tiddler="$:/config/ColourPicker/Recent" - $subfilter="$(colour-picker-value)$ [list[$:/config/ColourPicker/Recent]remove[$(colour-picker-value)$]] +[limit[8]]" + $subfilter="[] [list[$:/config/ColourPicker/Recent]remove] +[limit[8]]" /> \end -\define colour-picker-inner(actions) -<$button tag="a" tooltip="""$(colour-picker-value)$"""> -$(colour-picker-update-recent)$ -<$transclude $variable="__actions__"/> - - - +\procedure colour-picker-inner(actions) +<$button tag="a" tooltip=<>> +<> +<$transclude $variable="actions"/> +> style.width="100%" style.height="100%" style.borderRadius="50%"/> \end -\define colour-picker-recent-inner(actions) \whitespace trim -<$set name="colour-picker-value" value="$(recentColour)$"> -<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/> +\procedure colour-picker-recent-inner(actions) +<$set name="colour-picker-value" value=<>> +<$transclude $variable="colour-picker-inner" actions=<>/> \end -\define colour-picker-recent(actions) -\whitespace trim +\procedure colour-picker-recent(actions) {{$:/language/ColourPicker/Recent}}<$list filter="[list[$:/config/ColourPicker/Recent]]" variable="recentColour"> -<$macrocall $name="colour-picker-recent-inner" actions=<<__actions__>>/> +<$transclude $variable="colour-picker-recent-inner" actions=<>/> \end -\define colour-picker(actions) -\whitespace trim +\procedure colour-picker(actions)
-<$macrocall $name="colour-picker-recent" actions=<<__actions__>>/> +<$transclude $variable="colour-picker-recent" actions=<>/> --- <$list filter="LightPink Pink Crimson LavenderBlush PaleVioletRed HotPink DeepPink MediumVioletRed Orchid Thistle Plum Violet Magenta Fuchsia DarkMagenta Purple MediumOrchid DarkViolet DarkOrchid Indigo BlueViolet MediumPurple MediumSlateBlue SlateBlue DarkSlateBlue Lavender GhostWhite Blue MediumBlue MidnightBlue DarkBlue Navy RoyalBlue CornflowerBlue LightSteelBlue LightSlateGrey SlateGrey DodgerBlue AliceBlue SteelBlue LightSkyBlue SkyBlue DeepSkyBlue LightBlue PowderBlue CadetBlue Azure LightCyan PaleTurquoise Cyan Aqua DarkTurquoise DarkSlateGrey DarkCyan Teal MediumTurquoise LightSeaGreen Turquoise Aquamarine MediumAquamarine MediumSpringGreen MintCream SpringGreen MediumSeaGreen SeaGreen Honeydew LightGreen PaleGreen DarkSeaGreen LimeGreen Lime ForestGreen Green DarkGreen Chartreuse LawnGreen GreenYellow DarkOliveGreen YellowGreen OliveDrab Beige LightGoldenrodYellow Ivory LightYellow Yellow Olive DarkKhaki LemonChiffon PaleGoldenrod Khaki Gold Cornsilk Goldenrod DarkGoldenrod FloralWhite OldLace Wheat Moccasin Orange PapayaWhip BlanchedAlmond NavajoWhite AntiqueWhite Tan BurlyWood Bisque DarkOrange Linen Peru PeachPuff SandyBrown Chocolate SaddleBrown Seashell Sienna LightSalmon Coral OrangeRed DarkSalmon Tomato MistyRose Salmon Snow LightCoral RosyBrown IndianRed Red Brown FireBrick DarkRed Maroon White WhiteSmoke Gainsboro LightGrey Silver DarkGrey Grey DimGrey Black" variable="colour-picker-value"> -<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/> +<$transclude $variable="colour-picker-inner" actions=<>/> --- -<$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder=""/> - +<$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder="" class="tc-tiny-gap-right"/> <$edit-text tiddler="$:/config/ColourPicker/New" type="color" tag="input"/> <$set name="colour-picker-value" value={{$:/config/ColourPicker/New}}> -<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/> +<%if [{$:/config/ColourPicker/New}!is[blank]] %> +<$transclude $variable="colour-picker-inner" actions=<>/> +<%endif%>
diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 0ab9e2001..835cddabe 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -1,7 +1,7 @@ title: $:/core/macros/dumpvariables tags: $:/tags/Macro -\define dumpvariables() +\procedure dumpvariables() \whitespace trim
    <$list filter="[variables[]]" variable="varname"> 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 diff --git a/core/wiki/macros/list.tid b/core/wiki/macros/list.tid index c9dd2ad71..a431d5ec5 100644 --- a/core/wiki/macros/list.tid +++ b/core/wiki/macros/list.tid @@ -1,14 +1,18 @@ title: $:/core/macros/list tags: $:/tags/Macro -\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption") +\procedure list-links-draggable-drop-actions() +<$action-listops $tiddler=<> $field=<> $subfilter="+[insertbefore,]"/> +\end + \whitespace trim -<$genesis $type=<<__type__>> class=<<__class__>>> - <$list filter=<<__filter__>> emptyMessage=<<__emptyMessage__>>> - <$genesis $type=<<__subtype__>>> +\procedure list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption") +<$genesis $type=<> class=<>> + <$list filter=<> emptyMessage=<>> + <$genesis $type=<>> <$link to={{!!title}}> <$let tv-wikilinks="no"> - <$transclude field=<<__field__>>> + <$transclude field=<>> <$view field="title"/> @@ -18,24 +22,19 @@ tags: $:/tags/Macro \end -\define list-links-draggable-drop-actions() -<$action-listops $tiddler=<> $field=<> $subfilter="+[insertbefore,]"/> -\end - -\define list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate) -\whitespace trim +\procedure list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate) - <$vars targetTiddler="""$tiddler$""" targetField="""$field$"""> - <$genesis $type=<<__type__>> class="$class$"> - <$list filter="[list[$tiddler$!!$field$]]" emptyMessage=<<__emptyMessage__>>> + <$let targetTiddler=<> targetField=<>> + <$genesis $type=<> class=<>> + <$list filter="[getenlist-input[]]" emptyMessage=<>> <$droppable actions=<> - tag="""$subtype$""" + tag=<> enable=<> >
    - <$transclude tiddler="""$itemTemplate$"""> + <$transclude tiddler=<>> <$link to={{!!title}}> <$let tv-wikilinks="no"> <$transclude field="caption"> @@ -60,50 +59,48 @@ tags: $:/tags/Macro - + \end -\define list-tagged-draggable-drop-actions(tag) -\whitespace trim +\procedure list-tagged-draggable-drop-actions(tag) -<$set name="order" filter="[<__tag__>tagging[]]"> +<$set name="order" filter="[tagging[]]"> - <$list filter="[<__tag__>tagging[]]"> + <$list filter="[tagging[]]"> <$action-deletefield $field="list-before"/> <$action-deletefield $field="list-after"/> - <$action-listops $tiddler=<<__tag__>> $field="list" $filter="+[enlist] +[insertbefore,]"/> + <$action-listops $tiddler=<> $field="list" $filter="+[enlist] +[insertbefore,]"/> - + - <$list filter="[!contains:tags<__tag__>]"> + <$list filter="[!contains:tags]"> <$fieldmangler tiddler=<>> - <$action-sendmessage $message="tm-add-tag" $param=<<__tag__>>/> + <$action-sendmessage $message="tm-add-tag" $param=<>/> \end -\define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"") -\whitespace trim +\procedure list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"") - <$set name="tag" value=<<__tag__>>> + <$set name="tag" value=<>> <$list - filter="[<__tag__>tagging[]$subFilter$]" - emptyMessage=<<__emptyMessage__>> - storyview=<<__storyview__>> + filter=`[tagging[]$(subFilter)$]` + emptyMessage=<> + storyview=<> > - <$genesis $type=<<__elementTag__>> class="tc-menu-list-item"> + <$genesis $type=<> class="tc-menu-list-item"> <$droppable - actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>""" + actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<>/>""" enable=<> > - <$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/> - <$genesis $type=<<__elementTag__>>> - <$transclude tiddler="""$itemTemplate$"""> + <$genesis $type=<> class="tc-droppable-placeholder"/> + <$genesis $type=<>> + <$transclude tiddler=<>> <$link to={{!!title}}> <$view field="title"/> @@ -114,11 +111,11 @@ tags: $:/tags/Macro <$tiddler tiddler=""> <$droppable - actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>""" + actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<>/>""" enable=<> > - <$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/> - <$genesis $type=<<__elementTag__>> style="height:0.5em;"/> + <$genesis $type=<> class="tc-droppable-placeholder"/> + <$genesis $type=<> style="height:0.5em;"/> diff --git a/core/wiki/macros/translink.tid b/core/wiki/macros/translink.tid index 9cc465422..34faaa781 100644 --- a/core/wiki/macros/translink.tid +++ b/core/wiki/macros/translink.tid @@ -1,28 +1,28 @@ title: $:/core/macros/translink tags: $:/tags/Macro -\define translink(title,mode:"block") +\procedure translink(title,mode:"block") \whitespace trim -<$list filter="[<__mode__>match[block]]"> +<%if [match[block]] %>