mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 19:04:38 +00:00
Compare commits
465 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1c2647452 | ||
|
|
a52b4953bc | ||
|
|
001f9da512 | ||
|
|
a31aa25d0c | ||
|
|
39c678a50c | ||
|
|
14613502c2 | ||
|
|
1235ff8aad | ||
|
|
5d8dc1dcd9 | ||
|
|
c9d0f1d221 | ||
|
|
8e74a3028e | ||
|
|
6605e1a37c | ||
|
|
af906e4b73 | ||
|
|
c5bb95dbfb | ||
|
|
5fa8a1e08a | ||
|
|
c8e2c2ceb9 | ||
|
|
625ebd4d41 | ||
|
|
5e8420a3ac | ||
|
|
2abc5dee78 | ||
|
|
d2c4920ba4 | ||
|
|
93660bdea8 | ||
|
|
abebff78ba | ||
|
|
b1c5d7694e | ||
|
|
b29973312d | ||
|
|
2317840ce6 | ||
|
|
182c2428ca | ||
|
|
86329f5daa | ||
|
|
bc447410fe | ||
|
|
513e1c8cbb | ||
|
|
97422ee1b9 | ||
|
|
dd0f3a4e5a | ||
|
|
0ef136c809 | ||
|
|
9753583fec | ||
|
|
f9ec85d153 | ||
|
|
0778ea6756 | ||
|
|
d031a93c6d | ||
|
|
05a794d5b8 | ||
|
|
3685d90c6c | ||
|
|
047b786a22 | ||
|
|
609cb1fcbd | ||
|
|
c90a756c80 | ||
|
|
c15f978ac1 | ||
|
|
d07c45dbca | ||
|
|
4137ee6852 | ||
|
|
a3a0002bbc | ||
|
|
4afca0e2b8 | ||
|
|
f5a52ff99c | ||
|
|
a8c4b524b6 | ||
|
|
8765d4e31b | ||
|
|
bf37522808 | ||
|
|
6a8c0a25b5 | ||
|
|
42dba113cc | ||
|
|
2579553375 | ||
|
|
156d3bc692 | ||
|
|
5b38c21a41 | ||
|
|
2e50ddc213 | ||
|
|
51db48acc9 | ||
|
|
2698f08851 | ||
|
|
c82fbbb6e5 | ||
|
|
755693766a | ||
|
|
376b447570 | ||
|
|
ef9878802a | ||
|
|
31b5eb1578 | ||
|
|
a0c13a0856 | ||
|
|
77277b429e | ||
|
|
23fdc94417 | ||
|
|
4c66eee1ec | ||
|
|
37718cceff | ||
|
|
63c441d3e8 | ||
|
|
46e6fb1957 | ||
|
|
900738e796 | ||
|
|
fa43f45e18 | ||
|
|
f1001fc236 | ||
|
|
71535c6691 | ||
|
|
78f97cb516 | ||
|
|
4aa8fc6d1d | ||
|
|
957a8608ad | ||
|
|
ab129a620e | ||
|
|
7034c429f6 | ||
|
|
bf974e37a2 | ||
|
|
0e62d8f648 | ||
|
|
9c77f1bac6 | ||
|
|
edce18c10d | ||
|
|
51f8e58d5f | ||
|
|
bbceddf10b | ||
|
|
2689e2861b | ||
|
|
bb74be7ac1 | ||
|
|
dfa5b6c8dc | ||
|
|
5b68405500 | ||
|
|
41dcf7a9f5 | ||
|
|
ef00786d61 | ||
|
|
cbc8a6b785 | ||
|
|
a682a229e3 | ||
|
|
1e3a41311d | ||
|
|
870006d2b9 | ||
|
|
4bdc92843c | ||
|
|
e94656e028 | ||
|
|
d4cc001ad5 | ||
|
|
751ea7b759 | ||
|
|
f604bebaee | ||
|
|
156256afc7 | ||
|
|
d4abd1722c | ||
|
|
1e7d9bd3cd | ||
|
|
b220c19fb7 | ||
|
|
64a905b9f8 | ||
|
|
3ba0186523 | ||
|
|
e628da4804 | ||
|
|
5154a25ab9 | ||
|
|
85217112ad | ||
|
|
e11c9e83b9 | ||
|
|
136c00237e | ||
|
|
1f545f06ad | ||
|
|
1d848e2f51 | ||
|
|
d8365cfc9e | ||
|
|
a8ee6c7b7c | ||
|
|
a94da683f0 | ||
|
|
4d68111c49 | ||
|
|
da541b656c | ||
|
|
e32695e2c3 | ||
|
|
5d75dc7991 | ||
|
|
12896ef1c4 | ||
|
|
521e7f9b62 | ||
|
|
38ca847ec9 | ||
|
|
56a0809768 | ||
|
|
249e532e07 | ||
|
|
271d70ff92 | ||
|
|
7657a6960b | ||
|
|
0f157cff90 | ||
|
|
1e47a62c2a | ||
|
|
4c825101c2 | ||
|
|
377530a3dc | ||
|
|
002fbf6ca1 | ||
|
|
37ac580ac2 | ||
|
|
52087b4e20 | ||
|
|
ace16ace24 | ||
|
|
6f6a2e8c59 | ||
|
|
4374d2f5c4 | ||
|
|
357c9ef8fe | ||
|
|
7d46afc7b2 | ||
|
|
a5c7089bcf | ||
|
|
962cdf500a | ||
|
|
1600beb193 | ||
|
|
b6f7d471bd | ||
|
|
cb9506a166 | ||
|
|
37ee16f97d | ||
|
|
c8fa52cce4 | ||
|
|
92b957f6f8 | ||
|
|
241e021654 | ||
|
|
2ed46ca02f | ||
|
|
117bdbcda7 | ||
|
|
53d7e5351b | ||
|
|
9a1fb7da26 | ||
|
|
996eecc79a | ||
|
|
6f0d581d72 | ||
|
|
b26e2955d4 | ||
|
|
3a621c18bd | ||
|
|
c0834583a0 | ||
|
|
d52dd870dd | ||
|
|
86629e3144 | ||
|
|
d6b1cf2e93 | ||
|
|
77431e5e6f | ||
|
|
95fed82024 | ||
|
|
6b15a01f9c | ||
|
|
4b381c8f76 | ||
|
|
1015196817 | ||
|
|
719e4d901d | ||
|
|
5914f2f200 | ||
|
|
2ee7607e57 | ||
|
|
37ef5da20f | ||
|
|
6f0736e82a | ||
|
|
62ad533aa6 | ||
|
|
79e428757b | ||
|
|
4def52df80 | ||
|
|
61718d6023 | ||
|
|
242a753bbe | ||
|
|
c4c51feee2 | ||
|
|
8b61a71115 | ||
|
|
8dc425e403 | ||
|
|
d1e452e930 | ||
|
|
d0cd91cfba | ||
|
|
8790f29d0e | ||
|
|
87c515f3ce | ||
|
|
c51eb93edb | ||
|
|
a84dc61303 | ||
|
|
5708b76d6e | ||
|
|
84bebb65b7 | ||
|
|
8e52830320 | ||
|
|
a614c0d543 | ||
|
|
4134392841 | ||
|
|
76d94b4d09 | ||
|
|
73d7bb69c5 | ||
|
|
2643f24bb5 | ||
|
|
ac5c6d1d73 | ||
|
|
151ca670bd | ||
|
|
86329835c9 | ||
|
|
5329392dbe | ||
|
|
804a579d17 | ||
|
|
1126458f8c | ||
|
|
738393285f | ||
|
|
90caf5bf42 | ||
|
|
933caab2e6 | ||
|
|
e6043b07b9 | ||
|
|
d6c5e51501 | ||
|
|
7d3d2ba3fe | ||
|
|
8cae6677a7 | ||
|
|
f786872589 | ||
|
|
31bcd139e6 | ||
|
|
1f82ebc7c3 | ||
|
|
b882a0dff1 | ||
|
|
27c9e7269e | ||
|
|
d31f61255e | ||
|
|
e553653729 | ||
|
|
ac89c154b4 | ||
|
|
c4420612e8 | ||
|
|
c1e715de93 | ||
|
|
f3ee058839 | ||
|
|
7011cecb95 | ||
|
|
931d47e50c | ||
|
|
002d47b4d9 | ||
|
|
302768e009 | ||
|
|
838c3c4eb0 | ||
|
|
f1f318931d | ||
|
|
0c49ac179b | ||
|
|
93cb03eeab | ||
|
|
73c8dc8c23 | ||
|
|
270b76ce94 | ||
|
|
4aa140b16c | ||
|
|
b2550f31c2 | ||
|
|
81481588e0 | ||
|
|
6c6fda498f | ||
|
|
05e2b170fb | ||
|
|
fe47808d8a | ||
|
|
5eddcb0e8d | ||
|
|
d1ed1ddc8c | ||
|
|
705cdc8b17 | ||
|
|
48052130d2 | ||
|
|
21cc5fc1d6 | ||
|
|
47481ed52a | ||
|
|
d8cc283b3a | ||
|
|
a9eab1b8fc | ||
|
|
52d29ac0cf | ||
|
|
0ea8cfb1de | ||
|
|
5758713014 | ||
|
|
1d08d2d7dc | ||
|
|
88c4fbd2d7 | ||
|
|
6121076ab0 | ||
|
|
28d6e6ad1c | ||
|
|
6d5ba0744b | ||
|
|
1f26428fbc | ||
|
|
a3d84694ea | ||
|
|
874c8d5516 | ||
|
|
f5055c0205 | ||
|
|
bd211ea082 | ||
|
|
fdc272bff4 | ||
|
|
e0041d8483 | ||
|
|
dcac3b27b7 | ||
|
|
13837a6f30 | ||
|
|
025f56ebab | ||
|
|
64d661f6e4 | ||
|
|
4bf6fe7fe9 | ||
|
|
4dec771c20 | ||
|
|
8e685e5150 | ||
|
|
d1bbe7253c | ||
|
|
1d49e45deb | ||
|
|
62c265aab0 | ||
|
|
c9d99f5d92 | ||
|
|
05f60b03a6 | ||
|
|
b924bc35b0 | ||
|
|
7c6b376bdb | ||
|
|
6375346b04 | ||
|
|
3f7f04b2ea | ||
|
|
e69e2c1c91 | ||
|
|
78735cde96 | ||
|
|
a44f6039bb | ||
|
|
e02ffcb969 | ||
|
|
6fc5c70ace | ||
|
|
147f404a41 | ||
|
|
13d9c55d5c | ||
|
|
b520efdeb8 | ||
|
|
b70b85aa9e | ||
|
|
e175746122 | ||
|
|
3035badf14 | ||
|
|
c44a53e670 | ||
|
|
145713e766 | ||
|
|
1dfa6f369b | ||
|
|
3b08b5e9dd | ||
|
|
cea0b74265 | ||
|
|
5ded01f2c6 | ||
|
|
9bbd599f5c | ||
|
|
d2ab7c5986 | ||
|
|
8c67e11365 | ||
|
|
23ca729805 | ||
|
|
2c5d241d96 | ||
|
|
769842c4db | ||
|
|
1255060a5a | ||
|
|
187ec2e76c | ||
|
|
f66ec88716 | ||
|
|
d03c214425 | ||
|
|
70b07470d6 | ||
|
|
db8e43da23 | ||
|
|
853f5fd064 | ||
|
|
f6d234b88c | ||
|
|
ae756ddff0 | ||
|
|
ec4beb7f0f | ||
|
|
e2a7b35211 | ||
|
|
09a3f94d79 | ||
|
|
bd73990438 | ||
|
|
16ef49c66d | ||
|
|
028bf94281 | ||
|
|
91a7c39791 | ||
|
|
c7971d3da3 | ||
|
|
d93c19daaa | ||
|
|
b851fe1800 | ||
|
|
421e913dd3 | ||
|
|
9ac9239c51 | ||
|
|
4d061d0fee | ||
|
|
157f8faa6b | ||
|
|
8260d000be | ||
|
|
f1a2d8c2b9 | ||
|
|
12aec57086 | ||
|
|
24956f036e | ||
|
|
92f69d44bf | ||
|
|
da1f9f7d22 | ||
|
|
efeeab45f8 | ||
|
|
0a2a5184c4 | ||
|
|
741f853986 | ||
|
|
a18af9b760 | ||
|
|
0a986ccd99 | ||
|
|
0bb8e08edc | ||
|
|
73491f14dd | ||
|
|
e145376838 | ||
|
|
e18e6e85cc | ||
|
|
df8f72ce90 | ||
|
|
6912f80f0a | ||
|
|
db2f47cc4a | ||
|
|
32b8270740 | ||
|
|
be3533688a | ||
|
|
453193ce78 | ||
|
|
df891e7110 | ||
|
|
4862afbf2a | ||
|
|
5093cdc860 | ||
|
|
335c470797 | ||
|
|
0550efabf8 | ||
|
|
096165217a | ||
|
|
5f6a52886e | ||
|
|
94103f8d57 | ||
|
|
fcaf9cc5d2 | ||
|
|
d07fea949d | ||
|
|
7475515caf | ||
|
|
9022dfdf71 | ||
|
|
2e41b139d3 | ||
|
|
15c0ca2fdf | ||
|
|
c343c18cff | ||
|
|
9ff7f61ad3 | ||
|
|
d34bcc2ebb | ||
|
|
8ac31e9134 | ||
|
|
202fe5a1ae | ||
|
|
a3a50dbf6d | ||
|
|
989e0d436c | ||
|
|
5599f9f933 | ||
|
|
cea963420c | ||
|
|
d8e4002259 | ||
|
|
48696c7d41 | ||
|
|
2e1db82f2d | ||
|
|
3d7b40fbaa | ||
|
|
835e3a9452 | ||
|
|
7e4309397e | ||
|
|
55d72bfaf4 | ||
|
|
7062bb9293 | ||
|
|
3a0616044e | ||
|
|
2ddc53ab3d | ||
|
|
63b00fd0f8 | ||
|
|
946d84f38e | ||
|
|
51f3008858 | ||
|
|
6c36ef93c3 | ||
|
|
79c77966df | ||
|
|
d0a0dd1812 | ||
|
|
6aa91dda33 | ||
|
|
81f0a79c5d | ||
|
|
73bba27673 | ||
|
|
83f1f49c89 | ||
|
|
270fb09993 | ||
|
|
9e85782407 | ||
|
|
f7a2849d27 | ||
|
|
4e3f6fc4f8 | ||
|
|
4a63343789 | ||
|
|
657ced1221 | ||
|
|
14a64ef3ef | ||
|
|
4e3c1bfd02 | ||
|
|
eb99629d3f | ||
|
|
06cbc45dfa | ||
|
|
176ad5adde | ||
|
|
4328d7cf3f | ||
|
|
6b3e8bdfd3 | ||
|
|
938e782772 | ||
|
|
b1e2ea19a8 | ||
|
|
97d36e26fc | ||
|
|
0240d5edc8 | ||
|
|
2e5c01f630 | ||
|
|
31300b6e2e | ||
|
|
13726ef731 | ||
|
|
7eb8301020 | ||
|
|
6eb43f3fbf | ||
|
|
c9c189048e | ||
|
|
d55693d85d | ||
|
|
11b6c52761 | ||
|
|
0a5eb0c848 | ||
|
|
cc33fee9fd | ||
|
|
90096cbd36 | ||
|
|
f069046f5b | ||
|
|
54fb3c11f9 | ||
|
|
be2a74d623 | ||
|
|
d27eb7b757 | ||
|
|
c20c935faa | ||
|
|
62f69168b6 | ||
|
|
dcb65d2ae0 | ||
|
|
349abaddea | ||
|
|
2eee132147 | ||
|
|
e7b4cab20d | ||
|
|
615425cf06 | ||
|
|
9b587ee203 | ||
|
|
3506c85807 | ||
|
|
17a594a97a | ||
|
|
f0df09c027 | ||
|
|
7fe8c4c4a1 | ||
|
|
4bce8ca8ff | ||
|
|
a205f142b3 | ||
|
|
8ba1a9b72a | ||
|
|
73a3077365 | ||
|
|
fddefc0d52 | ||
|
|
9317923307 | ||
|
|
2aa74c9467 | ||
|
|
d44d94e9b4 | ||
|
|
217614b7c6 | ||
|
|
c2245e1898 | ||
|
|
19f9587ac0 | ||
|
|
e07cdb7eed | ||
|
|
cdf67c34d0 | ||
|
|
b0a0859b62 | ||
|
|
96ca36798e | ||
|
|
04d26e6fae | ||
|
|
3d07b11894 | ||
|
|
c13cf94413 | ||
|
|
f8df354fc0 | ||
|
|
58948d2093 | ||
|
|
8d3463e3df | ||
|
|
91ec164361 | ||
|
|
3fea51a08b | ||
|
|
86c56d846e | ||
|
|
d8248cfba7 | ||
|
|
c724439a08 | ||
|
|
19272a7ca2 | ||
|
|
cf1fb650d5 | ||
|
|
4b808396f2 | ||
|
|
4a17212576 | ||
|
|
80e67f5028 | ||
|
|
6e9508be66 | ||
|
|
da86664a53 | ||
|
|
2bc9a7b115 | ||
|
|
29a8b2e718 | ||
|
|
a2672482c9 | ||
|
|
39e37d5776 | ||
|
|
485ffae366 | ||
|
|
30a757ec49 | ||
|
|
5e199f6b7d | ||
|
|
47b99d635a |
81
boot/boot.js
81
boot/boot.js
@@ -62,14 +62,22 @@ $tw.utils.isDate = function(value) {
|
||||
Iterate through all the own properties of an object or array. Callback is invoked with (element,title,object)
|
||||
*/
|
||||
$tw.utils.each = function(object,callback) {
|
||||
var f;
|
||||
var next,f;
|
||||
if(object) {
|
||||
if(Object.prototype.toString.call(object) == "[object Array]") {
|
||||
object.forEach(callback);
|
||||
for (f=0; f<object.length; f++) {
|
||||
next = callback(object[f],f,object);
|
||||
if(next === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(f in object) {
|
||||
if(Object.prototype.hasOwnProperty.call(object,f)) {
|
||||
callback(object[f],f,object);
|
||||
next = callback(object[f],f,object);
|
||||
if(next === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -413,7 +421,7 @@ $tw.utils.evalGlobal = function(code,context,filename) {
|
||||
contextValues.push(value);
|
||||
});
|
||||
// Add the code prologue and epilogue
|
||||
code = "(function(" + contextNames.join(",") + ") {(function(){\n" + code + ";})();\nreturn exports;\n})\n";
|
||||
code = "(function(" + contextNames.join(",") + ") {(function(){\n" + code + "\n;})();\nreturn exports;\n})\n";
|
||||
// Compile the code into a function
|
||||
var fn;
|
||||
if($tw.browser) {
|
||||
@@ -687,7 +695,7 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
|
||||
moduleInfo.exports = moduleInfo.definition;
|
||||
}
|
||||
} catch(e) {
|
||||
$tw.utils.error("Error executing boot module " + name + ":\n" + e);
|
||||
$tw.utils.error("Error executing boot module " + name + ":\n" + e.stack);
|
||||
}
|
||||
}
|
||||
// Return the exports of the module
|
||||
@@ -930,7 +938,7 @@ $tw.Wiki = function(options) {
|
||||
|
||||
};
|
||||
|
||||
// Test for the existence of a tiddler
|
||||
// Test for the existence of a tiddler (excludes shadow tiddlers)
|
||||
this.tiddlerExists = function(title) {
|
||||
return !!$tw.utils.hop(tiddlers,title);
|
||||
};
|
||||
@@ -1529,7 +1537,7 @@ $tw.getLibraryItemSearchPaths = function(libraryPath,envVar) {
|
||||
var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)],
|
||||
env = process.env[envVar];
|
||||
if(env) {
|
||||
Array.prototype.push.apply(pluginPaths,env.split(":"));
|
||||
Array.prototype.push.apply(pluginPaths,env.split(path.delimiter));
|
||||
}
|
||||
return pluginPaths;
|
||||
};
|
||||
@@ -1550,11 +1558,14 @@ $tw.loadPlugins = function(plugins,libraryPath,envVar) {
|
||||
|
||||
/*
|
||||
path: path of wiki directory
|
||||
parentPaths: array of parent paths that we mustn't recurse into
|
||||
options:
|
||||
parentPaths: array of parent paths that we mustn't recurse into
|
||||
readOnly: true if the tiddler file paths should not be retained
|
||||
*/
|
||||
$tw.loadWikiTiddlers = function(wikiPath,parentPaths) {
|
||||
parentPaths = parentPaths || [];
|
||||
var wikiInfoPath = path.resolve(wikiPath,$tw.config.wikiInfo),
|
||||
$tw.loadWikiTiddlers = function(wikiPath,options) {
|
||||
options = options || {};
|
||||
var parentPaths = options.parentPaths || [],
|
||||
wikiInfoPath = path.resolve(wikiPath,$tw.config.wikiInfo),
|
||||
wikiInfo,
|
||||
pluginFields;
|
||||
// Bail if we don't have a wiki info file
|
||||
@@ -1567,10 +1578,16 @@ $tw.loadWikiTiddlers = function(wikiPath,parentPaths) {
|
||||
if(wikiInfo.includeWikis) {
|
||||
parentPaths = parentPaths.slice(0);
|
||||
parentPaths.push(wikiPath);
|
||||
$tw.utils.each(wikiInfo.includeWikis,function(includedWikiPath) {
|
||||
var resolvedIncludedWikiPath = path.resolve(wikiPath,includedWikiPath);
|
||||
$tw.utils.each(wikiInfo.includeWikis,function(info) {
|
||||
if(typeof info === "string") {
|
||||
info = {path: info};
|
||||
}
|
||||
var resolvedIncludedWikiPath = path.resolve(wikiPath,info.path);
|
||||
if(parentPaths.indexOf(resolvedIncludedWikiPath) === -1) {
|
||||
var subWikiInfo = $tw.loadWikiTiddlers(resolvedIncludedWikiPath,parentPaths);
|
||||
var subWikiInfo = $tw.loadWikiTiddlers(resolvedIncludedWikiPath,{
|
||||
parentPaths: parentPaths,
|
||||
readOnly: info["read-only"]
|
||||
});
|
||||
// Merge the build targets
|
||||
wikiInfo.build = $tw.utils.extend([],subWikiInfo.build,wikiInfo.build);
|
||||
} else {
|
||||
@@ -1585,7 +1602,7 @@ $tw.loadWikiTiddlers = function(wikiPath,parentPaths) {
|
||||
// Load the wiki files, registering them as writable
|
||||
var resolvedWikiPath = path.resolve(wikiPath,$tw.config.wikiTiddlersSubDir);
|
||||
$tw.utils.each($tw.loadTiddlersFromPath(resolvedWikiPath),function(tiddlerFile) {
|
||||
if(tiddlerFile.filepath) {
|
||||
if(!options.readOnly && tiddlerFile.filepath) {
|
||||
$tw.utils.each(tiddlerFile.tiddlers,function(tiddler) {
|
||||
$tw.boot.files[tiddler.title] = {
|
||||
filepath: tiddlerFile.filepath,
|
||||
@@ -1699,7 +1716,8 @@ $tw.boot.startup = function(options) {
|
||||
themesEnvVar: "TIDDLYWIKI_THEME_PATH",
|
||||
languagesEnvVar: "TIDDLYWIKI_LANGUAGE_PATH",
|
||||
editionsEnvVar: "TIDDLYWIKI_EDITION_PATH"
|
||||
}
|
||||
},
|
||||
log: {} // Log flags
|
||||
});
|
||||
if(!$tw.boot.tasks.readBrowserTiddlers) {
|
||||
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}
|
||||
@@ -1889,6 +1907,35 @@ $tw.boot.isStartupTaskEligible = function(taskModule) {
|
||||
return true;
|
||||
};
|
||||
|
||||
/*
|
||||
Global Hooks mechanism which allows plugins to modify default functionality
|
||||
*/
|
||||
$tw.hooks = $tw.hooks || { names: {}};
|
||||
|
||||
/*
|
||||
Add hooks to the hashmap
|
||||
*/
|
||||
$tw.hooks.addHook = function(hookName,definition) {
|
||||
if($tw.utils.hop($tw.hooks.names,hookName)) {
|
||||
$tw.hooks.names[hookName].push(definition);
|
||||
}
|
||||
else {
|
||||
$tw.hooks.names[hookName] = [definition];
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Invoke the hook by key
|
||||
*/
|
||||
$tw.hooks.invokeHook = function(hookName, value) {
|
||||
if($tw.utils.hop($tw.hooks.names,hookName)) {
|
||||
for (var i = 0; i < $tw.hooks.names[hookName].length; i++) {
|
||||
value = $tw.hooks.names[hookName][i](value);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
/////////////////////////// Main boot function to decrypt tiddlers and then startup
|
||||
|
||||
$tw.boot.boot = function() {
|
||||
@@ -1919,4 +1966,4 @@ if(typeof(exports) !== "undefined") {
|
||||
exports.TiddlyWiki = _boot;
|
||||
} else {
|
||||
_boot(window.$tw);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/cancel-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-cancel-button tc-image-button" viewBox="366 150 58 58" width="22pt" height="22pt"><path d="M 414.76236 158.98764 C 403.77887 148.0041 385.97113 148.0041 374.98764 158.98764 C 364.0041 169.97113 364.0041 187.77887 374.98764 198.76236 C 385.97113 209.7459 403.77887 209.7459 414.76236 198.76236 C 425.7459 187.77887 425.7459 169.97113 414.76236 158.98764 M 385.3967 165.32954 L 385.3967 165.32954 L 394.77674 174.7096 L 404.3533 165.13303 C 405.53068 163.95566 407.4396 163.95566 408.61697 165.13303 C 409.79434 166.31041 409.79434 168.21932 408.61697 169.39669 L 399.0404 178.97325 L 408.42046 188.35331 C 409.59783 189.53068 409.59783 191.43959 408.42046 192.61697 L 408.42046 192.61697 C 407.24308 193.79434 405.33417 193.79434 404.1568 192.61697 L 394.77675 183.23692 L 385.5932 192.42046 C 384.41583 193.59783 382.50692 193.59783 381.32954 192.42046 L 381.32954 192.42046 C 380.15217 191.24308 380.15217 189.33417 381.32954 188.1568 C 381.32954 188.1568 381.32954 188.1568 381.32954 188.1568 L 381.32954 188.1568 L 381.32954 188.1568 L 390.51309 178.97326 L 381.13303 169.5932 C 379.95566 168.41583 379.95566 166.50692 381.13303 165.32954 L 381.13303 165.32954 C 382.3104 164.15217 384.21932 164.15217 385.3967 165.32954 C 385.3967 165.32954 385.3967 165.32954 385.3967 165.32954 Z"/></svg>
|
||||
<svg class="tc-image-cancel-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M64,76.3137085 L47.0294734,93.2842351 C43.9038742,96.4098343 38.8399231,96.4084656 35.7157288,93.2842712 C32.5978915,90.166434 32.5915506,85.0947409 35.7157649,81.9705266 L52.6862915,65 L35.7157649,48.0294734 C32.5901657,44.9038742 32.5915344,39.8399231 35.7157288,36.7157288 C38.833566,33.5978915 43.9052591,33.5915506 47.0294734,36.7157649 L64,53.6862915 L80.9705266,36.7157649 C84.0961258,33.5901657 89.1600769,33.5915344 92.2842712,36.7157288 C95.4021085,39.833566 95.4084494,44.9052591 92.2842351,48.0294734 L75.3137085,65 L92.2842351,81.9705266 C95.4098343,85.0961258 95.4084656,90.1600769 92.2842712,93.2842712 C89.166434,96.4021085 84.0947409,96.4084494 80.9705266,93.2842351 L64,76.3137085 Z M64,129 C99.346224,129 128,100.346224 128,65 C128,29.653776 99.346224,1 64,1 C28.653776,1 1.13686838e-13,29.653776 1.13686838e-13,65 C1.13686838e-13,100.346224 28.653776,129 64,129 Z M64,113 C90.509668,113 112,91.509668 112,65 C112,38.490332 90.509668,17 64,17 C37.490332,17 16,38.490332 16,65 C16,91.509668 37.490332,113 64,113 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
9
core/images/chevron-down.tid
Normal file
9
core/images/chevron-down.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/images/chevron-down
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-chevron-down tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd" transform="translate(64.000000, 40.500000) rotate(-270.000000) translate(-64.000000, -40.500000) translate(-22.500000, -26.500000)">
|
||||
<path d="M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z" transform="translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) "></path>
|
||||
<path d="M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z" transform="translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -2,8 +2,8 @@ title: $:/core/images/chevron-left
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-chevron-left tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128" version="1.1">
|
||||
<g>
|
||||
<path d="M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z" transform="translate(91.000000, 63.999491) rotate(-270.000000) translate(-91.000000, -63.999491) "></path>
|
||||
<path d="M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z" transform="translate(37.000000, 63.999491) rotate(-270.000000) translate(-37.000000, -63.999491) "></path>
|
||||
<g fill-rule="evenodd" transform="translate(92.500000, 64.000000) rotate(-180.000000) translate(-92.500000, -64.000000) translate(6.000000, -3.000000)">
|
||||
<path d="M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z" transform="translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) "></path>
|
||||
<path d="M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z" transform="translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -2,8 +2,8 @@ title: $:/core/images/chevron-right
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-chevron-right tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g>
|
||||
<path d="M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z" transform="translate(91.000000, 63.999491) rotate(-90.000000) translate(-91.000000, -63.999491) "></path>
|
||||
<path d="M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z" transform="translate(37.000000, 63.999491) rotate(-90.000000) translate(-37.000000, -63.999491) "></path>
|
||||
<g fill-rule="evenodd" transform="translate(-48.000000, -3.000000)">
|
||||
<path d="M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z" transform="translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) "></path>
|
||||
<path d="M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z" transform="translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
9
core/images/chevron-up.tid
Normal file
9
core/images/chevron-up.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/images/chevron-up
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-chevron-up tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd" transform="translate(64.000000, 89.500000) rotate(-90.000000) translate(-64.000000, -89.500000) translate(-22.500000, 22.500000)">
|
||||
<path d="M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z" transform="translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) "></path>
|
||||
<path d="M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z" transform="translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -2,14 +2,10 @@ title: $:/core/images/close-all-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-close-all-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M53.9827008,89.3556477 C56.4275461,87.3639978 57.9887999,84.3311393 57.9887999,80.9340168 C57.9887999,74.9354419 53.1208368,70.0726361 47.1158999,70.0726361 C44.078736,70.0726361 41.3324226,71.3165963 39.359689,73.3222993 L39.3567754,73.3194062 L3.099103,109.537527 L3.10272197,109.541128 C1.18328516,111.499774 0,114.181157 0,117.138619 C0,123.137194 4.86796314,128 10.8729,128 C13.8490664,128 16.5459476,126.805505 18.5093193,124.870257 L18.5232339,124.884102 L53.9827008,89.3556477 Z"></path>
|
||||
<path d="M53.9827008,19.3556477 C56.4275461,17.3639978 57.9887999,14.3311393 57.9887999,10.9340168 C57.9887999,4.93544186 53.1208368,0.0726360641 47.1158999,0.0726360641 C44.078736,0.0726360641 41.3324226,1.31659634 39.359689,3.3222993 L39.3567754,3.31940621 L3.099103,39.5375274 L3.10272197,39.5411281 C1.18328516,41.4997737 0,44.1811574 0,47.1386193 C0,53.1371942 4.86796314,58 10.8729,58 C13.8490664,58 16.5459476,56.8055047 18.5093193,54.870257 L18.5232339,54.8841017 L53.9827008,19.3556477 Z"></path>
|
||||
<path d="M123.982701,19.3556477 C126.427546,17.3639978 127.9888,14.3311393 127.9888,10.9340168 C127.9888,4.93544186 123.120837,0.0726360641 117.1159,0.0726360641 C114.078736,0.0726360641 111.332423,1.31659634 109.359689,3.3222993 L109.356775,3.31940621 L73.099103,39.5375274 L73.102722,39.5411281 C71.1832852,41.4997737 70,44.1811574 70,47.1386193 C70,53.1371942 74.8679631,58 80.8729,58 C83.8490664,58 86.5459476,56.8055047 88.5093193,54.870257 L88.5232339,54.8841017 L123.982701,19.3556477 Z"></path>
|
||||
<path d="M123.982701,89.3556477 C126.427546,87.3639978 127.9888,84.3311393 127.9888,80.9340168 C127.9888,74.9354419 123.120837,70.0726361 117.1159,70.0726361 C114.078736,70.0726361 111.332423,71.3165963 109.359689,73.3222993 L109.356775,73.3194062 L73.099103,109.537527 L73.102722,109.541128 C71.1832852,111.499774 70,114.181157 70,117.138619 C70,123.137194 74.8679631,128 80.8729,128 C83.8490664,128 86.5459476,126.805505 88.5093193,124.870257 L88.5232339,124.884102 L123.982701,89.3556477 Z"></path>
|
||||
<path d="M19.0968372,73.831398 C17.1051319,71.5224249 14.1594885,70.0611168 10.8729,70.0611168 C4.87432504,70.0611168 0.0115192444,74.92908 0.0115192444,80.9340168 C0.0115192444,84.1948309 1.44542995,87.1203819 3.71646837,89.1132541 L39.4956787,124.931536 L39.5183554,124.908745 C41.4770057,126.828213 44.1584112,128.011519 47.1158999,128.011519 C53.1144749,128.011519 57.9772807,123.143556 57.9772807,117.138619 C57.9772807,113.981762 56.6333409,111.139133 54.4869671,109.152809 L19.0968372,73.831398 Z"></path>
|
||||
<path d="M19.0968372,3.83139798 C17.1051319,1.52242486 14.1594885,0.0611168197 10.8729,0.0611168197 C4.87432504,0.0611168197 0.0115192444,4.92907996 0.0115192444,10.9340168 C0.0115192444,14.1948309 1.44542995,17.1203819 3.71646837,19.1132541 L39.4956787,54.9315363 L39.5183554,54.908745 C41.4770057,56.8282126 44.1584112,58.0115192 47.1158999,58.0115192 C53.1144749,58.0115192 57.9772807,53.1435561 57.9772807,47.1386193 C57.9772807,43.9817625 56.6333409,41.1391325 54.4869671,39.1528094 L19.0968372,3.83139798 Z"></path>
|
||||
<path d="M89.0968372,3.83139798 C87.1051319,1.52242486 84.1594885,0.0611168197 80.8729,0.0611168197 C74.874325,0.0611168197 70.0115192,4.92907996 70.0115192,10.9340168 C70.0115192,14.1948309 71.4454299,17.1203819 73.7164684,19.1132541 L109.495679,54.9315363 L109.518355,54.908745 C111.477006,56.8282126 114.158411,58.0115192 117.1159,58.0115192 C123.114475,58.0115192 127.977281,53.1435561 127.977281,47.1386193 C127.977281,43.9817625 126.633341,41.1391325 124.486967,39.1528094 L89.0968372,3.83139798 Z"></path>
|
||||
<path d="M89.0968372,73.831398 C87.1051319,71.5224249 84.1594885,70.0611168 80.8729,70.0611168 C74.874325,70.0611168 70.0115192,74.92908 70.0115192,80.9340168 C70.0115192,84.1948309 71.4454299,87.1203819 73.7164684,89.1132541 L109.495679,124.931536 L109.518355,124.908745 C111.477006,126.828213 114.158411,128.011519 117.1159,128.011519 C123.114475,128.011519 127.977281,123.143556 127.977281,117.138619 C127.977281,113.981762 126.633341,111.139133 124.486967,109.152809 L89.0968372,73.831398 Z"></path>
|
||||
<g fill-rule="evenodd" transform="translate(-23.000000, -23.000000)">
|
||||
<path d="M43,131 L22.9976794,131 C18.5827987,131 15,127.418278 15,123 C15,118.590712 18.5806831,115 22.9976794,115 L43,115 L43,94.9976794 C43,90.5827987 46.581722,87 51,87 C55.4092877,87 59,90.5806831 59,94.9976794 L59,115 L79.0023206,115 C83.4172013,115 87,118.581722 87,123 C87,127.409288 83.4193169,131 79.0023206,131 L59,131 L59,151.002321 C59,155.417201 55.418278,159 51,159 C46.5907123,159 43,155.419317 43,151.002321 L43,131 Z" transform="translate(51.000000, 123.000000) rotate(-45.000000) translate(-51.000000, -123.000000) "></path>
|
||||
<path d="M43,59 L22.9976794,59 C18.5827987,59 15,55.418278 15,51 C15,46.5907123 18.5806831,43 22.9976794,43 L43,43 L43,22.9976794 C43,18.5827987 46.581722,15 51,15 C55.4092877,15 59,18.5806831 59,22.9976794 L59,43 L79.0023206,43 C83.4172013,43 87,46.581722 87,51 C87,55.4092877 83.4193169,59 79.0023206,59 L59,59 L59,79.0023206 C59,83.4172013 55.418278,87 51,87 C46.5907123,87 43,83.4193169 43,79.0023206 L43,59 Z" transform="translate(51.000000, 51.000000) rotate(-45.000000) translate(-51.000000, -51.000000) "></path>
|
||||
<path d="M115,59 L94.9976794,59 C90.5827987,59 87,55.418278 87,51 C87,46.5907123 90.5806831,43 94.9976794,43 L115,43 L115,22.9976794 C115,18.5827987 118.581722,15 123,15 C127.409288,15 131,18.5806831 131,22.9976794 L131,43 L151.002321,43 C155.417201,43 159,46.581722 159,51 C159,55.4092877 155.419317,59 151.002321,59 L131,59 L131,79.0023206 C131,83.4172013 127.418278,87 123,87 C118.590712,87 115,83.4193169 115,79.0023206 L115,59 Z" transform="translate(123.000000, 51.000000) rotate(-45.000000) translate(-123.000000, -51.000000) "></path>
|
||||
<path d="M115,131 L94.9976794,131 C90.5827987,131 87,127.418278 87,123 C87,118.590712 90.5806831,115 94.9976794,115 L115,115 L115,94.9976794 C115,90.5827987 118.581722,87 123,87 C127.409288,87 131,90.5806831 131,94.9976794 L131,115 L151.002321,115 C155.417201,115 159,118.581722 159,123 C159,127.409288 155.419317,131 151.002321,131 L131,131 L131,151.002321 C131,155.417201 127.418278,159 123,159 C118.590712,159 115,155.419317 115,151.002321 L115,131 Z" transform="translate(123.000000, 123.000000) rotate(-45.000000) translate(-123.000000, -123.000000) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/close-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-close-button tc-image-button" viewBox="222 150 56 56" width="22pt" height="22pt"><path d="M 249.56668 185.88827 L 267.06757 203.38916 C 269.26427 205.58586 272.82582 205.58586 275.02252 203.38916 L 275.02252 203.38916 C 277.21922 201.19246 277.21922 197.63091 275.02252 195.43421 L 257.52163 177.93332 L 275.38916 160.06579 C 277.58586 157.86909 277.58586 154.30754 275.38916 152.11084 C 273.19246 149.91414 269.63091 149.91414 267.43421 152.11084 L 249.56668 169.97837 L 232.06579 152.47748 L 232.06579 152.47748 C 232.06579 152.47748 232.06579 152.47748 232.06579 152.47748 C 229.86909 150.28078 226.30754 150.28078 224.11084 152.47748 L 224.11084 152.47748 C 221.91414 154.674175 221.91414 158.23573 224.11084 160.43243 L 241.61173 177.93332 L 224.47748 195.06757 L 224.47748 195.06757 L 224.47748 195.06757 C 224.47748 195.06757 224.47748 195.06757 224.47748 195.06757 C 222.28078 197.26427 222.28078 200.82583 224.47748 203.02252 L 224.47748 203.02252 C 226.67418 205.21922 230.23573 205.21922 232.43243 203.02252 Z"/></svg>
|
||||
<svg class="tc-image-close-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M65.0864256,75.4091629 L14.9727349,125.522854 C11.8515951,128.643993 6.78104858,128.64922 3.65685425,125.525026 C0.539017023,122.407189 0.5336324,117.334539 3.65902635,114.209145 L53.7727171,64.0954544 L3.65902635,13.9817637 C0.537886594,10.8606239 0.532659916,5.79007744 3.65685425,2.6658831 C6.77469148,-0.451954124 11.8473409,-0.457338747 14.9727349,2.66805521 L65.0864256,52.7817459 L115.200116,2.66805521 C118.321256,-0.453084553 123.391803,-0.458311231 126.515997,2.6658831 C129.633834,5.78372033 129.639219,10.8563698 126.513825,13.9817637 L76.4001341,64.0954544 L126.513825,114.209145 C129.634965,117.330285 129.640191,122.400831 126.515997,125.525026 C123.39816,128.642863 118.32551,128.648248 115.200116,125.522854 L65.0864256,75.4091629 L65.0864256,75.4091629 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
title: $:/core/images/delete-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-delete-button tc-image-button" viewBox="303 155 39 50" width="17pt" height="22pt"><path d="M 333 164.25 L 333 157.25 C 333 156.14543 332.10457 155.25 331 155.25 L 314.75 155.25 C 314.75 155.25 314.75 155.25 314.75 155.25 C 313.64543 155.25 312.75 156.14543 312.75 157.25 L 312.75 164.25 L 303.75 164.25 L 303.75 168.75 L 306 168.75 L 306 201.75 L 306 201.75 L 306 201.75 C 306 203.40685 307.34315 204.75 309 204.75 L 336.75 204.75 C 338.40685 204.75 339.75 203.40685 339.75 201.75 L 339.75 168.75 L 342 168.75 L 342 164.25 Z M 317.25 160.75 L 317.25 160.75 C 317.25 160.19772 317.69772 159.75 318.25 159.75 C 318.25 159.75 318.25 159.75 318.25 159.75 L 327.5 159.75 C 328.05228 159.75 328.5 160.19772 328.5 160.75 L 328.5 164.25 L 317.25 164.25 L 317.25 160.75 Z M 310.5 168.75 L 312.75 168.75 L 312.75 200.25 L 310.5 200.25 Z M 317.25 168.75 L 319.5 168.75 L 319.5 200.25 L 317.25 200.25 Z M 324 168.75 L 326.25 168.75 L 326.25 200.25 L 324 200.25 Z M 330.75 168.75 L 333 168.75 L 333 200.25 L 330.75 200.25 Z"/></svg>
|
||||
<svg class="tc-image-delete-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd" transform="translate(12.000000, 0.000000)">
|
||||
<rect x="0" y="11" width="105" height="16" rx="8"></rect>
|
||||
<rect x="28" y="0" width="48" height="16" rx="8"></rect>
|
||||
<rect x="8" y="16" width="16" height="112" rx="8"></rect>
|
||||
<rect x="8" y="112" width="88" height="16" rx="8"></rect>
|
||||
<rect x="80" y="16" width="16" height="112" rx="8"></rect>
|
||||
<rect x="56" y="16" width="16" height="112" rx="8"></rect>
|
||||
<rect x="32" y="16" width="16" height="112" rx="8"></rect>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/done-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-done-button tc-image-button" viewBox="434 150 68 55" width="22pt" height="18pt"><path d="M 438.49266 178.00797 L 439.00744 177.49319 C 441.35054 175.15008 445.14946 175.15004 447.49262 177.49309 L 452.50734 182.50757 C 454.8505 184.85063 458.6494 184.85058 460.99252 182.50748 L 488.50747 154.99255 C 490.85058 152.64944 494.6495 152.6494 496.99266 154.99246 L 497.50722 155.506995 C 499.8504 157.85009 499.8505 161.64908 497.5074 163.99228 C 497.50738 163.99229 497.50736 163.99231 497.50734 163.99233 L 460.9926 200.5077 C 458.64947 202.85087 454.85048 202.8509 452.50732 200.50778 C 452.5073 200.50777 452.5073 200.50777 452.5073 200.50776 L 438.49268 186.49327 C 436.14952 184.15013 436.1495 180.35114 438.49264 178.00799 C 438.49265 178.00798 438.49265 178.00797 438.49266 178.00797 Z"/></svg>
|
||||
<svg class="tc-image-done-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M3.52445141,76.8322939 C2.07397484,75.3828178 1.17514421,73.3795385 1.17514421,71.1666288 L1.17514421,23.1836596 C1.17514421,18.7531992 4.75686621,15.1751442 9.17514421,15.1751442 C13.5844319,15.1751442 17.1751442,18.7606787 17.1751442,23.1836596 L17.1751442,63.1751442 L119.173716,63.1751442 C123.590457,63.1751442 127.175144,66.7568662 127.175144,71.1751442 C127.175144,75.5844319 123.592783,79.1751442 119.173716,79.1751442 L9.17657227,79.1751442 C6.96796403,79.1751442 4.9674142,78.279521 3.51911285,76.8315312 Z" id="Rectangle-285" transform="translate(64.175144, 47.175144) rotate(-45.000000) translate(-64.175144, -47.175144) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
title: $:/core/images/down-arrow
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-down-arrow tc-image-button" viewBox="63 152 64 64" width="22pt" height="22pt"><path d="M 98.001786 212.81802 L 123.45763 187.36218 C 125.21499 185.60482 125.21499 182.75557 123.45763 180.99821 C 121.70027 179.24086 118.85103 179.24086 117.09367 180.99821 L 94.819805 203.27208 L 72.54594 180.99821 C 70.788582 179.24086 67.93934 179.24086 66.18198 180.99821 C 64.42462 182.75557 64.42462 185.60482 66.18198 187.36218 L 91.637825 212.81802 C 93.395184 214.57538 96.244426 214.57538 98.001786 212.81802 Z"/></svg>
|
||||
<svg class="tc-image-down-arrow tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<path d="M109.35638,81.3533152 C107.923899,82.7869182 105.94502,83.6751442 103.759224,83.6751442 L24.5910645,83.6751442 C20.225873,83.6751442 16.6751442,80.1307318 16.6751442,75.7584775 C16.6751442,71.3951199 20.2192225,67.8418109 24.5910645,67.8418109 L95.8418109,67.8418109 L95.8418109,-3.40893546 C95.8418109,-7.77412698 99.3862233,-11.3248558 103.758478,-11.3248558 C108.121835,-11.3248558 111.675144,-7.78077754 111.675144,-3.40893546 L111.675144,75.7592239 C111.675144,77.9416955 110.789142,79.9205745 109.356651,81.3538862 Z" transform="translate(64.175144, 36.175144) rotate(45.000000) translate(-64.175144, -36.175144) "></path>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
title: $:/core/images/edit-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-edit-button tc-image-button" viewBox="244 193 20 22" width="20pt" height="22pt"><path d="M 257.33334 196.80951 L 245.90476 207.2857 L 244 212.0476 L 248.7619 210.14284 L 260.19048 199.66665 Z M 259.2381 194.90475 L 258.28566 195.85716 L 261.14284 198.71428 L 262.09522 197.76187 Z M 261.14286 193 L 260.19042 193.95241 L 263.04762 196.80953 L 264 195.85714 Z M 244 213.72882 C 244 213.72882 247.4281 215.43353 250.8572 213.7288 C 254.28599 212.02405 261.14284 214.86531 261.14284 214.86531 L 261.14284 213.72884 C 261.14284 213.72884 254.28577 210.88755 250.8572 212.5923 C 247.42858 214.29712 244 212.59228 244 212.59228 Z"/></svg>
|
||||
<svg class="tc-image-edit-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M116.870058,45.3431458 L108.870058,45.3431458 L108.870058,45.3431458 L108.870058,61.3431458 L116.870058,61.3431458 L116.870058,45.3431458 Z M124.870058,45.3431458 L127.649881,45.3431458 C132.066101,45.3431458 135.656854,48.9248678 135.656854,53.3431458 C135.656854,57.7524334 132.07201,61.3431458 127.649881,61.3431458 L124.870058,61.3431458 L124.870058,45.3431458 Z M100.870058,45.3431458 L15.6638275,45.3431458 C15.5064377,45.3431458 15.3501085,45.3476943 15.1949638,45.3566664 L15.1949638,45.3566664 C15.0628002,45.3477039 14.928279,45.3431458 14.7913977,45.3431458 C6.68160973,45.3431458 -8.34314575,53.3431458 -8.34314575,53.3431458 C-8.34314575,53.3431458 6.85614548,61.3431458 14.7913977,61.3431458 C14.9266533,61.3431458 15.0596543,61.3384973 15.190398,61.3293588 C15.3470529,61.3385075 15.5049057,61.3431458 15.6638275,61.3431458 L100.870058,61.3431458 L100.870058,45.3431458 L100.870058,45.3431458 Z" transform="translate(63.656854, 53.343146) rotate(-45.000000) translate(-63.656854, -53.343146) "></path>
|
||||
<path d="M35.1714596,124.189544 C41.9594858,123.613403 49.068777,121.917633 58.85987,118.842282 C60.6854386,118.268877 62.4306907,117.705515 65.1957709,116.802278 C81.1962861,111.575575 87.0734839,109.994907 93.9414474,109.655721 C102.29855,109.242993 107.795169,111.785371 111.520478,118.355045 C112.610163,120.276732 115.051363,120.951203 116.97305,119.861518 C118.894737,118.771832 119.569207,116.330633 118.479522,114.408946 C113.146151,105.003414 104.734907,101.112919 93.5468356,101.66546 C85.6716631,102.054388 79.4899908,103.716944 62.7116783,109.197722 C59.9734132,110.092199 58.2519873,110.64787 56.4625698,111.20992 C37.002649,117.322218 25.6914684,118.282267 16.8654804,112.957098 C14.9739614,111.815848 12.5154166,112.424061 11.3741667,114.31558 C10.2329168,116.207099 10.84113,118.665644 12.7326489,119.806894 C19.0655164,123.627836 26.4866335,124.926678 35.1714596,124.189544 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -3,10 +3,6 @@ tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-export-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<g transform="translate(17.000000, 0.000000)">
|
||||
<path d="M22.1250738,80.1852318 L44.5417352,102.861881 C46.0418294,104.379373 48.4739749,104.379373 49.9740691,102.861881 L72.3907305,80.1852318 C73.8908246,78.6677396 73.8908246,76.2073861 72.3907305,74.6898939 C71.670357,73.9611656 70.6933246,73.5517715 69.6745636,73.5517715 L62.6228651,73.5517715 C60.5014118,73.5517715 58.7816243,71.812038 58.7816243,69.6659802 L58.7816243,57.0371585 C58.7816243,54.8911007 57.0618368,53.1513672 54.9403836,53.1513672 L39.5754207,53.1513672 C37.4539675,53.1513672 35.73418,54.8911007 35.73418,57.0371585 L35.73418,57.0371585 L35.73418,69.6659802 C35.73418,71.812038 34.0143925,73.5517715 31.8929392,73.5517715 L24.8412407,73.5517715 C22.7197875,73.5517715 21,75.2915051 21,77.4375628 C21,78.4681395 21.4047003,79.4565034 22.1250738,80.1852318 L22.1250738,80.1852318 Z"></path>
|
||||
<path d="M0,122.5 C0,125.537566 2.46243388,128 5.5,128 L88.5,128 C91.5375661,128 94,125.537566 94,122.5 L94,38.9285714 C94,37.4764177 93.4257051,36.0831928 92.402406,35.0528486 L59.202406,1.62427715 C58.1698923,0.584654954 56.7652299,0 55.3,0 L5.5,0 C2.46243388,0 0,2.46243388 0,5.5 L0,122.5 Z M83,44.9285714 L83,117 L11,117 L11,11 L50.3,11 L50.3,39.4285714 C50.3,42.4661376 52.7624339,44.9285714 55.8,44.9285714 L83,44.9285714 Z"></path>
|
||||
<path d="M88,44.9285714 C92.8908847,44.9285714 95.3488993,39.0230699 91.902406,35.5528486 L58.702406,2.12427715 C55.2430914,-1.3588537 49.3,1.09092089 49.3,6 L49.3,39.4285714 C49.3,42.4661376 51.7624339,44.9285714 54.8,44.9285714 L88,44.9285714 Z"></path>
|
||||
</g>
|
||||
<path d="M8.00348646,127.999999 C8.00464867,128 8.00581094,128 8.00697327,128 L119.993027,128 C122.205254,128 124.207939,127.101378 125.657096,125.651198 L125.656838,125.65759 C127.104563,124.210109 128,122.21009 128,119.999949 L128,56.0000511 C128,51.5817449 124.409288,48 120,48 C115.581722,48 112,51.5797863 112,56.0000511 L112,112 L16,112 L16,56.0000511 C16,51.5817449 12.4092877,48 8,48 C3.581722,48 7.10542736e-15,51.5797863 7.10542736e-15,56.0000511 L7.10542736e-15,119.999949 C7.10542736e-15,124.418255 3.59071231,128 8,128 C8.00116233,128 8.0023246,128 8.00348681,127.999999 Z M56.6235633,27.3113724 L47.6580188,36.2769169 C44.5333664,39.4015692 39.4634864,39.4061295 36.339292,36.2819351 C33.2214548,33.1640979 33.2173444,28.0901742 36.3443103,24.9632084 L58.9616908,2.34582788 C60.5248533,0.782665335 62.5748436,0.000361191261 64.624516,2.38225238e-14 L64.6193616,0.00151809229 C66.6695374,0.000796251595 68.7211167,0.781508799 70.2854358,2.34582788 L92.9028163,24.9632084 C96.0274686,28.0878607 96.0320289,33.1577408 92.9078345,36.2819351 C89.7899973,39.3997724 84.7160736,39.4038827 81.5891078,36.2769169 L72.6235633,27.3113724 L72.6235633,88.5669606 C72.6235633,92.9781015 69.0418413,96.5662064 64.6235633,96.5662064 C60.2142756,96.5662064 56.6235633,92.984822 56.6235633,88.5669606 L56.6235633,27.3113724 L56.6235633,27.3113724 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/home-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-home-button tc-image-button" viewBox="81 513 64 54" width="22pt" height="22pt"><g><path d="M 97.04536 522.62083 L 81.364685 531.49067 L 87.85863 531.49067 L 87.85863 566.9699 L 107.49902 566.9699 L 107.49902 552.99265 L 117.95268 552.99265 L 117.95268 566.9699 L 137.59307 566.9699 L 137.59307 531.49067 L 144.086885 531.49067 L 112.72591 513.751 L 107.49902 516.70758 L 107.49902 513.751 L 97.04536 513.751 Z M 94.669443 534.17844 L 103.222493 534.17844 L 103.222493 545.19854 L 94.669443 545.19854 Z M 108.449266 534.17844 L 117.002435 534.17844 L 117.002435 545.19854 L 108.449266 545.19854 Z M 122.387575 534.17844 L 130.9405 534.17844 L 130.9405 545.19854 L 122.387575 545.19854 Z"/></g></svg>
|
||||
<svg class="tc-image-home-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M112.9847,119.501583 C112.99485,119.336814 113,119.170705 113,119.003406 L113,67.56802 C116.137461,70.5156358 121.076014,70.4518569 124.133985,67.3938855 C127.25818,64.2696912 127.260618,59.2068102 124.131541,56.0777326 L70.3963143,2.34250601 C68.8331348,0.779326498 66.7828947,-0.000743167069 64.7337457,1.61675364e-05 C62.691312,-0.00409949529 60.6426632,0.777559815 59.077717,2.34250601 L33,28.420223 L33,28.420223 L33,8.00697327 C33,3.58484404 29.4092877,0 25,0 C20.581722,0 17,3.59075293 17,8.00697327 L17,44.420223 L5.3424904,56.0777326 C2.21694607,59.2032769 2.22220878,64.2760483 5.34004601,67.3938855 C8.46424034,70.5180798 13.5271213,70.5205187 16.6561989,67.3914411 L17,67.04764 L17,119.993027 C17,119.994189 17.0000002,119.995351 17.0000007,119.996514 C17.0000002,119.997675 17,119.998838 17,120 C17,124.418278 20.5881049,128 24.9992458,128 L105.000754,128 C109.418616,128 113,124.409288 113,120 C113,119.832611 112.99485,119.666422 112.9847,119.501583 Z M97,112 L97,51.5736087 L97,51.5736087 L64.7370156,19.3106244 L33,51.04764 L33,112 L97,112 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
title: $:/core/images/info-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-info-button tc-image-button" viewBox="294 150 58 58" width="22pt" height="22pt"><path d="M 342.76236 158.98764 C 331.77887 148.0041 313.97113 148.0041 302.98764 158.98764 C 292.0041 169.97113 292.0041 187.77887 302.98764 198.76236 C 313.97113 209.7459 331.77887 209.7459 342.76236 198.76236 C 353.7459 187.77887 353.7459 169.97113 342.76236 158.98764 M 326.5425 157.5 L 326.5425 157.5 C 327.72545 157.5 328.72201 157.91022 329.5337 158.73088 C 330.34465 159.55157 330.75 160.54402 330.75 161.7075 C 330.75 162.87172 330.33979 163.86316 329.51911 164.68385 C 328.69842 165.5045 327.70674 165.91501 326.5425 165.91501 C 325.39801 165.91501 324.4153 165.5045 323.5946 164.68385 C 322.77393 163.86316 322.36372 162.87172 322.36372 161.7075 C 322.36372 160.54402 322.76906 159.55157 323.58 158.73088 C 324.39171 157.91022 325.3793 157.5 326.5425 157.5 Z M 327.80211 190.47259 C 324.91945 195.49132 321.85778 198 318.61462 198 C 317.37452 198 316.38691 197.65158 315.65186 196.9555 C 314.9176 196.25866 314.54943 195.37617 314.54943 194.30782 C 314.54943 193.60202 314.71223 192.70572 315.03629 191.61813 L 319.0151 177.93651 C 319.39685 176.61922 319.58735 175.62754 319.58735 174.95991 C 319.58735 174.53996 319.40582 174.16692 319.04356 173.84286 C 318.68052 173.51905 318.18469 173.35701 317.55527 173.35701 C 317.26861 173.35701 316.92506 173.36677 316.5246 173.38548 L 316.89661 172.2407 L 326.59967 170.66627 L 328.31744 170.66627 L 322.44986 191.01638 C 322.12503 192.18064 321.963 192.94337 321.963 193.30666 C 321.963 193.51588 322.04862 193.71121 322.2204 193.89273 C 322.39218 194.07425 322.5737 194.16554 322.7642 194.16477 C 323.08903 194.16554 323.4131 194.02221 323.73792 193.73559 C 324.59605 193.02976 325.6267 191.75142 326.82838 189.90008 Z"/></svg>
|
||||
<svg class="tc-image-info-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<g transform="translate(0.049406, 0.000000)">
|
||||
<path d="M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z"></path>
|
||||
<circle cx="64" cy="32" r="8"></circle>
|
||||
<rect x="56" y="48" width="16" height="56" rx="8"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/menu-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-menu-button tc-image-button" viewBox="216 585 63 45" width="22pt" height="22pt"><g><path d="M 274.5 585 L 229.5 585 C 227.01472 585 225 587.01472 225 589.5 L 225 589.5 C 225 591.98528 227.01472 594 229.5 594 L 274.5 594 C 276.98528 594 279 591.98528 279 589.5 L 279 589.5 C 279 587.01472 276.98528 585 274.5 585 Z"/><path d="M 274.5 603 L 229.5 603 C 227.01472 603 225 605.01472 225 607.5 L 225 607.5 C 225 609.98528 227.01472 612 229.5 612 L 274.5 612 C 276.98528 612 279 609.98528 279 607.5 L 279 607.5 C 279 605.01472 276.98528 603 274.5 603 Z"/><path d="M 274.5 621 L 229.5 621 C 227.01472 621 225 623.01472 225 625.5 L 225 625.5 C 225 627.9853 227.01472 630 229.5 630 L 274.5 630 C 276.98528 630 279 627.9853 279 625.5 L 279 625.5 C 279 623.01472 276.98528 621 274.5 621 Z"/></g></svg>
|
||||
<svg class="tc-image-menu-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<rect x="0" y="16" width="128" height="16" rx="8"></rect>
|
||||
<rect x="0" y="56" width="128" height="16" rx="8"></rect>
|
||||
<rect x="0" y="96" width="128" height="16" rx="8"></rect>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/new-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-new-button tc-image-button" viewBox="83 81 50 50" width="22pt" height="22pt"><path d="M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z"/></svg>
|
||||
<svg class="tc-image-new-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M56,72 L8.00697327,72 C3.59075293,72 0,68.418278 0,64 C0,59.5907123 3.58484404,56 8.00697327,56 L56,56 L56,8.00697327 C56,3.59075293 59.581722,0 64,0 C68.4092877,0 72,3.58484404 72,8.00697327 L72,56 L119.993027,56 C124.409247,56 128,59.581722 128,64 C128,68.4092877 124.415156,72 119.993027,72 L72,72 L72,119.993027 C72,124.409247 68.418278,128 64,128 C59.5907123,128 56,124.415156 56,119.993027 L56,72 L56,72 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -3,6 +3,12 @@ tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-new-here-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M56.5301831,72 L48.53728,72 C44.1183542,72 40.5301831,68.418278 40.5301831,64 C40.5301831,59.5907123 44.1150825,56 48.53728,56 L56.5301831,56 L56.5301831,48.0070969 C56.5301831,43.5881712 60.1119051,40 64.5301831,40 C68.9394708,40 72.5301831,43.5848994 72.5301831,48.0070969 L72.5301831,56 L80.5230862,56 C84.9420119,56 88.5301831,59.581722 88.5301831,64 C88.5301831,68.4092877 84.9452837,72 80.5230862,72 L72.5301831,72 L72.5301831,79.9929031 C72.5301831,84.4118288 68.9484611,88 64.5301831,88 C60.1208954,88 56.5301831,84.4151006 56.5301831,79.9929031 L56.5301831,72 Z M64.5301831,128 C99.8764071,128 128.530183,99.346224 128.530183,64 C128.530183,28.653776 99.8764071,0 64.5301831,0 C29.1839591,0 0.530183077,28.653776 0.530183077,64 C0.530183077,99.346224 29.1839591,128 64.5301831,128 Z M64.5301831,118 C94.3535596,118 118.530183,93.8233765 118.530183,64 C118.530183,34.1766235 94.3535596,10 64.5301831,10 C34.7068066,10 10.5301831,34.1766235 10.5301831,64 C10.5301831,93.8233765 34.7068066,118 64.5301831,118 Z M64.5301831,108 C88.8307121,108 108.530183,88.300529 108.530183,64 C108.530183,39.699471 88.8307121,20 64.5301831,20 C40.2296541,20 20.5301831,39.699471 20.5301831,64 C20.5301831,88.300529 40.2296541,108 64.5301831,108 Z M64.5301831,98 C83.3078646,98 98.5301831,82.7776815 98.5301831,64 C98.5301831,45.2223185 83.3078646,30 64.5301831,30 C45.7525016,30 30.5301831,45.2223185 30.5301831,64 C30.5301831,82.7776815 45.7525016,98 64.5301831,98 Z"></path>
|
||||
<g transform="translate(52.233611, 64.389922) rotate(75.000000) translate(-52.233611, -64.389922) translate(-7.734417, 3.702450)">
|
||||
<path d="M18.9270186,45.959338 L18.9080585,49.6521741 C18.8884833,53.4648378 21.0574548,58.7482162 23.7526408,61.4434022 L78.5671839,116.257945 C81.2617332,118.952495 85.6348701,118.950391 88.3334363,116.251825 L115.863237,88.7220241 C118.555265,86.0299959 118.564544,81.6509578 115.869358,78.9557717 L61.0548144,24.1412286 C58.3602652,21.4466794 53.0787224,19.2788426 49.2595808,19.3006519 L25.9781737,19.4336012 C22.1633003,19.4553862 19.0471195,22.5673232 19.0275223,26.3842526 L18.9871663,34.2443819 C19.0818862,34.255617 19.1779758,34.2665345 19.2754441,34.2771502 C22.6891275,34.6489512 27.0485594,34.2348566 31.513244,33.2285542 C31.7789418,32.8671684 32.075337,32.5211298 32.4024112,32.1940556 C34.8567584,29.7397084 38.3789778,29.0128681 41.4406288,30.0213822 C41.5958829,29.9543375 41.7503946,29.8866669 41.9041198,29.8183808 L42.1110981,30.2733467 C43.1114373,30.6972371 44.0473796,31.3160521 44.8614145,32.1300869 C48.2842088,35.5528813 48.2555691,41.130967 44.7974459,44.5890903 C41.4339531,47.952583 36.0649346,48.0717177 32.6241879,44.9262969 C27.8170558,45.8919233 23.0726921,46.2881596 18.9270186,45.959338 Z"></path>
|
||||
<path d="M45.4903462,38.8768094 C36.7300141,42.6833154 26.099618,44.7997354 18.1909048,43.9383587 C7.2512621,42.7468685 1.50150083,35.8404432 4.66865776,24.7010202 C7.51507386,14.6896965 15.4908218,6.92103848 24.3842626,4.38423012 C34.1310219,1.60401701 42.4070208,6.15882777 42.4070209,16.3101169 L34.5379395,16.310117 C34.5379394,11.9285862 31.728784,10.3825286 26.5666962,11.8549876 C20.2597508,13.6540114 14.3453742,19.4148216 12.2444303,26.8041943 C10.4963869,32.9523565 12.6250796,35.5092726 19.0530263,36.2093718 C25.5557042,36.9176104 35.0513021,34.9907189 42.7038419,31.5913902 L42.7421786,31.6756595 C44.3874154,31.5384763 47.8846101,37.3706354 45.9274416,38.6772897 L45.9302799,38.6835285 C45.9166992,38.6895612 45.9031139,38.6955897 45.8895238,38.7016142 C45.8389288,38.7327898 45.7849056,38.7611034 45.7273406,38.7863919 C45.6506459,38.8200841 45.571574,38.8501593 45.4903462,38.8768094 Z"></path>
|
||||
</g>
|
||||
<rect x="96" y="80" width="16" height="48" rx="8"></rect>
|
||||
<rect x="80" y="96" width="48" height="16" rx="8"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/options-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-options-button tc-image-button" viewBox="434 218 68 68" width="22pt" height="22pt"><path d="M 478.39696 232.53705 L 478.39696 232.53705 C 477.11453 231.85132 475.77877 231.30146 474.4106 230.88735 L 474.4106 218.24993 L 461.58944 218.24993 L 461.58944 230.88735 C 460.22126 231.30146 458.8855 231.85132 457.60308 232.53705 L 448.66825 223.60214 L 439.6022 232.66814 L 448.53716 241.60304 C 447.8515 242.88541 447.30158 244.22116 446.88747 245.58935 L 434.25 245.58935 L 434.25 258.41052 L 446.88747 258.41052 C 447.30158 259.7787 447.8515 261.11446 448.53716 262.39689 L 439.6022 271.33173 L 448.66825 280.39779 L 457.60308 271.46281 C 458.8855 272.14862 460.22126 272.69847 461.58944 273.11251 L 461.58944 285.74986 L 474.4106 285.74986 L 474.4106 273.11251 C 475.77877 272.69847 477.11453 272.14862 478.39696 271.46281 L 487.3318 280.39779 L 496.3977 271.33173 L 487.46287 262.39689 C 488.14854 261.11446 488.6984 259.7787 489.11257 258.41052 L 501.7499 258.41052 L 501.7499 245.58935 L 489.11257 245.58935 C 488.6984 244.22116 488.14854 242.88541 487.46287 241.60304 L 496.3977 232.66814 L 487.3318 223.60214 Z M 475.3328 244.66714 C 479.38253 248.71698 479.38253 255.2829 475.3328 259.33273 C 471.28297 263.3826 464.71706 263.3826 460.66723 259.33273 C 456.61737 255.2829 456.61737 248.71698 460.66723 244.66714 C 464.71706 240.61734 471.28297 240.61734 475.3328 244.66714"/></svg>
|
||||
<svg class="tc-image-options-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M110.48779,76.0002544 C109.354214,80.4045063 107.611262,84.5641217 105.354171,88.3838625 L105.354171,88.3838625 L112.07833,95.1080219 C115.20107,98.2307613 115.210098,103.299824 112.089164,106.420759 L106.420504,112.089418 C103.301049,115.208874 98.2346851,115.205502 95.1077675,112.078585 L88.3836082,105.354425 C84.5638673,107.611516 80.4042519,109.354468 76,110.488045 L76,110.488045 L76,119.993281 C76,124.409501 72.4220153,128.000254 68.0083475,128.000254 L59.9916525,128.000254 C55.5800761,128.000254 52,124.41541 52,119.993281 L52,110.488045 C47.5957481,109.354468 43.4361327,107.611516 39.6163918,105.354425 L32.8922325,112.078585 C29.7694931,115.201324 24.7004301,115.210353 21.5794957,112.089418 L15.9108363,106.420759 C12.7913807,103.301303 12.7947522,98.2349395 15.9216697,95.1080219 L22.6458291,88.3838625 C20.3887383,84.5641217 18.6457859,80.4045063 17.5122098,76.0002544 L8.00697327,76.0002544 C3.59075293,76.0002544 2.19088375e-16,72.4222697 4.89347582e-16,68.0086019 L9.80228577e-16,59.9919069 C1.25035972e-15,55.5803305 3.58484404,52.0002544 8.00697327,52.0002544 L17.5122098,52.0002544 C18.6457859,47.5960025 20.3887383,43.4363871 22.6458291,39.6166462 L15.9216697,32.8924868 C12.7989304,29.7697475 12.7899019,24.7006845 15.9108363,21.5797501 L21.5794957,15.9110907 C24.6989513,12.7916351 29.7653149,12.7950065 32.8922325,15.9219241 L39.6163918,22.6460835 C43.4361327,20.3889927 47.5957481,18.6460403 52,17.5124642 L52,8.00722764 C52,3.5910073 55.5779847,0.000254375069 59.9916525,0.000254375069 L68.0083475,0.000254375069 C72.4199239,0.000254375069 76,3.58509841 76,8.00722764 L76,17.5124642 C80.4042519,18.6460403 84.5638673,20.3889927 88.3836082,22.6460835 L95.1077675,15.9219241 C98.2305069,12.7991848 103.29957,12.7901562 106.420504,15.9110907 L112.089164,21.5797501 C115.208619,24.6992057 115.205248,29.7655693 112.07833,32.8924868 L105.354171,39.6166462 L105.354171,39.6166462 C107.611262,43.4363871 109.354214,47.5960025 110.48779,52.0002544 L119.993027,52.0002544 C124.409247,52.0002544 128,55.5782391 128,59.9919069 L128,68.0086019 C128,72.4201783 124.415156,76.0002544 119.993027,76.0002544 L110.48779,76.0002544 L110.48779,76.0002544 Z M64,96.0002544 C81.673112,96.0002544 96,81.6733664 96,64.0002544 C96,46.3271424 81.673112,32.0002544 64,32.0002544 C46.326888,32.0002544 32,46.3271424 32,64.0002544 C32,81.6733664 46.326888,96.0002544 64,96.0002544 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
title: $:/core/images/permalink-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-permalink-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 129 125">
|
||||
<svg class="tc-image-permalink-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M114,92.0520153 L85.0841463,92.0520153 L77.4459963,128.151367 L64.6248159,128.151367 L72.2629659,92.0520153 L47.8936301,92.0520153 L40.2554801,128.151367 L27.4342997,128.151367 L35.0724497,92.0520153 L17.7047515,92.0520153 L17.7047515,80.1401384 L37.6184997,80.1401384 L44.5292069,47.4961401 L17.7047515,47.4961401 L17.7047515,35.5842633 L46.9843266,35.5842633 L54.6224766,-0.151367188 L67.443657,-0.151367188 L59.805507,35.5842633 L84.1748428,35.5842633 L91.8129928,-0.151367188 L104.634173,-0.151367188 L97.0869535,35.5842633 L114,35.5842633 L114,47.4961401 L94.6318339,47.4961401 L87.7211267,80.1401384 L114,80.1401384 L114,92.0520153 Z M81.8106535,47.4961401 L57.3503873,47.4961401 L50.5306105,80.1401384 L74.8999463,80.1401384 L81.8106535,47.4961401 Z"></path>
|
||||
<path d="M80.4834582,48 L73.0956761,80 L73.0956761,80 L47.5165418,80 L54.9043239,48 L80.4834582,48 Z M84.1773493,32 L89.8007299,7.64246248 C90.7941633,3.33942958 95.0918297,0.64641956 99.3968675,1.64031585 C103.693145,2.63218977 106.385414,6.93288901 105.390651,11.2416793 L100.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L96.9043239,48 L89.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L85.8226507,96 L80.1992701,120.357538 C79.2058367,124.66057 74.9081703,127.35358 70.6031325,126.359684 C66.3068546,125.36781 63.6145865,121.067111 64.6093491,116.758321 L69.401785,96 L43.8226507,96 L38.1992701,120.357538 C37.2058367,124.66057 32.9081703,127.35358 28.6031325,126.359684 C24.3068546,125.36781 21.6145865,121.067111 22.6093491,116.758321 L27.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L31.0956761,80 L38.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L42.1773493,32 L47.8007299,7.64246248 C48.7941633,3.33942958 53.0918297,0.64641956 57.3968675,1.64031585 C61.6931454,2.63218977 64.3854135,6.93288901 63.3906509,11.2416793 L58.598215,32 L84.1773493,32 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -3,8 +3,6 @@ tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-permaview-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M111.6744,92.2645264 L82.9006479,92.2645264 L75.300034,128.289805 L62.5418608,128.289805 L70.1424746,92.2645264 L45.8928971,92.2645264 L38.2922833,128.289805 L25.53411,128.289805 L33.1347239,92.2645264 L15.8523757,92.2645264 L15.8523757,80.3770918 L35.6682618,80.3770918 L42.5450077,47.8000762 L15.8523757,47.8000762 L15.8523757,35.9126416 L44.9880621,35.9126416 L52.588676,0.250337625 L65.3468492,0.250337625 L57.7462354,35.9126416 L81.9958129,35.9126416 L89.5964268,0.250337625 L102.3546,0.250337625 L94.8444696,35.9126416 L111.6744,35.9126416 L111.6744,47.8000762 L92.4014152,47.8000762 L85.5246693,80.3770918 L111.6744,80.3770918 L111.6744,92.2645264 Z M79.643242,47.8000762 L55.3031809,47.8000762 L48.5169186,80.3770918 L72.7664961,80.3770918 L79.643242,47.8000762 Z"></path>
|
||||
<rect x="15.9992745" y="57.8809888" width="95.528227" height="11.975377"></rect>
|
||||
<path d="M70.8113396,0.098602426 L83.5061663,0.219342965 L56.0934841,128.105958 L43.968839,128.22602 L70.8113396,0.098602426 Z"></path>
|
||||
<path d="M81.4834582,48 L79.6365127,56 L79.6365127,56 L74.0573784,56 L75.9043239,48 L81.4834582,48 Z M85.1773493,32 L90.8007299,7.64246248 C91.7941633,3.33942958 96.0918297,0.64641956 100.396867,1.64031585 C104.693145,2.63218977 107.385414,6.93288901 106.390651,11.2416793 L101.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L97.9043239,48 L96.0573784,56 L104.000754,56 C108.411895,56 112,59.581722 112,64 C112,68.4092877 108.418616,72 104.000754,72 L92.3634873,72 L90.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L86.8226507,96 L81.1992701,120.357538 C80.2058367,124.66057 75.9081703,127.35358 71.6031325,126.359684 C67.3068546,125.36781 64.6145865,121.067111 65.6093491,116.758321 L70.401785,96 L64.8226507,96 L59.1992701,120.357538 C58.2058367,124.66057 53.9081703,127.35358 49.6031325,126.359684 C45.3068546,125.36781 42.6145865,121.067111 43.6093491,116.758321 L48.401785,96 L42.8226507,96 L37.1992701,120.357538 C36.2058367,124.66057 31.9081703,127.35358 27.6031325,126.359684 C23.3068546,125.36781 20.6145865,121.067111 21.6093491,116.758321 L26.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L30.0956761,80 L31.9426216,72 L23.9992458,72 C19.5881049,72 16,68.418278 16,64 C16,59.5907123 19.5813843,56 23.9992458,56 L35.6365127,56 L37.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L41.1773493,32 L46.8007299,7.64246248 C47.7941633,3.33942958 52.0918297,0.64641956 56.3968675,1.64031585 C60.6931454,2.63218977 63.3854135,6.93288901 62.3906509,11.2416793 L57.598215,32 L63.1773493,32 L68.8007299,7.64246248 C69.7941633,3.33942958 74.0918297,0.64641956 78.3968675,1.64031585 C82.6931454,2.63218977 85.3854135,6.93288901 84.3906509,11.2416793 L79.598215,32 L85.1773493,32 Z M53.9043239,48 L52.0573784,56 L57.6365127,56 L59.4834582,48 L53.9043239,48 Z M75.9426216,72 L74.0956761,80 L74.0956761,80 L68.5165418,80 L70.3634873,72 L75.9426216,72 L75.9426216,72 Z M48.3634873,72 L46.5165418,80 L52.0956761,80 L53.9426216,72 L48.3634873,72 L48.3634873,72 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -1,4 +1,6 @@
|
||||
title: $:/core/images/right-arrow
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-right-arrow tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128"><path d="M72.7982405,98.6541105 L127.184015,43.9832042 C130.938662,40.2089635 130.938662,34.0896964 127.184015,30.3154557 C123.429583,26.5412364 117.342116,26.5412364 113.587684,30.3154557 L66.0000107,78.152522 L18.4123803,30.3154557 C14.6578195,26.5412364 8.57048132,26.5412364 4.81592057,30.3154557 C1.06135981,34.0896964 1.06135981,40.2089635 4.81592057,43.9832042 L59.2017595,98.6541105 C62.9563202,102.428351 69.0436798,102.428351 72.7982405,98.6541126 L72.7982405,98.6541105 Z" transform="translate(66.000000, 64.484791) rotate(-90.000000) translate(-66.000000, -64.484791) "/></svg>
|
||||
<svg class="tc-image-right-arrow tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<path d="M80.3563798,109.353315 C78.9238993,110.786918 76.9450203,111.675144 74.7592239,111.675144 L-4.40893546,111.675144 C-8.77412698,111.675144 -12.3248558,108.130732 -12.3248558,103.758478 C-12.3248558,99.3951199 -8.78077754,95.8418109 -4.40893546,95.8418109 L66.8418109,95.8418109 L66.8418109,24.5910645 C66.8418109,20.225873 70.3862233,16.6751442 74.7584775,16.6751442 C79.1218352,16.6751442 82.6751442,20.2192225 82.6751442,24.5910645 L82.6751442,103.759224 C82.6751442,105.941695 81.7891419,107.920575 80.3566508,109.353886 Z" transform="translate(35.175144, 64.175144) rotate(-45.000000) translate(-35.175144, -64.175144) "></path>
|
||||
</svg>
|
||||
@@ -1,4 +1,8 @@
|
||||
title: $:/core/images/save-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-save-button tc-image-button" viewBox="4 512 64 60" width="22pt" height="21pt"><path d="M 13.5 537.75 L 11.5 537.75 C 11.5 537.75 11.5 537.75 11.5 537.75 C 7.6340064 537.75 4.4999994 540.884 4.5 544.75 L 4.5 564.5 L 4.5 564.5 C 4.5 564.5 4.5 564.5 4.5 564.5 L 4.5 564.5 C 4.5000006 568.366 7.634007 571.5 11.5 571.5 L 60.5 571.5 C 64.365993 571.5 67.5 568.366 67.5 564.5 L 67.5 544.75 C 67.5 540.884 64.365993 537.75 60.5 537.75 L 58.5 537.75 L 49.5 546.75 L 50 546.75 C 52.20914 546.75 54 548.54086 54 550.75 L 54 556.25 C 54 558.45914 52.20914 560.25 50 560.25 L 36 560.25 L 22 560.25 C 19.790861 560.25 18 558.45914 18 556.25 L 18 556.25 C 18 556.25 18 556.25 18 556.25 L 18 550.75 C 18 548.54086 19.790861 546.75 22 546.75 C 22 546.75 22 546.75 22 546.75 L 22.5 546.75 Z"/><path d="M 16.37132 533.87132 L 33.87868 551.37868 C 35.050253 552.55025 36.949747 552.55025 38.12132 551.37868 L 55.62868 533.87132 C 56.800252 532.69975 56.800252 530.80025 55.62868 529.62868 C 55.06607 529.06607 54.30301 528.75 53.50736 528.75 L 48 528.75 C 46.343146 528.75 45 527.40685 45 525.75 L 45 516 C 45 514.34315 43.656854 513 42 513 L 30 513 C 28.343146 513 27 514.34315 27 516 L 27 525.75 C 27 527.40685 25.656854 528.75 24 528.75 L 18.492641 528.75 C 16.835786 528.75 15.492641 530.09315 15.492641 531.75 C 15.492641 532.54565 15.808711 533.3087 16.37132 533.87132 Z"/></svg>
|
||||
<svg class="tc-image-save-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M120.78304,34.329058 C125.424287,43.1924006 128.049406,53.2778608 128.049406,63.9764502 C128.049406,99.3226742 99.3956295,127.97645 64.0494055,127.97645 C28.7031816,127.97645 0.0494055385,99.3226742 0.0494055385,63.9764502 C0.0494055385,28.6302262 28.7031816,-0.0235498012 64.0494055,-0.0235498012 C82.8568763,-0.0235498012 99.769563,8.08898558 111.479045,21.0056358 L114.159581,18.3250998 C117.289194,15.1954866 122.356036,15.1939641 125.480231,18.3181584 C128.598068,21.4359957 128.601317,26.5107804 125.473289,29.6388083 L120.78304,34.329058 Z M108.72451,46.3875877 C110.870571,51.8341374 112.049406,57.767628 112.049406,63.9764502 C112.049406,90.4861182 90.5590735,111.97645 64.0494055,111.97645 C37.5397375,111.97645 16.0494055,90.4861182 16.0494055,63.9764502 C16.0494055,37.4667822 37.5397375,15.9764502 64.0494055,15.9764502 C78.438886,15.9764502 91.3495036,22.308215 100.147097,32.3375836 L58.9411255,73.5435552 L41.975581,56.5780107 C38.8486152,53.4510448 33.7746915,53.4551552 30.6568542,56.5729924 C27.5326599,59.6971868 27.5372202,64.7670668 30.6618725,67.8917192 L53.279253,90.5090997 C54.8435723,92.073419 56.8951519,92.8541315 58.9380216,92.8558261 C60.987971,92.8559239 63.0389578,92.0731398 64.6049211,90.5071765 L108.72451,46.3875877 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -3,9 +3,6 @@ tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-storyview-classic tc-image-button" width="22pt" height="22pt" viewBox="0 0 129 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M9.99919566,0 C4.48152297,0 0.00856547772,4.48053479 0.00856547772,9.99063018 L0.00856547772,118.00937 C0.00856547772,123.527043 4.48910027,128 9.99919566,128 L118.017935,128 C123.535608,128 128.008565,123.519465 128.008565,118.00937 L128.008565,9.99063018 C128.008565,4.47295749 123.528031,0 118.017935,0 L9.99919566,0 Z M9.00856548,9 L9.00856548,119 L119.008565,119 L119.008565,9 L9.00856548,9 Z"></path>
|
||||
<rect x="16.0098828" y="16" width="96.203165" height="32"></rect>
|
||||
<rect x="16.0098828" y="55" width="96.203165" height="23"></rect>
|
||||
<rect x="16.0207797" y="85" width="96.203165" height="24"></rect>
|
||||
<path d="M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -3,10 +3,6 @@ tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-storyview-pop tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M9.99919566,0 C4.48152297,0 0.00856547772,4.48053479 0.00856547772,9.99063018 L0.00856547772,118.00937 C0.00856547772,123.527043 4.48910027,128 9.99919566,128 L118.017935,128 C123.535608,128 128.008565,123.519465 128.008565,118.00937 L128.008565,9.99063018 C128.008565,4.47295749 123.528031,0 118.017935,0 L9.99919566,0 Z M9.00856548,9 L9.00856548,119 L119.008565,119 L119.008565,9 L9.00856548,9 Z"></path>
|
||||
<rect x="16.0098828" y="16" width="96.203165" height="32"></rect>
|
||||
<path d="M16.0098828,55 L16.0098828,78 L112.213048,78 L112.213048,55 L16.0098828,55 Z M18.5049414,57.5 L18.5049414,75.5 L109.717989,75.5 L109.717989,57.5 L18.5049414,57.5 Z"></path>
|
||||
<rect x="25.6164067" y="60.5" width="76.9901172" height="12"></rect>
|
||||
<rect x="16.0207797" y="85" width="96.203165" height="24"></rect>
|
||||
<path d="M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M16.0098166,56 C11.586117,56 8,59.5776607 8,63.9924054 L8,80.0075946 C8,84.4216782 11.5838751,88 16.0098166,88 L111.990183,88 C116.413883,88 120,84.4223393 120,80.0075946 L120,63.9924054 C120,59.5783218 116.416125,56 111.990183,56 L16.0098166,56 L16.0098166,56 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -3,7 +3,6 @@ tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-storyview-zoomin tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M9.99919566,0 C4.48152297,0 0.00856547772,4.48053479 0.00856547772,9.99063018 L0.00856547772,118.00937 C0.00856547772,123.527043 4.48910027,128 9.99919566,128 L118.017935,128 C123.535608,128 128.008565,123.519465 128.008565,118.00937 L128.008565,9.99063018 C128.008565,4.47295749 123.528031,0 118.017935,0 L9.99919566,0 Z M9.00856548,9 L9.00856548,119 L119.008565,119 L119.008565,9 L9.00856548,9 Z"></path>
|
||||
<rect x="16.0098828" y="16" width="96.203165" height="57.9273639"></rect>
|
||||
<path d="M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.578055 16,24.0085154 L16,71.9914846 C16,76.4144655 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.421945 112,71.9914846 L112,24.0085154 C112,19.5855345 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
8
core/images/video.tid
Normal file
8
core/images/video.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: $:/core/images/video
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-video tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M64,12 C29.0909091,12 8.72727273,14.9166667 5.81818182,17.8333333 C2.90909091,20.75 1.93784382e-15,41.1666667 0,64.5 C1.93784382e-15,87.8333333 2.90909091,108.25 5.81818182,111.166667 C8.72727273,114.083333 29.0909091,117 64,117 C98.9090909,117 119.272727,114.083333 122.181818,111.166667 C125.090909,108.25 128,87.8333333 128,64.5 C128,41.1666667 125.090909,20.75 122.181818,17.8333333 C119.272727,14.9166667 98.9090909,12 64,12 Z M54.9161194,44.6182253 C51.102648,42.0759111 48.0112186,43.7391738 48.0112186,48.3159447 L48.0112186,79.6840553 C48.0112186,84.2685636 51.109784,85.9193316 54.9161194,83.3817747 L77.0838806,68.6032672 C80.897352,66.0609529 80.890216,61.9342897 77.0838806,59.3967328 L54.9161194,44.6182253 Z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -24,6 +24,12 @@ Encryption/ClearPassword/Caption: clear password
|
||||
Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption
|
||||
Encryption/SetPassword/Caption: set password
|
||||
Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption
|
||||
ExportPage/Caption: export all
|
||||
ExportPage/Hint: Export all tiddlers
|
||||
ExportTiddler/Caption: export tiddler
|
||||
ExportTiddler/Hint: Export tiddler
|
||||
ExportTiddlers/Caption: export tiddlers
|
||||
ExportTiddlers/Hint: Export tiddlers
|
||||
FullScreen/Caption: full-screen
|
||||
FullScreen/Hint: Enter or leave full-screen mode
|
||||
Import/Caption: import
|
||||
|
||||
@@ -94,7 +94,5 @@ Toolbars/PageControls/Caption: Page Toolbar
|
||||
Toolbars/PageControls/Hint: Choose which buttons are displayed on the main page toolbar
|
||||
Toolbars/ViewToolbar/Caption: View Toolbar
|
||||
Toolbars/ViewToolbar/Hint: Choose which buttons are displayed for tiddlers in view mode
|
||||
Tools/Caption: Tools
|
||||
Tools/Download/Full/Caption: Download full wiki
|
||||
Tools/Export/AllAsStaticHTML/Caption: Download all tiddlers as static HTML
|
||||
Tools/Export/Heading: Export
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ Body/Hint: Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add f
|
||||
Body/Placeholder: Type the text for this tiddler
|
||||
Body/Preview/Button/Hide: hide preview
|
||||
Body/Preview/Button/Show: show preview
|
||||
Field/Remove/Caption: remove field
|
||||
Field/Remove/Hint: Remove field
|
||||
Fields/Add/Button: add
|
||||
Fields/Add/Name/Placeholder: field name
|
||||
Fields/Add/Prompt: Add a new field:
|
||||
@@ -13,5 +15,11 @@ Shadow/Warning: This is a shadow tiddler. Any changes will override the default
|
||||
Shadow/OverriddenWarning: This is a modified shadow tiddler. You can revert to the default version by deleting this tiddler
|
||||
Tags/Add/Button: add
|
||||
Tags/Add/Placeholder: tag name
|
||||
Tags/Dropdown/Caption: tag list
|
||||
Tags/Dropdown/Hint: Show tag list
|
||||
Type/Dropdown/Caption: content type list
|
||||
Type/Dropdown/Hint: Show content type list
|
||||
Type/Delete/Caption: delete content type
|
||||
Type/Delete/Hint: Delete content type
|
||||
Type/Placeholder: content type
|
||||
Type/Prompt: Type:
|
||||
|
||||
6
core/language/en-GB/Exporters.multids
Normal file
6
core/language/en-GB/Exporters.multids
Normal file
@@ -0,0 +1,6 @@
|
||||
title: $:/language/Exporters/
|
||||
|
||||
StaticRiver: River of tiddlers as static HTML file
|
||||
JsonFile: JSON tiddlers file
|
||||
CsvFile: CSV tiddlers file
|
||||
TidFile: Single tiddler ".tid" file
|
||||
@@ -1,6 +1,7 @@
|
||||
title: $:/language/Filters/
|
||||
|
||||
AllTiddlers: All tiddlers except system tiddlers
|
||||
RecentSystemTiddlers: Recently modified tiddlers, including system tiddlers
|
||||
RecentTiddlers: Recently modified tiddlers
|
||||
AllTags: All tags except system tags
|
||||
Missing: Missing tiddlers
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
title: GettingStarted
|
||||
|
||||
Welcome to TiddlyWiki, the non-linear personal web notebook.
|
||||
\define lingo-base() $:/language/ControlPanel/Basics/
|
||||
Welcome to ~TiddlyWiki and the ~TiddlyWiki community
|
||||
|
||||
To get started, first verify that you can save changes successfully - see http://tiddlywiki.com/ for detailed instructions.
|
||||
Before you start storing important information in ~TiddlyWiki it is important to make sure that you can reliably save changes. See http://tiddlywiki.com/#GettingStarted for details
|
||||
|
||||
Then you can:
|
||||
!! Set up this ~TiddlyWiki
|
||||
|
||||
* Create new tiddlers using the 'plus' button in the sidebar
|
||||
* Visit the [[control panel|$:/ControlPanel]] using the 'cog' button in the sidebar to customise your wiki
|
||||
** Stop this message appearing by changing the default tiddlers under the ''Basics'' tab
|
||||
* Save changes using the 'download' button in the sidebar
|
||||
* Learn more about [[WikiText|http://tiddlywiki.com/static/WikiText.html]]
|
||||
|<$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
||||
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
||||
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|
||||
|
||||
See the [[control panel|$:/ControlPanel]] for more options.
|
||||
|
||||
8
core/language/en-GB/Help/editions.tid
Normal file
8
core/language/en-GB/Help/editions.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: $:/language/Help/editions
|
||||
description: Lists the available editions of TiddlyWiki
|
||||
|
||||
Lists the names and descriptions of the available editions. You can create a new wiki of a specified edition with the `--init` command.
|
||||
|
||||
```
|
||||
--editions
|
||||
```
|
||||
@@ -20,4 +20,4 @@ Note:
|
||||
* The init command will fail if the wiki folder is not empty
|
||||
* The init command removes any `includeWikis` definitions in the edition's `tiddlywiki.info` file
|
||||
* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)
|
||||
* `--help editions` returns a list of available editions
|
||||
* `--editions` returns a list of available editions
|
||||
|
||||
@@ -7,4 +7,5 @@ Sets the base output directory for subsequent commands. The default output direc
|
||||
--output <pathname>
|
||||
```
|
||||
|
||||
If the specified pathname is relative then it is resolved relative to the current working directory.
|
||||
If the specified pathname is relative then it is resolved relative to the current working directory. For example `--output .` sets the output directory to the current working directory.
|
||||
|
||||
|
||||
8
core/language/en-GB/Help/unpackplugin.tid
Normal file
8
core/language/en-GB/Help/unpackplugin.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: $:/language/Help/unpackplugin
|
||||
description: Unpack the payload tiddlers from a plugin
|
||||
|
||||
Extract the payload tiddlers from a plugin, creating them as ordinary tiddlers:
|
||||
|
||||
```
|
||||
--unpackplugin <title>
|
||||
```
|
||||
@@ -18,5 +18,6 @@ RecentChanges/DateFormat: DDth MMM YYYY
|
||||
SystemTiddler/Tooltip: This is a system tiddler
|
||||
TagManager/Colour/Heading: Colour
|
||||
TagManager/Icon/Heading: Icon
|
||||
TagManager/Info/Heading: Info
|
||||
TagManager/Tag/Heading: Tag
|
||||
UnsavedChangesWarning: You have unsaved changes in TiddlyWiki
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/language/Search/
|
||||
|
||||
DefaultResults/Caption: List
|
||||
Filter/Caption: Filter
|
||||
Filter/Hint: Search via a [[filter expression|http://tiddlywiki.com/static/Filters.html]]
|
||||
Filter/Matches: //<small><<resultCount>> matches</small>//
|
||||
|
||||
@@ -58,7 +58,7 @@ Commander.prototype.executeNextCommand = function() {
|
||||
// Get and check the command token
|
||||
var commandName = this.commandTokens[this.nextToken++];
|
||||
if(commandName.substr(0,2) !== "--") {
|
||||
this.callback("Missing command");
|
||||
this.callback("Missing command: " + commandName);
|
||||
} else {
|
||||
commandName = commandName.substr(2); // Trim off the --
|
||||
// Accumulate the parameters to the command
|
||||
|
||||
62
core/modules/commands/editions.js
Normal file
62
core/modules/commands/editions.js
Normal file
@@ -0,0 +1,62 @@
|
||||
/*\
|
||||
title: $:/core/modules/commands/editions.js
|
||||
type: application/javascript
|
||||
module-type: command
|
||||
|
||||
Command to list the available editions
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "editions",
|
||||
synchronous: true
|
||||
};
|
||||
|
||||
var Command = function(params,commander) {
|
||||
this.params = params;
|
||||
this.commander = commander;
|
||||
};
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
var fs = require("fs"),
|
||||
path = require("path"),
|
||||
self = this;
|
||||
// Enumerate the edition paths
|
||||
var editionPaths = $tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar),
|
||||
editions = {};
|
||||
for(var editionIndex=0; editionIndex<editionPaths.length; editionIndex++) {
|
||||
var editionPath = editionPaths[editionIndex];
|
||||
// Enumerate the folders
|
||||
var entries = fs.readdirSync(editionPath);
|
||||
for(var entryIndex=0; entryIndex<entries.length; entryIndex++) {
|
||||
var entry = entries[entryIndex];
|
||||
// Check if directories have a valid tiddlywiki.info
|
||||
if(!editions[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {
|
||||
var info;
|
||||
try {
|
||||
info = JSON.parse(fs.readFileSync(path.resolve(editionPath,entry,"tiddlywiki.info"),"utf8"));
|
||||
} catch(ex) {
|
||||
}
|
||||
if(info) {
|
||||
editions[entry] = info.description || "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Output the list
|
||||
this.commander.streams.output.write("Available editions:\n\n");
|
||||
$tw.utils.each(editions,function(description,name) {
|
||||
self.commander.streams.output.write(" " + name + ": " + description + "\n");
|
||||
});
|
||||
this.commander.streams.output.write("\n");
|
||||
return null;
|
||||
};
|
||||
|
||||
exports.Command = Command;
|
||||
|
||||
})();
|
||||
@@ -26,7 +26,7 @@ Command.prototype.execute = function() {
|
||||
var fs = require("fs"),
|
||||
path = require("path");
|
||||
// Check that we don't already have a valid wiki folder
|
||||
if($tw.boot.wikiTiddlersPath) {
|
||||
if($tw.boot.wikiTiddlersPath || ($tw.utils.isDirectory($tw.boot.wikiPath) && !$tw.utils.isDirectoryEmpty($tw.boot.wikiPath))) {
|
||||
return "Wiki folder is not empty";
|
||||
}
|
||||
// Loop through each of the specified editions
|
||||
|
||||
44
core/modules/commands/unpackplugin.js
Normal file
44
core/modules/commands/unpackplugin.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/*\
|
||||
title: $:/core/modules/commands/unpackplugin.js
|
||||
type: application/javascript
|
||||
module-type: command
|
||||
|
||||
Command to extract the shadow tiddlers from within a plugin
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "unpackplugin",
|
||||
synchronous: true
|
||||
};
|
||||
|
||||
var Command = function(params,commander,callback) {
|
||||
this.params = params;
|
||||
this.commander = commander;
|
||||
this.callback = callback;
|
||||
};
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
if(this.params.length < 1) {
|
||||
return "Missing plugin name";
|
||||
}
|
||||
var self = this,
|
||||
title = this.params[0],
|
||||
pluginData = this.commander.wiki.getTiddlerData(title);
|
||||
if(!pluginData) {
|
||||
return "Plugin '" + title + "' not found";
|
||||
}
|
||||
$tw.utils.each(pluginData.tiddlers,function(tiddler) {
|
||||
self.commander.wiki.addTiddler(new $tw.Tiddler(tiddler));
|
||||
});
|
||||
return null;
|
||||
};
|
||||
|
||||
exports.Command = Command;
|
||||
|
||||
})();
|
||||
@@ -17,6 +17,19 @@ exports.preferences = {};
|
||||
exports.preferences.notificationDuration = 3 * 1000;
|
||||
exports.preferences.jsonSpaces = 4;
|
||||
|
||||
exports.textPrimitives = {
|
||||
upperLetter: "[A-Z\u00c0-\u00d6\u00d8-\u00de\u0150\u0170]",
|
||||
lowerLetter: "[a-z\u00df-\u00f6\u00f8-\u00ff\u0151\u0171]",
|
||||
anyLetter: "[A-Za-z0-9\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]",
|
||||
blockPrefixLetters: "[A-Za-z0-9-_\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]"
|
||||
};
|
||||
|
||||
exports.textPrimitives.unWikiLink = "~";
|
||||
exports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + "+" +
|
||||
exports.textPrimitives.lowerLetter + "+" +
|
||||
exports.textPrimitives.upperLetter +
|
||||
exports.textPrimitives.anyLetter + "*";
|
||||
|
||||
exports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
||||
|
||||
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
||||
|
||||
@@ -72,21 +72,21 @@ exports["application/x-tiddler-html-div"] = function(text,fields) {
|
||||
};
|
||||
|
||||
exports["application/json"] = function(text,fields) {
|
||||
var tiddlers = JSON.parse(text),
|
||||
result = [],
|
||||
getKnownFields = function(tid) {
|
||||
var fields = {};
|
||||
"title text created creator modified modifier type tags".split(" ").forEach(function(value) {
|
||||
if(tid[value] !== null) {
|
||||
fields[value] = tid[value];
|
||||
var incoming = JSON.parse(text),
|
||||
results = [];
|
||||
if($tw.utils.isArray(incoming)) {
|
||||
for(var t=0; t<incoming.length; t++) {
|
||||
var incomingFields = incoming[t],
|
||||
fields = {};
|
||||
for(var f in incomingFields) {
|
||||
if(typeof incomingFields[f] === "string") {
|
||||
fields[f] = incomingFields[f];
|
||||
}
|
||||
});
|
||||
return fields;
|
||||
};
|
||||
for(var t=0; t<tiddlers.length; t++) {
|
||||
result.push(getKnownFields(tiddlers[t]));
|
||||
}
|
||||
results.push(fields);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return results;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -26,6 +26,8 @@ exports.field = function(source,operator,options) {
|
||||
if(text !== null && !operator.regexp.exec(text)) {
|
||||
results.push(title);
|
||||
}
|
||||
} else {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -35,6 +37,8 @@ exports.field = function(source,operator,options) {
|
||||
if(text !== null && text !== operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
} else {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ exports.has = function(source,operator,options) {
|
||||
var results = [];
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === "")) {
|
||||
if(!tiddler || (tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === ""))) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -17,10 +17,18 @@ Export our filter function
|
||||
*/
|
||||
exports.search = function(source,operator,options) {
|
||||
var invert = operator.prefix === "!";
|
||||
return options.wiki.search(operator.operand,{
|
||||
source: source,
|
||||
invert: invert
|
||||
});
|
||||
if(operator.suffix) {
|
||||
return options.wiki.search(operator.operand,{
|
||||
source: source,
|
||||
invert: invert,
|
||||
field: operator.suffix
|
||||
});
|
||||
} else {
|
||||
return options.wiki.search(operator.operand,{
|
||||
source: source,
|
||||
invert: invert
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
31
core/modules/filters/splitbefore.js
Normal file
31
core/modules/filters/splitbefore.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/splitbefore.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator that splits each result on the first occurance of the specified separator and returns the unique values.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.splitbefore = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
var parts = title.split(operator.operand);
|
||||
if(parts.length === 1) {
|
||||
$tw.utils.pushTop(results,parts[0]);
|
||||
} else {
|
||||
$tw.utils.pushTop(results,parts[0] + operator.operand);
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
45
core/modules/macros/contrastcolour.js
Normal file
45
core/modules/macros/contrastcolour.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*\
|
||||
title: $:/core/modules/macros/contrastcolour.js
|
||||
type: application/javascript
|
||||
module-type: macro
|
||||
|
||||
Macro to choose which of two colours has the highest contrast with a base colour
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Information about this macro
|
||||
*/
|
||||
|
||||
exports.name = "contrastcolour";
|
||||
|
||||
exports.params = [
|
||||
{name: "target"},
|
||||
{name: "fallbackTarget"},
|
||||
{name: "colourA"},
|
||||
{name: "colourB"}
|
||||
];
|
||||
|
||||
/*
|
||||
Run the macro
|
||||
*/
|
||||
exports.run = function(target,fallbackTarget,colourA,colourB) {
|
||||
var rgbTarget = $tw.utils.parseCSSColor(target) || $tw.utils.parseCSSColor(fallbackTarget);
|
||||
if(!rgbTarget) {
|
||||
return colourA;
|
||||
}
|
||||
// Colour brightness formula derived from http://www.w3.org/WAI/ER/WD-AERT/#color-contrast
|
||||
var rgbColourA = $tw.utils.parseCSSColor(colourA),
|
||||
rgbColourB = $tw.utils.parseCSSColor(colourB),
|
||||
brightnessTarget = rgbTarget[0] * 0.299 + rgbTarget[1] * 0.587 + rgbTarget[2] * 0.114,
|
||||
brightnessA = rgbColourA[0] * 0.299 + rgbColourA[1] * 0.587 + rgbColourA[2] * 0.114,
|
||||
brightnessB = rgbColourB[0] * 0.299 + rgbColourB[1] * 0.587 + rgbColourB[2] * 0.114;
|
||||
return Math.abs(brightnessTarget - brightnessA) > Math.abs(brightnessTarget - brightnessB) ? colourA : colourB;
|
||||
};
|
||||
|
||||
})();
|
||||
75
core/modules/macros/csvtiddlers.js
Normal file
75
core/modules/macros/csvtiddlers.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/*\
|
||||
title: $:/core/modules/macros/csvtiddlers.js
|
||||
type: application/javascript
|
||||
module-type: macro
|
||||
|
||||
Macro to output tiddlers matching a filter to CSV
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Information about this macro
|
||||
*/
|
||||
|
||||
exports.name = "csvtiddlers";
|
||||
|
||||
exports.params = [
|
||||
{name: "filter"},
|
||||
{name: "format"},
|
||||
];
|
||||
|
||||
/*
|
||||
Run the macro
|
||||
*/
|
||||
exports.run = function(filter,format) {
|
||||
var self = this,
|
||||
tiddlers = this.wiki.filterTiddlers(filter),
|
||||
tiddler,
|
||||
fields = [],
|
||||
t,f;
|
||||
// Collect all the fields
|
||||
for(t=0;t<tiddlers.length; t++) {
|
||||
tiddler = this.wiki.getTiddler(tiddlers[t]);
|
||||
for(f in tiddler.fields) {
|
||||
if(fields.indexOf(f) === -1) {
|
||||
fields.push(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sort the fields and bring the standard ones to the front
|
||||
fields.sort();
|
||||
"title text modified modifier created creator".split(" ").reverse().forEach(function(value,index) {
|
||||
var p = fields.indexOf(value);
|
||||
if(p !== -1) {
|
||||
fields.splice(p,1);
|
||||
fields.unshift(value)
|
||||
}
|
||||
});
|
||||
// Output the column headings
|
||||
var output = [], row = [];
|
||||
fields.forEach(function(value) {
|
||||
row.push(quoteAndEscape(value))
|
||||
});
|
||||
output.push(row.join(","));
|
||||
// Output each tiddler
|
||||
for(var t=0;t<tiddlers.length; t++) {
|
||||
row = [];
|
||||
tiddler = this.wiki.getTiddler(tiddlers[t]);
|
||||
for(f=0; f<fields.length; f++) {
|
||||
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : ""));
|
||||
}
|
||||
output.push(row.join(","));
|
||||
}
|
||||
return output.join("\n");
|
||||
};
|
||||
|
||||
function quoteAndEscape(value) {
|
||||
return "\"" + value.replace(/"/mg,"\"\"") + "\"";
|
||||
}
|
||||
|
||||
})();
|
||||
44
core/modules/macros/jsontiddlers.js
Normal file
44
core/modules/macros/jsontiddlers.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/*\
|
||||
title: $:/core/modules/macros/jsontiddlers.js
|
||||
type: application/javascript
|
||||
module-type: macro
|
||||
|
||||
Macro to output tiddlers matching a filter to JSON
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Information about this macro
|
||||
*/
|
||||
|
||||
exports.name = "jsontiddlers";
|
||||
|
||||
exports.params = [
|
||||
{name: "filter"}
|
||||
];
|
||||
|
||||
/*
|
||||
Run the macro
|
||||
*/
|
||||
exports.run = function(filter) {
|
||||
var tiddlers = this.wiki.filterTiddlers(filter),
|
||||
data = [];
|
||||
for(var t=0;t<tiddlers.length; t++) {
|
||||
var tiddler = this.wiki.getTiddler(tiddlers[t]);
|
||||
if(tiddler) {
|
||||
var fields = new Object();
|
||||
for(var field in tiddler.fields) {
|
||||
fields[field] = tiddler.getFieldString(field);
|
||||
}
|
||||
data.push(fields);
|
||||
}
|
||||
}
|
||||
return JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -17,7 +17,7 @@ var HtmlParser = function(type,text,options) {
|
||||
if(options._canonical_uri) {
|
||||
src = options._canonical_uri;
|
||||
} else if(text) {
|
||||
src = "data:text/html," + encodeURIComponent(text);
|
||||
src = "data:text/html;charset=utf-8," + encodeURIComponent(text);
|
||||
}
|
||||
this.tree = [{
|
||||
type: "element",
|
||||
|
||||
@@ -58,7 +58,7 @@ exports.parse = function() {
|
||||
var reEnd;
|
||||
if(this.match[3]) {
|
||||
// If so, the end of the body is marked with \end
|
||||
reEnd = /(\r?\n\\end(?:$|\r?\n))/mg;
|
||||
reEnd = /(\r?\n\\end[^\S\n\r]*(?:$|\r?\n))/mg;
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /(\r?\n)/mg;
|
||||
|
||||
@@ -23,23 +23,10 @@ Precede a camel case word with `~` to prevent it from being recognised as a link
|
||||
exports.name = "wikilink";
|
||||
exports.types = {inline: true};
|
||||
|
||||
var textPrimitives = {
|
||||
upperLetter: "[A-Z\u00c0-\u00d6\u00d8-\u00de\u0150\u0170]",
|
||||
lowerLetter: "[a-z\u00df-\u00f6\u00f8-\u00ff\u0151\u0171]",
|
||||
anyLetter: "[A-Za-z0-9\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]",
|
||||
blockPrefixLetters: "[A-Za-z0-9-_\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]"
|
||||
};
|
||||
|
||||
textPrimitives.unWikiLink = "~";
|
||||
textPrimitives.wikiLink = textPrimitives.upperLetter + "+" +
|
||||
textPrimitives.lowerLetter + "+" +
|
||||
textPrimitives.upperLetter +
|
||||
textPrimitives.anyLetter + "*";
|
||||
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = new RegExp(textPrimitives.unWikiLink + "?" + textPrimitives.wikiLink,"mg");
|
||||
this.matchRegExp = new RegExp($tw.config.textPrimitives.unWikiLink + "?" + $tw.config.textPrimitives.wikiLink,"mg");
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -51,12 +38,12 @@ exports.parse = function() {
|
||||
// Move past the macro call
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// If the link starts with the unwikilink character then just output it as plain text
|
||||
if(linkText.substr(0,1) === textPrimitives.unWikiLink) {
|
||||
if(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {
|
||||
return [{type: "text", text: linkText.substr(1)}];
|
||||
}
|
||||
// If the link has been preceded with a blocked letter then don't treat it as a link
|
||||
if(this.match.index > 0) {
|
||||
var preRegExp = new RegExp(textPrimitives.blockPrefixLetters,"mg");
|
||||
var preRegExp = new RegExp($tw.config.textPrimitives.blockPrefixLetters,"mg");
|
||||
preRegExp.lastIndex = this.match.index-1;
|
||||
var preMatch = preRegExp.exec(this.parser.source);
|
||||
if(preMatch && preMatch.index === this.match.index-1) {
|
||||
|
||||
@@ -60,29 +60,10 @@ PluginSwitcher.prototype.switchPlugins = function() {
|
||||
accumulatePlugin(selectedPluginTitle);
|
||||
// Unregister any existing theme tiddlers
|
||||
var unregisteredTiddlers = $tw.wiki.unregisterPluginTiddlers(this.pluginType);
|
||||
// Accumulate the titles of shadow tiddlers that have changed as a result of this switch
|
||||
var changedTiddlers = {};
|
||||
this.wiki.eachShadow(function(tiddler,title) {
|
||||
var source = self.wiki.getShadowSource(title);
|
||||
if(unregisteredTiddlers.indexOf(source) !== -1) {
|
||||
changedTiddlers[title] = true; // isDeleted?
|
||||
}
|
||||
});
|
||||
// Register any new theme tiddlers
|
||||
var registeredTiddlers = $tw.wiki.registerPluginTiddlers(this.pluginType,plugins);
|
||||
// Unpack the current theme tiddlers
|
||||
$tw.wiki.unpackPluginTiddlers();
|
||||
// Accumulate the affected shadow tiddlers
|
||||
this.wiki.eachShadow(function(tiddler,title) {
|
||||
var source = self.wiki.getShadowSource(title);
|
||||
if(registeredTiddlers.indexOf(source) !== -1) {
|
||||
changedTiddlers[title] = false; // isDeleted?
|
||||
}
|
||||
});
|
||||
// Issue change events for the modified tiddlers
|
||||
$tw.utils.each(changedTiddlers,function(status,title) {
|
||||
self.wiki.enqueueTiddlerEvent(title,status);
|
||||
});
|
||||
};
|
||||
|
||||
exports.PluginSwitcher = PluginSwitcher;
|
||||
|
||||
@@ -89,14 +89,16 @@ function SaverHandler(options) {
|
||||
$tw.rootWidget.addEventListener("tm-save-wiki",function(event) {
|
||||
self.saveWiki({
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
downloadType: "text/plain",
|
||||
variables: event.paramObject
|
||||
});
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tm-download-file",function(event) {
|
||||
self.saveWiki({
|
||||
method: "download",
|
||||
template: event.param,
|
||||
downloadType: "text/plain"
|
||||
downloadType: "text/plain",
|
||||
variables: event.paramObject
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -143,9 +145,10 @@ SaverHandler.prototype.saveWiki = function(options) {
|
||||
options = options || {};
|
||||
var self = this,
|
||||
method = options.method || "save",
|
||||
variables = options.variables || {},
|
||||
template = options.template || "$:/core/save/all",
|
||||
downloadType = options.downloadType || "text/plain",
|
||||
text = this.wiki.renderTiddler(downloadType,template),
|
||||
text = this.wiki.renderTiddler(downloadType,template,options),
|
||||
callback = function(err) {
|
||||
if(err) {
|
||||
alert("Error while saving:\n\n" + err);
|
||||
@@ -168,7 +171,7 @@ SaverHandler.prototype.saveWiki = function(options) {
|
||||
// Call the highest priority saver that supports this method
|
||||
for(var t=this.savers.length-1; t>=0; t--) {
|
||||
var saver = this.savers[t];
|
||||
if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback)) {
|
||||
if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename}})) {
|
||||
this.logger.log("Saving wiki with method",method,"through saver",saver.info.name);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,18 @@ Select the appropriate saver module and set it up
|
||||
var DownloadSaver = function(wiki) {
|
||||
};
|
||||
|
||||
DownloadSaver.prototype.save = function(text,method,callback) {
|
||||
DownloadSaver.prototype.save = function(text,method,callback,options) {
|
||||
options = options || {};
|
||||
// Get the current filename
|
||||
var filename = "tiddlywiki.html",
|
||||
p = document.location.pathname.lastIndexOf("/");
|
||||
if(p !== -1) {
|
||||
filename = document.location.pathname.substr(p+1);
|
||||
var filename = options.variables.filename;
|
||||
if(!filename) {
|
||||
var p = document.location.pathname.lastIndexOf("/");
|
||||
if(p !== -1) {
|
||||
filename = document.location.pathname.substr(p+1);
|
||||
}
|
||||
}
|
||||
if(!filename) {
|
||||
filename = "tiddlywiki.html";
|
||||
}
|
||||
// Set up the link
|
||||
var link = document.createElement("a");
|
||||
|
||||
@@ -19,7 +19,7 @@ exports.synchronous = true;
|
||||
exports.startup = function() {
|
||||
// Load modules
|
||||
$tw.modules.applyMethods("utils",$tw.utils);
|
||||
if($tw.node && !$tw.browser) {
|
||||
if($tw.node) {
|
||||
$tw.modules.applyMethods("utils-node",$tw.utils);
|
||||
}
|
||||
$tw.modules.applyMethods("global",$tw);
|
||||
|
||||
@@ -23,7 +23,7 @@ exports.startup = function() {
|
||||
// Install the modal message mechanism
|
||||
$tw.modal = new $tw.utils.Modal($tw.wiki);
|
||||
$tw.rootWidget.addEventListener("tm-modal",function(event) {
|
||||
$tw.modal.display(event.param);
|
||||
$tw.modal.display(event.param,{variables: event.paramObject});
|
||||
});
|
||||
// Install the notification mechanism
|
||||
$tw.notifier = new $tw.utils.Notifier($tw.wiki);
|
||||
|
||||
@@ -78,9 +78,7 @@ exports.startup = function() {
|
||||
// Host-specific startup
|
||||
if($tw.browser) {
|
||||
// Install the popup manager
|
||||
$tw.popup = new $tw.utils.Popup({
|
||||
rootElement: document.body
|
||||
});
|
||||
$tw.popup = new $tw.utils.Popup();
|
||||
// Install the animator
|
||||
$tw.anim = new $tw.utils.Animator();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@ exports.startup = function() {
|
||||
window.location.hash = "";
|
||||
var storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE),
|
||||
storyList = $tw.wiki.filterTiddlers(storyFilter);
|
||||
//invoke any hooks that might change the default story list
|
||||
storyList = $tw.hooks.invokeHook("th-opening-default-tiddlers-list",storyList);
|
||||
$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: "", list: storyList},$tw.wiki.getModificationFields());
|
||||
if(storyList[0]) {
|
||||
$tw.wiki.addToHistory(storyList[0]);
|
||||
@@ -116,6 +118,8 @@ function openStartupTiddlers(options) {
|
||||
}
|
||||
// Process the story filter to get the story list
|
||||
var storyList = $tw.wiki.filterTiddlers(storyFilter);
|
||||
//invoke any hooks that might change the default story list
|
||||
storyList = $tw.hooks.invokeHook("th-opening-default-tiddlers-list",storyList);
|
||||
// If the target tiddler isn't included then splice it in at the top
|
||||
if(target && storyList.indexOf(target) === -1) {
|
||||
storyList.unshift(target);
|
||||
|
||||
@@ -63,6 +63,9 @@ tiddler: the tiddler to compare
|
||||
excludeFields: array of field names to exclude from the comparison
|
||||
*/
|
||||
exports.isEqual = function(tiddler,excludeFields) {
|
||||
if(!(tiddler instanceof $tw.Tiddler)) {
|
||||
return false;
|
||||
}
|
||||
excludeFields = excludeFields || [];
|
||||
var self = this,
|
||||
differences = []; // Fields that have differences
|
||||
|
||||
200
core/modules/utils/dom/csscolorparser.js
Normal file
200
core/modules/utils/dom/csscolorparser.js
Normal file
@@ -0,0 +1,200 @@
|
||||
// (c) Dean McNamee <dean@gmail.com>, 2012.
|
||||
//
|
||||
// https://github.com/deanm/css-color-parser-js
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
// http://www.w3.org/TR/css3-color/
|
||||
var kCSSColorTable = {
|
||||
"transparent": [0,0,0,0], "aliceblue": [240,248,255,1],
|
||||
"antiquewhite": [250,235,215,1], "aqua": [0,255,255,1],
|
||||
"aquamarine": [127,255,212,1], "azure": [240,255,255,1],
|
||||
"beige": [245,245,220,1], "bisque": [255,228,196,1],
|
||||
"black": [0,0,0,1], "blanchedalmond": [255,235,205,1],
|
||||
"blue": [0,0,255,1], "blueviolet": [138,43,226,1],
|
||||
"brown": [165,42,42,1], "burlywood": [222,184,135,1],
|
||||
"cadetblue": [95,158,160,1], "chartreuse": [127,255,0,1],
|
||||
"chocolate": [210,105,30,1], "coral": [255,127,80,1],
|
||||
"cornflowerblue": [100,149,237,1], "cornsilk": [255,248,220,1],
|
||||
"crimson": [220,20,60,1], "cyan": [0,255,255,1],
|
||||
"darkblue": [0,0,139,1], "darkcyan": [0,139,139,1],
|
||||
"darkgoldenrod": [184,134,11,1], "darkgray": [169,169,169,1],
|
||||
"darkgreen": [0,100,0,1], "darkgrey": [169,169,169,1],
|
||||
"darkkhaki": [189,183,107,1], "darkmagenta": [139,0,139,1],
|
||||
"darkolivegreen": [85,107,47,1], "darkorange": [255,140,0,1],
|
||||
"darkorchid": [153,50,204,1], "darkred": [139,0,0,1],
|
||||
"darksalmon": [233,150,122,1], "darkseagreen": [143,188,143,1],
|
||||
"darkslateblue": [72,61,139,1], "darkslategray": [47,79,79,1],
|
||||
"darkslategrey": [47,79,79,1], "darkturquoise": [0,206,209,1],
|
||||
"darkviolet": [148,0,211,1], "deeppink": [255,20,147,1],
|
||||
"deepskyblue": [0,191,255,1], "dimgray": [105,105,105,1],
|
||||
"dimgrey": [105,105,105,1], "dodgerblue": [30,144,255,1],
|
||||
"firebrick": [178,34,34,1], "floralwhite": [255,250,240,1],
|
||||
"forestgreen": [34,139,34,1], "fuchsia": [255,0,255,1],
|
||||
"gainsboro": [220,220,220,1], "ghostwhite": [248,248,255,1],
|
||||
"gold": [255,215,0,1], "goldenrod": [218,165,32,1],
|
||||
"gray": [128,128,128,1], "green": [0,128,0,1],
|
||||
"greenyellow": [173,255,47,1], "grey": [128,128,128,1],
|
||||
"honeydew": [240,255,240,1], "hotpink": [255,105,180,1],
|
||||
"indianred": [205,92,92,1], "indigo": [75,0,130,1],
|
||||
"ivory": [255,255,240,1], "khaki": [240,230,140,1],
|
||||
"lavender": [230,230,250,1], "lavenderblush": [255,240,245,1],
|
||||
"lawngreen": [124,252,0,1], "lemonchiffon": [255,250,205,1],
|
||||
"lightblue": [173,216,230,1], "lightcoral": [240,128,128,1],
|
||||
"lightcyan": [224,255,255,1], "lightgoldenrodyellow": [250,250,210,1],
|
||||
"lightgray": [211,211,211,1], "lightgreen": [144,238,144,1],
|
||||
"lightgrey": [211,211,211,1], "lightpink": [255,182,193,1],
|
||||
"lightsalmon": [255,160,122,1], "lightseagreen": [32,178,170,1],
|
||||
"lightskyblue": [135,206,250,1], "lightslategray": [119,136,153,1],
|
||||
"lightslategrey": [119,136,153,1], "lightsteelblue": [176,196,222,1],
|
||||
"lightyellow": [255,255,224,1], "lime": [0,255,0,1],
|
||||
"limegreen": [50,205,50,1], "linen": [250,240,230,1],
|
||||
"magenta": [255,0,255,1], "maroon": [128,0,0,1],
|
||||
"mediumaquamarine": [102,205,170,1], "mediumblue": [0,0,205,1],
|
||||
"mediumorchid": [186,85,211,1], "mediumpurple": [147,112,219,1],
|
||||
"mediumseagreen": [60,179,113,1], "mediumslateblue": [123,104,238,1],
|
||||
"mediumspringgreen": [0,250,154,1], "mediumturquoise": [72,209,204,1],
|
||||
"mediumvioletred": [199,21,133,1], "midnightblue": [25,25,112,1],
|
||||
"mintcream": [245,255,250,1], "mistyrose": [255,228,225,1],
|
||||
"moccasin": [255,228,181,1], "navajowhite": [255,222,173,1],
|
||||
"navy": [0,0,128,1], "oldlace": [253,245,230,1],
|
||||
"olive": [128,128,0,1], "olivedrab": [107,142,35,1],
|
||||
"orange": [255,165,0,1], "orangered": [255,69,0,1],
|
||||
"orchid": [218,112,214,1], "palegoldenrod": [238,232,170,1],
|
||||
"palegreen": [152,251,152,1], "paleturquoise": [175,238,238,1],
|
||||
"palevioletred": [219,112,147,1], "papayawhip": [255,239,213,1],
|
||||
"peachpuff": [255,218,185,1], "peru": [205,133,63,1],
|
||||
"pink": [255,192,203,1], "plum": [221,160,221,1],
|
||||
"powderblue": [176,224,230,1], "purple": [128,0,128,1],
|
||||
"red": [255,0,0,1], "rosybrown": [188,143,143,1],
|
||||
"royalblue": [65,105,225,1], "saddlebrown": [139,69,19,1],
|
||||
"salmon": [250,128,114,1], "sandybrown": [244,164,96,1],
|
||||
"seagreen": [46,139,87,1], "seashell": [255,245,238,1],
|
||||
"sienna": [160,82,45,1], "silver": [192,192,192,1],
|
||||
"skyblue": [135,206,235,1], "slateblue": [106,90,205,1],
|
||||
"slategray": [112,128,144,1], "slategrey": [112,128,144,1],
|
||||
"snow": [255,250,250,1], "springgreen": [0,255,127,1],
|
||||
"steelblue": [70,130,180,1], "tan": [210,180,140,1],
|
||||
"teal": [0,128,128,1], "thistle": [216,191,216,1],
|
||||
"tomato": [255,99,71,1], "turquoise": [64,224,208,1],
|
||||
"violet": [238,130,238,1], "wheat": [245,222,179,1],
|
||||
"white": [255,255,255,1], "whitesmoke": [245,245,245,1],
|
||||
"yellow": [255,255,0,1], "yellowgreen": [154,205,50,1]}
|
||||
|
||||
function clamp_css_byte(i) { // Clamp to integer 0 .. 255.
|
||||
i = Math.round(i); // Seems to be what Chrome does (vs truncation).
|
||||
return i < 0 ? 0 : i > 255 ? 255 : i;
|
||||
}
|
||||
|
||||
function clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.
|
||||
return f < 0 ? 0 : f > 1 ? 1 : f;
|
||||
}
|
||||
|
||||
function parse_css_int(str) { // int or percentage.
|
||||
if (str[str.length - 1] === '%')
|
||||
return clamp_css_byte(parseFloat(str) / 100 * 255);
|
||||
return clamp_css_byte(parseInt(str));
|
||||
}
|
||||
|
||||
function parse_css_float(str) { // float or percentage.
|
||||
if (str[str.length - 1] === '%')
|
||||
return clamp_css_float(parseFloat(str) / 100);
|
||||
return clamp_css_float(parseFloat(str));
|
||||
}
|
||||
|
||||
function css_hue_to_rgb(m1, m2, h) {
|
||||
if (h < 0) h += 1;
|
||||
else if (h > 1) h -= 1;
|
||||
|
||||
if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;
|
||||
if (h * 2 < 1) return m2;
|
||||
if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;
|
||||
return m1;
|
||||
}
|
||||
|
||||
function parseCSSColor(css_str) {
|
||||
// Remove all whitespace, not compliant, but should just be more accepting.
|
||||
var str = css_str.replace(/ /g, '').toLowerCase();
|
||||
|
||||
// Color keywords (and transparent) lookup.
|
||||
if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.
|
||||
|
||||
// #abc and #abc123 syntax.
|
||||
if (str[0] === '#') {
|
||||
if (str.length === 4) {
|
||||
var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
|
||||
if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.
|
||||
return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),
|
||||
(iv & 0xf0) | ((iv & 0xf0) >> 4),
|
||||
(iv & 0xf) | ((iv & 0xf) << 4),
|
||||
1];
|
||||
} else if (str.length === 7) {
|
||||
var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
|
||||
if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.
|
||||
return [(iv & 0xff0000) >> 16,
|
||||
(iv & 0xff00) >> 8,
|
||||
iv & 0xff,
|
||||
1];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
var op = str.indexOf('('), ep = str.indexOf(')');
|
||||
if (op !== -1 && ep + 1 === str.length) {
|
||||
var fname = str.substr(0, op);
|
||||
var params = str.substr(op+1, ep-(op+1)).split(',');
|
||||
var alpha = 1; // To allow case fallthrough.
|
||||
switch (fname) {
|
||||
case 'rgba':
|
||||
if (params.length !== 4) return null;
|
||||
alpha = parse_css_float(params.pop());
|
||||
// Fall through.
|
||||
case 'rgb':
|
||||
if (params.length !== 3) return null;
|
||||
return [parse_css_int(params[0]),
|
||||
parse_css_int(params[1]),
|
||||
parse_css_int(params[2]),
|
||||
alpha];
|
||||
case 'hsla':
|
||||
if (params.length !== 4) return null;
|
||||
alpha = parse_css_float(params.pop());
|
||||
// Fall through.
|
||||
case 'hsl':
|
||||
if (params.length !== 3) return null;
|
||||
var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1
|
||||
// NOTE(deanm): According to the CSS spec s/l should only be
|
||||
// percentages, but we don't bother and let float or percentage.
|
||||
var s = parse_css_float(params[1]);
|
||||
var l = parse_css_float(params[2]);
|
||||
var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
|
||||
var m1 = l * 2 - m2;
|
||||
return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),
|
||||
clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),
|
||||
clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),
|
||||
alpha];
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
try { exports.parseCSSColor = parseCSSColor } catch(e) { }
|
||||
3
core/modules/utils/dom/csscolorparser.js.meta
Normal file
3
core/modules/utils/dom/csscolorparser.js.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/core/modules/utils/dom/csscolorparser.js
|
||||
type: application/javascript
|
||||
module-type: utils
|
||||
@@ -35,6 +35,8 @@ Modal.prototype.display = function(title,options) {
|
||||
if(!tiddler) {
|
||||
return;
|
||||
}
|
||||
// Create the variables
|
||||
var variables = $tw.utils.extend({currentTiddler: title},options.variables);
|
||||
// Create the wrapper divs
|
||||
var wrapper = document.createElement("div"),
|
||||
modalBackdrop = document.createElement("div"),
|
||||
@@ -76,7 +78,8 @@ Modal.prototype.display = function(title,options) {
|
||||
value: title
|
||||
}}}],
|
||||
parentWidget: $tw.rootWidget,
|
||||
document: document
|
||||
document: document,
|
||||
variables: variables
|
||||
});
|
||||
headerWidgetNode.render(headerTitle,null);
|
||||
this.wiki.addEventListener("change",function(changes) {
|
||||
@@ -85,7 +88,8 @@ Modal.prototype.display = function(title,options) {
|
||||
// Render the body of the message
|
||||
var bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{
|
||||
parentWidget: $tw.rootWidget,
|
||||
document: document
|
||||
document: document,
|
||||
variables: variables
|
||||
});
|
||||
bodyWidgetNode.render(modalBody,null);
|
||||
this.wiki.addEventListener("change",function(changes) {
|
||||
@@ -125,7 +129,8 @@ Modal.prototype.display = function(title,options) {
|
||||
}}}
|
||||
]}],
|
||||
parentWidget: $tw.rootWidget,
|
||||
document: document
|
||||
document: document,
|
||||
variables: variables
|
||||
});
|
||||
footerWidgetNode.render(modalFooterButtons,null);
|
||||
this.wiki.addEventListener("change",function(changes) {
|
||||
|
||||
@@ -18,41 +18,8 @@ Creates a Popup object with these options:
|
||||
*/
|
||||
var Popup = function(options) {
|
||||
options = options || {};
|
||||
this.rootElement = options.rootElement || document.body;
|
||||
};
|
||||
|
||||
Popup.prototype.show = function(options) {
|
||||
this.cancel();
|
||||
this.title = options.title;
|
||||
this.wiki = options.wiki;
|
||||
this.anchorDomNode = options.domNode;
|
||||
$tw.utils.addClass(this.anchorDomNode,"tc-popup");
|
||||
this.rootElement.addEventListener("click",this,false);
|
||||
};
|
||||
|
||||
Popup.prototype.handleEvent = function(event) {
|
||||
// Dismiss the popup if we get a click on an element that doesn't have .tc-popup class
|
||||
if(event.type === "click") {
|
||||
var node = event.target;
|
||||
while(node && !$tw.utils.hasClass(node,"tc-popup")) {
|
||||
node = node.parentNode;
|
||||
}
|
||||
if(!node) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Popup.prototype.cancel = function() {
|
||||
if(this.anchorDomNode) {
|
||||
$tw.utils.removeClass(this.anchorDomNode,"tc-popup");
|
||||
this.anchorDomNode = null;
|
||||
}
|
||||
this.rootElement.removeEventListener("click",this,false);
|
||||
if(this.title) {
|
||||
this.wiki.deleteTiddler(this.title);
|
||||
this.title = null;
|
||||
}
|
||||
this.rootElement = options.rootElement || document.documentElement;
|
||||
this.popups = []; // Array of {title:,wiki:,domNode:} objects
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -60,38 +27,126 @@ Trigger a popup open or closed. Parameters are in a hashmap:
|
||||
title: title of the tiddler where the popup details are stored
|
||||
domNode: dom node to which the popup will be positioned
|
||||
wiki: wiki
|
||||
force: if specified, forces the popup state to true or false
|
||||
force: if specified, forces the popup state to true or false (instead of toggling it)
|
||||
*/
|
||||
Popup.prototype.triggerPopup = function(options) {
|
||||
// Get the current popup state tiddler
|
||||
var value = options.wiki.getTextReference(options.title,"");
|
||||
// Check if the popup is open by checking whether it matches "(<x>,<y>)"
|
||||
var state = !this.readPopupState(options.title,value);
|
||||
if("force" in options) {
|
||||
// Check if this popup is already active
|
||||
var index = -1;
|
||||
for(var t=0; t<this.popups.length; t++) {
|
||||
if(this.popups[t].title === options.title) {
|
||||
index = t;
|
||||
}
|
||||
}
|
||||
// Compute the new state
|
||||
var state = index === -1;
|
||||
if(options.force !== undefined) {
|
||||
state = options.force;
|
||||
}
|
||||
// Show or cancel the popup according to the new state
|
||||
if(state) {
|
||||
// Set the position if we're opening it
|
||||
this.cancel();
|
||||
options.wiki.setTextReference(options.title,
|
||||
"(" + options.domNode.offsetLeft + "," + options.domNode.offsetTop + "," +
|
||||
options.domNode.offsetWidth + "," + options.domNode.offsetHeight + ")");
|
||||
this.show(options);
|
||||
} else {
|
||||
this.cancel();
|
||||
this.cancel(index);
|
||||
}
|
||||
};
|
||||
|
||||
Popup.prototype.handleEvent = function(event) {
|
||||
if(event.type === "click") {
|
||||
// Find out what was clicked on
|
||||
var info = this.popupInfo(event.target),
|
||||
cancelLevel = info.popupLevel - 1;
|
||||
// Don't remove the level that was clicked on if we clicked on a handle
|
||||
if(info.isHandle) {
|
||||
cancelLevel++;
|
||||
}
|
||||
// Cancel
|
||||
this.cancel(cancelLevel);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Find the popup level containing a DOM node. Returns:
|
||||
popupLevel: count of the number of nested popups containing the specified element
|
||||
isHandle: true if the specified element is within a popup handle
|
||||
*/
|
||||
Popup.prototype.popupInfo = function(domNode) {
|
||||
var isHandle = false,
|
||||
popupCount = 0,
|
||||
node = domNode;
|
||||
// First check ancestors to see if we're within a popup handle
|
||||
while(node) {
|
||||
if($tw.utils.hasClass(node,"tc-popup-handle")) {
|
||||
isHandle = true;
|
||||
popupCount++;
|
||||
}
|
||||
if($tw.utils.hasClass(node,"tc-popup-keep")) {
|
||||
isHandle = true;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
// Then count the number of ancestor popups
|
||||
node = domNode;
|
||||
while(node) {
|
||||
if($tw.utils.hasClass(node,"tc-popup")) {
|
||||
popupCount++;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
var info = {
|
||||
popupLevel: popupCount,
|
||||
isHandle: isHandle
|
||||
};
|
||||
return info;
|
||||
};
|
||||
|
||||
/*
|
||||
Display a popup by adding it to the stack
|
||||
*/
|
||||
Popup.prototype.show = function(options) {
|
||||
// Find out what was clicked on
|
||||
var info = this.popupInfo(options.domNode);
|
||||
// Cancel any higher level popups
|
||||
this.cancel(info.popupLevel);
|
||||
// Store the popup details
|
||||
this.popups.push({
|
||||
title: options.title,
|
||||
wiki: options.wiki,
|
||||
domNode: options.domNode
|
||||
});
|
||||
// Set the state tiddler
|
||||
options.wiki.setTextReference(options.title,
|
||||
"(" + options.domNode.offsetLeft + "," + options.domNode.offsetTop + "," +
|
||||
options.domNode.offsetWidth + "," + options.domNode.offsetHeight + ")");
|
||||
// Add the click handler if we have any popups
|
||||
if(this.popups.length > 0) {
|
||||
this.rootElement.addEventListener("click",this,true);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Cancel all popups at or above a specified level or DOM node
|
||||
level: popup level to cancel (0 cancels all popups)
|
||||
*/
|
||||
Popup.prototype.cancel = function(level) {
|
||||
var numPopups = this.popups.length;
|
||||
level = Math.max(0,Math.min(level,numPopups));
|
||||
for(var t=level; t<numPopups; t++) {
|
||||
var popup = this.popups.pop();
|
||||
if(popup.title) {
|
||||
popup.wiki.deleteTiddler(popup.title);
|
||||
}
|
||||
}
|
||||
if(this.popups.length === 0) {
|
||||
this.rootElement.removeEventListener("click",this,false);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Returns true if the specified title and text identifies an active popup
|
||||
*/
|
||||
Popup.prototype.readPopupState = function(title,text) {
|
||||
var popupLocationRegExp = /^\((-?[0-9\.E]+),(-?[0-9\.E]+),(-?[0-9\.E]+),(-?[0-9\.E]+)\)$/,
|
||||
result = false;
|
||||
if(this.title === title) {
|
||||
result = popupLocationRegExp.test(text);
|
||||
}
|
||||
return result;
|
||||
Popup.prototype.readPopupState = function(text) {
|
||||
var popupLocationRegExp = /^\((-?[0-9\.E]+),(-?[0-9\.E]+),(-?[0-9\.E]+),(-?[0-9\.E]+)\)$/;
|
||||
return popupLocationRegExp.test(text);
|
||||
};
|
||||
|
||||
exports.Popup = Popup;
|
||||
|
||||
@@ -52,9 +52,13 @@ exports.copyDirectory = function(srcPath,dstPath) {
|
||||
Copy a file
|
||||
*/
|
||||
var FILE_BUFFER_LENGTH = 64 * 1024,
|
||||
fileBuffer = $tw.node && new Buffer(FILE_BUFFER_LENGTH);
|
||||
fileBuffer;
|
||||
|
||||
exports.copyFile = function(srcPath,dstPath) {
|
||||
// Create buffer if required
|
||||
if(!fileBuffer) {
|
||||
fileBuffer = new Buffer(FILE_BUFFER_LENGTH);
|
||||
}
|
||||
// Create any directories in the destination
|
||||
$tw.utils.createDirectory(path.dirname(dstPath));
|
||||
// Copy the file
|
||||
@@ -139,4 +143,21 @@ exports.isDirectory = function(dirPath) {
|
||||
return fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory();
|
||||
};
|
||||
|
||||
/*
|
||||
Check if a path identifies a directory that is empty
|
||||
*/
|
||||
exports.isDirectoryEmpty = function(dirPath) {
|
||||
if(!$tw.utils.isDirectory(dirPath)) {
|
||||
return false;
|
||||
}
|
||||
var files = fs.readdirSync(dirPath),
|
||||
empty = true;
|
||||
$tw.utils.each(files,function(file,index) {
|
||||
if(file.charAt(0) !== ".") {
|
||||
empty = false;
|
||||
}
|
||||
});
|
||||
return empty;
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -176,89 +176,109 @@ exports.slowInSlowOut = function(t) {
|
||||
};
|
||||
|
||||
exports.formatDateString = function(date,template) {
|
||||
var t = template;
|
||||
t = t.replace(/0hh12/g,function() {
|
||||
return $tw.utils.pad($tw.utils.getHours12(date));
|
||||
});
|
||||
t = t.replace(/hh12/g,function() {
|
||||
return $tw.utils.getHours12(date);
|
||||
});
|
||||
t = t.replace(/0hh/g,function() {
|
||||
return $tw.utils.pad(date.getHours());
|
||||
});
|
||||
t = t.replace(/hh/g,function() {
|
||||
return date.getHours();
|
||||
});
|
||||
t = t.replace(/mmm/g,function() {
|
||||
return $tw.language.getString("Date/Short/Month/" + (date.getMonth() + 1));
|
||||
});
|
||||
t = t.replace(/0mm/g,function() {
|
||||
return $tw.utils.pad(date.getMinutes());
|
||||
});
|
||||
t = t.replace(/mm/g,function() {
|
||||
return date.getMinutes();
|
||||
});
|
||||
t = t.replace(/0ss/g,function() {
|
||||
return $tw.utils.pad(date.getSeconds());
|
||||
});
|
||||
t = t.replace(/ss/g,function() {
|
||||
return date.getSeconds();
|
||||
});
|
||||
t = t.replace(/[ap]m/g,function() {
|
||||
return $tw.utils.getAmPm(date).toLowerCase();
|
||||
});
|
||||
t = t.replace(/[AP]M/g,function() {
|
||||
return $tw.utils.getAmPm(date).toUpperCase();
|
||||
});
|
||||
t = t.replace(/wYYYY/g,function() {
|
||||
return $tw.utils.getYearForWeekNo(date);
|
||||
});
|
||||
t = t.replace(/wYY/g,function() {
|
||||
return $tw.utils.pad($tw.utils.getYearForWeekNo(date)-2000);
|
||||
});
|
||||
t = t.replace(/YYYY/g,function() {
|
||||
return date.getFullYear();
|
||||
});
|
||||
t = t.replace(/YY/g,function() {
|
||||
return $tw.utils.pad(date.getFullYear()-2000);
|
||||
});
|
||||
t = t.replace(/MMM/g,function() {
|
||||
return $tw.language.getString("Date/Long/Month/" + (date.getMonth() + 1));
|
||||
});
|
||||
t = t.replace(/0MM/g,function() {
|
||||
return $tw.utils.pad(date.getMonth()+1);
|
||||
});
|
||||
t = t.replace(/MM/g,function() {
|
||||
return date.getMonth() + 1;
|
||||
});
|
||||
t = t.replace(/0WW/g,function() {
|
||||
return $tw.utils.pad($tw.utils.getWeek(date));
|
||||
});
|
||||
t = t.replace(/WW/g,function() {
|
||||
return $tw.utils.getWeek(date);
|
||||
});
|
||||
t = t.replace(/DDD/g,function() {
|
||||
return $tw.language.getString("Date/Long/Day/" + date.getDay());
|
||||
});
|
||||
t = t.replace(/ddd/g,function() {
|
||||
return $tw.language.getString("Date/Short/Day/" + date.getDay());
|
||||
});
|
||||
t = t.replace(/0DD/g,function() {
|
||||
return $tw.utils.pad(date.getDate());
|
||||
});
|
||||
t = t.replace(/DDth/g,function() {
|
||||
return date.getDate() + $tw.utils.getDaySuffix(date);
|
||||
});
|
||||
t = t.replace(/DD/g,function() {
|
||||
return date.getDate();
|
||||
});
|
||||
t = t.replace(/TZD/g,function() {
|
||||
var tz = date.getTimezoneOffset(),
|
||||
atz = Math.abs(tz);
|
||||
return (tz < 0 ? '+' : '-') + $tw.utils.pad(Math.floor(atz / 60)) + ':' + $tw.utils.pad(atz % 60);
|
||||
});
|
||||
t = t.replace(/\\(.)/g,"$1");
|
||||
return t;
|
||||
var result = "",
|
||||
t = template,
|
||||
matches = [
|
||||
[/^0hh12/, function() {
|
||||
return $tw.utils.pad($tw.utils.getHours12(date));
|
||||
}],
|
||||
[/^wYYYY/, function() {
|
||||
return $tw.utils.getYearForWeekNo(date);
|
||||
}],
|
||||
[/^hh12/, function() {
|
||||
return $tw.utils.getHours12(date);
|
||||
}],
|
||||
[/^DDth/, function() {
|
||||
return date.getDate() + $tw.utils.getDaySuffix(date);
|
||||
}],
|
||||
[/^YYYY/, function() {
|
||||
return date.getFullYear();
|
||||
}],
|
||||
[/^0hh/, function() {
|
||||
return $tw.utils.pad(date.getHours());
|
||||
}],
|
||||
[/^0mm/, function() {
|
||||
return $tw.utils.pad(date.getMinutes());
|
||||
}],
|
||||
[/^0ss/, function() {
|
||||
return $tw.utils.pad(date.getSeconds());
|
||||
}],
|
||||
[/^0DD/, function() {
|
||||
return $tw.utils.pad(date.getDate());
|
||||
}],
|
||||
[/^0MM/, function() {
|
||||
return $tw.utils.pad(date.getMonth()+1);
|
||||
}],
|
||||
[/^0WW/, function() {
|
||||
return $tw.utils.pad($tw.utils.getWeek(date));
|
||||
}],
|
||||
[/^ddd/, function() {
|
||||
return $tw.language.getString("Date/Short/Day/" + date.getDay());
|
||||
}],
|
||||
[/^mmm/, function() {
|
||||
return $tw.language.getString("Date/Short/Month/" + (date.getMonth() + 1));
|
||||
}],
|
||||
[/^DDD/, function() {
|
||||
return $tw.language.getString("Date/Long/Day/" + date.getDay());
|
||||
}],
|
||||
[/^MMM/, function() {
|
||||
return $tw.language.getString("Date/Long/Month/" + (date.getMonth() + 1));
|
||||
}],
|
||||
[/^TZD/, function() {
|
||||
var tz = date.getTimezoneOffset(),
|
||||
atz = Math.abs(tz);
|
||||
return (tz < 0 ? '+' : '-') + $tw.utils.pad(Math.floor(atz / 60)) + ':' + $tw.utils.pad(atz % 60);
|
||||
}],
|
||||
[/^wYY/, function() {
|
||||
return $tw.utils.pad($tw.utils.getYearForWeekNo(date) - 2000);
|
||||
}],
|
||||
[/^[ap]m/, function() {
|
||||
return $tw.utils.getAmPm(date).toLowerCase();
|
||||
}],
|
||||
[/^hh/, function() {
|
||||
return date.getHours();
|
||||
}],
|
||||
[/^mm/, function() {
|
||||
return date.getMinutes();
|
||||
}],
|
||||
[/^ss/, function() {
|
||||
return date.getSeconds();
|
||||
}],
|
||||
[/^[AP]M/, function() {
|
||||
return $tw.utils.getAmPm(date).toUpperCase();
|
||||
}],
|
||||
[/^DD/, function() {
|
||||
return date.getDate();
|
||||
}],
|
||||
[/^MM/, function() {
|
||||
return date.getMonth() + 1;
|
||||
}],
|
||||
[/^WW/, function() {
|
||||
return $tw.utils.getWeek(date);
|
||||
}],
|
||||
[/^YY/, function() {
|
||||
return $tw.utils.pad(date.getFullYear() - 2000);
|
||||
}]
|
||||
];
|
||||
while(t.length){
|
||||
var matchString = "";
|
||||
$tw.utils.each(matches, function(m) {
|
||||
var match = m[0].exec(t);
|
||||
if(match) {
|
||||
matchString = m[1].call();
|
||||
t = t.substr(match[0].length);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if(matchString) {
|
||||
result += matchString;
|
||||
} else {
|
||||
result += t.charAt(0);
|
||||
t = t.substr(1);
|
||||
}
|
||||
}
|
||||
result = result.replace(/\\(.)/g,"$1");
|
||||
return result;
|
||||
};
|
||||
|
||||
exports.getAmPm = function(date) {
|
||||
@@ -461,21 +481,31 @@ Returns an object with the following fields, all optional:
|
||||
*/
|
||||
exports.parseTextReference = function(textRef) {
|
||||
// Separate out the title, field name and/or JSON indices
|
||||
var reTextRef = /^\s*([^!#]+)?(?:(?:!!([^\s]+))|(?:##(.+)))?\s*/mg,
|
||||
match = reTextRef.exec(textRef);
|
||||
var reTextRef = /(?:(.*?)!!(.+))|(?:(.*?)##(.+))|(.*)/mg,
|
||||
match = reTextRef.exec(textRef),
|
||||
result = {};
|
||||
if(match && reTextRef.lastIndex === textRef.length) {
|
||||
// Return the parts
|
||||
return {
|
||||
title: match[1],
|
||||
field: match[2],
|
||||
index: match[3]
|
||||
};
|
||||
if(match[1]) {
|
||||
result.title = match[1];
|
||||
}
|
||||
if(match[2]) {
|
||||
result.field = match[2];
|
||||
}
|
||||
if(match[3]) {
|
||||
result.title = match[3];
|
||||
}
|
||||
if(match[4]) {
|
||||
result.index = match[4];
|
||||
}
|
||||
if(match[5]) {
|
||||
result.title = match[5];
|
||||
}
|
||||
} else {
|
||||
// If we couldn't parse it (eg it started with a)
|
||||
return {
|
||||
title: textRef
|
||||
};
|
||||
// If we couldn't parse it
|
||||
result.title = textRef
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -494,29 +524,22 @@ exports.isValidFieldName = function(name) {
|
||||
Extract the version number from the meta tag or from the boot file
|
||||
*/
|
||||
|
||||
if($tw.browser) {
|
||||
|
||||
// Browser version
|
||||
exports.extractVersionInfo = function() {
|
||||
var metatags = document.getElementsByTagName("meta");
|
||||
for(var t=0; t<metatags.length; t++) {
|
||||
var m = metatags[t];
|
||||
if(m.name === "tiddlywiki-version") {
|
||||
return m.content;
|
||||
if($tw.packageInfo) {
|
||||
return $tw.packageInfo.version;
|
||||
} else {
|
||||
var metatags = document.getElementsByTagName("meta");
|
||||
for(var t=0; t<metatags.length; t++) {
|
||||
var m = metatags[t];
|
||||
if(m.name === "tiddlywiki-version") {
|
||||
return m.content;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
// Server version
|
||||
exports.extractVersionInfo = function() {
|
||||
return $tw.packageInfo.version;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
Get the animation duration in ms
|
||||
*/
|
||||
@@ -577,4 +600,4 @@ exports.timer = function(base) {
|
||||
return m;
|
||||
};
|
||||
|
||||
})();
|
||||
})();
|
||||
77
core/modules/widgets/action-deletefield.js
Normal file
77
core/modules/widgets/action-deletefield.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/action-deletefield.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
Action widget to delete fields of a tiddler.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var DeleteFieldWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
DeleteFieldWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
DeleteFieldWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
};
|
||||
|
||||
/*
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
DeleteFieldWidget.prototype.execute = function() {
|
||||
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
||||
this.actionField = this.getAttribute("$field");
|
||||
};
|
||||
|
||||
/*
|
||||
Refresh the widget by ensuring our attributes are up to date
|
||||
*/
|
||||
DeleteFieldWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes["$tiddler"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
/*
|
||||
Invoke the action associated with this widget
|
||||
*/
|
||||
DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
var self = this,
|
||||
tiddler = this.wiki.getTiddler(self.actionTiddler),
|
||||
removeFields = {};
|
||||
if(this.actionField) {
|
||||
removeFields[this.actionField] = undefined;
|
||||
}
|
||||
if(tiddler) {
|
||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||
if(name.charAt(0) !== "$" && name !== "title") {
|
||||
removeFields[name] = undefined;
|
||||
}
|
||||
});
|
||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,removeFields));
|
||||
}
|
||||
return true; // Action was invoked
|
||||
};
|
||||
|
||||
exports["action-deletefield"] = DeleteFieldWidget;
|
||||
|
||||
})();
|
||||
73
core/modules/widgets/action-deletetiddler.js
Normal file
73
core/modules/widgets/action-deletetiddler.js
Normal file
@@ -0,0 +1,73 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/action-deletetiddler.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
Action widget to delete a tiddler.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var DeleteTiddlerWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
DeleteTiddlerWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
DeleteTiddlerWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
};
|
||||
|
||||
/*
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
DeleteTiddlerWidget.prototype.execute = function() {
|
||||
this.actionFilter = this.getAttribute("$filter");
|
||||
this.actionTiddler = this.getAttribute("$tiddler");
|
||||
};
|
||||
|
||||
/*
|
||||
Refresh the widget by ensuring our attributes are up to date
|
||||
*/
|
||||
DeleteTiddlerWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes["$filter"] || changedAttributes["$tiddler"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
/*
|
||||
Invoke the action associated with this widget
|
||||
*/
|
||||
DeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
var tiddlers = [];
|
||||
if(this.actionFilter) {
|
||||
tiddlers = this.wiki.filterTiddlers(this.actionFilter,this);
|
||||
}
|
||||
if(this.actionTiddler) {
|
||||
tiddlers.push(this.actionTiddler);
|
||||
}
|
||||
for(var t=0; t<tiddlers.length; t++) {
|
||||
this.wiki.deleteTiddler(tiddlers[t]);
|
||||
}
|
||||
return true; // Action was invoked
|
||||
};
|
||||
|
||||
exports["action-deletetiddler"] = DeleteTiddlerWidget;
|
||||
|
||||
})();
|
||||
@@ -55,25 +55,19 @@ SendMessageWidget.prototype.refresh = function(changedTiddlers) {
|
||||
Invoke the action associated with this widget
|
||||
*/
|
||||
SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
// Get the parameter
|
||||
// Get the string parameter
|
||||
var param = this.actionParam;
|
||||
// If the parameter is missing then we'll assemble the attributes as a hashmap
|
||||
if(!param) {
|
||||
param = Object.create(null);
|
||||
var count = 0;
|
||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||
if(name.charAt(0) !== "$") {
|
||||
param[name] = attribute;
|
||||
count++;
|
||||
}
|
||||
});
|
||||
// Revert to an empty parameter if no values were found
|
||||
if(!count) {
|
||||
param = undefined;
|
||||
// Assemble the attributes as a hashmap
|
||||
var paramObject = Object.create(null);
|
||||
var count = 0;
|
||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||
if(name.charAt(0) !== "$") {
|
||||
paramObject[name] = attribute;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
});
|
||||
// Dispatch the message
|
||||
this.dispatchEvent({type: this.actionMessage, param: param, tiddlerTitle: this.getVariable("currentTiddler")});
|
||||
this.dispatchEvent({type: this.actionMessage, param: param, paramObject: paramObject, tiddlerTitle: this.getVariable("currentTiddler")});
|
||||
return true; // Action was invoked
|
||||
};
|
||||
|
||||
|
||||
74
core/modules/widgets/action-setfield.js
Normal file
74
core/modules/widgets/action-setfield.js
Normal file
@@ -0,0 +1,74 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/action-setfield.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
Action widget to set a single field or index on a tiddler.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var SetFieldWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
SetFieldWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
SetFieldWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
};
|
||||
|
||||
/*
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
SetFieldWidget.prototype.execute = function() {
|
||||
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
||||
this.actionField = this.getAttribute("$field");
|
||||
this.actionIndex = this.getAttribute("$index");
|
||||
this.actionValue = this.getAttribute("$value");
|
||||
};
|
||||
|
||||
/*
|
||||
Refresh the widget by ensuring our attributes are up to date
|
||||
*/
|
||||
SetFieldWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes["$tiddler"] || changedAttributes["$field"] || changedAttributes["$index"] || changedAttributes["$value"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
/*
|
||||
Invoke the action associated with this widget
|
||||
*/
|
||||
SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
var self = this;
|
||||
if(typeof this.actionValue === "string") {
|
||||
this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue);
|
||||
}
|
||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||
if(name.charAt(0) !== "$") {
|
||||
self.wiki.setText(self.actionTiddler,name,undefined,attribute);
|
||||
}
|
||||
});
|
||||
return true; // Action was invoked
|
||||
};
|
||||
|
||||
exports["action-setfield"] = SetFieldWidget;
|
||||
|
||||
})();
|
||||
@@ -39,6 +39,9 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
|
||||
if(this.browseMultiple) {
|
||||
domNode.setAttribute("multiple","multiple");
|
||||
}
|
||||
if(this.tooltip) {
|
||||
domNode.setAttribute("title",this.tooltip);
|
||||
}
|
||||
// Add a click event handler
|
||||
domNode.addEventListener("change",function (event) {
|
||||
if(self.message) {
|
||||
@@ -62,6 +65,7 @@ Compute the internal state of the widget
|
||||
BrowseWidget.prototype.execute = function() {
|
||||
this.browseMultiple = this.getAttribute("multiple");
|
||||
this.message = this.getAttribute("message");
|
||||
this.tooltip = this.getAttribute("tooltip");
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -36,15 +36,19 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Create element
|
||||
var domNode = this.document.createElement("button");
|
||||
// Assign classes
|
||||
var classes = this["class"].split(" ") || [];
|
||||
var classes = this["class"].split(" ") || [],
|
||||
isPoppedUp = this.popup && this.isPoppedUp();
|
||||
if(this.selectedClass) {
|
||||
if(this.set && this.setTo && this.isSelected()) {
|
||||
$tw.utils.pushTop(classes,this.selectedClass.split(" "));
|
||||
}
|
||||
if(this.popup && this.isPoppedUp()) {
|
||||
if(isPoppedUp) {
|
||||
$tw.utils.pushTop(classes,this.selectedClass.split(" "));
|
||||
}
|
||||
}
|
||||
if(isPoppedUp) {
|
||||
$tw.utils.pushTop(classes,"tc-popup-handle");
|
||||
}
|
||||
domNode.className = classes.join(" ");
|
||||
// Assign other attributes
|
||||
if(this.style) {
|
||||
@@ -101,7 +105,7 @@ ButtonWidget.prototype.isSelected = function() {
|
||||
|
||||
ButtonWidget.prototype.isPoppedUp = function() {
|
||||
var tiddler = this.wiki.getTiddler(this.popup);
|
||||
var result = tiddler && tiddler.fields.text ? $tw.popup.readPopupState(this.popup,tiddler.fields.text) : false;
|
||||
var result = tiddler && tiddler.fields.text ? $tw.popup.readPopupState(tiddler.fields.text) : false;
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
@@ -52,13 +52,26 @@ DropZoneWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.domNodes.push(domNode);
|
||||
};
|
||||
|
||||
DropZoneWidget.prototype.handleDragEnterEvent = function(event) {
|
||||
DropZoneWidget.prototype.enterDrag = function() {
|
||||
// We count enter/leave events
|
||||
this.dragEnterCount = (this.dragEnterCount || 0) + 1;
|
||||
// If we're entering for the first time we need to apply highlighting
|
||||
if(this.dragEnterCount === 1) {
|
||||
$tw.utils.addClass(this.domNodes[0],"tc-dragover");
|
||||
}
|
||||
};
|
||||
|
||||
DropZoneWidget.prototype.leaveDrag = function() {
|
||||
// Reduce the enter count
|
||||
this.dragEnterCount = (this.dragEnterCount || 0) - 1;
|
||||
// Remove highlighting if we're leaving externally
|
||||
if(this.dragEnterCount <= 0) {
|
||||
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
|
||||
}
|
||||
};
|
||||
|
||||
DropZoneWidget.prototype.handleDragEnterEvent = function(event) {
|
||||
this.enterDrag();
|
||||
// Tell the browser that we're ready to handle the drop
|
||||
event.preventDefault();
|
||||
// Tell the browser not to ripple the drag up to any parent drop handlers
|
||||
@@ -76,15 +89,11 @@ DropZoneWidget.prototype.handleDragOverEvent = function(event) {
|
||||
};
|
||||
|
||||
DropZoneWidget.prototype.handleDragLeaveEvent = function(event) {
|
||||
// Reduce the enter count
|
||||
this.dragEnterCount = (this.dragEnterCount || 0) - 1;
|
||||
// Remove highlighting if we're leaving externally
|
||||
if(this.dragEnterCount <= 0) {
|
||||
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
|
||||
}
|
||||
this.leaveDrag();
|
||||
};
|
||||
|
||||
DropZoneWidget.prototype.handleDropEvent = function(event) {
|
||||
this.leaveDrag();
|
||||
// Check for being over a TEXTAREA or INPUT
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) !== -1) {
|
||||
return false;
|
||||
@@ -118,6 +127,9 @@ DropZoneWidget.prototype.importData = function(dataTransfer) {
|
||||
var data = dataTransfer.getData(dataType.type);
|
||||
// Import the tiddlers in the data
|
||||
if(data !== "" && data !== null) {
|
||||
if($tw.log.IMPORT) {
|
||||
console.log("Importing data type '" + dataType.type + "', data: '" + data + "'")
|
||||
}
|
||||
var tiddlerFields = dataType.convertToFields(data);
|
||||
if(!tiddlerFields.title) {
|
||||
tiddlerFields.title = this.wiki.generateNewTitle("Untitled");
|
||||
@@ -199,6 +211,9 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
text: str,
|
||||
type: type
|
||||
};
|
||||
if($tw.log.IMPORT) {
|
||||
console.log("Importing string '" + str + "', type: '" + type + "'");
|
||||
}
|
||||
self.dispatchEvent({type: "tm-import-tiddlers", param: JSON.stringify([tiddlerFields])});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -80,7 +80,9 @@ EditBitmapWidget.prototype.render = function(parent,nextSibling) {
|
||||
parent.insertBefore(this.heightDomNode,nextSibling);
|
||||
this.domNodes.push(this.canvasDomNode,this.widthDomNode,this.heightDomNode);
|
||||
// Load the image into the canvas
|
||||
this.loadCanvas();
|
||||
if($tw.browser) {
|
||||
this.loadCanvas();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,7 +12,7 @@ Edit-text widget
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var MIN_TEXT_AREA_HEIGHT = 100; // Minimum height of textareas in pixels
|
||||
var DEFAULT_MIN_TEXT_AREA_HEIGHT = "100px"; // Minimum height of textareas in pixels
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
@@ -71,6 +71,11 @@ EditTextWidget.prototype.render = function(parent,nextSibling) {
|
||||
}
|
||||
// Fix height
|
||||
this.fixHeight();
|
||||
// Focus field
|
||||
if(this.editFocus === "true") {
|
||||
domNode.focus();
|
||||
domNode.select();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -137,7 +142,10 @@ EditTextWidget.prototype.execute = function() {
|
||||
this.editClass = this.getAttribute("class");
|
||||
this.editPlaceholder = this.getAttribute("placeholder");
|
||||
this.editSize = this.getAttribute("size");
|
||||
this.editAutoHeight = this.getAttribute("autoHeight","yes") === "yes";
|
||||
this.editMinHeight = this.getAttribute("minHeight",DEFAULT_MIN_TEXT_AREA_HEIGHT);
|
||||
this.editFocusPopup = this.getAttribute("focusPopup");
|
||||
this.editFocus = this.getAttribute("focus");
|
||||
// Get the editor element tag and type
|
||||
var tag,type;
|
||||
if(this.editField === "text") {
|
||||
@@ -164,7 +172,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
EditTextWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
// Completely rerender if any of our attributes have changed
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if(changedTiddlers[this.editTitle]) {
|
||||
@@ -203,25 +211,26 @@ Fix the height of textareas to fit their content
|
||||
EditTextWidget.prototype.fixHeight = function() {
|
||||
var self = this,
|
||||
domNode = this.domNodes[0];
|
||||
if(domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === "textarea") {
|
||||
$tw.utils.nextTick(function() {
|
||||
// Resize the textarea to fit its content, preserving scroll position
|
||||
var scrollPosition = $tw.utils.getScrollPosition(),
|
||||
scrollTop = scrollPosition.y;
|
||||
// Set its height to auto so that it snaps to the correct height
|
||||
domNode.style.height = "auto";
|
||||
// Calculate the revised height
|
||||
var newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,MIN_TEXT_AREA_HEIGHT);
|
||||
// Only try to change the height if it has changed
|
||||
if(newHeight !== domNode.offsetHeight) {
|
||||
domNode.style.height = newHeight + "px";
|
||||
// Make sure that the dimensions of the textarea are recalculated
|
||||
$tw.utils.forceLayout(domNode);
|
||||
// Check that the scroll position is still visible before trying to scroll back to it
|
||||
scrollTop = Math.min(scrollTop,self.document.body.scrollHeight - window.innerHeight);
|
||||
window.scrollTo(scrollPosition.x,scrollTop);
|
||||
}
|
||||
});
|
||||
if(this.editAutoHeight && domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === "textarea") {
|
||||
// Resize the textarea to fit its content, preserving scroll position
|
||||
var scrollPosition = $tw.utils.getScrollPosition(),
|
||||
scrollTop = scrollPosition.y;
|
||||
// Measure the specified minimum height
|
||||
domNode.style.height = self.editMinHeight;
|
||||
var minHeight = domNode.offsetHeight;
|
||||
// Set its height to auto so that it snaps to the correct height
|
||||
domNode.style.height = "auto";
|
||||
// Calculate the revised height
|
||||
var newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,minHeight);
|
||||
// Only try to change the height if it has changed
|
||||
if(newHeight !== domNode.offsetHeight) {
|
||||
domNode.style.height = newHeight + "px";
|
||||
// Make sure that the dimensions of the textarea are recalculated
|
||||
$tw.utils.forceLayout(domNode);
|
||||
// Check that the scroll position is still visible before trying to scroll back to it
|
||||
scrollTop = Math.min(scrollTop,self.document.body.scrollHeight - window.innerHeight);
|
||||
window.scrollTo(scrollPosition.x,scrollTop);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -71,24 +71,40 @@ FieldManglerWidget.prototype.handleRemoveFieldEvent = function(event) {
|
||||
};
|
||||
|
||||
FieldManglerWidget.prototype.handleAddFieldEvent = function(event) {
|
||||
var tiddler = this.wiki.getTiddler(this.mangleTitle);
|
||||
if(tiddler && typeof event.param === "string") {
|
||||
var name = event.param.toLowerCase().trim();
|
||||
if(name !== "" && !$tw.utils.hop(tiddler.fields,name)) {
|
||||
if(!$tw.utils.isValidFieldName(name)) {
|
||||
alert($tw.language.getString(
|
||||
"InvalidFieldName",
|
||||
{variables:
|
||||
{fieldName: name}
|
||||
}
|
||||
));
|
||||
return true;
|
||||
var tiddler = this.wiki.getTiddler(this.mangleTitle),
|
||||
addition = this.wiki.getModificationFields(),
|
||||
hadInvalidFieldName = false,
|
||||
addField = function(name,value) {
|
||||
var trimmedName = name.toLowerCase().trim();
|
||||
if(!$tw.utils.isValidFieldName(trimmedName)) {
|
||||
if(!hadInvalidFieldName) {
|
||||
alert($tw.language.getString(
|
||||
"InvalidFieldName",
|
||||
{variables:
|
||||
{fieldName: trimmedName}
|
||||
}
|
||||
));
|
||||
hadInvalidFieldName = true;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if(!value && tiddler) {
|
||||
value = tiddler.fields[trimmedName];
|
||||
}
|
||||
addition[trimmedName] = value || "";
|
||||
}
|
||||
var addition = this.wiki.getModificationFields();
|
||||
addition[name] = "";
|
||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));
|
||||
return;
|
||||
};
|
||||
addition.title = this.mangleTitle;
|
||||
if(typeof event.param === "string") {
|
||||
addField(event.param,"");
|
||||
}
|
||||
if(typeof event.paramObject === "object") {
|
||||
for(var name in event.paramObject) {
|
||||
addField(name,event.paramObject[name]);
|
||||
}
|
||||
}
|
||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -154,15 +154,16 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
|
||||
// Then the data
|
||||
dataTransfer.clearData();
|
||||
var jsonData = this.wiki.getTiddlerAsJson(this.to),
|
||||
textData = this.wiki.getTiddlerText(this.to,"");
|
||||
textData = this.wiki.getTiddlerText(this.to,""),
|
||||
title = (new RegExp("^" + $tw.config.textPrimitives.wikiLink + "$","mg")).exec(this.to) ? this.to : "[[" + this.to + "]]";
|
||||
// IE doesn't like these content types
|
||||
if(!$tw.browser.isIE) {
|
||||
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
||||
dataTransfer.setData("text/plain",this.to);
|
||||
dataTransfer.setData("text/plain",title);
|
||||
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURI(jsonData));
|
||||
}
|
||||
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURI(jsonData));
|
||||
dataTransfer.setData("Text",this.to);
|
||||
dataTransfer.setData("Text",title);
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -208,19 +208,18 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
tiddler = this.wiki.getTiddler(title),
|
||||
storyList = this.getStoryList(),
|
||||
originalTitle, confirmationTitle;
|
||||
originalTitle = tiddler.fields["draft.of"],
|
||||
confirmationTitle;
|
||||
// Check if the tiddler we're deleting is in draft mode
|
||||
if(tiddler.hasField("draft.title")) {
|
||||
if(originalTitle) {
|
||||
// If so, we'll prompt for confirmation referencing the original tiddler
|
||||
originalTitle = tiddler.fields["draft.of"];
|
||||
confirmationTitle = originalTitle;
|
||||
} else {
|
||||
// If not a draft, then prompt for confirmation referencing the specified tiddler
|
||||
originalTitle = null;
|
||||
confirmationTitle = title;
|
||||
}
|
||||
// Seek confirmation
|
||||
if(!confirm($tw.language.getString(
|
||||
if((this.wiki.getTiddler(originalTitle) || (tiddler.fields.text || "") !== "") && !confirm($tw.language.getString(
|
||||
"ConfirmDeleteTiddler",
|
||||
{variables:
|
||||
{title: confirmationTitle}
|
||||
@@ -302,10 +301,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
||||
}
|
||||
));
|
||||
}
|
||||
if(!isRename && !this.wiki.isDraftModified(title)) {
|
||||
event.type = "tm-cancel-tiddler";
|
||||
this.dispatchEvent(event);
|
||||
} else if(isConfirmed) {
|
||||
if(isConfirmed) {
|
||||
// Save the draft tiddler as the real tiddler
|
||||
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{
|
||||
title: draftTitle,
|
||||
@@ -338,11 +334,12 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
||||
var draftTitle = event.param || event.tiddlerTitle,
|
||||
draftTiddler = this.wiki.getTiddler(draftTitle),
|
||||
originalTitle = draftTiddler.fields["draft.of"],
|
||||
originalTiddler = this.wiki.getTiddler(originalTitle),
|
||||
storyList = this.getStoryList();
|
||||
if(draftTiddler && originalTitle) {
|
||||
// Ask for confirmation if the tiddler text has changed
|
||||
var isConfirmed = true;
|
||||
if(this.wiki.getTiddlerText(draftTitle) !== this.wiki.getTiddlerText(originalTitle)) {
|
||||
if(this.wiki.isDraftModified(draftTitle)) {
|
||||
isConfirmed = confirm($tw.language.getString(
|
||||
"ConfirmCancelTiddler",
|
||||
{variables:
|
||||
@@ -353,9 +350,15 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
||||
// Remove the draft tiddler
|
||||
if(isConfirmed) {
|
||||
this.wiki.deleteTiddler(draftTitle);
|
||||
this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
|
||||
this.addToHistory(originalTitle,event.navigateFromClientRect);
|
||||
if(originalTiddler) {
|
||||
this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
|
||||
this.addToHistory(originalTitle,event.navigateFromClientRect);
|
||||
} else {
|
||||
this.removeTitleFromStory(storyList,draftTitle);
|
||||
}
|
||||
this.saveStoryList(storyList);
|
||||
// Trigger an autosave
|
||||
$tw.rootWidget.dispatchEvent({type: "tm-auto-save-wiki"});
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -373,23 +376,26 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
||||
NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
// Get the story details
|
||||
var storyList = this.getStoryList(),
|
||||
templateTiddler, title, draftTitle, existingTiddler, mergedTags;
|
||||
// Work out the title of the target tiddler
|
||||
if(typeof event.param === "object") {
|
||||
// If we got a hashmap use it as the template
|
||||
templateTiddler = event.param;
|
||||
if(templateTiddler.title) {
|
||||
// Use the provided title
|
||||
title = templateTiddler.title
|
||||
} else {
|
||||
// Generate a new unique title
|
||||
title = this.wiki.generateNewTitle($tw.language.getString("DefaultNewTiddlerTitle"));
|
||||
}
|
||||
} else {
|
||||
// If we got a string, use it as the template and generate a new title
|
||||
templateTiddler, additionalFields, title, draftTitle, existingTiddler;
|
||||
// Get the template tiddler (if any)
|
||||
if(typeof event.param === "string") {
|
||||
// Get the template tiddler
|
||||
templateTiddler = this.wiki.getTiddler(event.param);
|
||||
// Generate a new title
|
||||
title = this.wiki.generateNewTitle(event.param || $tw.language.getString("DefaultNewTiddlerTitle"));
|
||||
}
|
||||
// Get the specified additional fields
|
||||
if(typeof event.paramObject === "object") {
|
||||
additionalFields = event.paramObject;
|
||||
}
|
||||
if(typeof event.param === "object") { // Backwards compatibility with 5.1.3
|
||||
additionalFields = event.param;
|
||||
}
|
||||
if(additionalFields && additionalFields.title) {
|
||||
title = additionalFields.title;
|
||||
}
|
||||
// Generate a title if we don't have one
|
||||
title = title || this.wiki.generateNewTitle($tw.language.getString("DefaultNewTiddlerTitle"));
|
||||
// Find any existing draft for this tiddler
|
||||
draftTitle = this.wiki.findDraft(title);
|
||||
// Pull in any existing tiddler
|
||||
@@ -400,15 +406,17 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
existingTiddler = this.wiki.getTiddler(title);
|
||||
}
|
||||
// Merge the tags
|
||||
if(existingTiddler && existingTiddler.fields.tags && templateTiddler && templateTiddler.tags) {
|
||||
var mergedTags = [];
|
||||
if(existingTiddler && existingTiddler.fields.tags) {
|
||||
$tw.utils.pushTop(mergedTags,existingTiddler.fields.tags)
|
||||
}
|
||||
if(additionalFields && additionalFields.tags) {
|
||||
// Merge tags
|
||||
mergedTags = $tw.utils.pushTop($tw.utils.parseStringArray(templateTiddler.tags),existingTiddler.fields.tags);
|
||||
} else if(existingTiddler && existingTiddler.fields.tags) {
|
||||
mergedTags = existingTiddler.fields.tags;
|
||||
} else if(templateTiddler && templateTiddler.tags) {
|
||||
mergedTags = templateTiddler.tags;
|
||||
} else if(templateTiddler && templateTiddler.fields && templateTiddler.fields.tags) {
|
||||
mergedTags = templateTiddler.fields.tags;
|
||||
mergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags));
|
||||
}
|
||||
if(templateTiddler && templateTiddler.fields.tags) {
|
||||
// Merge tags
|
||||
mergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags);
|
||||
}
|
||||
// Save the draft tiddler
|
||||
var draftTiddler = new $tw.Tiddler({
|
||||
@@ -417,6 +425,7 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
},
|
||||
templateTiddler,
|
||||
existingTiddler,
|
||||
additionalFields,
|
||||
this.wiki.getCreationFields(),
|
||||
{
|
||||
title: draftTitle,
|
||||
|
||||
@@ -106,20 +106,18 @@ Read the state tiddler
|
||||
*/
|
||||
RevealWidget.prototype.readState = function() {
|
||||
// Read the information from the state tiddler
|
||||
if(this.stateTitle) {
|
||||
var state = this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler"));
|
||||
switch(this.type) {
|
||||
case "popup":
|
||||
this.readPopupState(state);
|
||||
break;
|
||||
case "match":
|
||||
this.readMatchState(state);
|
||||
break;
|
||||
case "nomatch":
|
||||
this.readMatchState(state);
|
||||
this.isOpen = !this.isOpen;
|
||||
break;
|
||||
}
|
||||
var state = this.stateTitle ? this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler")) : this["default"];
|
||||
switch(this.type) {
|
||||
case "popup":
|
||||
this.readPopupState(state);
|
||||
break;
|
||||
case "match":
|
||||
this.readMatchState(state);
|
||||
break;
|
||||
case "nomatch":
|
||||
this.readMatchState(state);
|
||||
this.isOpen = !this.isOpen;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -39,9 +39,21 @@ Compute the internal state of the widget
|
||||
SetWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.setName = this.getAttribute("name","currentTiddler");
|
||||
this.setFilter = this.getAttribute("filter");
|
||||
this.setValue = this.getAttribute("value");
|
||||
this.setEmptyValue = this.getAttribute("emptyValue");
|
||||
// Set context variable
|
||||
this.setVariable(this.setName,this.setValue,this.parseTreeNode.params);
|
||||
var value = this.setValue;
|
||||
if(this.setFilter) {
|
||||
var results = this.wiki.filterTiddlers(this.setFilter,this);
|
||||
if(!this.setValue) {
|
||||
value = $tw.utils.stringifyList(results);
|
||||
}
|
||||
if(results.length === 0 && this.setEmptyValue !== undefined) {
|
||||
value = this.setEmptyValue;
|
||||
}
|
||||
}
|
||||
this.setVariable(this.setName,value,this.parseTreeNode.params);
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
@@ -51,7 +63,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
SetWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.name || changedAttributes.value) {
|
||||
if(changedAttributes.name || changedAttributes.filter || changedAttributes.value || changedAttributes.emptyValue) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -37,18 +37,35 @@ TiddlerWidget.prototype.render = function(parent,nextSibling) {
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
TiddlerWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.tiddlerTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
// Set context variables
|
||||
this.setVariable("currentTiddler",this.tiddlerTitle);
|
||||
this.setVariable("missingTiddlerClass",(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tc-tiddler-exists" : "tc-tiddler-missing");
|
||||
this.setVariable("shadowTiddlerClass",this.wiki.isShadowTiddler(this.tiddlerTitle) ? "tc-tiddler-shadow" : "");
|
||||
this.setVariable("systemTiddlerClass",this.wiki.isSystemTiddler(this.tiddlerTitle) ? "tc-tiddler-system" : "");
|
||||
this.setVariable("tiddlerTagClasses",this.getTagClasses());
|
||||
this.tiddlerState = this.computeTiddlerState();
|
||||
this.setVariable("currentTiddler",this.tiddlerState.currentTiddler);
|
||||
this.setVariable("missingTiddlerClass",this.tiddlerState.missingTiddlerClass);
|
||||
this.setVariable("shadowTiddlerClass",this.tiddlerState.shadowTiddlerClass);
|
||||
this.setVariable("systemTiddlerClass",this.tiddlerState.systemTiddlerClass);
|
||||
this.setVariable("tiddlerTagClasses",this.tiddlerState.tiddlerTagClasses);
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
/*
|
||||
Compute the tiddler state flags
|
||||
*/
|
||||
TiddlerWidget.prototype.computeTiddlerState = function() {
|
||||
// Get our parameters
|
||||
this.tiddlerTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
// Compute the state
|
||||
var state = {
|
||||
currentTiddler: this.tiddlerTitle || "",
|
||||
missingTiddlerClass: (this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tc-tiddler-exists" : "tc-tiddler-missing",
|
||||
shadowTiddlerClass: this.wiki.isShadowTiddler(this.tiddlerTitle) ? "tc-tiddler-shadow" : "",
|
||||
systemTiddlerClass: this.wiki.isSystemTiddler(this.tiddlerTitle) ? "tc-tiddler-system" : "",
|
||||
tiddlerTagClasses: this.getTagClasses()
|
||||
};
|
||||
// Compute a simple hash to make it easier to detect changes
|
||||
state.hash = state.currentTiddler + state.missingTiddlerClass + state.shadowTiddlerClass + state.systemTiddlerClass + state.tiddlerTagClasses;
|
||||
return state;
|
||||
};
|
||||
|
||||
/*
|
||||
Create a string of CSS classes derived from the tags of the current tiddler
|
||||
*/
|
||||
@@ -69,8 +86,9 @@ TiddlerWidget.prototype.getTagClasses = function() {
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
TiddlerWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.tiddler) {
|
||||
var changedAttributes = this.computeAttributes(),
|
||||
newTiddlerState = this.computeTiddlerState();
|
||||
if(changedAttributes.tiddler || newTiddlerState.hash !== this.tiddlerState.hash) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -844,6 +844,7 @@ exports.parseTextReference = function(title,field,index,options) {
|
||||
}
|
||||
return this.parseText("text/vnd.tiddlywiki",text.toString(),options);
|
||||
} else if(index) {
|
||||
this.getTiddlerText(title); // Force the tiddler to be lazily loaded
|
||||
text = this.extractTiddlerDataItem(tiddler,index,undefined);
|
||||
if(text === undefined) {
|
||||
return null;
|
||||
@@ -968,6 +969,7 @@ Options available:
|
||||
invert: If true returns tiddlers that do not contain the specified string
|
||||
caseSensitive: If true forces a case sensitive search
|
||||
literal: If true, searches for literal string, rather than separate search terms
|
||||
field: If specified, restricts the search to the specified field
|
||||
*/
|
||||
exports.search = function(text,options) {
|
||||
options = options || {};
|
||||
@@ -1006,13 +1008,17 @@ exports.search = function(text,options) {
|
||||
var contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo["text/vnd.tiddlywiki"],
|
||||
match;
|
||||
for(var t=0; t<searchTermsRegExps.length; t++) {
|
||||
// Search title, tags and body
|
||||
match = false;
|
||||
if(contentTypeInfo.encoding === "utf8") {
|
||||
match = match || searchTermsRegExps[t].test(tiddler.fields.text);
|
||||
if(options.field) {
|
||||
match = searchTermsRegExps[t].test(tiddler.getFieldString(options.field));
|
||||
} else {
|
||||
// Search title, tags and body
|
||||
if(contentTypeInfo.encoding === "utf8") {
|
||||
match = match || searchTermsRegExps[t].test(tiddler.fields.text);
|
||||
}
|
||||
var tags = tiddler.fields.tags ? tiddler.fields.tags.join("\0") : "";
|
||||
match = match || searchTermsRegExps[t].test(tags) || searchTermsRegExps[t].test(tiddler.fields.title);
|
||||
}
|
||||
var tags = tiddler.fields.tags ? tiddler.fields.tags.join("\0") : "";
|
||||
match = match || searchTermsRegExps[t].test(tags) || searchTermsRegExps[t].test(tiddler.fields.title);
|
||||
if(!match) {
|
||||
return false;
|
||||
}
|
||||
@@ -1095,6 +1101,10 @@ exports.readFile = function(file,callback) {
|
||||
// Figure out if we're reading a binary file
|
||||
var contentTypeInfo = $tw.config.contentTypeInfo[type],
|
||||
isBinary = contentTypeInfo ? contentTypeInfo.encoding === "base64" : false;
|
||||
// Log some debugging information
|
||||
if($tw.log.IMPORT) {
|
||||
console.log("Importing file '" + file.name + "', type: '" + type + "', isBinary: " + isBinary);
|
||||
}
|
||||
// Create the FileReader
|
||||
var reader = new FileReader();
|
||||
// Onload
|
||||
@@ -1156,9 +1166,9 @@ exports.isDraftModified = function(title) {
|
||||
var ignoredFields = ["created", "modified", "title", "draft.title", "draft.of"],
|
||||
origTiddler = this.getTiddler(tiddler.fields["draft.of"]);
|
||||
if(!origTiddler) {
|
||||
return true;
|
||||
return tiddler.fields.text !== "";
|
||||
}
|
||||
return !tiddler.isEqual(origTiddler,ignoredFields);
|
||||
return tiddler.fields["draft.title"] !== tiddler.fields["draft.of"] || !tiddler.isEqual(origTiddler,ignoredFields);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -73,7 +73,7 @@ tab-foreground: #666666
|
||||
table-border: #dddddd
|
||||
table-footer-background: #a8a8a8
|
||||
table-header-background: #f0f0f0
|
||||
tag-background: #d5ad34
|
||||
tag-background: #ec6
|
||||
tag-foreground: #ffffff
|
||||
tiddler-background: <<colour background>>
|
||||
tiddler-border: <<colour background>>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
title: $:/core/templates/alltiddlers.content
|
||||
|
||||
{{{ [!is[system]sort[title]] ||$:/core/templates/static-tiddler}}}
|
||||
@@ -1,31 +1,10 @@
|
||||
title: $:/core/templates/alltiddlers.template.html
|
||||
type: text/vnd.tiddlywiki-html
|
||||
|
||||
\define tv-wikilink-template() #$uri_encoded$
|
||||
\define tv-config-toolbar-icons() no
|
||||
\define tv-config-toolbar-text() no
|
||||
\define tv-config-toolbar-class() tc-btn-invisible
|
||||
\rules only filteredtranscludeinline transcludeinline
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="generator" content="TiddlyWiki" />
|
||||
<meta name="tiddlywiki-version" content="{{$:/core/templates/version}}" />
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
|
||||
<title>{{$:/core/wiki/title}}</title>
|
||||
<div id="styleArea">
|
||||
{{$:/boot/boot.css||$:/core/templates/css-tiddler}}
|
||||
</div>
|
||||
<style type="text/css">
|
||||
{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}
|
||||
</style>
|
||||
</head>
|
||||
<body class="tc-body">
|
||||
{{$:/StaticBanner||$:/core/templates/html-tiddler}}
|
||||
<section class="tc-story-river">
|
||||
{{$:/core/templates/alltiddlers.content||$:/core/templates/html-tiddler}}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
<!-- This template is provided for backwards compatibility with older versions of TiddlyWiki -->
|
||||
|
||||
<$set name="exportFilter" value="[!is[system]sort[title]]">
|
||||
|
||||
{{$:/core/templates/exporters/StaticRiver}}
|
||||
|
||||
</$set>
|
||||
|
||||
9
core/templates/exporters/CsvFile.tid
Normal file
9
core/templates/exporters/CsvFile.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/templates/exporters/CsvFile
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/CsvFile}}
|
||||
extension: .csv
|
||||
|
||||
\define renderContent()
|
||||
<$text text=<<csvtiddlers filter:"""$(exportFilter)$""" format:"quoted-comma-sep">>/>
|
||||
\end
|
||||
<<renderContent>>
|
||||
9
core/templates/exporters/JsonFile.tid
Normal file
9
core/templates/exporters/JsonFile.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/templates/exporters/JsonFile
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/JsonFile}}
|
||||
extension: .json
|
||||
|
||||
\define renderContent()
|
||||
<$text text=<<jsontiddlers filter:"""$(exportFilter)$""">>/>
|
||||
\end
|
||||
<<renderContent>>
|
||||
33
core/templates/exporters/StaticRiver.tid
Normal file
33
core/templates/exporters/StaticRiver.tid
Normal file
@@ -0,0 +1,33 @@
|
||||
title: $:/core/templates/exporters/StaticRiver
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/StaticRiver}}
|
||||
extension: .html
|
||||
|
||||
\define tv-wikilink-template() #$uri_encoded$
|
||||
\define tv-config-toolbar-icons() no
|
||||
\define tv-config-toolbar-text() no
|
||||
\define tv-config-toolbar-class() tc-btn-invisible
|
||||
\rules only filteredtranscludeinline transcludeinline
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="generator" content="TiddlyWiki" />
|
||||
<meta name="tiddlywiki-version" content="{{$:/core/templates/version}}" />
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
|
||||
<title>{{$:/core/wiki/title}}</title>
|
||||
<div id="styleArea">
|
||||
{{$:/boot/boot.css||$:/core/templates/css-tiddler}}
|
||||
</div>
|
||||
<style type="text/css">
|
||||
{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}
|
||||
</style>
|
||||
</head>
|
||||
<body class="tc-body">
|
||||
{{$:/StaticBanner||$:/core/templates/html-tiddler}}
|
||||
<section class="tc-story-river">
|
||||
{{$:/core/templates/exporters/StaticRiver/Content||$:/core/templates/html-tiddler}}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
8
core/templates/exporters/StaticRiverContent.tid
Normal file
8
core/templates/exporters/StaticRiverContent.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: $:/core/templates/exporters/StaticRiver/Content
|
||||
|
||||
\define renderContent()
|
||||
{{{ $(exportFilter)$ ||$:/core/templates/static-tiddler}}}
|
||||
\end
|
||||
<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
|
||||
<<renderContent>>
|
||||
</$importvariables>
|
||||
9
core/templates/exporters/TidFile.tid
Normal file
9
core/templates/exporters/TidFile.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/templates/exporters/TidFile
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/TidFile}}
|
||||
extension: .tid
|
||||
|
||||
\define renderContent()
|
||||
{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}
|
||||
\end
|
||||
<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]"><<renderContent>></$importvariables>
|
||||
@@ -7,7 +7,19 @@ caption: {{$:/language/Search/Filter/Caption}}
|
||||
|
||||
<<lingo Filter/Hint>>
|
||||
|
||||
<div class="tc-search tc-advanced-search"><$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/> <$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">{{$:/core/images/down-arrow}}</$button> <$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> <$link to="" class="tc-btn-invisible">{{$:/core/images/close-button}}</$link></$reveal></div>
|
||||
<div class="tc-search tc-advanced-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/>
|
||||
<$button popup=<<qualify "$:/state/filterDropdown">> class="tc-btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
<$macrocall $name="exportButton" exportFilter={{$:/temp/advancedsearch}} lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/filterDropdown">> type="nomatch" text="" default="">
|
||||
|
||||
@@ -7,7 +7,15 @@ caption: {{$:/language/Search/Shadows/Caption}}
|
||||
|
||||
<<lingo Shadows/Hint>>
|
||||
|
||||
<div class="tc-search"><$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/><$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> <$link to="" class="tc-btn-invisible">{{$:/core/images/close-button}}</$link></$reveal></div>
|
||||
<div class="tc-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
|
||||
@@ -7,26 +7,26 @@ caption: {{$:/language/Search/Standard/Caption}}
|
||||
|
||||
<<lingo Standard/Hint>>
|
||||
|
||||
<div class="tc-search"><$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/><$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> <$link to="" class="tc-btn-invisible">{{$:/core/images/close-button}}</$link></$reveal></div>
|
||||
<div class="tc-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
|
||||
<$set name="resultCount" value="""<$count filter="[!is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
|
||||
|
||||
<div class="tc-search-results">
|
||||
|
||||
<<lingo Standard/Matches>>
|
||||
|
||||
<$list filter="[!is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
|
||||
</div>
|
||||
|
||||
<$set name="searchTiddler" value="$:/temp/advancedsearch">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]" emptyMessage="""
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]">
|
||||
<$transclude/>
|
||||
</$list>
|
||||
""">
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}}/>
|
||||
</$list>
|
||||
</$set>
|
||||
|
||||
</$reveal>
|
||||
|
||||
<$reveal state="$:/temp/advancedsearch" type="match" text="">
|
||||
|
||||
</$reveal>
|
||||
|
||||
@@ -7,7 +7,15 @@ caption: {{$:/language/Search/System/Caption}}
|
||||
|
||||
<<lingo System/Hint>>
|
||||
|
||||
<div class="tc-search"><$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/><$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> <$link to="" class="tc-btn-invisible">{{$:/core/images/close-button}}</$link></$reveal></div>
|
||||
<div class="tc-search">
|
||||
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/>
|
||||
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $field="text" $value=""/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
|
||||
@@ -3,6 +3,17 @@ tags: $:/tags/ControlPanel/Info
|
||||
caption: {{$:/language/ControlPanel/Basics/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Basics/
|
||||
|
||||
\define show-filter-count(filter)
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-setfield $tiddler="$:/temp/advancedsearch" $value="""$filter$"""/>
|
||||
<$action-setfield $tiddler="$:/state/tab--1498284803" $value="$:/core/ui/AdvancedSearch/Filter"/>
|
||||
<$action-navigate $to="$:/AdvancedSearch"/>
|
||||
''<$count filter="""$filter$"""/>''
|
||||
{{$:/core/images/advanced-search-button}}
|
||||
</$button>
|
||||
\end
|
||||
|
||||
|<<lingo Version/Prompt>> |''<<version>>'' |
|
||||
|<$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
||||
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
||||
@@ -12,8 +23,8 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
|
||||
|<$link to="$:/config/NewJournal/Title"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> |
|
||||
|<$link to="$:/config/NewJournal/Tags"><<lingo NewJournal/Tags/Prompt>></$link> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> |
|
||||
|<<lingo Language/Prompt>> |{{$:/snippets/minilanguageswitcher}} |
|
||||
|<<lingo Tiddlers/Prompt>> |''<$count filter="[!is[system]]"/>'' |
|
||||
|<<lingo Tags/Prompt>> |''<$count filter="[tags[]]"/>'' |
|
||||
|<<lingo SystemTiddlers/Prompt>> |''<$count filter="[is[system]]"/>'' |
|
||||
|<<lingo ShadowTiddlers/Prompt>> |''<$count filter="[all[shadows]]"/>'' |
|
||||
|<<lingo OverriddenShadowTiddlers/Prompt>> |''<$count filter="[is[tiddler]is[shadow]]"/>'' |
|
||||
|<<lingo Tiddlers/Prompt>> |<<show-filter-count "[!is[system]sort[title]]">> |
|
||||
|<<lingo Tags/Prompt>> |<<show-filter-count "[tags[]sort[title]]">> |
|
||||
|<<lingo SystemTiddlers/Prompt>> |<<show-filter-count "[is[system]sort[title]]">> |
|
||||
|<<lingo ShadowTiddlers/Prompt>> |<<show-filter-count "[all[shadows]sort[title]]">> |
|
||||
|<<lingo OverriddenShadowTiddlers/Prompt>> |<<show-filter-count "[is[tiddler]is[shadow]sort[title]]">> |
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
title: $:/core/ui/ControlPanel/Tools
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: {{$:/language/ControlPanel/Tools/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Tools/
|
||||
|
||||
//Note that before the end of the beta this tab will be removed, and more extensive export options made available via toolbar buttons//
|
||||
|
||||
! <<lingo Export/Heading>>
|
||||
|
||||
<$button message="tm-download-file" param="$:/core/templates/alltiddlers.template.html" class="tc-btn-big-green"><<lingo Export/AllAsStaticHTML/Caption>> {{$:/core/images/save-button}}</$button>
|
||||
20
core/ui/DefaultSearchResultList.tid
Normal file
20
core/ui/DefaultSearchResultList.tid
Normal file
@@ -0,0 +1,20 @@
|
||||
title: $:/core/ui/DefaultSearchResultList
|
||||
tags: $:/tags/SearchResults
|
||||
caption: {{$:/language/Search/DefaultResults/Caption}}
|
||||
|
||||
\define searchResultList()
|
||||
<$set name="resultCount" value="""<$count filter="[!is[system]search{$(searchTiddler)$}]"/>""">
|
||||
|
||||
{{$:/language/Search/Matches}}
|
||||
|
||||
</$set>
|
||||
|
||||
//<small>Title matches:</small>//
|
||||
|
||||
<$list filter="[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
|
||||
//<small>All matches:</small>//
|
||||
|
||||
<$list filter="[!is[system]search{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
\end
|
||||
<<searchResultList>>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user