mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-27 09:24:45 +00:00
Switch to using a slider for tiddler info
This commit is contained in:
parent
f5a5cbe35a
commit
d3fa781287
@ -40,6 +40,9 @@ RevealWidget.prototype.generate = function() {
|
||||
if(this["class"]) {
|
||||
$tw.utils.pushTop(classes,this["class"]);
|
||||
}
|
||||
if(this.isOpen) {
|
||||
$tw.utils.pushTop(classes,"tw-reveal-open");
|
||||
}
|
||||
switch(this.type) {
|
||||
case "popup":
|
||||
styles.push("position:absolute;");
|
||||
@ -146,6 +149,8 @@ RevealWidget.prototype.refreshInDom = function(changedAttributes,changedTiddlers
|
||||
}
|
||||
// Set the visibility of the children
|
||||
this.renderer.domNode.style.display = this.isOpen ? (this.renderer.parseTreeNode.isBlock ? "block" : "inline") : "none";
|
||||
// Add or remove the tw-reveal-open class
|
||||
$tw.utils.toggleClass(this.renderer.domNode,"tw-reveal-open",this.isOpen);
|
||||
}
|
||||
// Position the content if required
|
||||
if(this.isOpen) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: $:/templates/TiddlerDropdown
|
||||
title: $:/templates/TiddlerInfo
|
||||
|
||||
<div class="tw-tab-set"><div class="tw-tab-buttons"><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="refTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">References</$button><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="taggingTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Tagging</$button><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="fieldsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Fields</$button></div>
|
||||
<div class="tw-tiddler-info"><div class="tw-tab-set"><div class="tw-tab-buttons"><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="refTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">References</$button><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="taggingTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Tagging</$button><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="fieldsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Fields</$button></div>
|
||||
<div class="tw-tab-divider">
|
||||
</div>
|
||||
<div class="tw-tab-content">
|
||||
@ -15,4 +15,4 @@ title: $:/templates/TiddlerDropdown
|
||||
<$fieldgrid />
|
||||
</$reveal>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
@ -1,12 +1,11 @@
|
||||
title: $:/templates/ViewTemplate
|
||||
modifier: JeremyRuston
|
||||
|
||||
|
||||
<span class="title"><span class="tw-tiddler-controls"><$button popup="$:/state/tiddlerDropdown" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/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>
|
||||
<span class="title"><span class="tw-tiddler-controls"><$button popup="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/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>
|
||||
|
||||
</span><$view field="title"/></span>
|
||||
|
||||
<$reveal type="popup" state="$:/state/tiddlerDropdown" position="belowleft" qualifyTiddlerTitles="yes"><div class="tw-drop-down"><$transclude template="$:/templates/TiddlerDropdown"></$transclude></div>
|
||||
<$reveal type="nomatch" text="" default="" state="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes"><$transclude template="$:/templates/TiddlerInfo"/>
|
||||
</$reveal>
|
||||
|
||||
<div class="small"><$view field="modifier" format="link"/> <$view field="modified" format="relativedate"/></div>
|
||||
|
@ -395,6 +395,15 @@ a.tw-tiddlylink-external:before {
|
||||
fill: #888;
|
||||
}
|
||||
|
||||
.tw-tiddler-info {
|
||||
margin: 0 -3em 0 -3em;
|
||||
padding: 1em 3em 1em 3em;
|
||||
background-color: #f8f8f8;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
<<box-shadow "inset 1px 2px 3px rgba(0,0,0,0.1)">>
|
||||
}
|
||||
|
||||
@media print {
|
||||
.tw-tiddler-controls {
|
||||
display: none;
|
||||
|
Loading…
Reference in New Issue
Block a user