mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10: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:
parent
cee81ed44b
commit
7a034560d1
@ -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>
|
||||
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user