mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-18 07:44:51 +00:00
ffae85140f
We were deleting the wrong tiddler
50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
title: $:/core/ui/EditorToolbar/excise-dropdown
|
|
|
|
\define lingo-base() $:/language/Buttons/Excise/
|
|
|
|
\define body(config-title)
|
|
''<<lingo Hint>>''
|
|
|
|
<<lingo Caption/NewTitle>> <$edit-text tag="input" tiddler="$config-title$/new-title" default="" focus="true"/>
|
|
|
|
<$set name="new-title" value={{$config-title$/new-title}}>
|
|
<$list filter="""[<new-title>is[tiddler]]""">
|
|
<div class="tc-error">
|
|
<<lingo Caption/TiddlerExists>>
|
|
</div>
|
|
</$list>
|
|
</$set>
|
|
|
|
<$checkbox tiddler="""$config-title$/tagnew""" field="text" checked="yes" unchecked="no" default="false"> <<lingo Caption/Tag>></$checkbox>
|
|
|
|
<<lingo Caption/Replace>> <$select tiddler="""$config-title$/type""" default="transclude">
|
|
<option value="link"><<lingo Caption/Replace/Link>></option>
|
|
<option value="transclude"><<lingo Caption/Replace/Transclusion>></option>
|
|
<option value="macro"><<lingo Caption/Replace/Macro>></option>
|
|
</$select>
|
|
|
|
<$reveal state="""$config-title$/type""" type="match" text="macro">
|
|
<<lingo Caption/MacroName>> <$edit-text tag="input" tiddler="""$config-title$/macro-title""" default="translink"/>
|
|
</$reveal>
|
|
|
|
<$button>
|
|
<$action-sendmessage
|
|
$message="tm-edit-text-operation"
|
|
$param="excise"
|
|
title={{$config-title$/new-title}}
|
|
type={{$config-title$/type}}
|
|
macro={{$config-title$/macro-title}}
|
|
tagnew={{$config-title$/tagnew}}
|
|
/>
|
|
<$action-deletetiddler
|
|
$tiddler="$config-title$/new-title"
|
|
/>
|
|
<$action-deletetiddler
|
|
$tiddler=<<dropdown-state>>
|
|
/>
|
|
<<lingo Caption/Excise>>
|
|
</$button>
|
|
\end
|
|
|
|
<$macrocall $name="body" config-title=<<qualify "$:/state/Excise/">>/>
|