1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-26 21:03:42 +00:00

Compare commits

...

93 Commits

Author SHA1 Message Date
Jermolene
f1e909278c Version update 2013-11-19 12:21:12 +00:00
Jermolene
8d3613e8b4 Docs updates 2013-11-19 12:21:08 +00:00
Jermolene
3fd3e408fc Adopt a brighter link colour 2013-11-19 12:17:31 +00:00
Jermolene
a2fcc59648 Docs update 2013-11-19 12:17:22 +00:00
Jermolene
223e9c4747 FIx margins and spacing 2013-11-19 12:17:16 +00:00
Jermolene
b63f7a7416 Fix missing seconds in serialised date fields 2013-11-19 12:14:37 +00:00
Jermolene
905d3e6e1e Docs update 2013-11-18 09:01:06 +00:00
Jermolene
90a0eca2f5 Add dropdown interface for setting the type of a tiddler 2013-11-18 09:00:25 +00:00
Jermolene
7658789971 Style tweaks for the edit template 2013-11-18 09:00:00 +00:00
Jermolene
9257c8205f More information about Jermolene 2013-11-18 08:58:23 +00:00
Jermolene
b117f74666 Make the toolbars be tag driven 2013-11-17 21:53:39 +00:00
Jermolene
3b35d7dfe4 Fixed problem with greedy regexp for macrocalls
It was preventing this from working:

```
<<macro>><<bacrp>><<sdf>><<qweqwe>>
```
2013-11-17 21:53:12 +00:00
Jermolene
29c0f7156b Fix overlooked typo
Ouch.
2013-11-16 22:50:10 +00:00
Jermolene
0d2ed8f112 More release docs 2013-11-16 17:51:20 +00:00
Jermolene
99a6b1bcc0 More TiddlyWeb docs 2013-11-15 23:02:30 +00:00
Jermolene
da4cdf2d3b Refactor edit template to be driven by $:/tags/EditTemplate tag 2013-11-15 22:55:32 +00:00
Jermolene
26cc62cff7 Fix problem with tiddler info panel in Firefox
Fixes #104
2013-11-15 22:46:17 +00:00
Jermolene
b1992714ed Docs update 2013-11-15 22:09:42 +00:00
Jermolene
ecca7a3ea9 TiddlyWeb control panel update 2013-11-15 22:09:06 +00:00
Jermolene
4b84d9bfe5 Update to pre-release version number
I should have done this immediately after the alpha.14 release.
2013-11-15 22:08:57 +00:00
Jermolene
92b1932fcf Update docs for TiddlyWeb 2013-11-15 22:08:23 +00:00
Jermolene
9a6e404215 Fix modules list in the Internal tab of Control Panel 2013-11-15 22:08:16 +00:00
Jermolene
939ad11eae Rename the 'setvariable' widget to 'set'
Sleeker.
2013-11-15 18:31:39 +00:00
Jermolene
6785c49734 Better styling for embedded PDFs 2013-11-15 18:30:57 +00:00
Jermolene
45c51481de Improve performance of tag handling with some caching 2013-11-13 23:33:32 +00:00
Jermolene
874bd7b2b8 Tweaks tests
This was the only place we were using the `variables` option to the
widget constructor.
2013-11-13 21:26:13 +00:00
Jermolene
fc6dd83f2f Use prototypal inheritance to speed up the inheritance of widget variables
Now we reuse the prototype mechanism to let javascript do the work of
searching up the parent chain.
2013-11-13 21:25:45 +00:00
Jermolene
a8129874fb Docs update 2013-11-13 20:21:28 +00:00
Jermolene
c7d5905242 Fix view format=date so that it doesn't crash on empty fields 2013-11-13 19:41:54 +00:00
Jermolene
02d3620d93 Update the tiddler info panel to use the new tw-popup class
This fixes the problem with the inability to click on items within the
tiddler info panel (including the static URL)
2013-11-12 22:03:20 +00:00
Jermolene
b304e3fe40 Update the reveal widget to set the tw-popup class 2013-11-12 22:02:43 +00:00
Jermolene
06a66cf24e Improve popup dismissal
Now we ignore clicks if they come from an element that has an ancestor
with the class `tw-popup`
2013-11-12 22:02:26 +00:00
Jermolene
145e3ece78 Fix $tw.utils.hasClass() to work even if the element doesn't have a className property 2013-11-12 22:01:31 +00:00
Jermolene
24e361da77 Removed inadvertent alert() 2013-11-12 20:58:54 +00:00
Jermolene
1b9614eb9d Docs update 2013-11-12 20:54:28 +00:00
Jermolene
791033d751 First pass at a saver for IE10 and above
It's not great, sadly. Clicking save in the browser pulls up an
unobtrusive bar at the bottom of the browser window where you can click
"save". You then get a new copy of your wiki in the downloads folder.
2013-11-12 20:49:00 +00:00
Jermolene
9748709759 Fix up prematutely committed static link tab for tw5.com 2013-11-12 20:29:53 +00:00
Jermolene
b885743efe Fix typo 2013-11-12 20:29:22 +00:00
Jermolene
8ec92405fd Add urlencoded and doubleurlencoded formats to the view widget 2013-11-12 20:29:14 +00:00
Jermolene
e68ab95ecb For tw5.com add a link in the info panel to the static tiddler representation 2013-11-12 19:52:57 +00:00
Jermolene
d2dbc73448 Correct typo 2013-11-12 19:52:25 +00:00
Jermolene
4a5a8dd773 Fix the execution context for widget attributes specified as macros
We need to ensure that variables in the tree up to this point are
accessible when we render the macro text.
2013-11-12 19:52:17 +00:00
Jermolene
439dfcb172 Added a link to Bob Robison's TW5 theme 2013-11-12 15:34:14 +00:00
Jermolene
f6a4ea6b0f Fixed typo from d64590a12b 2013-11-11 23:44:55 +00:00
Jeremy Ruston
8681e0228d Merge pull request #212 from grayeul/closeAllOthers
Add support for close-others
2013-11-11 14:46:05 -08:00
Jeremy Ruston
c1123cb3e9 Merge pull request #214 from grayeul/sign-cla2
CLA signature from @grayeul
2013-11-11 14:45:12 -08:00
Jermolene
d64590a12b Fixed problem with target fields/index being erroneously applied to template
See here for discussion:

https://groups.google.com/d/msg/TiddlyWiki/D3MBNhjaT3E/ph0ZuAhuPFMJ
2013-11-11 22:29:38 +00:00
Jermolene
e274a0c7d1 Make sure we use state tiddler titles in the $:/state namespace 2013-11-11 15:27:12 +00:00
Jermolene
51fe1e20e8 Make sure that searching for the empty string returns all available tiddlers
Makes sense because every tiddler contains the empty string. This
restores the functionality of the tag editor dropdown.
2013-11-11 15:26:41 +00:00
Grayeul
9c4ffae1b3 Remove close-others-button from core/images 2013-11-11 07:52:04 -06:00
Grayeul
3d0c6cf41e Fixed missing reference to old CloseAllOthers 2013-11-11 07:48:54 -06:00
Grayeul
3800d3b2b1 Merge branch 'closeAllOthers' of https://github.com/grayeul/TiddlyWiki5 into closeAllOthers
Conflicts:
	core/modules/widgets/navigator.js

merging namechange.
2013-11-11 07:41:22 -06:00
Grayeul
da54236f5a Change names to tw=close-other-tiddlers and handleCloseOtherTiddlersEvent 2013-11-11 07:34:19 -06:00
Grayeul
c930d84d01 Add support for close-all-others 2013-11-11 07:28:29 -06:00
Grayeul
2317f779e9 sign cla 2013-11-11 07:18:58 -06:00
Jermolene
c501e70512 Add new blog post link to docs 2013-11-11 12:42:49 +00:00
Jermolene
8357d90e59 Fix bug caused when creating a tiddler title starting or ending with a space 2013-11-11 08:48:06 +00:00
Grayeul
efef6261b8 Add support for close-all-others 2013-11-10 22:09:52 -06:00
Jermolene
95b7a5d4fe Add host configuration to TiddlyWeb control panel tab 2013-11-10 23:28:03 +00:00
Jermolene
2c55c7ca82 Fix typo 2013-11-10 23:27:44 +00:00
Jermolene
02dda51269 Docs updates 2013-11-10 23:17:10 +00:00
Jermolene
083cb848f2 Version update 2013-11-10 23:15:19 +00:00
Jermolene
254da0b170 Clean up the tools tab 2013-11-10 23:14:23 +00:00
Jermolene
8b0b9eafb8 Simplify the page controls by dropping the drop shadow
Makes the icons less blurry in Retina™ displays
2013-11-10 23:04:41 +00:00
Jermolene
04e2f18ff1 Remove tooltip, classes and styles from transclusion syntax
Now that transclusion doesn't generate any intrinsic elements we don't
have an element to attach the tooltip, classes and styles to.
2013-11-10 22:46:37 +00:00
Jermolene
a4783a2c19 Add a demo control panel page for the Starlight theme
If you open the control panel and then use the tools sidebar to switch
themes to and from Starlight, you'll see this tab dynamically appear
and disappear
2013-11-10 22:45:53 +00:00
Jermolene
8fb6f26729 Make sure we don't try to wikify the names of modules in the module listing 2013-11-10 22:45:11 +00:00
Jermolene
0e7ffa677a Narrow the gap between tabs 2013-11-10 21:53:56 +00:00
Jermolene
a668f09522 More refinements to the control panel
Including adding a TiddlyWeb-specific control panel tab
2013-11-10 21:53:39 +00:00
Jermolene
2598e22422 Spruce up the control panel
Structure things with extensible tabs.
2013-11-10 21:40:03 +00:00
Jermolene
dc6a9c6348 Release note for alpha.14 2013-11-10 19:24:34 +00:00
Jermolene
b1667259f0 Fix default password
The password widget was defaulting to the password "null".
2013-11-10 19:22:10 +00:00
Jermolene
c77b451863 Fixed bug when using checkbox widget to apply a tag to a tiddler that is untagged 2013-11-10 19:21:37 +00:00
Jermolene
9e48460940 Docs update 2013-11-09 19:29:57 +00:00
Jermolene
3972e9150e Version update 2013-11-09 19:27:17 +00:00
Jermolene
0c8ba71edd Use the built-in tabs macro for the tiddler info panel and the sidebar tabs
Now you can insert your own tabs, too - see the release note
2013-11-09 19:21:37 +00:00
Jermolene
a7bb331412 Extend view widget so that it falls back to its content if the field/property is empty or missing 2013-11-09 17:30:06 +00:00
Jermolene
6f1c9d88cc Improve the Widget.prototype.removeChildDomNodes() method so that most subclasses won't need to override it 2013-11-09 16:55:14 +00:00
Jermolene
e2d7c7aea5 Docs updates 2013-11-09 16:19:43 +00:00
Jermolene
dc0645725e More accurate text in ThemeTweaks 2013-11-09 16:19:38 +00:00
Jermolene
06e0bdbfbb Improve readability of CodeMirror editor 2013-11-09 15:56:17 +00:00
Jermolene
14db418519 Docs updates 2013-11-09 15:55:59 +00:00
Jermolene
d5e1a9d7d0 Docs updates 2013-11-09 14:48:17 +00:00
Jermolene
ccb7fac25e Fix further typo in edit-text widget 2013-11-09 14:17:08 +00:00
Jermolene
bbe9a9c191 Fixed typos in edit-text widget
Thanks @grayeul
2013-11-09 13:15:54 +00:00
Jermolene
4ee67986a5 Docs update 2013-11-09 12:52:09 +00:00
Jermolene
0a657acbd8 Make the modifier field in the subtitle be a link 2013-11-09 12:51:52 +00:00
Jermolene
d41feb63e3 Rejiggle the release documentation 2013-11-09 11:55:14 +00:00
Jermolene
b745e304a2 Fix problem with edit-text widget and indexed properties
Thanks to @grayeul for the pointer:

https://github.com/Jermolene/TiddlyWiki5/commit/78bc89cbdbcc26e373001f2d
473436489d8d4365#commitcomment-4554613
2013-11-09 10:55:18 +00:00
Jermolene
2a7f577366 Script for bumping the version number 2013-11-09 10:54:25 +00:00
Jermolene
73d301e63f Update the deploy script to publish to NPM
Which means that I'll only be deploying when there's a version bump.
Which means that I'll be deploying new versions multiple times a day
sometimes.
2013-11-09 10:54:10 +00:00
Jermolene
fbfdd80f9b Fix @giffmex's themes
They just needed the `tw-body` class added to the body element.
2013-11-09 10:53:16 +00:00
Jermolene
2d0ff5f8a2 Docs updates 2013-11-09 10:52:52 +00:00
140 changed files with 953 additions and 732 deletions

View File

@@ -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),

View File

@@ -0,0 +1,3 @@
title: $:/docs/types/image/gif
description: GIF image
name: image/gif

View File

@@ -0,0 +1,3 @@
title: $:/docs/types/image/jpeg
description: JPEG image
name: image/jpeg

View File

@@ -0,0 +1,3 @@
title: $:/docs/types/image/png
description: PNG image
name: image/png

View File

@@ -0,0 +1,3 @@
title: $:/docs/types/text/plain
description: Plain text
name: text/plain

View File

@@ -0,0 +1,3 @@
title: $:/docs/types/text/vnd.tiddlywiki
description: TW5 wikitext
name: text/vnd.tiddlywiki

View File

@@ -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;
};
/*

View File

@@ -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];
};

View File

@@ -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];
};

View 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);
};
})();

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;
})();

View File

@@ -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;

View File

@@ -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
View 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>

View File

@@ -0,0 +1,11 @@
title: $:/core/ui/ControlPanel/Appearance
tags: $:/tags/ControlPanel
caption: Appearance
! Theme
{{$:/snippets/themeswitcher}}
! Story View
{{$:/snippets/viewswitcher}}

View 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]]"/>

View File

@@ -0,0 +1,5 @@
title: $:/core/ui/ControlPanel/Encryption
tags: $:/tags/ControlPanel
caption: Encryption
{{$:/snippets/encryptionstatus}}

View File

@@ -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

View 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>

View 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.

View File

@@ -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>

View 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>

View 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>

View 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>

View 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">&times;</$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>

View 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"/>

View 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>

View 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>

View 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>

View 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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View 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"/>

View 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"/>

View 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"/>

View 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"/>

View File

@@ -0,0 +1,5 @@
title: $:/core/ui/MoreSideBar/Recent
tags: $:/tags/MoreSideBar
caption: Recent
{{$:/snippets/recentchanges}}

View 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"/>

View 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"/>

View 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>

View 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>

View File

@@ -0,0 +1,4 @@
title: $:/core/ui/PageControls/control-panel
tags: $:/tags/PageControls
<$link to="$:/ControlPanel">{{$:/core/images/options-button}}</$link>

View 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>

View 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>

View File

@@ -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">

View File

@@ -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}}

View File

@@ -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">&times;</$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
View 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
View 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">&times;</$button> <$link to={{!!title}}><$view field="title"/></$link>
</$list>
<$button message="tw-close-all-tiddlers" class="btn-invisible btn-mini">close all</$button>

View File

@@ -0,0 +1,5 @@
title: $:/core/ui/SideBar/Recent
tags: $:/tags/SideBar
caption: Recent
{{$:/snippets/recentchanges}}

View File

@@ -1,8 +1,6 @@
title: $:/core/ui/ToolsPanel
[[Wiki Info|$:/WikiInfo]]
---
title: $:/core/ui/SideBar/Tools
tags: $:/tags/SideBar
caption: Tools
{{$:/snippets/viewswitcher}}

View File

@@ -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"/>

View File

@@ -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">&times;</$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>

View File

@@ -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">>

View File

@@ -0,0 +1,5 @@
title: $:/core/ui/TiddlerInfo/Fields
tags: $:/tags/TiddlerInfo
caption: Fields
<$transclude tiddler="$:/core/ui/TiddlerFields"/>

View 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"/>

View 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"/>

View 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>

View 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"/>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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"/>

View 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>

View 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>

View 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>

View File

@@ -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]]

View File

@@ -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]]"/>

View File

@@ -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>

View File

@@ -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

View File

@@ -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

View 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

View 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]]

View File

@@ -0,0 +1,2 @@
title: $:/tags/EditToolbar
list: [[$:/core/ui/EditToolbar/delete]] [[$:/core/ui/EditToolbar/cancel]] [[$:/core/ui/EditToolbar/save]]

View 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]]

View File

@@ -0,0 +1,2 @@
title: $:/tags/PageControls
list: [[$:/core/ui/PageControls/new-tiddler]] [[$:/core/ui/PageControls/control-panel]] [[$:/core/ui/PageControls/save-wiki]]

View 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]]

View 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]]

View File

@@ -0,0 +1,2 @@
title: $:/tags/ViewToolbar
list: [[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/close]]

View File

@@ -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}}>&bull;</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}>&nbsp;</$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}}>&bull;</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}><$view field="name" format="text"/></$link></div>
</$list>
</$linkcatcher>

View File

@@ -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}}>&bull;</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}><$view field="title"/></$link>
<$linkcatcher to="$:/view"><$list filter="classic zoomin pop"><div><$reveal state="$:/view" type="match" text={{!!title}}>&bull;</$reveal><$reveal state="$:/view" type="nomatch" text={{!!title}}>&nbsp;</$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