1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-26 15:23:15 +00:00

Use temporary tiddlers for popup locations

This commit is contained in:
Jeremy Ruston 2012-11-11 15:03:34 +00:00
parent cf15b128c1
commit f1089c1c92
5 changed files with 8 additions and 8 deletions

View File

@ -100,7 +100,7 @@ exports.handleEvent = function(event) {
exports.executeMacro = function() {
this.stateTextRef = this.params.state;
if(this.hasParameter("qualifyTiddlerTitles")) {
this.stateTextRef = "(" + this.parents.join(",") + "," + this.tiddlerTitle + ")" + this.stateTextRef;
this.stateTextRef = this.stateTextRef + "(" + this.parents.join(",") + "," + this.tiddlerTitle + ")";
}
this.readState();
var attributes = {

View File

@ -57,7 +57,7 @@ Popup.prototype.triggerPopup = function(options) {
// Get the textref of the popup state tiddler
var textRef = options.textRef;
if(options.qualifyTiddlerTitles === "yes") {
textRef = "(" + options.contextParents.join(",") + "," + options.contextTiddlerTitle + ")" + textRef;
textRef = textRef + "(" + options.contextParents.join(",") + "," + options.contextTiddlerTitle + ")";
}
// Get the current popup state tiddler
var value = options.wiki.getTextReference(textRef,"",options.contextTiddlerTitle);

View File

@ -3,14 +3,14 @@ title: $:/templates/SearchResultTemplate
{{tw-search-result{
<li>
<<link throughField:title hover:SearchPreviewDropDownLocation qualifyHoverTitle:yes><
<<link throughField:title hover:"$:/temp/SearchPreviewDropDownLocation" qualifyHoverTitle:yes><
<<view title text>>
>>
</li>
}}}
<<reveal state:SearchPreviewDropDownLocation type:popup position:right qualifyTiddlerTitles:yes><
<<reveal state:"$:/temp/SearchPreviewDropDownLocation" type:popup position:right qualifyTiddlerTitles:yes><
<div class="tw-tiddler-frame" style="color: black; width: 400px;">

View File

@ -1,7 +1,7 @@
title: $:/templates/TagTemplate
{{btn-invisible{
<<button popup:TagDropDownLocation qualifyTiddlerTitles:yes><
<<button popup:"$:/temp/TagDropDownLocation" qualifyTiddlerTitles:yes><
{{label{
<<color background:yes default:#aaa><
<<view title>>
@ -9,7 +9,7 @@ title: $:/templates/TagTemplate
}}}
>>
}}}
<<reveal state:TagDropDownLocation type:popup qualifyTiddlerTitles:yes><
<<reveal state:"$:/temp/TagDropDownLocation" type:popup qualifyTiddlerTitles:yes><
<div class="open">

View File

@ -1,7 +1,7 @@
title: $:/templates/ViewTemplate
modifier: JeremyRuston
<<button popup:FieldsDropDownLocation qualifyTiddlerTitles:yes class:"btn-invisible"><
<<button popup:"$:/temp/FieldsDropDownLocation" qualifyTiddlerTitles:yes class:"btn-invisible"><
<span class="title"><<view title>> </span>
>>
<span> <<reveal state:[[$:/EditMode]] type:match text:yes>< <<button EditTiddler class:"btn-invisible"><[img[$:/core/images/edit-button.svg]]>> >> </span>
@ -9,7 +9,7 @@ modifier: JeremyRuston
<div class:"small"><<view modifier link>> <<view modified relativedate>></div>
<<reveal state:FieldsDropDownLocation type:popup qualifyTiddlerTitles:yes><
<<reveal state:"$:/temp/FieldsDropDownLocation" type:popup qualifyTiddlerTitles:yes><
<div class="open">