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

Make the toolbars be tag driven

This commit is contained in:
Jermolene 2013-11-17 21:53:39 +00:00
parent 3b35d7dfe4
commit b117f74666
17 changed files with 51 additions and 6 deletions

View File

@ -1,4 +1,4 @@
title: $:/core/ui/EditTemplate/controls
tags: $:/tags/EditTemplate
<span class="tw-tiddler-controls titlebar"> <$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button> <$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button> <$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button> </span>
<span class="tw-tiddler-controls titlebar"> <$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> </span>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/EditToolbar/cancel
tags: $:/tags/EditToolbar
<$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/EditToolbar/delete
tags: $:/tags/EditToolbar
<$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/EditToolbar/save
tags: $:/tags/EditToolbar
<$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/PageControls/control-panel
tags: $:/tags/PageControls
<$link to="$:/ControlPanel">{{$:/core/images/options-button}}</$link>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/PageControls/new-tiddler
tags: $:/tags/PageControls
<$button message="tw-new-tiddler" class="btn-invisible">{{$:/core/images/new-button}}</$button>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/PageControls/save-wiki
tags: $:/tags/PageControls
<$button message="tw-save-wiki" class="btn-invisible">{{$:/core/images/save-button}}</$button>

View File

@ -15,7 +15,7 @@ title: $:/core/ui/PageTemplate
<header class="sidebar-header"><div class="titlebar">{{SiteTitle}}</div><div class="tw-subtitle">{{SiteSubtitle}}</div>
<div class="tw-page-controls">
<$button message="tw-new-tiddler" class="btn-invisible">{{$:/core/images/new-button}}</$button><$link to="$:/ControlPanel">{{$:/core/images/options-button}}</$link><$button message="tw-save-wiki" class="btn-invisible">{{$:/core/images/save-button}}</$button>
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [!is[shadow]!has[draft.of]tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>
{{$:/core/ui/SideBar}}

View File

@ -4,6 +4,6 @@ modifier: JeremyRuston
\define frame-classes()
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
\end
<$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
<$set name="tiddlerInfoState" value=<<qualify "$:/state/tiddlerInfo">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>
</$tiddler>
</$tiddler></$set>

View File

@ -4,11 +4,11 @@ tags: $:/tags/ViewTemplate
\define title-styles()
fill:$(foregroundColor)$;
\end
<div class="tw-tiddler-title"><div class="titlebar"><span class="tw-tiddler-controls"><$button popup=<<qualify "$:/state/tiddlerInfo">> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button><$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button><$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>
<div class="tw-tiddler-title"><div class="titlebar"><span class="tw-tiddler-controls"><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</span><$set name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude tiddler={{!!icon}}/></span></$set> <span class="title"><$view field="title"/></span></div>
<$reveal type="nomatch" text="" default="" state=<<qualify "$:/state/tiddlerInfo">> class="tw-tiddler-info tw-popup" animate="yes">
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tw-tiddler-info tw-popup" animate="yes">
<$transclude tiddler="$:/core/ui/TiddlerInfo"/>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/ViewToolbar/close
tags: $:/tags/ViewToolbar
<$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/ViewToolbar/edit
tags: $:/tags/ViewToolbar
<$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/ViewToolbar/info
tags: $:/tags/ViewToolbar
<$button popup=<<tiddlerInfoState>> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button>

View File

@ -0,0 +1,2 @@
title: $:/tags/EditToolbar
list: [[$:/core/ui/EditToolbar/delete]] [[$:/core/ui/EditToolbar/cancel]] [[$:/core/ui/EditToolbar/save]]

View File

@ -0,0 +1,2 @@
title: $:/tags/PageControls
list: [[$:/core/ui/PageControls/new-tiddler]] [[$:/core/ui/PageControls/control-panel]] [[$:/core/ui/PageControls/save-wiki]]

View File

@ -0,0 +1,2 @@
title: $:/tags/ViewToolbar
list: [[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/close]]

View File

@ -19,7 +19,10 @@ This release has several bug fixes and improvements:
* For http://five.tiddlywiki.com, add a tiddler info tab with a link to the static representation of the tiddler
* Improve the popup mechanism so that the tiddler info panel doesn't close so easily
* Make more UI elements extensible via system tags:
** [[$:/tags/ViewToolbar]] for the view mode tiddler toolbar
** [[$:/tags/EditTemplate]] for the edit template
** [[$:/tags/EditToolbar]] for the edit mode tiddler toolbar
** [[$:/tags/PageControls]] for the page control tools in the sidebar
* Various improvements for working with TiddlyWeb, including:
** Updated control panel
* Fixed the module type names in the internal tab of the control panel