Add 'more' toolbar button

This commit is contained in:
Jermolene 2014-07-28 11:29:06 +01:00
parent 497d9812c8
commit ad4db0de97
4 changed files with 53 additions and 7 deletions

View File

@ -20,6 +20,8 @@ Info/Caption: info
Info/Hint: Show information for this tiddler
NewTiddler/Caption: new tiddler
NewTiddler/Hint: Create a new tiddler
More/Caption: more
More/Hint: More actions
Permalink/Caption: permalink
Permalink/Hint: Set browser address bar to a direct link to this tiddler
Permaview/Caption: permaview

View File

@ -0,0 +1,28 @@
title: $:/core/ui/ViewToolbar/more
tags: $:/tags/ViewToolbar
\define config-title()
$:/config/Buttons/Hide/$(listItem)$
\end
<$button popup=<<qualify "$:/state/popup/more">> title={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class="btn-invisible">
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/down-arrow}}
</$list>
<$list filter="[<tw-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/More/Caption}}/>
</$list>
</$button>
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
<div class="tw-drop-down">
<$set name="tw-config-toolbar-icons" value="yes">
<$set name="tw-config-toolbar-text" value="yes">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/ViewToolbar/more]]" variable="listItem">
<$reveal type="match" state=<<config-title>> text="yes">
<$transclude tiddler=<<listItem>>/>
</$reveal>
</$list>
</$set>
</$set>
</div>
</$reveal>

View File

@ -1,2 +1,2 @@
title: $:/tags/ViewToolbar
list: [[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/close]]
list: [[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/clone]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/permalink]] [[$:/core/ui/ViewToolbar/permaview]] [[$:/core/ui/ViewToolbar/close-others]] [[$:/core/ui/ViewToolbar/close]] [[$:/core/ui/ViewToolbar/more]]

View File

@ -276,6 +276,7 @@ a.tw-tiddlylink-external:hover {
.tw-image-button {
height: 1em;
width: 1em;
}
/*
@ -392,6 +393,11 @@ a.tw-tiddlylink-external:hover {
.tw-page-controls {
margin-top: 14px;
font-size: 1.5em;
}
.tw-page-controls button {
margin-right: 0.5em;
}
.tw-page-controls a.tw-tiddlylink:hover {
@ -399,9 +405,6 @@ a.tw-tiddlylink-external:hover {
}
.tw-page-controls svg {
height: 1.75em;
min-width: 1px;
padding-right: 0.5em;
fill: <<colour sidebar-controls-foreground>>;
}
@ -603,8 +606,11 @@ a.tw-tiddlylink-external:hover {
float: right;
}
.tw-tiddler-controls .tw-drop-down {
font-size: 0.6em;
}
.tw-tiddler-controls button {
margin: 0 0 0 5px;
vertical-align: baseline;
}
@ -844,16 +850,26 @@ canvas.tw-edit-bitmapeditor {
white-space: nowrap;
}
.tw-drop-down button svg {
fill: <<colour foreground>>;
}
.tw-drop-down button.btn-invisible:hover svg {
fill: <<colour foreground>>;
}
.tw-drop-down p {
padding: 0 14px 0 14px;
}
.tw-drop-down a {
.tw-drop-down a, .tw-drop-down button {
display: block;
padding: 0 14px 0 14px;
width: 100%;
text-align: left;
}
.tw-drop-down a:hover {
.tw-drop-down a:hover, .tw-drop-down button:hover {
color: <<colour tiddler-link-background>>;
background-color: <<colour tiddler-link-foreground>>;
text-decoration: none;