From ad4db0de97db003517dafca7d7596f878455fa09 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 28 Jul 2014 11:29:06 +0100 Subject: [PATCH] Add 'more' toolbar button --- core/language/en-GB/Buttons.multids | 2 ++ core/ui/ViewToolbar/more.tid | 28 ++++++++++++++++++++++++++++ core/wiki/tags/ViewToolbar.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 28 ++++++++++++++++++++++------ 4 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 core/ui/ViewToolbar/more.tid diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index db809317a..14a5b4382 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -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 diff --git a/core/ui/ViewToolbar/more.tid b/core/ui/ViewToolbar/more.tid new file mode 100644 index 000000000..a8742fcd6 --- /dev/null +++ b/core/ui/ViewToolbar/more.tid @@ -0,0 +1,28 @@ +title: $:/core/ui/ViewToolbar/more +tags: $:/tags/ViewToolbar + +\define config-title() +$:/config/Buttons/Hide/$(listItem)$ +\end +<$button popup=<> title={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class="btn-invisible"> +<$list filter="[prefix[yes]]"> +{{$:/core/images/down-arrow}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/More/Caption}}/> + + +<$reveal state=<> type="popup" position="below" animate="yes"> +
+<$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=<> text="yes"> +<$transclude tiddler=<>/> + + + + +
+ + diff --git a/core/wiki/tags/ViewToolbar.tid b/core/wiki/tags/ViewToolbar.tid index e64d0c90f..b850bc344 100644 --- a/core/wiki/tags/ViewToolbar.tid +++ b/core/wiki/tags/ViewToolbar.tid @@ -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]] diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 508bbfca7..aefe6b734 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -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: <>; } @@ -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: <>; +} + +.tw-drop-down button.btn-invisible:hover svg { + fill: <>; +} + .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: <>; background-color: <>; text-decoration: none;