From 497d9812c8973b24b7e700c210de8d60bf0788ac Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 27 Jul 2014 11:43:26 +0100 Subject: [PATCH] More buttons for the view toolbar The arrangement of disabling and enabling buttons within the tiddler info panel is temporary. --- core/images/clone-button.tid | 9 +++++++++ core/images/close-others-button.tid | 8 ++++++++ core/images/permalink-button.tid | 8 ++++++++ core/images/permaview-button.tid | 10 ++++++++++ core/ui/TiddlerInfo.tid | 18 +++++++++++++++++- core/ui/ViewTemplate/title.tid | 5 ++++- core/ui/ViewToolbar/clone.tid | 11 +++++++++++ core/ui/ViewToolbar/close-others.tid | 11 +++++++++++ core/ui/ViewToolbar/edit.tid | 9 ++++++++- core/ui/ViewToolbar/info.tid | 9 ++++++++- core/ui/ViewToolbar/permalink.tid | 11 +++++++++++ core/ui/ViewToolbar/permaview.tid | 11 +++++++++++ core/wiki/config/ButtonsHide.multids | 6 ++++++ 13 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 core/images/clone-button.tid create mode 100644 core/images/close-others-button.tid create mode 100644 core/images/permalink-button.tid create mode 100644 core/images/permaview-button.tid create mode 100644 core/ui/ViewToolbar/clone.tid create mode 100644 core/ui/ViewToolbar/close-others.tid create mode 100644 core/ui/ViewToolbar/permalink.tid create mode 100644 core/ui/ViewToolbar/permaview.tid create mode 100644 core/wiki/config/ButtonsHide.multids diff --git a/core/images/clone-button.tid b/core/images/clone-button.tid new file mode 100644 index 000000000..ecea96c31 --- /dev/null +++ b/core/images/clone-button.tid @@ -0,0 +1,9 @@ +title: $:/core/images/clone-button +tags: $:/tags/Image + + + + + + + \ No newline at end of file diff --git a/core/images/close-others-button.tid b/core/images/close-others-button.tid new file mode 100644 index 000000000..5bc26ca28 --- /dev/null +++ b/core/images/close-others-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/close-others-button +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/permalink-button.tid b/core/images/permalink-button.tid new file mode 100644 index 000000000..118b2f495 --- /dev/null +++ b/core/images/permalink-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/permalink-button +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/permaview-button.tid b/core/images/permaview-button.tid new file mode 100644 index 000000000..2684406b9 --- /dev/null +++ b/core/images/permaview-button.tid @@ -0,0 +1,10 @@ +title: $:/core/images/permaview-button +tags: $:/tags/Image + + + + + + + + \ No newline at end of file diff --git a/core/ui/TiddlerInfo.tid b/core/ui/TiddlerInfo.tid index 6df90a05d..eb820593b 100644 --- a/core/ui/TiddlerInfo.tid +++ b/core/ui/TiddlerInfo.tid @@ -1,5 +1,21 @@ title: $:/core/ui/TiddlerInfo -<$button message="tw-permalink" title={{$:/language/Buttons/Permalink/Hint}} aria-label={{$:/language/Buttons/Permalink/Caption}}>{{$:/language/Buttons/Permalink/Caption}} <$button message="tw-permaview" title={{$:/language/Buttons/Permaview/Hint}} aria-label={{$:/language/Buttons/Permaview/Caption}}>{{$:/language/Buttons/Permaview/Caption}} <$button message="tw-new-tiddler" param=<> title={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}}>{{$:/language/Buttons/Clone/Caption}} <$button message="tw-close-other-tiddlers" param=<> title={{$:/language/Buttons/CloseOthers/Hint}} aria-label={{$:/language/Buttons/CloseOthers/Caption}}>{{$:/language/Buttons/CloseOthers/Caption}} +\define config-title() +$:/config/Buttons/Hide/$(listItem)$ +\end + +<$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]]" variable="listItem"> + +<$transclude tiddler=<>/> (<$checkbox tiddler=<> field="text" checked="no" unchecked="yes" default="no"> Show in toolbar) + + + + + + <> diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 2193f8deb..d24c9f11f 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -4,10 +4,13 @@ tags: $:/tags/ViewTemplate \define title-styles() fill:$(foregroundColor)$; \end +\define config-title() +$:/config/Buttons/Hide/$(listItem)$ +\end

-<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<> text="yes"><$transclude tiddler=<>/> <$set name="foregroundColor" value={{!!color}}> >> diff --git a/core/ui/ViewToolbar/clone.tid b/core/ui/ViewToolbar/clone.tid new file mode 100644 index 000000000..7e4899e1a --- /dev/null +++ b/core/ui/ViewToolbar/clone.tid @@ -0,0 +1,11 @@ +title: $:/core/ui/ViewToolbar/clone +tags: $:/tags/ViewToolbar + +<$button message="tw-new-tiddler" param=<> title={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}} class="btn-invisible"> +<$list filter="[prefix[yes]]"> +{{$:/core/images/clone-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Clone/Caption}}/> + + diff --git a/core/ui/ViewToolbar/close-others.tid b/core/ui/ViewToolbar/close-others.tid new file mode 100644 index 000000000..2cd3789a4 --- /dev/null +++ b/core/ui/ViewToolbar/close-others.tid @@ -0,0 +1,11 @@ +title: $:/core/ui/ViewToolbar/close-others +tags: $:/tags/ViewToolbar + +<$button message="tw-close-other-tiddlers" param=<> title={{$:/language/Buttons/CloseOthers/Hint}} aria-label={{$:/language/Buttons/CloseOthers/Caption}} class="btn-invisible"> +<$list filter="[prefix[yes]]"> +{{$:/core/images/close-others-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/CloseOthers/Caption}}/> + + diff --git a/core/ui/ViewToolbar/edit.tid b/core/ui/ViewToolbar/edit.tid index ac398358a..38cfa3220 100644 --- a/core/ui/ViewToolbar/edit.tid +++ b/core/ui/ViewToolbar/edit.tid @@ -1,4 +1,11 @@ title: $:/core/ui/ViewToolbar/edit tags: $:/tags/ViewToolbar -<$button message="tw-edit-tiddler" title={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class="btn-invisible">{{$:/core/images/edit-button}} \ No newline at end of file +<$button message="tw-edit-tiddler" title={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class="btn-invisible"> +<$list filter="[prefix[yes]]"> +{{$:/core/images/edit-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Edit/Caption}}/> + + diff --git a/core/ui/ViewToolbar/info.tid b/core/ui/ViewToolbar/info.tid index 2fc1c8ab8..faa4189a1 100644 --- a/core/ui/ViewToolbar/info.tid +++ b/core/ui/ViewToolbar/info.tid @@ -1,4 +1,11 @@ title: $:/core/ui/ViewToolbar/info tags: $:/tags/ViewToolbar -<$button popup=<> title={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}} \ No newline at end of file +<$button popup=<> title={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class="btn-invisible" selectedClass="tw-selected"> +<$list filter="[prefix[yes]]"> +{{$:/core/images/info-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Info/Caption}}/> + + diff --git a/core/ui/ViewToolbar/permalink.tid b/core/ui/ViewToolbar/permalink.tid new file mode 100644 index 000000000..6ef6810b1 --- /dev/null +++ b/core/ui/ViewToolbar/permalink.tid @@ -0,0 +1,11 @@ +title: $:/core/ui/ViewToolbar/permalink +tags: $:/tags/ViewToolbar + +<$button message="tw-permalink" title={{$:/language/Buttons/Permalink/Hint}} aria-label={{$:/language/Buttons/Permalink/Caption}} class="btn-invisible"> +<$list filter="[prefix[yes]]"> +{{$:/core/images/permalink-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Permalink/Caption}}/> + + diff --git a/core/ui/ViewToolbar/permaview.tid b/core/ui/ViewToolbar/permaview.tid new file mode 100644 index 000000000..137d4e8c5 --- /dev/null +++ b/core/ui/ViewToolbar/permaview.tid @@ -0,0 +1,11 @@ +title: $:/core/ui/ViewToolbar/permaview +tags: $:/tags/ViewToolbar + +<$button message="tw-permaview" title={{$:/language/Buttons/Permaview/Hint}} aria-label={{$:/language/Buttons/Permaview/Caption}} class="btn-invisible"> +<$list filter="[prefix[yes]]"> +{{$:/core/images/permaview-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Permaview/Caption}}/> + + diff --git a/core/wiki/config/ButtonsHide.multids b/core/wiki/config/ButtonsHide.multids new file mode 100644 index 000000000..a0d09f8c9 --- /dev/null +++ b/core/wiki/config/ButtonsHide.multids @@ -0,0 +1,6 @@ +title: $:/config/Buttons/Hide/$:/ + +core/ui/ViewToolbar/permalink: yes +core/ui/ViewToolbar/permaview: yes +core/ui/ViewToolbar/close-others: yes +core/ui/ViewToolbar/clone: yes