2016-04-22 07:36:29 +00:00
|
|
|
title: $:/core/ui/EditTemplate/body/toolbar/button
|
|
|
|
|
|
|
|
\define toolbar-button-icon()
|
2016-05-11 17:09:54 +00:00
|
|
|
<$list
|
|
|
|
|
|
|
|
filter="[all[current]!has[custom-icon]]"
|
|
|
|
variable="no-custom-icon"
|
|
|
|
|
|
|
|
><$transclude
|
|
|
|
|
|
|
|
tiddler={{!!icon}}
|
|
|
|
|
|
|
|
/></$list>
|
2016-04-22 07:36:29 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
\define toolbar-button-tooltip()
|
|
|
|
{{!!description}}<$macrocall $name="displayshortcuts" $output="text/plain" shortcuts={{!!shortcuts}} prefix="` - [" separator="] [" suffix="]`"/>
|
|
|
|
\end
|
|
|
|
|
|
|
|
\define toolbar-button()
|
2016-05-11 17:09:54 +00:00
|
|
|
<$list
|
|
|
|
|
|
|
|
filter={{!!condition}}
|
|
|
|
variable="list-condition"
|
|
|
|
|
|
|
|
><$wikify
|
|
|
|
|
|
|
|
name="tooltip-text"
|
|
|
|
text=<<toolbar-button-tooltip>>
|
|
|
|
mode="inline"
|
|
|
|
output="text"
|
|
|
|
|
|
|
|
><$list
|
|
|
|
|
|
|
|
filter="[all[current]!has[dropdown]]"
|
|
|
|
variable="no-dropdown"
|
|
|
|
|
2021-04-25 15:17:32 +00:00
|
|
|
><$set name=disabled filter={{!!condition-disabled}}><$button
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
class="tc-btn-invisible $(buttonClasses)$"
|
|
|
|
tooltip=<<tooltip-text>>
|
2018-06-29 14:09:34 +00:00
|
|
|
actions={{!!actions}}
|
2021-04-25 15:17:32 +00:00
|
|
|
disabled=<<disabled>>
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
><span
|
|
|
|
|
2021-04-25 15:17:32 +00:00
|
|
|
data-tw-keyboard-shortcut={{{ [<disabled>match[yes]then[]else{!!shortcuts}] }}}
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
/><<toolbar-button-icon>><$transclude
|
|
|
|
|
|
|
|
tiddler=<<currentTiddler>>
|
|
|
|
field="text"
|
|
|
|
|
2021-04-25 15:17:32 +00:00
|
|
|
/></$button></$set></$list><$list
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
filter="[all[current]has[dropdown]]"
|
|
|
|
variable="dropdown"
|
|
|
|
|
|
|
|
><$set
|
|
|
|
|
|
|
|
name="dropdown-state"
|
|
|
|
value=<<qualify "$:/state/EditorToolbarDropdown">>
|
|
|
|
|
2021-04-25 15:17:32 +00:00
|
|
|
><$set name=disabled filter={{!!condition-disabled}}><$button
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
popup=<<dropdown-state>>
|
|
|
|
class="tc-popup-keep tc-btn-invisible $(buttonClasses)$"
|
|
|
|
selectedClass="tc-selected"
|
|
|
|
tooltip=<<tooltip-text>>
|
2018-06-29 14:09:34 +00:00
|
|
|
actions={{!!actions}}
|
2021-04-25 15:17:32 +00:00
|
|
|
disabled=<<disabled>>
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
><span
|
|
|
|
|
2021-04-25 15:17:32 +00:00
|
|
|
data-tw-keyboard-shortcut={{{ [<disabled>match[yes]then[]else{!!shortcuts}] }}}
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
/><<toolbar-button-icon>><$transclude
|
|
|
|
|
|
|
|
tiddler=<<currentTiddler>>
|
|
|
|
field="text"
|
|
|
|
|
2021-04-25 15:17:32 +00:00
|
|
|
/></$button></$set><$reveal
|
2016-05-11 17:09:54 +00:00
|
|
|
|
|
|
|
state=<<dropdown-state>>
|
|
|
|
type="popup"
|
|
|
|
position="below"
|
|
|
|
animate="yes"
|
|
|
|
tag="span"
|
|
|
|
|
|
|
|
><div
|
|
|
|
|
|
|
|
class="tc-drop-down tc-popup-keep"
|
|
|
|
|
|
|
|
><$transclude
|
|
|
|
|
|
|
|
tiddler={{!!dropdown}}
|
|
|
|
mode="block"
|
|
|
|
|
|
|
|
/></div></$reveal></$set></$list></$wikify></$list>
|
2016-04-22 07:36:29 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
\define toolbar-button-outer()
|
2016-05-11 17:09:54 +00:00
|
|
|
<$set
|
|
|
|
|
|
|
|
name="buttonClasses"
|
|
|
|
value={{!!button-classes}}
|
|
|
|
|
|
|
|
><<toolbar-button>></$set>
|
2016-04-22 07:36:29 +00:00
|
|
|
\end
|
|
|
|
|
2016-05-11 17:09:54 +00:00
|
|
|
<<toolbar-button-outer>>
|