Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

Commit

Permalink
Updated context to use popup mechanism.
Browse files Browse the repository at this point in the history
  • Loading branch information
roma0104 committed Feb 2, 2015
1 parent f3e95e6 commit 7826de1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 29 deletions.
21 changes: 3 additions & 18 deletions core/ui/stylesheet/gsd5-stylesheet.tid
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,7 @@ tags: $:/tags/Stylesheet
padding-left: 5px;
}

.gsd-context-toggle {
display: none;
}

.gsd-context-toggle + label:before {
content: "+";
}

.gsd-context-toggle:checked + label:before {
content: "–";
}

.gsd-context-toggle + label + div {
display: none;
}

.gsd-context-toggle:checked + label + div {
display: block;
.gsd-context-button {
width:100%;
text-align:left;
}
28 changes: 17 additions & 11 deletions core/ui/view-template-addins/view-context.tid
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
title: $:/plugins/gsd5/core/ui/addins/ViewContext
tags: $:/tags/GSD5ActionPlugin

\define unique-id()
\define unique-id()
$(currentTiddler)$-toggle
\end

<p>
<div class="gsd-context-box">
<$set name="parentTiddler" value=<<currentTiddler>>>
<input type="checkbox" id=<<unique-id>> class="gsd-context-toggle gsd-checkbox-center"/><label title="Click to expand" for=<<unique-id>>> Contexts</label>
<div class="gsd-context-list">
<$list filter="[field:gsd_type[context]field:gsd_realm{!!gsd_realm}] [field:gsd_type[context]field:gsd_realm[all]]" emptyMessage="<em>-no contexts-</em>">
<div class="tc-menu-list-subitem">
<$checkbox tiddler=<<parentTiddler>> tag=<<currentTiddler>>>
<<currentTiddler>>
</$checkbox>
</div>
</$list>
</div>
<$set name="ContextStatus" value=<<qualify "$:/state/popup/context">>>
<$button popup=<<ContextStatus>> class="tc-btn-invisible gsd-context-button">+ Contexts</$button>
<$reveal state=<<ContextStatus>> type="nomatch" text="" class="tc-popup-handle" default="" retain="yes" animate="yes">
<div class="tc-menu-list-subitem">

<$list filter="[field:gsd_type[context]field:gsd_realm{!!gsd_realm}] [field:gsd_type[context]field:gsd_realm[all]]" emptyMessage="<em>-no contexts-</em>">
<div class="tc-menu-list-subitem">
<$checkbox tiddler=<<parentTiddler>> tag=<<currentTiddler>>>
<<currentTiddler>>
</$checkbox>
</div>
</$list>

</div>
</$reveal>
</$set>
</$set>
</div>
</p>

0 comments on commit 7826de1

Please sign in to comment.