From 2b6514ddc26e5dcd5aeccb6574cdc482713468b4 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 18 Nov 2018 11:54:12 +0100 Subject: [PATCH] Use new state* attributes for reveal and button widgets (#3531) * toc macros: use stateTitle and setTitle * tree macros: use stateTitle and setTitle * TagManager: use popupTitle, stateTitle setTitle * body viewtemplate: use stateTitle for folded-state * import-listings: use stateTitle and setTitle --- core/ui/ImportListing.tid | 10 ++++---- core/ui/TagManager.tid | 14 +++++------ core/ui/ViewTemplate/body.tid | 4 ++-- core/wiki/macros/toc.tid | 44 +++++++++++++++++------------------ core/wiki/macros/tree.tid | 10 ++++---- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/core/ui/ImportListing.tid b/core/ui/ImportListing.tid index ddf49a8ce..22ad2ace4 100644 --- a/core/ui/ImportListing.tid +++ b/core/ui/ImportListing.tid @@ -41,13 +41,13 @@ $(currentTiddler)$!!popup-$(payloadTiddler)$ <$checkbox field=<> checked="checked" unchecked="unchecked" default="checked"/> -<$reveal type="nomatch" state=<> text="yes" tag="div"> -<$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="yes"> +<$reveal type="nomatch" stateTitle=<> text="yes" tag="div"> +<$button class="tc-btn-invisible tc-btn-dropdown" setTitle=<> setTo="yes"> {{$:/core/images/right-arrow}} <$text text=<>/> -<$reveal type="match" state=<> text="yes" tag="div"> -<$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="no"> +<$reveal type="match" stateTitle=<> text="yes" tag="div"> +<$button class="tc-btn-invisible tc-btn-dropdown" setTitle=<> setTo="no"> {{$:/core/images/down-arrow}} <$text text=<>/> @@ -58,7 +58,7 @@ $(currentTiddler)$!!popup-$(payloadTiddler)$ -<$reveal type="match" text="yes" state=<> tag="div"> +<$reveal type="match" text="yes" stateTitle=<> tag="div"> <$list filter="[{$:/state/importpreviewtype}has[text]]" variable="listItem" emptyMessage={{$:/core/ui/ImportPreviews/Text}}> <$transclude tiddler={{$:/state/importpreviewtype}}/> diff --git a/core/ui/TagManager.tid b/core/ui/TagManager.tid index eeb2135c5..8c0bfb6ab 100644 --- a/core/ui/TagManager.tid +++ b/core/ui/TagManager.tid @@ -13,8 +13,8 @@ caption: {{$:/language/TagManager/Caption}} \end \define iconEditor(title)
-<$button popup=<> class="tc-btn-invisible tc-btn-dropdown">{{$:/core/images/down-arrow}} -<$reveal state=<> type="popup" position="belowleft" text="" default=""> +<$button popupTitle=<> class="tc-btn-invisible tc-btn-dropdown">{{$:/core/images/down-arrow}} +<$reveal stateTitle=<> type="popup" position="belowleft" text="" default="">
<$linkcatcher to="$title$!!icon"> <> @@ -29,13 +29,13 @@ caption: {{$:/language/TagManager/Caption}} $title$$(currentTiddler)$ \end \define toggleButton(state) -<$reveal state="$state$" type="match" text="closed" default="closed"> -<$button set="$state$" setTo="open" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected"> +<$reveal stateTitle="$state$" type="match" text="closed" default="closed"> +<$button setTitle="$state$" setTo="open" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected"> {{$:/core/images/info-button}} -<$reveal state="$state$" type="match" text="open" default="closed"> -<$button set="$state$" setTo="closed" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected"> +<$reveal stateTitle="$state$" type="match" text="open" default="closed"> +<$button setTitle="$state$" setTo="closed" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected"> {{$:/core/images/info-button}} @@ -64,7 +64,7 @@ $title$$(currentTiddler)$ -<$reveal state=<> type="match" text="open" default=""> +<$reveal stateTitle=<> type="match" text="open" default=""> diff --git a/core/ui/ViewTemplate/body.tid b/core/ui/ViewTemplate/body.tid index f2d65332e..a09e4753f 100644 --- a/core/ui/ViewTemplate/body.tid +++ b/core/ui/ViewTemplate/body.tid @@ -1,7 +1,7 @@ title: $:/core/ui/ViewTemplate/body tags: $:/tags/ViewTemplate -<$reveal tag="div" class="tc-tiddler-body" type="nomatch" state=<> text="hide" retain="yes" animate="yes"> +<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<> text="hide" retain="yes" animate="yes"> <$list filter="[all[current]!has[plugin-type]!field:hide-body[yes]]"> @@ -13,4 +13,4 @@ tags: $:/tags/ViewTemplate - \ No newline at end of file + diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index b0751c318..dc325b836 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -36,19 +36,19 @@ tags: $:/tags/Macro <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  • >> <$link> - <$reveal type="nomatch" state=<> text="open"> - <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="nomatch" stateTitle=<> text="open"> + <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} - <$reveal type="match" state=<> text="open"> - <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="match" stateTitle=<> text="open"> + <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> - <$reveal type="match" state=<> text="open"> + <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • @@ -61,19 +61,19 @@ tags: $:/tags/Macro <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  • >> - <$reveal type="nomatch" state=<> text="open"> - <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="nomatch" stateTitle=<> text="open"> + <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <> - <$reveal type="match" state=<> text="open"> - <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="match" stateTitle=<> text="open"> + <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> - <$reveal type="match" state=<> text="open"> + <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • @@ -103,20 +103,20 @@ tags: $:/tags/Macro
  • >> <$link> <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> - <$reveal type="nomatch" state=<> text="open"> - <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="nomatch" stateTitle=<> text="open"> + <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} - <$reveal type="match" state=<> text="open"> - <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="match" stateTitle=<> text="open"> + <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> - <$reveal type="match" state=<> text="open"> + <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • @@ -129,20 +129,20 @@ tags: $:/tags/Macro <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  • >> <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <$view field='caption'><$view field='title'/>"> - <$reveal type="nomatch" state=<> text="open"> - <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="nomatch" stateTitle=<> text="open"> + <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <> - <$reveal type="match" state=<> text="open"> - <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> + <$reveal type="match" stateTitle=<> text="open"> + <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> - <$reveal type="match" state=<> text="open"> + <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • @@ -175,13 +175,13 @@ tags: $:/tags/Macro
    - <$reveal state=<<__selectedTiddler__>> type="nomatch" text=""> + <$reveal stateTitle=<<__selectedTiddler__>> type="nomatch" text=""> <$transclude mode="block" tiddler=<<__template__>>>

    <>

    <$transclude mode="block">$missingText$ - <$reveal state=<<__selectedTiddler__>> type="match" text=""> + <$reveal stateTitle=<<__selectedTiddler__>> type="match" text=""> $unselectedText$
    diff --git a/core/wiki/macros/tree.tid b/core/wiki/macros/tree.tid index a6d2a8227..8cba3339b 100644 --- a/core/wiki/macros/tree.tid +++ b/core/wiki/macros/tree.tid @@ -16,15 +16,15 @@ emptyMessage="""<$text text="$prefix$$(chunk)$"/>"""> <$reveal type="nomatch" text="" default="""$(chunk)$""">
  • <$list filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]"""> -<$reveal type="nomatch" state="""$:/state/tree/$prefix$$(chunk)$""" text="show"> -<$button set="""$:/state/tree/$prefix$$(chunk)$""" setTo="show" class="tc-btn-invisible">{{$:/core/images/folder}} <$text text="""$(chunk)$"""/> +<$reveal type="nomatch" stateTitle="""$:/state/tree/$prefix$$(chunk)$""" text="show"> +<$button setTitle="""$:/state/tree/$prefix$$(chunk)$""" setTo="show" class="tc-btn-invisible">{{$:/core/images/folder}} <$text text="""$(chunk)$"""/> -<$reveal type="match" state="""$:/state/tree/$prefix$$(chunk)$""" text="show"> -<$button set="""$:/state/tree/$prefix$$(chunk)$""" setTo="hide" class="tc-btn-invisible">{{$:/core/images/folder}} <$text text="""$(chunk)$"""/> +<$reveal type="match" stateTitle="""$:/state/tree/$prefix$$(chunk)$""" text="show"> +<$button setTitle="""$:/state/tree/$prefix$$(chunk)$""" setTo="hide" class="tc-btn-invisible">{{$:/core/images/folder}} <$text text="""$(chunk)$"""/> <$list filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]""">(<$count filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]]"""/>) -<$reveal type="match" state="""$:/state/tree/$prefix$$(chunk)$""" text="show"> +<$reveal type="match" stateTitle="""$:/state/tree/$prefix$$(chunk)$""" text="show"> <$macrocall $name="tree-node" prefix="""$prefix$$(chunk)$"""/>
  • <><$edit-text field="color" tag="input" type="text" size="9"/>