kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix problem with formatting toolbar dropdowns
Cruft left over from the last big refactoring…print-window-tiddler
rodzic
0151363b74
commit
6f6cdc1bd0
|
@ -1,11 +1,13 @@
|
|||
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"/>
|
||||
<<lingo Caption/NewTitle>> <$edit-text tag="input" tiddler="$config-title$/new-title" default="" focus="true"/>
|
||||
|
||||
<$set name="new-title" value={{$(config-title)$/new-title}}>
|
||||
<$set name="new-title" value={{$config-title$/new-title}}>
|
||||
<$list filter="""[<new-title>is[tiddler]]""">
|
||||
<div class="tc-error">
|
||||
<<lingo Caption/TiddlerExists>>
|
||||
|
@ -13,33 +15,35 @@ title: $:/core/ui/EditorToolbar/excise-dropdown
|
|||
</$list>
|
||||
</$set>
|
||||
|
||||
<$checkbox tiddler="""$(config-title)$/tagnew""" field="text" checked="yes" unchecked="no" default="false"> <<lingo Caption/Tag>></$checkbox>
|
||||
<$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">
|
||||
<<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 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}}
|
||||
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"""
|
||||
$tiddler=<<qualify "$:/state/Excise/NewTitle">>
|
||||
/>
|
||||
<$action-deletetiddler
|
||||
$tiddler=<<dropdown-state>>
|
||||
/>
|
||||
<<lingo Caption/Excise>>
|
||||
</$button>
|
||||
\end
|
||||
|
||||
<$macrocall $name="body" config-title=<<qualify "$:/state/Excise/">>/>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
title: $:/core/ui/EditorToolbar/size-dropdown
|
||||
|
||||
\define lingo-base() $:/language/Buttons/Size/
|
||||
\define toolbar-button-size-preset()
|
||||
|
||||
\define toolbar-button-size-preset(config-title)
|
||||
<$set name="width" filter="$(sizePair)$ +[first[]]">
|
||||
|
||||
<$set name="height" filter="$(sizePair)$ +[last[]]">
|
||||
|
@ -9,17 +10,17 @@ title: $:/core/ui/EditorToolbar/size-dropdown
|
|||
<$button tag="a">
|
||||
|
||||
<$action-setfield
|
||||
$tiddler="""$(config-title)$/new-width"""
|
||||
$tiddler="""$config-title$/new-width"""
|
||||
$value=<<width>>
|
||||
/>
|
||||
|
||||
<$action-setfield
|
||||
$tiddler="""$(config-title)$/new-height"""
|
||||
$tiddler="""$config-title$/new-height"""
|
||||
$value=<<height>>
|
||||
/>
|
||||
|
||||
<$action-deletetiddler
|
||||
$tiddler="""$(config-title)$/presets-popup"""
|
||||
$tiddler="""$config-title$/presets-popup"""
|
||||
/>
|
||||
|
||||
<$text text=<<width>>/> × <$text text=<<height>>/>
|
||||
|
@ -31,20 +32,20 @@ title: $:/core/ui/EditorToolbar/size-dropdown
|
|||
</$set>
|
||||
\end
|
||||
|
||||
\define toolbar-button-size()
|
||||
\define toolbar-button-size(config-title)
|
||||
''{{$:/language/Buttons/Size/Hint}}''
|
||||
|
||||
<<lingo Caption/Width>> <$edit-text tag="input" tiddler="""$(config-title)$/new-width""" default=<<tv-bitmap-editor-width>> focus="true" size="8"/> <<lingo Caption/Height>> <$edit-text tag="input" tiddler="""$(config-title)$/new-height""" default=<<tv-bitmap-editor-height>> size="8"/> <$button popup="""$(config-title)$/presets-popup""" class="tc-btn-invisible tc-popup-keep" style="width: auto; display: inline-block; background-colour: inherit;" selectedClass="tc-selected">
|
||||
<<lingo Caption/Width>> <$edit-text tag="input" tiddler="""$config-title$/new-width""" default=<<tv-bitmap-editor-width>> focus="true" size="8"/> <<lingo Caption/Height>> <$edit-text tag="input" tiddler="""$config-title$/new-height""" default=<<tv-bitmap-editor-height>> size="8"/> <$button popup="""$config-title$/presets-popup""" class="tc-btn-invisible tc-popup-keep" style="width: auto; display: inline-block; background-colour: inherit;" selectedClass="tc-selected">
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
|
||||
<$reveal tag="span" state="""$(config-title)$/presets-popup""" type="popup" position="belowleft" animate="yes">
|
||||
<$reveal tag="span" state="""$config-title$/presets-popup""" type="popup" position="belowleft" animate="yes">
|
||||
|
||||
<div class="tc-drop-down tc-popup-keep">
|
||||
|
||||
<$list filter={{$:/config/BitmapEditor/ImageSizes}} variable="sizePair">
|
||||
|
||||
<<toolbar-button-size-preset>>
|
||||
<$macrocall $name="toolbar-button-size-preset" config-title="$config-title$"/>
|
||||
|
||||
</$list>
|
||||
|
||||
|
@ -56,14 +57,14 @@ title: $:/core/ui/EditorToolbar/size-dropdown
|
|||
<$action-sendmessage
|
||||
$message="tm-edit-bitmap-operation"
|
||||
$param="resize"
|
||||
width={{$(config-title)$/new-width}}
|
||||
height={{$(config-title)$/new-height}}
|
||||
width={{$config-title$/new-width}}
|
||||
height={{$config-title$/new-height}}
|
||||
/>
|
||||
<$action-deletetiddler
|
||||
$tiddler="""$(config-title)$/new-width"""
|
||||
$tiddler="""$config-title$/new-width"""
|
||||
/>
|
||||
<$action-deletetiddler
|
||||
$tiddler="""$(config-title)$/new-height"""
|
||||
$tiddler="""$config-title$/new-height"""
|
||||
/>
|
||||
<$action-deletetiddler
|
||||
$tiddler=<<dropdown-state>>
|
||||
|
@ -72,4 +73,4 @@ title: $:/core/ui/EditorToolbar/size-dropdown
|
|||
</$button>
|
||||
\end
|
||||
|
||||
<<toolbar-button-size>>
|
||||
<$macrocall $name="toolbar-button-size" config-title=<<qualify "$:/state/Size/">>/>
|
||||
|
|
|
@ -57,8 +57,8 @@ An example can be seen in [[$:/core/ui/EditorToolbar/size-dropdown]]:
|
|||
<$action-sendmessage
|
||||
$message="tm-edit-bitmap-operation"
|
||||
$param="resize"
|
||||
width={{$(config-title)$/new-width}}
|
||||
height={{$(config-title)$/new-height}}
|
||||
width={{$config-title$/new-width}}
|
||||
height={{$config-title$/new-height}}
|
||||
/>
|
||||
...
|
||||
Resize
|
||||
|
|
Ładowanie…
Reference in New Issue