diff --git a/boot/boot.js b/boot/boot.js index b4bdc00f2bb..ab403aa5ae8 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1470,17 +1470,15 @@ $tw.Wiki = function(options) { // Unpack the currently registered plugins, creating shadow tiddlers for their constituent tiddlers this.unpackPluginTiddlers = function() { var self = this; - // Sort the plugin titles by the `plugin-priority` field - pluginTiddlers.sort(function(a,b) { - if("plugin-priority" in a.fields && "plugin-priority" in b.fields) { - return a.fields["plugin-priority"] - b.fields["plugin-priority"]; - } else if("plugin-priority" in a.fields) { + // Sort the plugin titles by the `plugin-priority` field, if this field is missing, default to 1 + pluginTiddlers.sort(function(a, b) { + var priorityA = "plugin-priority" in a.fields ? a.fields["plugin-priority"] : 1; + var priorityB = "plugin-priority" in b.fields ? b.fields["plugin-priority"] : 1; + if (priorityA !== priorityB) { + return priorityA - priorityB; + } else if (a.fields.title < b.fields.title) { return -1; - } else if("plugin-priority" in b.fields) { - return +1; - } else if(a.fields.title < b.fields.title) { - return -1; - } else if(a.fields.title === b.fields.title) { + } else if (a.fields.title === b.fields.title) { return 0; } else { return +1; diff --git a/core/modules/server/routes/get-login-basic.js b/core/modules/server/routes/get-login-basic.js index d573a0b5d20..69d3bf908cf 100644 --- a/core/modules/server/routes/get-login-basic.js +++ b/core/modules/server/routes/get-login-basic.js @@ -25,7 +25,7 @@ exports.handler = function(request,response,state) { response.end(); } else { // Redirect to the root wiki if login worked - var location = ($tw.syncadaptor && $tw.syncadaptor.host)? $tw.syncadaptor.host: "/"; + var location = ($tw.syncadaptor && $tw.syncadaptor.host)? $tw.syncadaptor.host: `${state.pathPrefix}/`; response.writeHead(302,{ Location: location }); diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index f36afd1917f..ce0688ad6ec 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -278,6 +278,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) { } // Get the current value of the tiddler we're editing var tiddler = this.wiki.getTiddler(targetTitle); + var defaultType = this.wiki.getTiddlerText("$:/config/DefaultMissingType", "").trim(); + var defaultFields = { type: defaultType }; // Save the initial value of the draft tiddler draftTitle = this.generateDraftTitle(targetTitle); var draftTiddler = new $tw.Tiddler({ @@ -289,7 +291,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) { "draft.title": targetTitle, "draft.of": targetTitle }, - this.wiki.getModificationFields() + this.wiki.getModificationFields(), + tiddler === null || tiddler === undefined ? defaultFields : {} ); this.wiki.addTiddler(draftTiddler); return draftTiddler; diff --git a/core/modules/widgets/testcase.js b/core/modules/widgets/testcase.js index 0fd55531c0b..ad19052795e 100644 --- a/core/modules/widgets/testcase.js +++ b/core/modules/widgets/testcase.js @@ -33,6 +33,7 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) { this.execute(); // Create container DOM node var domNode = this.document.createElement("div"); + domNode.setAttribute("class", "tc-test-case " + this.testcaseClass); this.domNodes.push(domNode); parent.insertBefore(domNode,nextSibling); // Render the children into a hidden DOM node @@ -145,6 +146,7 @@ TestCaseWidget.prototype.execute = function() { this.testcaseTestActions = this.getAttribute("testActions"); this.testcaseTestExpectedResult = this.getAttribute("testExpectedResult"); this.testcaseHideIfPass = this.getAttribute("testHideIfPass"); + this.testcaseClass = this.getAttribute("class",""); }; /* diff --git a/core/palettes/FlexokiDark.tid b/core/palettes/FlexokiDark.tid index 73c695f40a3..53fa353304b 100644 --- a/core/palettes/FlexokiDark.tid +++ b/core/palettes/FlexokiDark.tid @@ -65,8 +65,8 @@ flexoki-bl-2: <> flexoki-pu-2: <> flexoki-ma-2: <> -alert-background: <> -alert-border: <> +alert-background: <> +alert-border: <> alert-highlight: <> alert-muted-foreground: <> background: #100F0F @@ -103,8 +103,8 @@ external-link-foreground-visited: <> external-link-foreground: <> footnote-target-background: <> foreground: #CECDC3 -highlight-background: #ffff00 -highlight-foreground: #000000 +highlight-background: <> +highlight-foreground: <> menubar-background: <> menubar-foreground: <> message-background: <> @@ -118,14 +118,14 @@ modal-footer-border: <> modal-header-border: <> muted-foreground: <> network-activity-foreground: <> -notification-background: <> -notification-border: <> +notification-background: <> +notification-border: <> page-background: <> -pre-background: <> +pre-background: <> pre-border: <> primary: <> -selection-background: #2b7b73 -selection-foreground: <> +selection-background: <> +selection-foreground: <> select-tag-background: <> select-tag-foreground: <> sidebar-button-foreground: <> @@ -193,20 +193,20 @@ toolbar-cancel-button: toolbar-done-button: untagged-background: <> very-muted-foreground: <> -wikilist-background: #e5e5e5 -wikilist-item: #fff -wikilist-info: #000 -wikilist-title: #666 +wikilist-background: <> +wikilist-item: <> +wikilist-info: <> +wikilist-title: <> wikilist-title-svg: <> -wikilist-url: #aaa -wikilist-button-open: #4fb82b -wikilist-button-open-hover: green -wikilist-button-reveal: #5778d8 -wikilist-button-reveal-hover: blue -wikilist-button-remove: #d85778 -wikilist-button-remove-hover: red -wikilist-toolbar-background: #d3d3d3 -wikilist-toolbar-foreground: #888 -wikilist-droplink-dragover: rgba(255,192,192,0.5) -wikilist-button-background: #acacac -wikilist-button-foreground: #000 \ No newline at end of file +wikilist-url: <> +wikilist-button-open: <> +wikilist-button-open-hover: <> +wikilist-button-reveal: <> +wikilist-button-reveal-hover: <> +wikilist-button-remove: <> +wikilist-button-remove-hover: <> +wikilist-toolbar-background: <> +wikilist-toolbar-foreground: <> +wikilist-droplink-dragover: <> +wikilist-button-background: <> +wikilist-button-foreground: <> \ No newline at end of file diff --git a/core/palettes/FlexokiLight.tid b/core/palettes/FlexokiLight.tid index 200e6ecadd2..abf5063878f 100644 --- a/core/palettes/FlexokiLight.tid +++ b/core/palettes/FlexokiLight.tid @@ -94,8 +94,8 @@ dragger-background: <> dragger-foreground: <> dropdown-background: <> dropdown-border: <> -dropdown-tab-background-selected: #fff -dropdown-tab-background: #ececec +dropdown-tab-background-selected: <> +dropdown-tab-background: <> dropzone-background: <> external-link-background-hover: inherit external-link-background-visited: inherit @@ -105,8 +105,8 @@ external-link-foreground-visited: <> external-link-foreground: <> footnote-target-background: <> foreground: #100F0F -highlight-background: #ffff00 -highlight-foreground: #000000 +highlight-background: <> +highlight-foreground: inherit menubar-background: <> menubar-foreground: <> message-background: <> @@ -123,7 +123,7 @@ network-activity-foreground: <> notification-background: <> notification-border: <> page-background: <> -pre-background: <> +pre-background: <> pre-border: <> primary: <> selection-background: <> @@ -196,19 +196,19 @@ toolbar-done-button: untagged-background: <> very-muted-foreground: <> wikilist-background: <> -wikilist-item: #fff -wikilist-info: #000 -wikilist-title: #666 +wikilist-item: <> +wikilist-info: <> +wikilist-title: <> wikilist-title-svg: <> -wikilist-url: #aaa -wikilist-button-open: #4fb82b -wikilist-button-open-hover: green -wikilist-button-reveal: #5778d8 -wikilist-button-reveal-hover: blue -wikilist-button-remove: #d85778 -wikilist-button-remove-hover: red -wikilist-toolbar-background: #d3d3d3 -wikilist-toolbar-foreground: #888 -wikilist-droplink-dragover: rgba(255,192,192,0.5) -wikilist-button-background: #acacac -wikilist-button-foreground: #000 +wikilist-url: <> +wikilist-button-open: <> +wikilist-button-open-hover: <> +wikilist-button-reveal: <> +wikilist-button-reveal-hover: <> +wikilist-button-remove: <> +wikilist-button-remove-hover: <> +wikilist-toolbar-background: <> +wikilist-toolbar-foreground: <> +wikilist-droplink-dragover: <> +wikilist-button-background: <> +wikilist-button-foreground: <> diff --git a/core/palettes/GruvBoxDark.tid b/core/palettes/GruvBoxDark.tid index e839fd7b4e0..16ac22d65db 100644 --- a/core/palettes/GruvBoxDark.tid +++ b/core/palettes/GruvBoxDark.tid @@ -21,9 +21,9 @@ diff-delete-foreground: <> diff-equal-background: diff-equal-foreground: <> diff-insert-background: #b8bb26 -diff-insert-foreground: <> -diff-invisible-background: -diff-invisible-foreground: <> +diff-insert-foreground: <> +diff-invisible-background: #ffff97 +diff-invisible-foreground: #444347 dirty-indicator: #fb4934 download-background: #b8bb26 download-foreground: <> diff --git a/core/palettes/Nord.tid b/core/palettes/Nord.tid index 5f18dce3f9a..87e91892705 100644 --- a/core/palettes/Nord.tid +++ b/core/palettes/Nord.tid @@ -21,8 +21,8 @@ diff-delete-foreground: <> diff-equal-background: diff-equal-foreground: <> diff-insert-background: #A3BE8C -diff-insert-foreground: <> -diff-invisible-background: +diff-insert-foreground: <> +diff-invisible-background: #f9f3b5 diff-invisible-foreground: <> dirty-indicator: #BF616A download-background: #A3BE8C diff --git a/core/palettes/SolarFlare.tid b/core/palettes/SolarFlare.tid index 9f394f10c6c..ff6ddcf1db8 100644 --- a/core/palettes/SolarFlare.tid +++ b/core/palettes/SolarFlare.tid @@ -125,6 +125,14 @@ foreground: #657b83 tiddler-link-foreground: <> alert-border: #b99e2f +diff-delete-background: <> +diff-delete-foreground: <> +diff-equal-background: inherit +diff-equal-foreground: inherit +diff-insert-background: <> +diff-insert-foreground: <> +diff-invisible-background: <> +diff-invisible-foreground: <> dirty-indicator: #ff0000 dropzone-background: rgba(0,200,0,0.7) external-link-background-hover: inherit diff --git a/core/palettes/SolarizedDark.tid b/core/palettes/SolarizedDark.tid index 326f6a4fb8e..9338998e9fd 100644 --- a/core/palettes/SolarizedDark.tid +++ b/core/palettes/SolarizedDark.tid @@ -18,6 +18,14 @@ button-foreground: #93a1a1 code-background: #073642 code-border: #586e75 code-foreground: #93a1a1 +diff-delete-background: #dc322f +diff-delete-foreground: #eee8d5 +diff-equal-background: inherit +diff-equal-foreground: inherit +diff-insert-background: #859900 +diff-insert-foreground: #073642 +diff-invisible-background: #b58900 +diff-invisible-foreground: #eee8d5 dirty-indicator: #dc322f download-background: #859900 download-foreground: #073642 diff --git a/core/palettes/SolarizedLight.tid b/core/palettes/SolarizedLight.tid index 28ce1c7c23c..c01ff882187 100644 --- a/core/palettes/SolarizedLight.tid +++ b/core/palettes/SolarizedLight.tid @@ -18,6 +18,14 @@ button-foreground: #586e75 code-background: #eee8d5 code-border: #93a1a1 code-foreground: #586e75 +diff-delete-background: #dc322f +diff-delete-foreground: #eee8d5 +diff-equal-background: inherit +diff-equal-foreground: inherit +diff-insert-background: #859900 +diff-insert-foreground: #eee8d5 +diff-invisible-background: #b58900 +diff-invisible-foreground: #eee8d5 dirty-indicator: #dc322f download-background: #859900 download-foreground: #eee8d5 diff --git a/core/palettes/Twilight.tid b/core/palettes/Twilight.tid index 1cd8efab16a..d6b54673adc 100644 --- a/core/palettes/Twilight.tid +++ b/core/palettes/Twilight.tid @@ -19,13 +19,13 @@ code-background: rgba(0,0,0,0.03) code-border: rgba(0,0,0,0.08) code-foreground: rgb(255, 94, 94) diff-delete-background: #ffc9c9 -diff-delete-foreground: <> +diff-delete-foreground: <> diff-equal-background: diff-equal-foreground: <> diff-insert-background: #aaefad -diff-insert-foreground: <> -diff-invisible-background: -diff-invisible-foreground: <> +diff-insert-foreground: <> +diff-invisible-background: #fdfcbd +diff-invisible-foreground: <> dirty-indicator: rgb(255, 94, 94) download-background: #19a974 download-foreground: rgb(38, 38, 38) diff --git a/core/ui/ViewTemplate/body/rendered-plain-text.tid b/core/ui/ViewTemplate/body/rendered-plain-text/css.tid similarity index 66% rename from core/ui/ViewTemplate/body/rendered-plain-text.tid rename to core/ui/ViewTemplate/body/rendered-plain-text/css.tid index d1dcc0f80d5..2e78bedcc0f 100644 --- a/core/ui/ViewTemplate/body/rendered-plain-text.tid +++ b/core/ui/ViewTemplate/body/rendered-plain-text/css.tid @@ -2,6 +2,7 @@ title: $:/core/ui/ViewTemplate/body/rendered-plain-text code-body: yes \whitespace trim +\parameters (language:"css") <$wikify name="text" text={{!!text}} type={{!!type}}> -<$codeblock code=<> language="css"/> +<$codeblock code=<> language=<>/> diff --git a/core/ui/ViewTemplate/body/rendered-plain-text/html.tid b/core/ui/ViewTemplate/body/rendered-plain-text/html.tid new file mode 100644 index 00000000000..d0742afcce8 --- /dev/null +++ b/core/ui/ViewTemplate/body/rendered-plain-text/html.tid @@ -0,0 +1,4 @@ +title: $:/core/ui/ViewTemplate/body/rendered-plain-text/html +code-body: yes + +{{||$:/core/ui/ViewTemplate/body/rendered-plain-text|html}} \ No newline at end of file diff --git a/core/wiki/config/ViewTemplateBodyFilters.multids b/core/wiki/config/ViewTemplateBodyFilters.multids index 90c127a0c96..8fdddd775bd 100644 --- a/core/wiki/config/ViewTemplateBodyFilters.multids +++ b/core/wiki/config/ViewTemplateBodyFilters.multids @@ -3,6 +3,7 @@ tags: $:/tags/ViewTemplateBodyFilter testcase: [tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]] [tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]] :then[[$:/core/ui/TestCaseTemplate]] stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]] +html: [tag[$:/tags/RawMarkupWikified]] [tag[$:/tags/RawMarkupWikified/TopHead]] [tag[$:/tags/RawMarkupWikified/TopBody]] [tag[$:/tags/RawMarkupWikified/BottomBody]] :then[[$:/core/ui/ViewTemplate/body/rendered-plain-text/html]] core-ui-tags: [tag[$:/tags/PageTemplate]] [tag[$:/tags/EditTemplate]] [tag[$:/tags/ViewTemplate]] [tag[$:/tags/KeyboardShortcut]] [tag[$:/tags/ImportPreview]] [tag[$:/tags/EditPreview]] [tag[$:/tags/EditorToolbar]] [tag[$:/EditorTools]] [tag[$:/tags/Actions]] [tag[$:/tags/ToolbarButtonStyle]] :then[[$:/core/ui/ViewTemplate/body/code]] system: [prefix[$:/boot/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/config/]] [prefix[$:/core/config/]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/info/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/temp/]] :and[!is[image]] :then[[$:/core/ui/ViewTemplate/body/code]] code-body: [field:code-body[yes]then[$:/core/ui/ViewTemplate/body/code]] diff --git a/core/wiki/macros/colour-picker.tid b/core/wiki/macros/colour-picker.tid index 7a607a5512a..3c37dc9b5a2 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 0ab9e20010c..835cddabe08 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 5f09ced0db6..5bda45bcaed 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 c9dd2ad71d6..a431d5ec51a 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 9cc46542280..34faaa78151 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]] %>