From f67777161dbb91ae8edddc164fae4b8a35309db1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 27 Nov 2016 23:04:54 +0000 Subject: [PATCH] Make manager sections be expandable --- core/ui/Manager.tid | 58 ++++++++++-------------- core/ui/Manager/ItemMainFields.tid | 9 ++++ core/ui/Manager/ItemMainRawText.tid | 5 ++ core/ui/Manager/ItemMainWikifiedText.tid | 5 ++ core/wiki/tags/ManagerItemMain.tid | 2 + themes/tiddlywiki/vanilla/base.tid | 10 ++-- 6 files changed, 52 insertions(+), 37 deletions(-) create mode 100644 core/ui/Manager/ItemMainFields.tid create mode 100644 core/ui/Manager/ItemMainRawText.tid create mode 100644 core/ui/Manager/ItemMainWikifiedText.tid create mode 100644 core/wiki/tags/ManagerItemMain.tid diff --git a/core/ui/Manager.tid b/core/ui/Manager.tid index 56ae55613..de4a972a8 100644 --- a/core/ui/Manager.tid +++ b/core/ui/Manager.tid @@ -18,6 +18,26 @@ color: #bbb /> \end +\define list-item-content-item() +
+ <$vars state-title=<>> + <$reveal state=<> type="match" text="show" default="show" tag="div"> + <$button set=<> setTo="hide" class="tc-btn-invisible tc-manager-list-item-content-item-heading"> + {{$:/core/images/down-arrow}} <$transclude tiddler=<> field="caption"/> + + + <$reveal state=<> type="nomatch" text="show" default="show" tag="div"> + <$button set=<> setTo="show" class="tc-btn-invisible tc-manager-list-item-content-item-heading"> + {{$:/core/images/right-arrow}} <$transclude tiddler=<> field="caption"/> + + + <$reveal state=<> type="match" text="show" default="show" tag="div" class="tc-manager-list-item-content-item-body"> + <$transclude tiddler=<>/> + + +
+\end +
@@ -79,43 +99,13 @@ color: #bbb <$reveal state=<> type="nomatch" text="" default="" tag="div" class="tc-manager-list-item-content tc-popup-handle">
- <$reveal state="$:/config/Manager/View" type="nomatch" text="plain" tag="div" class="tc-manager-list-item-content-tiddler-item"> -
- Wikified text -
-
- <$transclude mode="block"/> -
- - <$reveal state="$:/config/Manager/View" type="match" text="plain" tag="div" class="tc-manager-list-item-content-tiddler-item"> -
- Raw text -
-
-
<$view/>
-
- -
-
- Fields -
- - - <$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> - -
-
+ <$list filter="[all[shadows+tiddlers]tag[$:/tags/Manager/ItemMain]!has[draft.of]]" variable="listItem"> + <> +
diff --git a/core/ui/Manager/ItemMainFields.tid b/core/ui/Manager/ItemMainFields.tid new file mode 100644 index 000000000..922cee3bd --- /dev/null +++ b/core/ui/Manager/ItemMainFields.tid @@ -0,0 +1,9 @@ +title: $:/Manager/ItemMain/Fields +tags: $:/tags/Manager/ItemMain +caption: Fields + + + +<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> + +
diff --git a/core/ui/Manager/ItemMainRawText.tid b/core/ui/Manager/ItemMainRawText.tid new file mode 100644 index 000000000..578ebff22 --- /dev/null +++ b/core/ui/Manager/ItemMainRawText.tid @@ -0,0 +1,5 @@ +title: $:/Manager/ItemMain/RawText +tags: $:/tags/Manager/ItemMain +caption: Raw text + +
<$view/>
diff --git a/core/ui/Manager/ItemMainWikifiedText.tid b/core/ui/Manager/ItemMainWikifiedText.tid new file mode 100644 index 000000000..51f19c6fd --- /dev/null +++ b/core/ui/Manager/ItemMainWikifiedText.tid @@ -0,0 +1,5 @@ +title: $:/Manager/ItemMain/WikifiedText +tags: $:/tags/Manager/ItemMain +caption: Wikified text + +<$transclude mode="block"/> diff --git a/core/wiki/tags/ManagerItemMain.tid b/core/wiki/tags/ManagerItemMain.tid new file mode 100644 index 000000000..fa1af0824 --- /dev/null +++ b/core/wiki/tags/ManagerItemMain.tid @@ -0,0 +1,2 @@ +title: $:/tags/Manager/ItemMain +list: $:/Manager/ItemMain/WikifiedText $:/Manager/ItemMain/RawText $:/Manager/ItemMain/Fields \ No newline at end of file diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index b46d6a3fd..a02b8f521 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1790,10 +1790,14 @@ html body.tc-body.tc-single-tiddler-window { } .tc-manager-list-item-content-item-heading { + display: block; + width: 100%; + text-align: left; background: <>; text-transform: uppercase; font-size: 0.6em; - font-weight: bold; + font-weight: bold; + padding: 0.5em 0 0.5em 0; } .tc-manager-list-item-content-item-body { @@ -1813,13 +1817,13 @@ html body.tc-body.tc-single-tiddler-window { border-bottom: 0.5em solid <>; } -.tc-manager-list-item-content-item-body.tc-manager-list-item-content-item-body-table { +.tc-manager-list-item-content-item-body > table { border: none; padding: 0; margin: 0; } -.tc-manager-list-item-content-item-body.tc-manager-list-item-content-item-body-table td { +.tc-manager-list-item-content-item-body > table td { border: none; }