1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +00:00

Refactor ImportListing

Better to avoid relying on the storyTiddler variable, which is a pain
for people trying to reuse the import listing.
This commit is contained in:
Jermolene 2014-07-16 20:31:10 +01:00
parent cee81ed44b
commit 7a034560d1
2 changed files with 7 additions and 11 deletions

View File

@ -2,10 +2,10 @@ title: $:/core/ui/ImportListing
\define lingo-base() $:/language/Import/ \define lingo-base() $:/language/Import/
\define messageField() \define messageField()
message-$(currentTiddler)$ message-$(payloadTiddler)$
\end \end
\define selectionField() \define selectionField()
selection-$(currentTiddler)$ selection-$(payloadTiddler)$
\end \end
<table> <table>
<tbody> <tbody>
@ -20,18 +20,18 @@ selection-$(currentTiddler)$
<<lingo Listing/Status/Caption>> <<lingo Listing/Status/Caption>>
</th> </th>
</tr> </tr>
<$list filter="[all[current]plugintiddlers[]sort[title]]"> <$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
<tr> <tr>
<td> <td>
<$checkbox tiddler=<<storyTiddler>> field=<<selectionField>> checked="checked" unchecked="unchecked" default="checked"/> <$checkbox field=<<selectionField>> checked="checked" unchecked="unchecked" default="checked"/>
</td> </td>
<td> <td>
<$link to={{!!title}}> <$link to=<<payloadTiddler>>>
<$view field="title"/> <$text text=<<payloadTiddler>>/>
</$link> </$link>
</td> </td>
<td> <td>
<$view tiddler=<<storyTiddler>> field=<<messageField>>/> <$view field=<<messageField>>/>
</td> </td>
</tr> </tr>
</$list> </$list>

View File

@ -25,12 +25,8 @@ or click to pick a file <$browse/>
The following tiddlers will be included in the upgrade <$button message="tw-perform-import" param="$:/Import">Upgrade</$button> The following tiddlers will be included in the upgrade <$button message="tw-perform-import" param="$:/Import">Upgrade</$button>
<$set name="storyTiddler" value="$:/Import">
{{$:/Import||$:/core/ui/ImportListing}} {{$:/Import||$:/core/ui/ImportListing}}
</$set>
</$reveal> </$reveal>
<$reveal state="$:/Import!!status" type="match" text="complete"> <$reveal state="$:/Import!!status" type="match" text="complete">