Get rid of the qualifyTiddlerTitles hack

Now, finally, we can implement qualifyTiddlerTitles as a macro.
This commit is contained in:
Jeremy Ruston 2013-11-02 15:42:24 +00:00
parent 0b1f0a5fab
commit fd70aa8c45
16 changed files with 75 additions and 70 deletions

View File

@ -0,0 +1,32 @@
/*\
title: $:/core/modules/macros/qualify.js
type: application/javascript
module-type: macro
Macro to qualify a state tiddler title according
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name = "qualify";
exports.params = [
{name: "title"}
];
/*
Run the macro
*/
exports.run = function(title) {
return title + "-" + this.getStateQualifier();
};
})();

View File

@ -114,20 +114,9 @@ ButtonWidget.prototype.execute = function() {
this.setTo = this.getAttribute("setTo");
this.popup = this.getAttribute("popup");
this.hover = this.getAttribute("hover");
this.qualifyTiddlerTitles = this.getAttribute("qualifyTiddlerTitles");
this["class"] = this.getAttribute("class","");
this.style = this.getAttribute("style");
this.selectedClass = this.getAttribute("selectedClass");
// Qualify tiddler titles if required
if(this.qualifyTiddlerTitles) {
var qualifier = this.getStateQualifier();
if(this.set) {
this.set = this.set + "-" + qualifier;
}
if(this.popup) {
this.popup = this.popup + "-" + qualifier;
}
}
// Make child widgets
this.makeChildWidgets();
};
@ -137,7 +126,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
ButtonWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.qualifyTiddlerTitles || changedAttributes["class"] || changedAttributes.selectedClass || changedAttributes.style || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup])) {
if(changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes["class"] || changedAttributes.selectedClass || changedAttributes.style || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup])) {
this.refreshSelf();
return true;
}

View File

@ -115,14 +115,6 @@ EditTextWidget.prototype.execute = function() {
this.editClass = this.getAttribute("class");
this.editPlaceholder = this.getAttribute("placeholder");
this.editFocusPopup = this.getAttribute("focusPopup");
this.qualifyTiddlerTitles = this.getAttribute("qualifyTiddlerTitles");;
// Qualify tiddler titles if required
if(this.qualifyTiddlerTitles) {
var qualifier = this.getStateQualifier();
if(this.editFocusPopup) {
this.editFocusPopup = this.editFocusPopup + "-" + qualifier;
}
}
// Get the editor element tag and type
var tag,type;
if(this.editField === "text") {

View File

@ -87,15 +87,11 @@ RevealWidget.prototype.execute = function() {
this.position = this.getAttribute("position");
this["class"] = this.getAttribute("class","");
this["default"] = this.getAttribute("default","");
this.qualifyTiddlerTitles = this.getAttribute("qualifyTiddlerTitles");
this.animate = this.getAttribute("animate","no");
this.openAnimation = this.animate === "no" ? undefined : "open";
this.closeAnimation = this.animate === "no" ? undefined : "close";
// Compute the title of the state tiddler and read it
this.stateTitle = this.state;
if(this.qualifyTiddlerTitles) {
this.stateTitle = this.stateTitle + "-" + this.getStateQualifier();
}
this.readState();
// Construct the child widgets
var childNodes = this.isOpen ? this.parseTreeNode.children : [];
@ -154,7 +150,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
RevealWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes["default"] || changedAttributes.qualifyTiddlerTitles || changedAttributes.animate) {
if(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes["default"] || changedAttributes.animate) {
this.refreshSelf();
return true;
} else {

View File

@ -1,13 +1,12 @@
title: $:/core/ui/FieldEditor
<$fieldmangler><$setvariable name="targetTiddler" value=<<currentTiddler>>><div class="tw-edit-fields">
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<listItem>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<targetTiddler>> field=<<listItem>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<listItem>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
<$fieldmangler><div class="tw-edit-fields">
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]" variable="currentField"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<currentField>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<currentField>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
</tr>
</$list>
</tbody>
</table>
</div>
</$setvariable>
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>

View File

@ -1,7 +1,7 @@
title: $:/core/ui/MissingTemplate
<div class="tw-tiddler-missing"><$button popup="$:/state/missingpopup" qualifyTiddlerTitles="yes" class="btn-invisible tw-missing-tiddler-label"><$view field="title" format="text" /></$button>
<$reveal state="$:/state/missingpopup" type="popup" position="below" qualifyTiddlerTitles="yes" animate="yes"><div class="tw-drop-down">
<div class="tw-tiddler-missing"><$button popup=<<qualify "$:/state/missingpopup">> class="btn-invisible tw-missing-tiddler-label"><$view field="title" format="text" /></$button>
<$reveal state=<<qualify "$:/state/missingpopup">> type="popup" position="below" animate="yes"><div class="tw-drop-down">
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
<hr>
<$list filter="[is[current]backlinks[]sort[title]]" template="$:/core/ui/ListItemTemplate"/>

View File

@ -2,48 +2,48 @@ title: $:/core/ui/MoreSideBar
<div class="tw-tab-set tw-more-sidebar"><div class="tw-tab-buttons">
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="allTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">All</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="allTab" selectedClass="tw-tab-selected">All</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="recentTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Recent</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="recentTab" selectedClass="tw-tab-selected">Recent</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="tagsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Tags</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="tagsTab" selectedClass="tw-tab-selected">Tags</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="missingTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Missing</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="missingTab" selectedClass="tw-tab-selected">Missing</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="draftsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Drafts</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="draftsTab" selectedClass="tw-tab-selected">Drafts</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="orphanTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Orphans</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="orphanTab" selectedClass="tw-tab-selected">Orphans</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="typeTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Types</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="typeTab" selectedClass="tw-tab-selected">Types</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="systemTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">System</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="systemTab" selectedClass="tw-tab-selected">System</$button>
<$button type="set" set="$:/state/moreSideBarTabSet" setTo="shadowsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Shadows</$button>
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="shadowsTab" selectedClass="tw-tab-selected">Shadows</$button>
</div><div class="tw-tab-content">
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="allTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="allTab">
<$list filter="[!is[system]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="recentTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="recentTab">
{{$:/snippets/recentchanges}}
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="tagsTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="tagsTab">
<$list filter="[tags[]sort[title]]" itemClass="tw-menu-list-item">
<$transclude tiddler="$:/core/ui/TagTemplate"/> <small class="tw-menu-list-count"><$count filter="[is[current]tagging[]]"/></small>
</$list>
----
{{$:/core/ui/UntaggedTemplate}} <small class="tw-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small>
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="missingTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="missingTab">
<$list filter="[is[missing]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/MissingTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="draftsTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="draftsTab">
<$list filter="[has[draft.of]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="orphanTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="orphanTab">
<$list filter="[is[orphan]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="typeTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="typeTab">
<$list filter="[!is[system]has[type]each[type]sort[type]]">
<div class="tw-menu-list-item">
<$view field="type"/>
@ -55,10 +55,10 @@ title: $:/core/ui/MoreSideBar
</div>
</$list>
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="systemTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="systemTab">
<$list filter="[is[system]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="shadowsTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="shadowsTab">
<$list filter="[is[shadow]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
</div></div>

View File

@ -25,23 +25,23 @@ title: $:/core/ui/SideBar
<$reveal state="$:/temp/search" type="match" text="">
<div class="tw-tab-set">
<div class="tw-tab-buttons"><$button type="set" set="$:/state/sideBarTabSet" setTo="openTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Open</$button><$button type="set" set="$:/state/sideBarTabSet" setTo="recentTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Recent</$button><$button type="set" set="$:/state/sideBarTabSet" setTo="toolsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Tools</$button><$button type="set" set="$:/state/sideBarTabSet" setTo="moreTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">More</$button></div>
<div class="tw-tab-buttons"><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="openTab" selectedClass="tw-tab-selected">Open</$button><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="recentTab" selectedClass="tw-tab-selected">Recent</$button><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="toolsTab" selectedClass="tw-tab-selected">Tools</$button><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="moreTab" selectedClass="tw-tab-selected">More</$button></div>
<div class="tw-tab-divider tw-sidebar-tab-divider">
</div>
<div class="tw-tab-content">
<$reveal type="match" state="$:/state/sideBarTabSet" text="openTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="openTab">
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" listview="pop" itemClass="tw-menu-list-item tw-open-tiddler-list">
<$button message="tw-close-tiddler" class="btn-invisible btn-mini">&times;</$button> <$link to={{!!title}}><$view field="title"/></$link>
</$list>
<$button message="tw-close-all-tiddlers" class="btn-invisible btn-mini">close all</$button>
</$reveal>
<$reveal type="match" state="$:/state/sideBarTabSet" text="recentTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="recentTab">
{{$:/snippets/recentchanges}}
</$reveal>
<$reveal type="match" state="$:/state/sideBarTabSet" text="toolsTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="toolsTab">
{{$:/core/ui/ToolsPanel}}
</$reveal>
<$reveal type="match" state="$:/state/sideBarTabSet" text="moreTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="moreTab">
{{$:/core/ui/MoreSideBar}}
</$reveal>
</div>

View File

@ -3,8 +3,8 @@ title: $:/core/ui/TagTemplate
\define tag-styles()
background-color:$(backgroundColor)$;
\end
<span class="tw-tag-list-item"><$setvariable name="backgroundColor" value={{!!color}}><$button popup="$:/state/tagpopup" qualifyTiddlerTitles="yes" class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button></$setvariable>
<$reveal state="$:/state/tagpopup" type="popup" position="below" qualifyTiddlerTitles="yes" animate="yes"><div class="tw-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
<span class="tw-tag-list-item"><$setvariable name="backgroundColor" value={{!!color}}><$button popup=<<qualify "$:/state/tagpopup">> class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button></$setvariable>
<$reveal state=<<qualify "$:/state/tagpopup">> type="popup" position="below" animate="yes"><div class="tw-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
<hr>
<$list filter="[is[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
</div></$reveal></span>

View File

@ -6,10 +6,10 @@ background-color:$(backgroundColor)$;
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" listview="pop" itemClass="tw-tag-editor-label"><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">&times;</$button></span></$setvariable>
</$list></div>
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="tw-edit-texteditor"/></span> <$button popup="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
<div class="tw-tags-autocomplete-wrapper">
<$reveal state="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" type="nomatch" text="" default="">
<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default="">
<div class="tw-tags-autocomplete">
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text"/></span></$setvariable></$link>
</$list>

View File

@ -1,23 +1,23 @@
title: $:/core/ui/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="listTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">List</$button><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="listedTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Listed</$button><$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="fieldsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Fields</$button></div>
<div class="tw-tab-set"><div class="tw-tab-buttons"><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="refTab" selectedClass="tw-tab-selected">References</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="taggingTab" selectedClass="tw-tab-selected">Tagging</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="listTab" selectedClass="tw-tab-selected">List</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="listedTab" selectedClass="tw-tab-selected">Listed</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="fieldsTab" selectedClass="tw-tab-selected">Fields</$button></div>
<div class="tw-tab-divider">
</div>
<div class="tw-tab-content">
<$reveal type="match" state="$:/state/tiddlerDropDownTabSet" text="refTab" default="refTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="refTab" default="refTab">
<$list filter="[is[current]backlinks[]sort[title]]" emptyMessage="No tiddlers link to this one" template="$:/core/ui/ListItemTemplate">
</$list>
</$reveal>
<$reveal type="match" state="$:/state/tiddlerDropDownTabSet" text="taggingTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="taggingTab">
<$list filter="[is[current]tagging[]]" itemClass="tw-menu-list-item" emptyMessage="No tiddlers are tagged with this one" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/tiddlerDropDownTabSet" text="listTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="listTab">
<$list filter="[list{!!title}]" itemClass="tw-menu-list-item" emptyMessage="This tiddler does not have a list" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/tiddlerDropDownTabSet" text="listedTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="listedTab">
<$list filter="[is[current]listed[]!is[system]]" itemClass="tw-menu-list-item" emptyMessage="This tiddler is not listed by any others" template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/state/tiddlerDropDownTabSet" text="fieldsTab" qualifyTiddlerTitles="yes">
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="fieldsTab">
<$transclude tiddler="$:/core/ui/TiddlerFields"/>
</$reveal>
</div>

View File

@ -1,6 +1,6 @@
title: $:/core/ui/UntaggedTemplate
<$button popup="$:/state/tagpopup" qualifyTiddlerTitles="yes" class="btn-invisible tw-untagged-label tw-tag-label">untagged</$button>
<$reveal state="$:/state/tagpopup" type="popup" position="below" qualifyTiddlerTitles="yes"><div class="tw-drop-down">
<$button popup=<<qualify "$:/state/tagpopup">> class="btn-invisible tw-untagged-label tw-tag-label">untagged</$button>
<$reveal state=<<qualify "$:/state/tagpopup">> type="popup" position="below"><div class="tw-drop-down">
<$list filter="[untagged[]!is[system]] -[tags[]] +[sort[title]]" template="$:/core/ui/ListItemTemplate"/>
</div></$reveal>

View File

@ -4,11 +4,11 @@ tags: $:/tags/ViewTemplate
\define title-styles()
fill:$(foregroundColor)$;
\end
<div class="tw-tiddler-title"><div class="title"><span class="tw-tiddler-controls"><$button popup="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes" 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="title"><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>
</span><$setvariable name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude tiddler={{!!icon}}/></span></$setvariable> <$view field="title"/></div>
<$reveal type="nomatch" text="" default="" state="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes" class="tw-tiddler-info" animate="yes">
<$reveal type="nomatch" text="" default="" state=<<qualify "$:/state/tiddlerInfo">> class="tw-tiddler-info" animate="yes">
<$transclude tiddler="$:/core/ui/TiddlerInfo"/>

View File

@ -23,7 +23,6 @@ The content of the `<$button>` widget is displayed within the button.
|set |The title of a tiddler to which a new value will be assigned |
|setTo |The new value to assign to the tiddler identified in the `set` attribute |
|popup |Title of a state tiddler for a popup that is toggled when the button is clicked |
|qualifyTiddlerTitles |If this attribute is present then the state tiddler titles specified in the `set` and `popup` attributes are qualified as described in HandlingUserInterfaceState |
|class |An optional CSS class name to be assigned to the HTML element |
|style |An optional CSS style attribute to be assigned to the HTML element |
|selectedClass |An optional additional CSS class to be assigned if the popup is triggered or the tiddler specified in `set` already has the value specified in `setTo` |

View File

@ -23,6 +23,5 @@ The content of the `<$edit-text>` widget is ignored.
|class |A CSS class to be assigned to the generated HTML editing element |
|placeholder |Placeholder text to be displayed when the edit field is empty |
|focusPopup |Title of a state tiddler for a popup that is displayed when the editing element has focus |
|qualifyTiddlerTitles |If this attribute is present then the state tiddler title specified in the `focusPopup` attributes are qualified as described in HandlingUserInterfaceState |
|tag |Overrides the generated HTML editing element tag |
|type |Overrides the generated HTML editing element `type` attribute |

View File

@ -23,4 +23,3 @@ The content of the `<$reveal>` widget is displayed according to the rules given
|text |The text to match when the type is ''match'' and ''nomatch'' |
|position |The position used for the popup when the type is ''popup''. Can be ''left'',''above'',''aboveright'',''right'',''belowleft'' or ''below'' |
|default |Default value to use when the state tiddler |
|qualifyTiddlerTitles |If this attribute is present then the state tiddler title is qualified as described in HandlingUserInterfaceState |