mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-02-24 02:49:50 +00:00
Compare commits
1 Commits
further-tr
...
import-slo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc11772c55 |
@@ -212,8 +212,8 @@ ZoominListView.prototype.remove = function(widget) {
|
||||
]);
|
||||
setTimeout(function() {
|
||||
$tw.utils.removeStyles(toWidgetDomNode, ["transformOrigin", "transform", "transition", "opacity", "zIndex"]);
|
||||
removeElement();
|
||||
}, duration);
|
||||
setTimeout(removeElement,duration);
|
||||
// Now the tiddler we're going back to
|
||||
if(toWidgetDomNode) {
|
||||
$tw.utils.setStyle(toWidgetDomNode,[
|
||||
|
||||
@@ -30,10 +30,8 @@ Remove style properties of an element
|
||||
styleProperties: ordered array of string property names
|
||||
*/
|
||||
exports.removeStyles = function(element, styleProperties) {
|
||||
if(element) {
|
||||
for(var i=0; i<styleProperties.length; i++) {
|
||||
element.style.removeProperty($tw.utils.convertStyleNameToPropertyName(styleProperties[i]));
|
||||
}
|
||||
for(var i=0; i<styleProperties.length; i++) {
|
||||
element.style.removeProperty($tw.utils.convertStyleNameToPropertyName(styleProperties[i]));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -415,10 +415,9 @@ Widget.prototype.computeAttribute = function(attribute,options) {
|
||||
value;
|
||||
if(attribute.type === "filtered") {
|
||||
value = this.wiki.filterTiddlers(attribute.filter,this);
|
||||
if(!value.length) {
|
||||
value = [""];
|
||||
if(!options.asList) {
|
||||
value = value[0] || "";
|
||||
}
|
||||
value = options.asList ? value : value[0];
|
||||
} else if(attribute.type === "indirect") {
|
||||
value = this.wiki.getTextReference(attribute.textReference,"",this.getVariable("currentTiddler"));
|
||||
if(value && options.asList) {
|
||||
|
||||
@@ -49,23 +49,27 @@ title: $:/core/ui/ImportListing
|
||||
\end
|
||||
|
||||
\whitespace trim
|
||||
<$let importJson={{{ [{$:/Import}] }}}
|
||||
importTitles={{{ [<importJson>jsonindexes[tiddlers]] }}}
|
||||
importTypes={{{ [(importTitles)] :map[<importJson>jsonget[tiddlers],<currentTiddler>,[type]] }}}
|
||||
anyMatch={{{ [all[shadows+tiddlers]tag[$:/tags/ImportOptions]get[condition]] :map[(importTypes)subfilter<currentTiddler>] +[!is[blank]limit[1]] }}}>
|
||||
<%if [<anyMatch>!is[blank]] %>
|
||||
<div class="tc-import-option">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ImportOptions]]" variable="importOption">
|
||||
<$let condition={{{ [<importOption>get[condition]] }}}
|
||||
hasMatch={{{ [(importTypes)subfilter<condition>limit[1]] }}}>
|
||||
<%if [<hasMatch>!is[blank]] %>
|
||||
<$transclude tiddler=<<importOption>>/>
|
||||
<%endif%>
|
||||
</$let>
|
||||
</$list>
|
||||
</div>
|
||||
<%endif%>
|
||||
</$let>
|
||||
<%if [all[shadows+tiddlers]tag[$:/tags/ImportOptions]] %>
|
||||
<$let importJson={{{ [{$:/Import}] }}}
|
||||
importTitles={{{ [<importJson>jsonindexes[tiddlers]] }}}
|
||||
importTypes={{{ [(importTitles)] :map[<importJson>jsonget[tiddlers],<currentTiddler>,[type]] }}}
|
||||
anyMatch={{{ [all[shadows+tiddlers]tag[$:/tags/ImportOptions]get[condition]] :map[(importTypes)subfilter<currentTiddler>] +[!is[blank]limit[1]] }}}
|
||||
>
|
||||
<%if [<anyMatch>!is[blank]] %>
|
||||
<div class="tc-import-option">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ImportOptions]]" variable="importOption">
|
||||
<$let condition={{{ [<importOption>get[condition]] }}}
|
||||
hasMatch={{{ [(importTypes)subfilter<condition>limit[1]] }}}
|
||||
>
|
||||
<%if [<hasMatch>!is[blank]] %>
|
||||
<$transclude tiddler=<<importOption>>/>
|
||||
<%endif%>
|
||||
</$let>
|
||||
</$list>
|
||||
</div>
|
||||
<%endif%>
|
||||
</$let>
|
||||
<%endif%>
|
||||
<div class="tc-table-wrapper">
|
||||
<table class="tc-import-table">
|
||||
<tbody>
|
||||
|
||||
@@ -5,6 +5,11 @@ tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure testproc()
|
||||
This is ''wikitext''
|
||||
\end
|
||||
|
||||
|
||||
<$tiddler tiddler="Data">
|
||||
<$transclude $index="testindex"/>
|
||||
-
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
title: Transclude/MissingTiddlerAttributeFiltered
|
||||
description: Missing Tiddler Attribute Filtered
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
<$transclude tiddler={{{ [[sometiddler]get[nosuchfield]] }}}/>
|
||||
-
|
||||
<$transclude tiddler="">fallback content</$transclude>
|
||||
-
|
||||
<$transclude tiddler={{{ [[sometiddler]get[nosuchfield]] }}}>fallback content</$transclude>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>
|
||||
-
|
||||
fallback content
|
||||
-
|
||||
fallback content</p>
|
||||
Reference in New Issue
Block a user