1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +00:00

Make tag-picker add-tag button more consistent II (#4313)

* Update tag-picker.tid

* Update tags.tid

* Update tag-picker.tid
This commit is contained in:
Simon Huber 2019-10-13 17:53:40 +02:00 committed by Jeremy Ruston
parent 9395d75671
commit 89728d8a9a
2 changed files with 5 additions and 15 deletions

View File

@ -25,21 +25,13 @@ color:$(foregroundColor)$;
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$"""/> <$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$"""/>
\end \end
\define tag-picker-actions()
<$action-listops
$tiddler=<<currentTiddler>>
$field="tags"
$subfilter="[<tag>] [all[current]tags[]]"
/>
\end
<div class="tc-edit-tags"> <div class="tc-edit-tags">
<$fieldmangler> <$fieldmangler>
<$list filter="[all[current]tags[]sort[title]]" storyview="pop"> <$list filter="[all[current]tags[]sort[title]]" storyview="pop">
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} icon={{!!icon}}/> <$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} icon={{!!icon}}/>
</$list> </$list>
</$fieldmangler>
<$set name="tabIndex" value={{$:/config/EditTabIndex}}> <$set name="tabIndex" value={{$:/config/EditTabIndex}}>
<$macrocall $name="tag-picker" actions=<<tag-picker-actions>>/> <$macrocall $name="tag-picker"/>
</$set> </$set>
</$fieldmangler>
</div> </div>

View File

@ -8,14 +8,13 @@ tags: $:/tags/Macro
\define tag-button() \define tag-button()
<$button class="tc-btn-invisible" tag="a" tooltip={{$:/language/EditTemplate/Tags/Add/Button/Hint}}> <$button class="tc-btn-invisible" tag="a" tooltip={{$:/language/EditTemplate/Tags/Add/Button/Hint}}>
$(actions)$ <$action-sendmessage $message="tm-add-tag" $param=<<tag>>/>
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> <$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
<$macrocall $name="tag-pill" tag=<<tag>>/> <$macrocall $name="tag-pill" tag=<<tag>>/>
</$button> </$button>
\end \end
\define tag-picker(actions) \define tag-picker()
<$set name="actions" value="""$actions$""">
<div class="tc-edit-add-tag"> <div class="tc-edit-add-tag">
<span class="tc-add-tag-name"> <span class="tc-add-tag-name">
<$keyboard key="ENTER" actions=<<add-tag-actions>>> <$keyboard key="ENTER" actions=<<add-tag-actions>>>
@ -24,7 +23,7 @@ $(actions)$
</span> <$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class="tc-add-tag-button"> </span> <$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class="tc-add-tag-button">
<$set name="tag" value={{$:/temp/NewTagName}}> <$set name="tag" value={{$:/temp/NewTagName}}>
<$button set="$:/temp/NewTagName" setTo="" class=""> <$button set="$:/temp/NewTagName" setTo="" class="">
$actions$ <<add-tag-actions>>
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> <$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
{{$:/language/EditTemplate/Tags/Add/Button}} {{$:/language/EditTemplate/Tags/Add/Button}}
</$button> </$button>
@ -46,5 +45,4 @@ $actions$
</div> </div>
</$reveal> </$reveal>
</div> </div>
</$set>
\end \end