mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-26 21:03:42 +00:00
Compare commits
93 Commits
v5.0.0-alp
...
v5.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1e909278c | ||
|
|
8d3613e8b4 | ||
|
|
3fd3e408fc | ||
|
|
a2fcc59648 | ||
|
|
223e9c4747 | ||
|
|
b63f7a7416 | ||
|
|
905d3e6e1e | ||
|
|
90a0eca2f5 | ||
|
|
7658789971 | ||
|
|
9257c8205f | ||
|
|
b117f74666 | ||
|
|
3b35d7dfe4 | ||
|
|
29c0f7156b | ||
|
|
0d2ed8f112 | ||
|
|
99a6b1bcc0 | ||
|
|
da4cdf2d3b | ||
|
|
26cc62cff7 | ||
|
|
b1992714ed | ||
|
|
ecca7a3ea9 | ||
|
|
4b84d9bfe5 | ||
|
|
92b1932fcf | ||
|
|
9a6e404215 | ||
|
|
939ad11eae | ||
|
|
6785c49734 | ||
|
|
45c51481de | ||
|
|
874bd7b2b8 | ||
|
|
fc6dd83f2f | ||
|
|
a8129874fb | ||
|
|
c7d5905242 | ||
|
|
02d3620d93 | ||
|
|
b304e3fe40 | ||
|
|
06a66cf24e | ||
|
|
145e3ece78 | ||
|
|
24e361da77 | ||
|
|
1b9614eb9d | ||
|
|
791033d751 | ||
|
|
9748709759 | ||
|
|
b885743efe | ||
|
|
8ec92405fd | ||
|
|
e68ab95ecb | ||
|
|
d2dbc73448 | ||
|
|
4a5a8dd773 | ||
|
|
439dfcb172 | ||
|
|
f6a4ea6b0f | ||
|
|
8681e0228d | ||
|
|
c1123cb3e9 | ||
|
|
d64590a12b | ||
|
|
e274a0c7d1 | ||
|
|
51fe1e20e8 | ||
|
|
9c4ffae1b3 | ||
|
|
3d0c6cf41e | ||
|
|
3800d3b2b1 | ||
|
|
da54236f5a | ||
|
|
c930d84d01 | ||
|
|
2317f779e9 | ||
|
|
c501e70512 | ||
|
|
8357d90e59 | ||
|
|
efef6261b8 | ||
|
|
95b7a5d4fe | ||
|
|
2c55c7ca82 | ||
|
|
02dda51269 | ||
|
|
083cb848f2 | ||
|
|
254da0b170 | ||
|
|
8b0b9eafb8 | ||
|
|
04e2f18ff1 | ||
|
|
a4783a2c19 | ||
|
|
8fb6f26729 | ||
|
|
0e7ffa677a | ||
|
|
a668f09522 | ||
|
|
2598e22422 | ||
|
|
dc6a9c6348 | ||
|
|
b1667259f0 | ||
|
|
c77b451863 | ||
|
|
9e48460940 | ||
|
|
3972e9150e | ||
|
|
0c8ba71edd | ||
|
|
a7bb331412 | ||
|
|
6f1c9d88cc | ||
|
|
e2d7c7aea5 | ||
|
|
dc0645725e | ||
|
|
06e0bdbfbb | ||
|
|
14db418519 | ||
|
|
d5e1a9d7d0 | ||
|
|
ccb7fac25e | ||
|
|
bbe9a9c191 | ||
|
|
4ee67986a5 | ||
|
|
0a657acbd8 | ||
|
|
d41feb63e3 | ||
|
|
b745e304a2 | ||
|
|
2a7f577366 | ||
|
|
73d301e63f | ||
|
|
fbfdd80f9b | ||
|
|
2d0ff5f8a2 |
@@ -225,17 +225,18 @@ $tw.utils.pad = function(value,length) {
|
||||
return s;
|
||||
};
|
||||
|
||||
// Convert a date into UTC YYYYMMDDHHMM format
|
||||
// Convert a date into UTC YYYYMMDDHHMMSSmmm format
|
||||
$tw.utils.stringifyDate = function(value) {
|
||||
return value.getUTCFullYear() +
|
||||
$tw.utils.pad(value.getUTCMonth() + 1) +
|
||||
$tw.utils.pad(value.getUTCDate()) +
|
||||
$tw.utils.pad(value.getUTCHours()) +
|
||||
$tw.utils.pad(value.getUTCMinutes()) +
|
||||
$tw.utils.pad(value.getUTCSeconds()) +
|
||||
$tw.utils.pad(value.getUTCMilliseconds(),3);
|
||||
};
|
||||
|
||||
// Parse a date from a UTC YYYYMMDDHHMMSSMMM format string
|
||||
// Parse a date from a UTC YYYYMMDDHHMMSSmmm format string
|
||||
$tw.utils.parseDate = function(value) {
|
||||
if(typeof value === "string") {
|
||||
return new Date(Date.UTC(parseInt(value.substr(0,4),10),
|
||||
|
||||
3
core/docs/types/image_gif.tid
Normal file
3
core/docs/types/image_gif.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/image/gif
|
||||
description: GIF image
|
||||
name: image/gif
|
||||
3
core/docs/types/image_jpeg.tid
Normal file
3
core/docs/types/image_jpeg.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/image/jpeg
|
||||
description: JPEG image
|
||||
name: image/jpeg
|
||||
3
core/docs/types/image_png.tid
Normal file
3
core/docs/types/image_png.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/image/png
|
||||
description: PNG image
|
||||
name: image/png
|
||||
3
core/docs/types/text_plain.tid
Normal file
3
core/docs/types/text_plain.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/text/plain
|
||||
description: Plain text
|
||||
name: text/plain
|
||||
3
core/docs/types/text_vnd.tiddlywiki.tid
Normal file
3
core/docs/types/text_vnd.tiddlywiki.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/docs/types/text/vnd.tiddlywiki
|
||||
description: TW5 wikitext
|
||||
name: text/vnd.tiddlywiki
|
||||
@@ -22,7 +22,7 @@ exports.types = {block: true};
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /<<([^\s>]+)\s*([\s\S]*?)>>(?:\r?\n|$)/mg;
|
||||
this.matchRegExp = /<<([^>\s]+)(?:\s*)((?:[^>]|(?:>(?!>)))*?)>>(?:\r?\n|$)/mg;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,10 +7,7 @@ Wiki text rule for block-level transclusion. For example:
|
||||
|
||||
```
|
||||
{{MyTiddler}}
|
||||
{{MyTiddler|tooltip}}
|
||||
{{MyTiddler||TemplateTitle}}
|
||||
{{MyTiddler|tooltip||TemplateTitle}}
|
||||
{{MyTiddler}width:40;height:50;}.class.class
|
||||
```
|
||||
|
||||
\*/
|
||||
@@ -26,7 +23,7 @@ exports.types = {block: true};
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}([^\}]*)\}(?:\.(\S+))?(?:\r?\n|$)/mg;
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|\|([^\|\{\}]+))?\}\}(?:\r?\n|$)/mg;
|
||||
};
|
||||
|
||||
exports.parse = function() {
|
||||
@@ -38,17 +35,12 @@ exports.parse = function() {
|
||||
targetTitle = tr.title,
|
||||
targetField = tr.field,
|
||||
targetIndex = tr.index,
|
||||
tooltip = this.match[2],
|
||||
template = $tw.utils.trim(this.match[3]),
|
||||
style = this.match[4],
|
||||
classes = this.match[5];
|
||||
template = $tw.utils.trim(this.match[2]);
|
||||
// Prepare the transclude widget
|
||||
var transcludeNode = {
|
||||
type: "element",
|
||||
tag: "$transclude",
|
||||
attributes: {
|
||||
tiddler: {type: "string", value: template || targetTitle}
|
||||
},
|
||||
attributes: {},
|
||||
isBlock: true
|
||||
};
|
||||
var tiddlerNode = {
|
||||
@@ -60,20 +52,16 @@ exports.parse = function() {
|
||||
isBlock: true,
|
||||
children: [transcludeNode]
|
||||
};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
if(tooltip) {
|
||||
transcludeNode.attributes.tooltip = {type: "string", value: tooltip};
|
||||
}
|
||||
if(style) {
|
||||
transcludeNode.attributes.style = {type: "string", value: style};
|
||||
}
|
||||
if(classes) {
|
||||
transcludeNode.attributes["class"] = {type: "string", value: classes.split(".").join(" ")};
|
||||
if(template) {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: template};
|
||||
} else {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: targetTitle};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
}
|
||||
return [tiddlerNode];
|
||||
};
|
||||
|
||||
@@ -7,10 +7,7 @@ Wiki text rule for inline-level transclusion. For example:
|
||||
|
||||
```
|
||||
{{MyTiddler}}
|
||||
{{MyTiddler|tooltip}}
|
||||
{{MyTiddler||TemplateTitle}}
|
||||
{{MyTiddler|tooltip||TemplateTitle}}
|
||||
{{MyTiddler}width:40;height:50;}.class.class
|
||||
```
|
||||
|
||||
\*/
|
||||
@@ -26,7 +23,7 @@ exports.types = {inline: true};
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}([^\}]*)\}(?:\.(\S+))?/mg;
|
||||
this.matchRegExp = /\{\{([^\{\}\|]+)(?:\|\|([^\|\{\}]+))?\}\}/mg;
|
||||
};
|
||||
|
||||
exports.parse = function() {
|
||||
@@ -38,17 +35,12 @@ exports.parse = function() {
|
||||
targetTitle = tr.title,
|
||||
targetField = tr.field,
|
||||
targetIndex = tr.index,
|
||||
tooltip = this.match[2],
|
||||
template = $tw.utils.trim(this.match[3]),
|
||||
style = this.match[4],
|
||||
classes = this.match[5];
|
||||
template = $tw.utils.trim(this.match[2]);
|
||||
// Prepare the transclude widget
|
||||
var transcludeNode = {
|
||||
type: "element",
|
||||
tag: "$transclude",
|
||||
attributes: {
|
||||
tiddler: {type: "string", value: template || targetTitle}
|
||||
}
|
||||
attributes: {}
|
||||
};
|
||||
var tiddlerNode = {
|
||||
type: "element",
|
||||
@@ -58,20 +50,16 @@ exports.parse = function() {
|
||||
},
|
||||
children: [transcludeNode]
|
||||
};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
if(tooltip) {
|
||||
transcludeNode.attributes.tooltip = {type: "string", value: tooltip};
|
||||
}
|
||||
if(style) {
|
||||
transcludeNode.attributes.style = {type: "string", value: style};
|
||||
}
|
||||
if(classes) {
|
||||
transcludeNode.attributes["class"] = {type: "string", value: classes.split(".").join(" ")};
|
||||
if(template) {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: template};
|
||||
} else {
|
||||
transcludeNode.attributes.tiddler = {type: "string", value: targetTitle};
|
||||
if(targetField) {
|
||||
transcludeNode.attributes.field = {type: "string", value: targetField};
|
||||
}
|
||||
if(targetIndex) {
|
||||
transcludeNode.attributes.index = {type: "string", value: targetIndex};
|
||||
}
|
||||
}
|
||||
return [tiddlerNode];
|
||||
};
|
||||
|
||||
56
core/modules/savers/msdownload.js
Normal file
56
core/modules/savers/msdownload.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/*\
|
||||
title: $:/core/modules/savers/msdownload.js
|
||||
type: application/javascript
|
||||
module-type: saver
|
||||
|
||||
Handles saving changes via window.navigator.msSaveBlob()
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Select the appropriate saver module and set it up
|
||||
*/
|
||||
var MsDownloadSaver = function(wiki) {
|
||||
};
|
||||
|
||||
MsDownloadSaver.prototype.save = function(text) {
|
||||
// Get the current filename
|
||||
var filename = "tiddlywiki.html",
|
||||
p = document.location.pathname.lastIndexOf("/");
|
||||
if(p !== -1) {
|
||||
filename = document.location.pathname.substr(p+1);
|
||||
}
|
||||
// Set up the link
|
||||
var blob = new Blob([text], {type: "text/html"});
|
||||
window.navigator.msSaveBlob(blob,filename);
|
||||
return true;
|
||||
};
|
||||
|
||||
/*
|
||||
Information about this saver
|
||||
*/
|
||||
MsDownloadSaver.prototype.info = {
|
||||
name: "msdownload",
|
||||
priority: 110
|
||||
};
|
||||
|
||||
/*
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
return !!window.navigator.msSaveBlob;
|
||||
};
|
||||
|
||||
/*
|
||||
Create an instance of this saver
|
||||
*/
|
||||
exports.create = function(wiki) {
|
||||
return new MsDownloadSaver(wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -29,7 +29,7 @@ exports.removeChildren = function(node) {
|
||||
};
|
||||
|
||||
exports.hasClass = function(el,className) {
|
||||
return el.className.split(" ").indexOf(className) !== -1;
|
||||
return el && el.className && el.className.split(" ").indexOf(className) !== -1;
|
||||
};
|
||||
|
||||
exports.addClass = function(el,className) {
|
||||
|
||||
@@ -26,16 +26,28 @@ Popup.prototype.show = function(options) {
|
||||
this.title = options.title;
|
||||
this.wiki = options.wiki;
|
||||
this.anchorDomNode = options.domNode;
|
||||
$tw.utils.addClass(this.anchorDomNode,"tw-popup");
|
||||
this.rootElement.addEventListener("click",this,false);
|
||||
};
|
||||
|
||||
Popup.prototype.handleEvent = function(event) {
|
||||
if(event.type === "click" && this.anchorDomNode !== event.target && !$tw.utils.domContains(this.anchorDomNode,event.target)) {
|
||||
this.cancel();
|
||||
// Dismiss the popup if we get a click on an element that doesn't have .tw-popup class
|
||||
if(event.type === "click") {
|
||||
var node = event.target;
|
||||
while(node && !$tw.utils.hasClass(node,"tw-popup")) {
|
||||
node = node.parentNode;
|
||||
}
|
||||
if(!node) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Popup.prototype.cancel = function() {
|
||||
if(this.anchorDomNode) {
|
||||
$tw.utils.removeClass(this.anchorDomNode,"tw-popup");
|
||||
this.anchorDomNode = null;
|
||||
}
|
||||
this.rootElement.removeEventListener("click",this,false);
|
||||
if(this.title) {
|
||||
this.wiki.deleteTiddler(this.title);
|
||||
|
||||
@@ -63,16 +63,6 @@ BrowseWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
BrowseWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.browse = BrowseWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -136,16 +136,6 @@ ButtonWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
ButtonWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.button = ButtonWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -62,7 +62,7 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
||||
var checked = this.inputDomNode.checked,
|
||||
tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
||||
if(tiddler && tiddler.hasTag(this.checkboxTag) !== checked) {
|
||||
var newTags = tiddler.fields.tags.slice(0),
|
||||
var newTags = (tiddler.fields.tags || []).slice(0),
|
||||
pos = newTags.indexOf(this.checkboxTag);
|
||||
if(pos !== -1) {
|
||||
newTags.splice(pos,1);
|
||||
@@ -103,16 +103,6 @@ CheckboxWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
CheckboxWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.checkbox = CheckboxWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -66,16 +66,6 @@ CountWidget.prototype.refresh = function(changedTiddlers) {
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget
|
||||
*/
|
||||
CountWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.count = CountWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -175,16 +175,6 @@ DropZoneWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
DropZoneWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.dropzone = DropZoneWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -94,16 +94,6 @@ EditBitmapWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
EditBitmapWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
EditBitmapWidget.prototype.loadCanvas = function() {
|
||||
var tiddler = this.wiki.getTiddler(this.editTitle),
|
||||
currImage = new Image();
|
||||
|
||||
@@ -73,12 +73,21 @@ Get the tiddler being edited and current value
|
||||
*/
|
||||
EditTextWidget.prototype.getEditInfo = function() {
|
||||
// Get the edit value
|
||||
var tiddler = this.wiki.getTiddler(this.editTitle),
|
||||
value;
|
||||
var self = this,
|
||||
value,
|
||||
update;
|
||||
if(this.editIndex) {
|
||||
value = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);
|
||||
update = function(value) {
|
||||
var data = self.wiki.getTiddlerData(self.editTitle,{});
|
||||
if(data[self.editIndex] !== value) {
|
||||
data[self.editIndex] = value;
|
||||
self.wiki.setTiddlerData(self.editTitle,data);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
// Get the current tiddler and the field name
|
||||
var tiddler = this.wiki.getTiddler(this.editTitle);
|
||||
if(tiddler) {
|
||||
// If we've got a tiddler, the value to display is the field string value
|
||||
value = tiddler.getFieldString(this.editField);
|
||||
@@ -99,8 +108,16 @@ EditTextWidget.prototype.getEditInfo = function() {
|
||||
value = this.editDefault;
|
||||
}
|
||||
}
|
||||
update = function(value) {
|
||||
var tiddler = self.wiki.getTiddler(self.editTitle),
|
||||
updateFields = {
|
||||
title: self.editTitle
|
||||
};
|
||||
updateFields[self.editField] = value;
|
||||
self.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));
|
||||
};
|
||||
}
|
||||
return {tiddler: tiddler, value: value};
|
||||
return {value: value, update: update};
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -224,36 +241,12 @@ EditTextWidget.prototype.handleFocusEvent = function(event) {
|
||||
};
|
||||
|
||||
EditTextWidget.prototype.saveChanges = function(text) {
|
||||
if(this.editField) {
|
||||
var tiddler = this.wiki.getTiddler(this.editTitle);
|
||||
if(!tiddler) {
|
||||
tiddler = new $tw.Tiddler({title: this.editTitle});
|
||||
}
|
||||
var oldValue = tiddler.getFieldString(this.editField);
|
||||
if(text !== oldValue) {
|
||||
var update = {};
|
||||
update[this.editField] = text;
|
||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,update));
|
||||
}
|
||||
} else {
|
||||
var data = this.wiki.getTiddlerData(this.editTitle,{});
|
||||
if(data[this.editIndex] !== text) {
|
||||
data[this.editIndex] = text;
|
||||
this.wiki.setTiddlerData(this.editTitle,data);
|
||||
}
|
||||
var editInfo = this.getEditInfo();
|
||||
if(text !== editInfo.value) {
|
||||
editInfo.update(text);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
EditTextWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports["edit-text"] = EditTextWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -70,16 +70,6 @@ ElementWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return this.refreshChildren(changedTiddlers) || hasChangedAttributes;
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
ElementWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.element = ElementWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -70,16 +70,6 @@ EncryptWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget
|
||||
*/
|
||||
EncryptWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.encrypt = EncryptWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -47,16 +47,6 @@ EntityWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget
|
||||
*/
|
||||
EntityWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.entity = EntityWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -98,16 +98,6 @@ FieldsWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget
|
||||
*/
|
||||
FieldsWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.fields = FieldsWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -169,16 +169,6 @@ LinkWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
LinkWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.link = LinkWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -24,6 +24,7 @@ var NavigatorWidget = function(parseTreeNode,options) {
|
||||
{type: "tw-cancel-tiddler", handler: "handleCancelTiddlerEvent"},
|
||||
{type: "tw-close-tiddler", handler: "handleCloseTiddlerEvent"},
|
||||
{type: "tw-close-all-tiddlers", handler: "handleCloseAllTiddlersEvent"},
|
||||
{type: "tw-close-other-tiddlers", handler: "handleCloseOtherTiddlersEvent"},
|
||||
{type: "tw-new-tiddler", handler: "handleNewTiddlerEvent"},
|
||||
{type: "tw-import-tiddlers", handler: "handleImportTiddlersEvent"},
|
||||
]);
|
||||
@@ -134,6 +135,12 @@ NavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {
|
||||
this.saveStoryList();
|
||||
return false;
|
||||
};
|
||||
// Close other tiddlers
|
||||
NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
|
||||
this.storyList = [event.tiddlerTitle];
|
||||
this.saveStoryList();
|
||||
return false;
|
||||
};
|
||||
|
||||
// Place a tiddler in edit mode
|
||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
@@ -233,8 +240,8 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
||||
if(this.storyList[t] === event.tiddlerTitle) {
|
||||
var tiddler = this.wiki.getTiddler(event.tiddlerTitle);
|
||||
if(tiddler) {
|
||||
var draftTitle = tiddler.fields["draft.title"],
|
||||
draftOf = tiddler.fields["draft.of"];
|
||||
var draftTitle = (tiddler.fields["draft.title"] || "").trim(),
|
||||
draftOf = (tiddler.fields["draft.of"] || "").trim();
|
||||
if(draftTitle) {
|
||||
var isRename = draftOf !== draftTitle,
|
||||
isConfirmed = true;
|
||||
|
||||
@@ -34,7 +34,7 @@ PasswordWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Execute our logic
|
||||
this.execute();
|
||||
// Get the current password
|
||||
var password = $tw.browser ? $tw.utils.getPassword(this.passwordName) : "";
|
||||
var password = $tw.browser ? $tw.utils.getPassword(this.passwordName) || "" : "";
|
||||
// Create our element
|
||||
var domNode = this.document.createElement("input");
|
||||
domNode.setAttribute("type","password");
|
||||
@@ -77,16 +77,6 @@ PasswordWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
PasswordWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.password = PasswordWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -38,6 +38,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.renderChildren(domNode,null);
|
||||
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
||||
this.positionPopup(domNode);
|
||||
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
|
||||
}
|
||||
if(!this.isOpen) {
|
||||
domNode.setAttribute("hidden","true")
|
||||
@@ -179,6 +180,8 @@ RevealWidget.prototype.updateState = function() {
|
||||
// Animate our DOM node
|
||||
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
||||
this.positionPopup(domNode);
|
||||
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
|
||||
|
||||
}
|
||||
if(this.isOpen) {
|
||||
domNode.removeAttribute("hidden");
|
||||
@@ -190,16 +193,6 @@ RevealWidget.prototype.updateState = function() {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
RevealWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.reveal = RevealWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/setvariable.js
|
||||
title: $:/core/modules/widgets/set.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
Setvariable widget
|
||||
Set variable widget
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
@@ -14,19 +14,19 @@ Setvariable widget
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var SetVariableWidget = function(parseTreeNode,options) {
|
||||
var SetWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
SetVariableWidget.prototype = new Widget();
|
||||
SetWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
SetVariableWidget.prototype.render = function(parent,nextSibling) {
|
||||
SetWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
@@ -36,7 +36,7 @@ SetVariableWidget.prototype.render = function(parent,nextSibling) {
|
||||
/*
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
SetVariableWidget.prototype.execute = function() {
|
||||
SetWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.setName = this.getAttribute("name","currentTiddler");
|
||||
this.setValue = this.getAttribute("value");
|
||||
@@ -49,7 +49,7 @@ SetVariableWidget.prototype.execute = function() {
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
SetVariableWidget.prototype.refresh = function(changedTiddlers) {
|
||||
SetWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.name || changedAttributes.value) {
|
||||
this.refreshSelf();
|
||||
@@ -59,6 +59,7 @@ SetVariableWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
exports.setvariable = SetVariableWidget;
|
||||
exports.setvariable = SetWidget;
|
||||
exports.set = SetWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -48,16 +48,6 @@ TextNodeWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget
|
||||
*/
|
||||
TextNodeWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.text = TextNodeWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -30,9 +30,14 @@ ViewWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
var textNode = this.document.createTextNode(this.text);
|
||||
parent.insertBefore(textNode,nextSibling);
|
||||
this.domNodes.push(textNode);
|
||||
if(this.text) {
|
||||
var textNode = this.document.createTextNode(this.text);
|
||||
parent.insertBefore(textNode,nextSibling);
|
||||
this.domNodes.push(textNode);
|
||||
} else {
|
||||
this.makeChildWidgets();
|
||||
this.renderChildren(parent,nextSibling);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -52,6 +57,12 @@ ViewWidget.prototype.execute = function() {
|
||||
case "htmlencoded":
|
||||
this.text = this.getValueAsHtmlEncoded();
|
||||
break;
|
||||
case "urlencoded":
|
||||
this.text = this.getValueAsUrlEncoded();
|
||||
break;
|
||||
case "doubleurlencoded":
|
||||
this.text = this.getValueAsDoubleUrlEncoded();
|
||||
break;
|
||||
case "date":
|
||||
this.text = this.getValueAsDate(this.viewTemplate);
|
||||
break;
|
||||
@@ -121,15 +132,28 @@ ViewWidget.prototype.getValueAsText = function() {
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsHtmlWikified = function() {
|
||||
return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),this);
|
||||
return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this});
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsHtmlEncoded = function() {
|
||||
return $tw.utils.htmlEncode(this.getValueAsText());
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsUrlEncoded = function() {
|
||||
return encodeURIComponent(this.getValueAsText());
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {
|
||||
return encodeURIComponent(encodeURIComponent(this.getValueAsText()));
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsDate = function(format) {
|
||||
return $tw.utils.formatDateString(this.getValue(),format);
|
||||
var value = this.getValue();
|
||||
if(value) {
|
||||
return $tw.utils.formatDateString(value,format);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsRelativeDate = function(format) {
|
||||
@@ -170,16 +194,6 @@ ViewWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget
|
||||
*/
|
||||
ViewWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.view = ViewWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -38,8 +38,10 @@ Widget.prototype.initialise = function(parseTreeNode,options) {
|
||||
// Save widget info
|
||||
this.parseTreeNode = parseTreeNode;
|
||||
this.wiki = options.wiki;
|
||||
this.variables = options.variables || {};
|
||||
this.parentWidget = options.parentWidget;
|
||||
this.variablesConstructor = function() {};
|
||||
this.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};
|
||||
this.variables = new this.variablesConstructor();
|
||||
this.document = options.document;
|
||||
this.attributes = {};
|
||||
this.children = [];
|
||||
@@ -67,6 +69,16 @@ Widget.prototype.execute = function() {
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
/*
|
||||
Set the value of a context variable
|
||||
name: name of the variable
|
||||
value: value of the variable
|
||||
params: array of {name:, default:} for each parameter
|
||||
*/
|
||||
Widget.prototype.setVariable = function(name,value,params) {
|
||||
this.variables[name] = {value: value, params: params};
|
||||
};
|
||||
|
||||
/*
|
||||
Get the prevailing value of a context variable
|
||||
name: name of variable
|
||||
@@ -78,19 +90,14 @@ defaultValue: default value if the variable is not defined
|
||||
Widget.prototype.getVariable = function(name,options) {
|
||||
options = options || {};
|
||||
var actualParams = options.params || [];
|
||||
// Search up the widget tree for the variable name
|
||||
var node = this;
|
||||
while(node && !$tw.utils.hop(node.variables,name)) {
|
||||
node = node.parentWidget;
|
||||
}
|
||||
// If we get to the root then look for a macro module
|
||||
if(!node) {
|
||||
// If the variable doesn't exist then look for a macro module
|
||||
if(!(name in this.variables)) {
|
||||
return this.evaluateMacroModule(name,actualParams,options.defaultValue);
|
||||
}
|
||||
// Get the value
|
||||
var value = node.variables[name].value || "";
|
||||
var variable = this.variables[name],
|
||||
value = variable.value || "";
|
||||
// Substitute any parameters specified in the definition
|
||||
value = this.substituteVariableParameters(value,node.variables[name].params,actualParams);
|
||||
value = this.substituteVariableParameters(value,variable.params,actualParams);
|
||||
value = this.substituteVariableReferences(value);
|
||||
return value;
|
||||
};
|
||||
@@ -166,16 +173,6 @@ Widget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue)
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Set the value of a context variable
|
||||
name: name of the variable
|
||||
value: value of the variable
|
||||
params: array of {name:, default:} for each parameter
|
||||
*/
|
||||
Widget.prototype.setVariable = function(name,value,params) {
|
||||
this.variables[name] = {value: value, params: params};
|
||||
};
|
||||
|
||||
/*
|
||||
Check whether a given context variable value exists in the parent chain
|
||||
*/
|
||||
@@ -218,7 +215,7 @@ Widget.prototype.computeAttributes = function() {
|
||||
value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler"));
|
||||
} else if(attribute.type === "macro") {
|
||||
var text = self.getVariable(attribute.value.name,{params: attribute.value.params});
|
||||
value = self.wiki.renderText("text/plain","text/vnd.tiddlywiki",text);
|
||||
value = self.wiki.renderText("text/plain","text/vnd.tiddlywiki",text,{parentWidget: self});
|
||||
} else { // String attribute
|
||||
value = attribute.value;
|
||||
}
|
||||
@@ -450,9 +447,18 @@ Widget.prototype.findFirstDomNode = function() {
|
||||
Remove any DOM nodes created by this widget or its children
|
||||
*/
|
||||
Widget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.children,function(childWidget) {
|
||||
childWidget.removeChildDomNodes();
|
||||
});
|
||||
// If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case
|
||||
if(this.domNodes.length > 0) {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
} else {
|
||||
// Otherwise, ask the child widgets to delete their DOM nodes
|
||||
$tw.utils.each(this.children,function(childWidget) {
|
||||
childWidget.removeChildDomNodes();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
exports.widget = Widget;
|
||||
|
||||
@@ -8,14 +8,12 @@ Extension methods for the $tw.Wiki object
|
||||
Adds the following properties to the wiki object:
|
||||
|
||||
* `eventListeners` is a hashmap by type of arrays of listener functions
|
||||
* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were
|
||||
last dispatched. Each entry is a hashmap containing two fields:
|
||||
* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were last dispatched. Each entry is a hashmap containing two fields:
|
||||
modified: true/false
|
||||
deleted: true/false
|
||||
* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is
|
||||
incremented each time a tiddler is created changed or deleted
|
||||
* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches
|
||||
are automatically cleared when a tiddler is modified or deleted
|
||||
* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is incremented each time a tiddler is created changed or deleted
|
||||
* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches are automatically cleared when a tiddler is modified or deleted
|
||||
* `globalCache` is a hashmap by cache name of cache objects that are cleared whenever any tiddler change occurs
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
@@ -163,6 +161,7 @@ exports.getChangeCount = function(title) {
|
||||
exports.deleteTiddler = function(title) {
|
||||
delete this.tiddlers[title];
|
||||
this.clearCache(title);
|
||||
this.clearGlobalCache();
|
||||
this.enqueueTiddlerEvent(title,true);
|
||||
};
|
||||
|
||||
@@ -207,6 +206,7 @@ exports.addTiddler = function(tiddler) {
|
||||
// Save the tiddler
|
||||
this.tiddlers[title] = tiddler;
|
||||
this.clearCache(title);
|
||||
this.clearGlobalCache();
|
||||
this.enqueueTiddlerEvent(title);
|
||||
};
|
||||
|
||||
@@ -425,15 +425,36 @@ exports.getShadowTitles = function() {
|
||||
Retrieves a list of the tiddler titles that are tagged with a given tag
|
||||
*/
|
||||
exports.getTiddlersWithTag = function(tag) {
|
||||
// Get the list associated with the tag
|
||||
var titles = [];
|
||||
for(var title in this.tiddlers) {
|
||||
var tiddler = this.tiddlers[title];
|
||||
if($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.indexOf(tag) !== -1) {
|
||||
titles.push(title);
|
||||
var self = this;
|
||||
return this.getGlobalCache("taglist-" + tag,function() {
|
||||
var tagmap = self.getTagMap();
|
||||
return self.sortByList(tagmap[tag],tag);
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
Get a hashmap by tag of arrays of tiddler titles
|
||||
*/
|
||||
exports.getTagMap = function() {
|
||||
var self = this;
|
||||
return this.getGlobalCache("tagmap",function() {
|
||||
var tags = {};
|
||||
// Collect up all the tags
|
||||
for(var title in self.tiddlers) {
|
||||
var tiddler = self.tiddlers[title];
|
||||
if(tiddler.fields.tags) {
|
||||
for(var index=0; index<tiddler.fields.tags.length; index++) {
|
||||
var tag = tiddler.fields.tags[index];
|
||||
if(tags[tag]) {
|
||||
tags[tag].push(title)
|
||||
} else {
|
||||
tags[tag] = [title];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.sortByList(titles,tag);
|
||||
return tags;
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -456,7 +477,9 @@ Sorts an array of tiddler titles according to an ordered list
|
||||
*/
|
||||
exports.sortByList = function(array,listTitle) {
|
||||
var list = this.getTiddlerList(listTitle);
|
||||
if(list) {
|
||||
if(!array || array.length === 0) {
|
||||
return [];
|
||||
} else if(list) {
|
||||
var titles = [], t, title;
|
||||
// First place any entries that are present in the list
|
||||
for(t=0; t<list.length; t++) {
|
||||
@@ -557,6 +580,21 @@ exports.getTiddlerList = function(title) {
|
||||
return [];
|
||||
};
|
||||
|
||||
// Return a named global cache object. Global cache objects are cleared whenever a tiddler change occurs
|
||||
exports.getGlobalCache = function(cacheName,initializer) {
|
||||
this.globalCache = this.globalCache || {};
|
||||
if($tw.utils.hop(this.globalCache,cacheName)) {
|
||||
return this.globalCache[cacheName];
|
||||
} else {
|
||||
this.globalCache[cacheName] = initializer();
|
||||
return this.globalCache[cacheName];
|
||||
}
|
||||
};
|
||||
|
||||
exports.clearGlobalCache = function() {
|
||||
this.globalCache = {};
|
||||
}
|
||||
|
||||
// Return the named cache object for a tiddler. If the cache doesn't exist then the initializer function is invoked to create it
|
||||
exports.getCacheForTiddler = function(title,cacheName,initializer) {
|
||||
|
||||
@@ -654,7 +692,7 @@ var tweakParseTreeNodes = function(nodeList) {
|
||||
|
||||
var tweakMacroDefinition = function(nodeList) {
|
||||
if(nodeList && nodeList[0] && nodeList[0].type === "macrodef") {
|
||||
nodeList[0].type = "setvariable";
|
||||
nodeList[0].type = "set";
|
||||
nodeList[0].attributes = {
|
||||
name: {type: "string", value: nodeList[0].name},
|
||||
value: {type: "string", value: nodeList[0].text}
|
||||
@@ -726,10 +764,10 @@ exports.makeWidget = function(parser,options) {
|
||||
children: []
|
||||
},
|
||||
currWidgetNode = widgetNode;
|
||||
// Create setvariable widgets for each variable
|
||||
// Create set variable widgets for each variable
|
||||
$tw.utils.each(options.variables,function(value,name) {
|
||||
var setVariableWidget = {
|
||||
type: "setvariable",
|
||||
type: "set",
|
||||
attributes: {
|
||||
name: {type: "string", value: name},
|
||||
value: {type: "string", value: value}
|
||||
@@ -761,7 +799,7 @@ parentWidget: optional parent widget for the root node
|
||||
*/
|
||||
exports.renderText = function(outputType,textType,text,options) {
|
||||
options = options || {};
|
||||
var parser = $tw.wiki.parseText(textType,text),
|
||||
var parser = this.parseText(textType,text,options),
|
||||
widgetNode = this.makeWidget(parser,options);
|
||||
var container = $tw.document.createElement("div");
|
||||
widgetNode.render(container,null);
|
||||
@@ -878,7 +916,7 @@ exports.search = function(text,options) {
|
||||
// Function to check a given tiddler for the search term
|
||||
var searchTiddler = function(title) {
|
||||
if(!searchTermsRegExps) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
var tiddler = self.getTiddler(title);
|
||||
if(!tiddler) {
|
||||
|
||||
3
core/ui/ControlPanel.tid
Normal file
3
core/ui/ControlPanel.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/ControlPanel
|
||||
|
||||
<div class="tw-control-panel"><<tabs "[is[shadow]!has[draft.of]tag[$:/tags/ControlPanel]] [!is[shadow]!has[draft.of]tag[$:/tags/ControlPanel]]" "$:/core/ui/ControlPanel/Basics">></div>
|
||||
11
core/ui/ControlPanel/Appearance.tid
Normal file
11
core/ui/ControlPanel/Appearance.tid
Normal file
@@ -0,0 +1,11 @@
|
||||
title: $:/core/ui/ControlPanel/Appearance
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Appearance
|
||||
|
||||
! Theme
|
||||
|
||||
{{$:/snippets/themeswitcher}}
|
||||
|
||||
! Story View
|
||||
|
||||
{{$:/snippets/viewswitcher}}
|
||||
23
core/ui/ControlPanel/Basics.tid
Normal file
23
core/ui/ControlPanel/Basics.tid
Normal file
@@ -0,0 +1,23 @@
|
||||
title: $:/core/ui/ControlPanel/Basics
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Basics
|
||||
|
||||
! Settings
|
||||
|
||||
|[[Title of this TiddlyWiki|SiteTitle]] |<$edit-text tiddler="SiteTitle" default="" tag="input"/> |
|
||||
|[[Subtitle|SiteSubtitle]] |<$edit-text tiddler="SiteSubtitle" default="" tag="input"/> |
|
||||
|[[Username for signing edits|$:/status/UserName]] |<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
||||
|[[Animation duration|$:/config/AnimationDuration]] |<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|
||||
|[[DefaultTiddlers|$:/DefaultTiddlers]] |Choose which tiddlers are displayed at startup:<br> <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/> |
|
||||
|
||||
! Info
|
||||
|
||||
!! Your Stuff
|
||||
|
||||
* Number of tiddlers: <$count filter="[!is[system]]"/>
|
||||
|
||||
!! TiddlyWiki's Stuff
|
||||
|
||||
* Number of system tiddlers: <$count filter="[is[system]]"/>
|
||||
* Number of shadow tiddlers: <$count filter="[is[shadow]]"/>
|
||||
** Number of over-ridden shadow tiddlers: <$count filter="[!is[system]is[shadow]]"/>
|
||||
5
core/ui/ControlPanel/Encryption.tid
Normal file
5
core/ui/ControlPanel/Encryption.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/ControlPanel/Encryption
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Encryption
|
||||
|
||||
{{$:/snippets/encryptionstatus}}
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/ConfigInfo
|
||||
|
||||
This tiddler displays the internal configuration of this wiki, which can be useful for troubleshooting, or just to help understand how TiddlyWiki5 works.
|
||||
title: $:/core/ui/ControlPanel/Internals
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Internals
|
||||
|
||||
! Tiddler fields
|
||||
|
||||
7
core/ui/ControlPanel/Plugins.tid
Normal file
7
core/ui/ControlPanel/Plugins.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
title: $:/core/ui/ControlPanel/Plugins
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Plugins
|
||||
|
||||
<table><tbody><tr><th>Title</th><th>Description</th></tr><$list filter="[!has[draft.of]has[plugin-type]sort[title]]"><tr><td><$link to={{!!title}}><$view field="title"/></$link></td><td><$view field="description"/></td></tr></$list>
|
||||
</tbody>
|
||||
</table>
|
||||
9
core/ui/ControlPanel/Tools.tid
Normal file
9
core/ui/ControlPanel/Tools.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/Tools
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Tools
|
||||
|
||||
! Import
|
||||
|
||||
<$browse/>
|
||||
|
||||
Browse for files on your computer to import their contents (the individual tiddlers within TiddlyWiki HTML files are imported separately). You can also drag and drop files directly to the browser window.
|
||||
@@ -2,30 +2,6 @@ title: $:/core/ui/EditTemplate
|
||||
modifier: JeremyRuston
|
||||
|
||||
\define frame-classes()
|
||||
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
\end
|
||||
<div class=<<frame-classes>>><span class="tw-tiddler-controls titlebar"> <$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button> <$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button> <$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button> </span>
|
||||
|
||||
<$view field="title"/>
|
||||
|
||||
<$edit-text field="draft.title" class="titlebar tw-edit-texteditor"/>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/TagsEditor"/>
|
||||
|
||||
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
|
||||
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
|
||||
<div class="tw-tiddler-preview">
|
||||
<div class="tw-tiddler-preview-preview">
|
||||
<$transclude />
|
||||
</div>
|
||||
<div class="tw-tiddler-preview-edit">
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</div>
|
||||
</div>
|
||||
</$reveal>
|
||||
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
|
||||
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</$reveal>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/FieldEditor"/></div>
|
||||
<div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list></div>
|
||||
|
||||
18
core/ui/EditTemplate/body.tid
Normal file
18
core/ui/EditTemplate/body.tid
Normal file
@@ -0,0 +1,18 @@
|
||||
title: $:/core/ui/EditTemplate/body
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
|
||||
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
|
||||
<div class="tw-tiddler-preview">
|
||||
<div class="tw-tiddler-preview-preview">
|
||||
<$transclude />
|
||||
</div>
|
||||
<div class="tw-tiddler-preview-edit">
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</div>
|
||||
</div>
|
||||
</$reveal>
|
||||
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
|
||||
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</$reveal>
|
||||
4
core/ui/EditTemplate/controls.tid
Normal file
4
core/ui/EditTemplate/controls.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditTemplate/controls
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<span class="tw-tiddler-controls titlebar"> <$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/EditToolbar]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> </span>
|
||||
14
core/ui/EditTemplate/fields.tid
Normal file
14
core/ui/EditTemplate/fields.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
title: $:/core/ui/EditTemplate/fields
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<$fieldmangler><div class="tw-edit-fields">
|
||||
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<currentField>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<currentField>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
|
||||
</tr>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tw-edit-field-add">//Add a new field:// <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
</$fieldmangler>
|
||||
22
core/ui/EditTemplate/tags.tid
Normal file
22
core/ui/EditTemplate/tags.tid
Normal file
@@ -0,0 +1,22 @@
|
||||
title: $:/core/ui/EditTemplate/tags
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
\end
|
||||
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" storyview="pop" itemClass="tw-tag-editor-label"><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×</$button></span></$set>
|
||||
</$list></div>
|
||||
|
||||
<div class="tw-add-tag">//Add a new tag:// <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
<div class="tw-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default="">
|
||||
<div class="tw-block-dropdown">
|
||||
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text"/></span></$set></$link>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
|
||||
</$reveal>
|
||||
</div>
|
||||
</$fieldmangler>
|
||||
6
core/ui/EditTemplate/title.tid
Normal file
6
core/ui/EditTemplate/title.tid
Normal file
@@ -0,0 +1,6 @@
|
||||
title: $:/core/ui/EditTemplate/title
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<$view field="title"/>
|
||||
|
||||
<$edit-text field="draft.title" class="titlebar tw-edit-texteditor"/>
|
||||
15
core/ui/EditTemplate/type.tid
Normal file
15
core/ui/EditTemplate/type.tid
Normal file
@@ -0,0 +1,15 @@
|
||||
title: $:/core/ui/EditTemplate/type
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
<p>//Type:// <$edit-text field="type" tag="input" default="" placeholder="type" focusPopup=<<qualify "$:/state/typeDropdown">> class="tw-edit-typeeditor"/> <$button popup=<<qualify "$:/state/typeDropdown">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button></p>
|
||||
|
||||
<div class="tw-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/typeDropdown">> type="nomatch" text="" default="">
|
||||
<div class="tw-block-dropdown tw-edit-type-dropdown">
|
||||
<$linkcatcher to="!!type">
|
||||
<$list filter="[is[shadow]prefix[$:/docs/types/]] [!is[shadow]prefix[$:/docs/types/]] +[sort[description]]"><$link to={{!!name}}><$view field="description"/> (<$view field="name"/>)</$link>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
4
core/ui/EditToolbar/cancel.tid
Normal file
4
core/ui/EditToolbar/cancel.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/cancel
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button>
|
||||
4
core/ui/EditToolbar/delete.tid
Normal file
4
core/ui/EditToolbar/delete.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/delete
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button>
|
||||
4
core/ui/EditToolbar/save.tid
Normal file
4
core/ui/EditToolbar/save.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/save
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button>
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/core/ui/EditorHint
|
||||
|
||||
<span class="tw-tiddler-help">Use WikiText to add formatting, images, and dynamic features</span>
|
||||
Use WikiText to add formatting, images, and dynamic features
|
||||
@@ -1,13 +0,0 @@
|
||||
title: $:/core/ui/FieldEditor
|
||||
|
||||
<$fieldmangler><div class="tw-edit-fields">
|
||||
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]" variable="currentField"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<currentField>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<currentField>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
|
||||
</tr>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
</$fieldmangler>
|
||||
@@ -1,64 +0,0 @@
|
||||
title: $:/core/ui/MoreSideBar
|
||||
|
||||
<div class="tw-tab-set tw-more-sidebar"><div class="tw-tab-buttons">
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="allTab" selectedClass="tw-tab-selected">All</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="recentTab" selectedClass="tw-tab-selected">Recent</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="tagsTab" selectedClass="tw-tab-selected">Tags</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="missingTab" selectedClass="tw-tab-selected">Missing</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="draftsTab" selectedClass="tw-tab-selected">Drafts</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="orphanTab" selectedClass="tw-tab-selected">Orphans</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="typeTab" selectedClass="tw-tab-selected">Types</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="systemTab" selectedClass="tw-tab-selected">System</$button>
|
||||
|
||||
<$button type="set" set=<<qualify "$:/state/moreSideBarTabSet">> setTo="shadowsTab" selectedClass="tw-tab-selected">Shadows</$button>
|
||||
|
||||
</div><div class="tw-tab-content">
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="allTab">
|
||||
<$list filter="[!is[system]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="recentTab">
|
||||
{{$:/snippets/recentchanges}}
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="tagsTab">
|
||||
<$list filter="[tags[]sort[title]]" itemClass="tw-menu-list-item">
|
||||
<$transclude tiddler="$:/core/ui/TagTemplate"/> <small class="tw-menu-list-count"><$count filter="[is[current]tagging[]]"/></small>
|
||||
</$list>
|
||||
----
|
||||
{{$:/core/ui/UntaggedTemplate}} <small class="tw-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="missingTab">
|
||||
<$list filter="[is[missing]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/MissingTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="draftsTab">
|
||||
<$list filter="[has[draft.of]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="orphanTab">
|
||||
<$list filter="[is[orphan]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="typeTab">
|
||||
<$list filter="[!is[system]has[type]each[type]sort[type]]">
|
||||
<div class="tw-menu-list-item">
|
||||
<$view field="type"/>
|
||||
<$list filter="[type{!!type}!is[system]sort[title]]">
|
||||
<div class="tw-menu-list-subitem">
|
||||
<$link to={{!!title}}><$view field="title"/></$link>
|
||||
</div>
|
||||
</$list>
|
||||
</div>
|
||||
</$list>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="systemTab">
|
||||
<$list filter="[is[system]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/moreSideBarTabSet">> text="shadowsTab">
|
||||
<$list filter="[is[shadow]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
</div></div>
|
||||
5
core/ui/MoreSideBar/All.tid
Normal file
5
core/ui/MoreSideBar/All.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/MoreSideBar/All
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: All
|
||||
|
||||
<$list filter="[!is[system]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
5
core/ui/MoreSideBar/Drafts.tid
Normal file
5
core/ui/MoreSideBar/Drafts.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/MoreSideBar/Drafts
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: Drafts
|
||||
|
||||
<$list filter="[has[draft.of]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
5
core/ui/MoreSideBar/Missing.tid
Normal file
5
core/ui/MoreSideBar/Missing.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/MoreSideBar/Missing
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: Missing
|
||||
|
||||
<$list filter="[is[missing]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/MissingTemplate"/>
|
||||
5
core/ui/MoreSideBar/Orphans.tid
Normal file
5
core/ui/MoreSideBar/Orphans.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/MoreSideBar/Orphans
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: Orphans
|
||||
|
||||
<$list filter="[is[orphan]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
5
core/ui/MoreSideBar/Recent.tid
Normal file
5
core/ui/MoreSideBar/Recent.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/MoreSideBar/Recent
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: Recent
|
||||
|
||||
{{$:/snippets/recentchanges}}
|
||||
5
core/ui/MoreSideBar/Shadows.tid
Normal file
5
core/ui/MoreSideBar/Shadows.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/MoreSideBar/Shadows
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: Shadows
|
||||
|
||||
<$list filter="[is[shadow]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
5
core/ui/MoreSideBar/System.tid
Normal file
5
core/ui/MoreSideBar/System.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/MoreSideBar/System
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: System
|
||||
|
||||
<$list filter="[is[system]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/ListItemTemplate"/>
|
||||
9
core/ui/MoreSideBar/Tags.tid
Normal file
9
core/ui/MoreSideBar/Tags.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/MoreSideBar/Tags
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: Tags
|
||||
|
||||
<$list filter="[tags[]sort[title]]" itemClass="tw-menu-list-item">
|
||||
<$transclude tiddler="$:/core/ui/TagTemplate"/> <small class="tw-menu-list-count"><$count filter="[is[current]tagging[]]"/></small>
|
||||
</$list>
|
||||
----
|
||||
{{$:/core/ui/UntaggedTemplate}} <small class="tw-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small>
|
||||
14
core/ui/MoreSideBar/Types.tid
Normal file
14
core/ui/MoreSideBar/Types.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
title: $:/core/ui/MoreSideBar/Types
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: Types
|
||||
|
||||
<$list filter="[!is[system]has[type]each[type]sort[type]]">
|
||||
<div class="tw-menu-list-item">
|
||||
<$view field="type"/>
|
||||
<$list filter="[type{!!type}!is[system]sort[title]]">
|
||||
<div class="tw-menu-list-subitem">
|
||||
<$link to={{!!title}}><$view field="title"/></$link>
|
||||
</div>
|
||||
</$list>
|
||||
</div>
|
||||
</$list>
|
||||
4
core/ui/PageControls/controlpanel.tid
Normal file
4
core/ui/PageControls/controlpanel.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/PageControls/control-panel
|
||||
tags: $:/tags/PageControls
|
||||
|
||||
<$link to="$:/ControlPanel">{{$:/core/images/options-button}}</$link>
|
||||
4
core/ui/PageControls/newtiddler.tid
Normal file
4
core/ui/PageControls/newtiddler.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/PageControls/new-tiddler
|
||||
tags: $:/tags/PageControls
|
||||
|
||||
<$button message="tw-new-tiddler" class="btn-invisible">{{$:/core/images/new-button}}</$button>
|
||||
4
core/ui/PageControls/savewiki.tid
Normal file
4
core/ui/PageControls/savewiki.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/PageControls/save-wiki
|
||||
tags: $:/tags/PageControls
|
||||
|
||||
<$button message="tw-save-wiki" class="btn-invisible">{{$:/core/images/save-button}}</$button>
|
||||
@@ -1,7 +1,7 @@
|
||||
title: $:/core/ui/PageMacros
|
||||
|
||||
\define tabs(tabsList,default,state:"$:/currentTab")
|
||||
<div class="tw-tab-buttons"><$list filter="$tabsList$" variable="currentTab"><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tw-tab-selected"><$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/> </$button>
|
||||
\define tabs(tabsList,default,state:"$:/state/tab")
|
||||
<div class="tw-tab-buttons"><$list filter="$tabsList$" variable="currentTab"><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tw-tab-selected"><$view tiddler=<<currentTab>> field="caption"><$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/></$view> </$button>
|
||||
</$list>
|
||||
</div>
|
||||
<div class="tw-tab-divider">
|
||||
|
||||
@@ -12,10 +12,12 @@ title: $:/core/ui/PageTemplate
|
||||
{{$:/LeftSideBar}}
|
||||
|
||||
<!-- The sidebar header -->
|
||||
<header class="sidebar-header"><div class="titlebar">{{SiteTitle}}</div><div class="tw-subtitle">{{SiteSubtitle}}</div>
|
||||
<header class="sidebar-header">
|
||||
<div class="titlebar">{{SiteTitle}}</div>
|
||||
<div class="tw-subtitle">{{SiteSubtitle}}</div>
|
||||
|
||||
<div class="tw-page-controls">
|
||||
<$button message="tw-new-tiddler" class="btn-invisible">{{$:/core/images/new-button}}</$button><$link to="$:/ControlPanel">{{$:/core/images/options-button}}</$link><$button message="tw-save-wiki" class="btn-invisible">{{$:/core/images/save-button}}</$button>
|
||||
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [!is[shadow]!has[draft.of]tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
</div>
|
||||
|
||||
{{$:/core/ui/SideBar}}
|
||||
|
||||
@@ -24,28 +24,7 @@ title: $:/core/ui/SideBar
|
||||
|
||||
<$reveal state="$:/temp/search" type="match" text="">
|
||||
|
||||
<div class="tw-tab-set">
|
||||
<div class="tw-tab-buttons"><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="openTab" selectedClass="tw-tab-selected">Open</$button><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="recentTab" selectedClass="tw-tab-selected">Recent</$button><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="toolsTab" selectedClass="tw-tab-selected">Tools</$button><$button type="set" set=<<qualify "$:/state/sideBarTabSet">> setTo="moreTab" selectedClass="tw-tab-selected">More</$button></div>
|
||||
<div class="tw-tab-divider tw-sidebar-tab-divider">
|
||||
</div>
|
||||
<div class="tw-tab-content">
|
||||
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="openTab">
|
||||
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" storyview="pop" itemClass="tw-menu-list-item tw-open-tiddler-list">
|
||||
<$button message="tw-close-tiddler" class="btn-invisible btn-mini">×</$button> <$link to={{!!title}}><$view field="title"/></$link>
|
||||
</$list>
|
||||
<$button message="tw-close-all-tiddlers" class="btn-invisible btn-mini">close all</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="recentTab">
|
||||
{{$:/snippets/recentchanges}}
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="toolsTab">
|
||||
{{$:/core/ui/ToolsPanel}}
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/sideBarTabSet">> text="moreTab">
|
||||
{{$:/core/ui/MoreSideBar}}
|
||||
</$reveal>
|
||||
</div>
|
||||
</div>
|
||||
<<tabs "[is[shadow]!has[draft.of]tag[$:/tags/SideBar]] [!is[shadow]!has[draft.of]tag[$:/tags/SideBar]]" "$:/core/ui/SideBar/Open" "$:/state/tab/sidebar">>
|
||||
|
||||
</$reveal>
|
||||
</div>
|
||||
|
||||
7
core/ui/SideBar/More.tid
Normal file
7
core/ui/SideBar/More.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
title: $:/core/ui/SideBar/More
|
||||
tags: $:/tags/SideBar
|
||||
caption: More
|
||||
|
||||
<div class="tw-more-sidebar">
|
||||
<<tabs "[is[shadow]!has[draft.of]tag[$:/tags/MoreSideBar]] [!is[shadow]!has[draft.of]tag[$:/tags/MoreSideBar]]" "$:/core/ui/MoreSideBar/Open" "$:/state/tab/moresidebar">>
|
||||
</div>
|
||||
8
core/ui/SideBar/Open.tid
Normal file
8
core/ui/SideBar/Open.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: $:/core/ui/SideBar/Open
|
||||
tags: $:/tags/SideBar
|
||||
caption: Open
|
||||
|
||||
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" storyview="pop" itemClass="tw-menu-list-item tw-open-tiddler-list">
|
||||
<$button message="tw-close-tiddler" class="btn-invisible btn-mini">×</$button> <$link to={{!!title}}><$view field="title"/></$link>
|
||||
</$list>
|
||||
<$button message="tw-close-all-tiddlers" class="btn-invisible btn-mini">close all</$button>
|
||||
5
core/ui/SideBar/Recent.tid
Normal file
5
core/ui/SideBar/Recent.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/SideBar/Recent
|
||||
tags: $:/tags/SideBar
|
||||
caption: Recent
|
||||
|
||||
{{$:/snippets/recentchanges}}
|
||||
@@ -1,8 +1,6 @@
|
||||
title: $:/core/ui/ToolsPanel
|
||||
|
||||
[[Wiki Info|$:/WikiInfo]]
|
||||
|
||||
---
|
||||
title: $:/core/ui/SideBar/Tools
|
||||
tags: $:/tags/SideBar
|
||||
caption: Tools
|
||||
|
||||
{{$:/snippets/viewswitcher}}
|
||||
|
||||
@@ -3,7 +3,7 @@ title: $:/core/ui/TagTemplate
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
\end
|
||||
<span class="tw-tag-list-item"><$setvariable name="backgroundColor" value={{!!color}}><$button popup=<<qualify "$:/state/tagpopup">> class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button></$setvariable>
|
||||
<span class="tw-tag-list-item"><$set name="backgroundColor" value={{!!color}}><$button popup=<<qualify "$:/state/tagpopup">> class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button></$set>
|
||||
<$reveal state=<<qualify "$:/state/tagpopup">> type="popup" position="below" animate="yes"><div class="tw-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
<hr>
|
||||
<$list filter="[is[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
title: $:/core/ui/TagsEditor
|
||||
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
\end
|
||||
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" storyview="pop" itemClass="tw-tag-editor-label"><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×</$button></span></$setvariable>
|
||||
</$list></div>
|
||||
|
||||
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
<div class="tw-tags-autocomplete-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default="">
|
||||
<div class="tw-tags-autocomplete">
|
||||
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text"/></span></$setvariable></$link>
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
|
||||
</$reveal>
|
||||
</div>
|
||||
</$fieldmangler>
|
||||
@@ -1,24 +1,3 @@
|
||||
title: $:/core/ui/TiddlerInfo
|
||||
|
||||
<div class="tw-tab-set"><div class="tw-tab-buttons"><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="refTab" selectedClass="tw-tab-selected">References</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="taggingTab" selectedClass="tw-tab-selected">Tagging</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="listTab" selectedClass="tw-tab-selected">List</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="listedTab" selectedClass="tw-tab-selected">Listed</$button><$button type="set" set=<<qualify "$:/state/tiddlerDropDownTabSet">> setTo="fieldsTab" selectedClass="tw-tab-selected">Fields</$button></div>
|
||||
<div class="tw-tab-divider">
|
||||
</div>
|
||||
<div class="tw-tab-content">
|
||||
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="refTab" default="refTab">
|
||||
<$list filter="[is[current]backlinks[]sort[title]]" emptyMessage="No tiddlers link to this one" template="$:/core/ui/ListItemTemplate">
|
||||
</$list>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="taggingTab">
|
||||
<$list filter="[is[current]tagging[]]" itemClass="tw-menu-list-item" emptyMessage="No tiddlers are tagged with this one" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="listTab">
|
||||
<$list filter="[list{!!title}]" itemClass="tw-menu-list-item" emptyMessage="This tiddler does not have a list" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="listedTab">
|
||||
<$list filter="[is[current]listed[]!is[system]]" itemClass="tw-menu-list-item" emptyMessage="This tiddler is not listed by any others" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/tiddlerDropDownTabSet">> text="fieldsTab">
|
||||
<$transclude tiddler="$:/core/ui/TiddlerFields"/>
|
||||
</$reveal>
|
||||
</div>
|
||||
</div>
|
||||
<<tabs "[is[shadow]!has[draft.of]tag[$:/tags/TiddlerInfo]] [!is[shadow]!has[draft.of]tag[$:/tags/TiddlerInfo]]" "$:/core/ui/TiddlerInfo/References">>
|
||||
|
||||
5
core/ui/TiddlerInfo/Fields.tid
Normal file
5
core/ui/TiddlerInfo/Fields.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/TiddlerInfo/Fields
|
||||
tags: $:/tags/TiddlerInfo
|
||||
caption: Fields
|
||||
|
||||
<$transclude tiddler="$:/core/ui/TiddlerFields"/>
|
||||
5
core/ui/TiddlerInfo/List.tid
Normal file
5
core/ui/TiddlerInfo/List.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/TiddlerInfo/List
|
||||
tags: $:/tags/TiddlerInfo
|
||||
caption: List
|
||||
|
||||
<$list filter="[list{!!title}]" itemClass="tw-menu-list-item" emptyMessage="This tiddler does not have a list" template="$:/core/ui/ListItemTemplate"/>
|
||||
5
core/ui/TiddlerInfo/Listed.tid
Normal file
5
core/ui/TiddlerInfo/Listed.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/TiddlerInfo/Listed
|
||||
tags: $:/tags/TiddlerInfo
|
||||
caption: Listed
|
||||
|
||||
<$list filter="[is[current]listed[]!is[system]]" itemClass="tw-menu-list-item" emptyMessage="This tiddler is not listed by any others" template="$:/core/ui/ListItemTemplate"/>
|
||||
6
core/ui/TiddlerInfo/References.tid
Normal file
6
core/ui/TiddlerInfo/References.tid
Normal file
@@ -0,0 +1,6 @@
|
||||
title: $:/core/ui/TiddlerInfo/References
|
||||
tags: $:/tags/TiddlerInfo
|
||||
caption: References
|
||||
|
||||
<$list filter="[is[current]backlinks[]sort[title]]" emptyMessage="No tiddlers link to this one" template="$:/core/ui/ListItemTemplate">
|
||||
</$list>
|
||||
5
core/ui/TiddlerInfo/Tagging.tid
Normal file
5
core/ui/TiddlerInfo/Tagging.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/ui/TiddlerInfo/Tagging
|
||||
tags: $:/tags/TiddlerInfo
|
||||
caption: Tagging
|
||||
|
||||
<$list filter="[is[current]tagging[]]" itemClass="tw-menu-list-item" emptyMessage="No tiddlers are tagged with this one" template="$:/core/ui/ListItemTemplate"/>
|
||||
@@ -4,6 +4,6 @@ modifier: JeremyRuston
|
||||
\define frame-classes()
|
||||
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
\end
|
||||
<$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
<$set name="tiddlerInfoState" value=<<qualify "$:/state/tiddlerInfo">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
</div>
|
||||
</$tiddler>
|
||||
</$tiddler></$set>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/ViewTemplate/subtitle
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
<div class="tw-subtitle"><$view field="modifier" format="link"/> <$view field="modified" format="relativedate"/></div>
|
||||
<div class="tw-subtitle"><$link to={{!!modifier}}><$view field="modifier"/></$link> <$view field="modified" format="relativedate"/></div>
|
||||
|
||||
@@ -4,11 +4,11 @@ tags: $:/tags/ViewTemplate
|
||||
\define title-styles()
|
||||
fill:$(foregroundColor)$;
|
||||
\end
|
||||
<div class="tw-tiddler-title"><div class="titlebar"><span class="tw-tiddler-controls"><$button popup=<<qualify "$:/state/tiddlerInfo">> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button><$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button><$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>
|
||||
<div class="tw-tiddler-title"><div class="titlebar"><span class="tw-tiddler-controls"><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]] [!is[shadow]!has[draft.of]tag[$:/tags/ViewToolbar]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
|
||||
</span><$setvariable name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude tiddler={{!!icon}}/></span></$setvariable> <span class="title"><$view field="title"/></span></div>
|
||||
</span><$set name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude tiddler={{!!icon}}/></span></$set> <span class="title"><$view field="title"/></span></div>
|
||||
|
||||
<$reveal type="nomatch" text="" default="" state=<<qualify "$:/state/tiddlerInfo">> class="tw-tiddler-info" animate="yes">
|
||||
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tw-tiddler-info tw-popup" animate="yes">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/TiddlerInfo"/>
|
||||
|
||||
|
||||
4
core/ui/ViewToolbar/close.tid
Normal file
4
core/ui/ViewToolbar/close.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/close
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>
|
||||
4
core/ui/ViewToolbar/edit.tid
Normal file
4
core/ui/ViewToolbar/edit.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/edit
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button>
|
||||
4
core/ui/ViewToolbar/info.tid
Normal file
4
core/ui/ViewToolbar/info.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/info
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button popup=<<tiddlerInfoState>> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button>
|
||||
@@ -1,28 +0,0 @@
|
||||
title: $:/ControlPanel
|
||||
|
||||
''Initial setup''
|
||||
|
||||
| ![[Title of this TiddlyWiki|SiteTitle]]|<$edit-text tiddler="SiteTitle" default="" tag="input"/> |
|
||||
| ![[Subtitle|SiteSubtitle]]|<$edit-text tiddler="SiteSubtitle" default="" tag="input"/> |
|
||||
| ![[Username for signing edits|$:/status/UserName]]|<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
||||
| ![[Animation duration|$:/config/AnimationDuration]]|<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|
||||
|
||||
Edit [[DefaultTiddlers|$:/DefaultTiddlers]] to choose which tiddlers are displayed at startup
|
||||
|
||||
{{$:/snippets/encryptionstatus}}
|
||||
|
||||
''Add plugins and tiddlers to your ~TiddlyWiki''
|
||||
|
||||
:Browse for files on your computer to import their contents (the individual tiddlers within TiddlyWiki HTML files are imported separately). <$browse/>
|
||||
|
||||
''Visual appearance''
|
||||
|
||||
*{{$:/snippets/viewswitcher}}
|
||||
*{{$:/snippets/themeswitcher}}
|
||||
*Edit [[ThemeTweaks|$:/ControlPanel/ThemeTweaks]] to change the appearance of your ~TiddlyWiki
|
||||
|
||||
''Additional information about this ~TiddlyWiki''
|
||||
|
||||
*~TiddlyWiki5 version <<version>>
|
||||
*[[Wiki Info|$:/WikiInfo]]
|
||||
*[[Internal configuration information|$:/ConfigInfo]]
|
||||
@@ -1,6 +0,0 @@
|
||||
title: $:/WikiInfo
|
||||
|
||||
* Tiddlers: <$count filter="[!is[system]]"/>
|
||||
* System tiddlers: <$count filter="[is[system]]"/>
|
||||
* Shadow tiddlers: <$count filter="[is[shadow]]"/>
|
||||
** Over-ridden shadow tiddlers: <$count filter="[!is[system]is[shadow]]"/>
|
||||
@@ -4,8 +4,8 @@ title: $:/snippets/modules
|
||||
{{$:/docs/moduletypes/$type$}}
|
||||
\end
|
||||
<$list filter="[moduletypes[]]">
|
||||
!! <<listItem>>
|
||||
<$macrocall $name="describeModuleType" type=<<listItem>>/>
|
||||
!! <$macrocall $name="currentTiddler" $type="text/plain" $output="text/plain"/>
|
||||
<$macrocall $name="describeModuleType" type=<<currentTiddler>>/>
|
||||
<ul><$list filter="[is[current]modules[]]"><li><$link><<currentTiddler>></$link>
|
||||
</li>
|
||||
</$list>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/state/moreSideBarTabSet-{$:/core/ui/MoreSideBar|$:/core/ui/MoreSideBar||}{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
title: $:/state/tab/moresidebar-{$:/core/ui/SideBar|$:/core/ui/SideBar/More||}{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
|
||||
tagsTab
|
||||
$:/core/ui/MoreSideBar/Tags
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/state/sideBarTabSet-{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
title: $:/state/tab/sidebar-{$:/core/ui/SideBar|$:/core/ui/SideBar||}{$:/core/ui/PageTemplate|$:/core/ui/PageTemplate||}
|
||||
|
||||
openTab
|
||||
$:/core/ui/SideBar/Open
|
||||
2
core/wiki/tags/ControlPanel.tid
Normal file
2
core/wiki/tags/ControlPanel.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/ControlPanel
|
||||
list: $:/core/ui/ControlPanel/Basics $:/core/ui/ControlPanel/Appearance $:/core/ui/ControlPanel/Encryption $:/core/ui/ControlPanel/Plugins $:/core/ui/ControlPanel/Tools $:/core/ui/ControlPanel/Internals
|
||||
2
core/wiki/tags/EditTemplate.tid
Normal file
2
core/wiki/tags/EditTemplate.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/EditTemplate
|
||||
list: [[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/type]] [[$:/core/ui/EditTemplate/fields]]
|
||||
2
core/wiki/tags/EditToolbar.tid
Normal file
2
core/wiki/tags/EditToolbar.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/EditToolbar
|
||||
list: [[$:/core/ui/EditToolbar/delete]] [[$:/core/ui/EditToolbar/cancel]] [[$:/core/ui/EditToolbar/save]]
|
||||
3
core/wiki/tags/MoreSideBar.tid
Normal file
3
core/wiki/tags/MoreSideBar.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/tags/MoreSideBar
|
||||
list: [[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]]
|
||||
|
||||
2
core/wiki/tags/PageControls.tid
Normal file
2
core/wiki/tags/PageControls.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/PageControls
|
||||
list: [[$:/core/ui/PageControls/new-tiddler]] [[$:/core/ui/PageControls/control-panel]] [[$:/core/ui/PageControls/save-wiki]]
|
||||
3
core/wiki/tags/SideBar.tid
Normal file
3
core/wiki/tags/SideBar.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/tags/SideBar
|
||||
list: [[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [[$:/core/ui/SideBar/More]]
|
||||
|
||||
3
core/wiki/tags/TiddlerInfo.tid
Normal file
3
core/wiki/tags/TiddlerInfo.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/tags/TiddlerInfo
|
||||
list: [[$:/core/ui/TiddlerInfo/References]] [[$:/core/ui/TiddlerInfo/Tagging]] [[$:/core/ui/TiddlerInfo/List]] [[$:/core/ui/TiddlerInfo/Listed]] [[$:/core/ui/TiddlerInfo/Fields]]
|
||||
|
||||
2
core/wiki/tags/ViewToolbar.tid
Normal file
2
core/wiki/tags/ViewToolbar.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/ViewToolbar
|
||||
list: [[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/close]]
|
||||
@@ -3,15 +3,6 @@ title: $:/snippets/themeswitcher
|
||||
Current theme: {{$:/theme}}
|
||||
|
||||
<$linkcatcher to="$:/theme">
|
||||
|
||||
<$list filter="[plugin-type[theme]sort[title]]">
|
||||
|
||||
<$reveal state="$:/theme" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}>
|
||||
|
||||
<$view field="name" format="text"/>
|
||||
|
||||
</$link>
|
||||
|
||||
<$list filter="[plugin-type[theme]sort[title]]"><div><$reveal state="$:/theme" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}><$view field="name" format="text"/></$link></div>
|
||||
</$list>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
@@ -2,12 +2,7 @@ title: $:/snippets/viewswitcher
|
||||
|
||||
Current view: {{$:/view}}
|
||||
|
||||
<$linkcatcher to="$:/view">
|
||||
|
||||
<$list filter="classic zoomin pop">
|
||||
|
||||
<$reveal state="$:/view" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}><$view field="title"/></$link>
|
||||
|
||||
<$linkcatcher to="$:/view"><$list filter="classic zoomin pop"><div><$reveal state="$:/view" type="match" text={{!!title}}>•</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}> </$reveal> <$link to={{!!title}}><$view field="title"/></$link>
|
||||
</div>
|
||||
</$list>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user