Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jermolene
committed
Mar 14, 2014
1 parent
b714c67
commit 42c67cf
Showing
7 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/*\ | ||
title: $:/core/modules/filters/plugintiddlers.js | ||
type: application/javascript | ||
module-type: filteroperator | ||
Filter operator for returning the titles of the shadow tiddlers within a plugin | ||
\*/ | ||
(function(){ | ||
|
||
/*jslint node: true, browser: true */ | ||
/*global $tw: false */ | ||
"use strict"; | ||
|
||
/* | ||
Export our filter function | ||
*/ | ||
exports.plugintiddlers = function(source,operator,options) { | ||
var results = [], | ||
pushShadows; | ||
switch(operator.operand) { | ||
default: | ||
pushShadows = function(title) { | ||
var pluginInfo = options.wiki.pluginInfo[title]; | ||
if(pluginInfo) { | ||
$tw.utils.each(pluginInfo.tiddlers,function(fields,title) { | ||
results.push(title); | ||
}); | ||
} | ||
}; | ||
break; | ||
} | ||
// Iterate through the source tiddlers | ||
if($tw.utils.isArray(source)) { | ||
$tw.utils.each(source,function(title) { | ||
pushShadows(title); | ||
}); | ||
} else { | ||
$tw.utils.each(source,function(element,title) { | ||
pushShadows(title); | ||
}); | ||
} | ||
results.sort(); | ||
return results; | ||
}; | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/*\ | ||
title: $:/core/modules/filters/shadowsource.js | ||
type: application/javascript | ||
module-type: filteroperator | ||
Filter operator for returning the source plugins for shadow tiddlers | ||
\*/ | ||
(function(){ | ||
|
||
/*jslint node: true, browser: true */ | ||
/*global $tw: false */ | ||
"use strict"; | ||
|
||
/* | ||
Export our filter function | ||
*/ | ||
exports.shadowsource = function(source,operator,options) { | ||
var results = [], | ||
pushShadowSource = function(title) { | ||
var shadowInfo = options.wiki.shadowTiddlers[title]; | ||
if(shadowInfo) { | ||
$tw.utils.pushTop(results,shadowInfo.source); | ||
} | ||
}; | ||
// Iterate through the source tiddlers | ||
if($tw.utils.isArray(source)) { | ||
$tw.utils.each(source,function(title) { | ||
pushShadowSource(title); | ||
}); | ||
} else { | ||
$tw.utils.each(source,function(element,title) { | ||
pushShadowSource(title); | ||
}); | ||
} | ||
results.sort(); | ||
return results; | ||
}; | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: $:/core/ui/TiddlerInfo/Advanced | ||
tags: $:/tags/TiddlerInfo | ||
caption: {{$:/language/TiddlerInfo/Advanced/Caption}} | ||
|
||
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/TiddlerInfo/Advanced]] [!is[shadow]!has[draft.of]tag[$:/tags/TiddlerInfo/Advanced]] +[tag[$:/tags/TiddlerInfo/Advanced]]" variable="listItem"> | ||
<$transclude tiddler=<<listItem>>/> | ||
|
||
</$list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
title: $:/core/ui/TiddlerInfo/Advanced/PluginInfo | ||
tags: $:/tags/TiddlerInfo/Advanced | ||
|
||
\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/ | ||
<$list filter="[is[current]has[plugin-type]]"> | ||
|
||
! <<lingo Heading>> | ||
|
||
<<lingo Hint>> | ||
<ul> | ||
<$list filter="[is[current]plugintiddlers[]sort[title]]" emptyMessage=<<lingo Empty/Hint>>> | ||
<li> | ||
<$link to={{!!title}}> | ||
<$view field="title"/> | ||
</$link> | ||
</li> | ||
</$list> | ||
</ul> | ||
|
||
</$list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
title: $:/core/ui/TiddlerInfo/Advanced/ShadowInfo | ||
tags: $:/tags/TiddlerInfo/Advanced | ||
|
||
\define lingo-base() $:/language/TiddlerInfo/Advanced/ShadowInfo/ | ||
<$set name="infoTiddler" value=<<currentTiddler>>> | ||
|
||
! <<lingo Heading>> | ||
|
||
<$list filter="[is[current]!is[shadow]]"> | ||
|
||
<<lingo NotShadow/Hint>> | ||
|
||
</$list> | ||
|
||
<$list filter="[is[current]is[shadow]]"> | ||
|
||
<<lingo Shadow/Hint>> | ||
|
||
<$list filter="[is[current]shadowsource[]]"> | ||
|
||
<$set name="pluginTiddler" value=<<currentTiddler>>> | ||
<<lingo Shadow/Source>> | ||
</$set> | ||
|
||
</$list> | ||
|
||
<$list filter="[is[current]is[shadow]is[tiddler]]"> | ||
|
||
<<lingo OverriddenShadow/Hint>> | ||
|
||
</$list> | ||
|
||
|
||
</$list> | ||
</$set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title: $:/tags/TiddlerInfo/Advanced | ||
list: [[$:/core/ui/TiddlerInfo/Advanced/ShadowInfo]] [[$:/core/ui/TiddlerInfo/Advanced/PluginInfo]] |