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 messageField()
message-$(currentTiddler)$
message-$(payloadTiddler)$
\end
\define selectionField()
selection-$(currentTiddler)$
selection-$(payloadTiddler)$
\end
<table>
<tbody>
@ -20,18 +20,18 @@ selection-$(currentTiddler)$
<<lingo Listing/Status/Caption>>
</th>
</tr>
<$list filter="[all[current]plugintiddlers[]sort[title]]">
<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
<tr>
<td>
<$checkbox tiddler=<<storyTiddler>> field=<<selectionField>> checked="checked" unchecked="unchecked" default="checked"/>
<$checkbox field=<<selectionField>> checked="checked" unchecked="unchecked" default="checked"/>
</td>
<td>
<$link to={{!!title}}>
<$view field="title"/>
<$link to=<<payloadTiddler>>>
<$text text=<<payloadTiddler>>/>
</$link>
</td>
<td>
<$view tiddler=<<storyTiddler>> field=<<messageField>>/>
<$view field=<<messageField>>/>
</td>
</tr>
</$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>
<$set name="storyTiddler" value="$:/Import">
{{$:/Import||$:/core/ui/ImportListing}}
</$set>
</$reveal>
<$reveal state="$:/Import!!status" type="match" text="complete">