diff --git a/bld.cmd b/bld.cmd index 4ec48e7f2..9d803d2b0 100644 --- a/bld.cmd +++ b/bld.cmd @@ -35,19 +35,18 @@ node .\tiddlywiki.js ^ .\editions\tw5.com ^ --verbose ^ --output . ^ - --rendertiddler ReadMe .\readme.md text/html ^ - --rendertiddler ContributingTemplate .\contributing.md text/html ^ - --rendertiddler $:/core/copyright.txt .\licenses\copyright.md text/plain ^ + --build readmes ^ --output %TW5_BUILD_OUTPUT% ^ - --rendertiddler $:/core/save/all index.html text/plain ^ - --savetiddler $:/favicon.ico favicon.ico ^ - --rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain ^ - --rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain ^ - --savetiddler $:/green_favicon.ico %TW5_BUILD_OUTPUT%/static/favicon.ico ^ - --rendertiddler $:/core/templates/static.template.html static.html text/plain ^ - --rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain ^ - --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain ^ - --rendertiddler $:/core/templates/static.template.css static\static.css text/plain ^ + --build favicon empty static index ^ + || exit 1 + +rem upgrade.html: custom edition for handling upgrades + +node .\tiddlywiki.js ^ + .\editions\upgrade ^ + --verbose ^ + --output %TW5_BUILD_OUTPUT% ^ + --build upgrade ^ || exit 1 rem encrypted.html: a version of the main file encrypted with the password "password" @@ -56,8 +55,7 @@ node .\tiddlywiki.js ^ .\editions\tw5.com ^ --verbose ^ --output %TW5_BUILD_OUTPUT% ^ - --password password ^ - --rendertiddler $:/core/save/all encrypted.html text/plain ^ + --build encrypted ^ || exit 1 rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS diff --git a/bld.sh b/bld.sh index e90ca436e..ad707acd9 100755 --- a/bld.sh +++ b/bld.sh @@ -36,19 +36,18 @@ node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ --output . \ - --rendertiddler ReadMe ./readme.md text/html \ - --rendertiddler ContributingTemplate ./contributing.md text/html \ - --rendertiddler $:/core/copyright.txt ./licenses/copyright.md text/plain \ + --build readmes \ --output $TW5_BUILD_OUTPUT \ - --rendertiddler $:/core/save/all index.html text/plain \ - --savetiddler $:/favicon.ico favicon.ico \ - --rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain \ - --rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain \ - --savetiddler $:/green_favicon.ico static/favicon.ico \ - --rendertiddler $:/core/templates/static.template.html static.html text/plain \ - --rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain \ - --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain \ - --rendertiddler $:/core/templates/static.template.css static/static.css text/plain \ + --build favicon empty static index \ + || exit 1 + +# upgrade.html: custom edition for handling upgrades + +node ./tiddlywiki.js \ + ./editions/upgrade \ + --verbose \ + --output $TW5_BUILD_OUTPUT \ + --build upgrade \ || exit 1 # encrypted.html: a version of the main file encrypted with the password "password" @@ -57,8 +56,7 @@ node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ --output $TW5_BUILD_OUTPUT \ - --password password \ - --rendertiddler $:/core/save/all encrypted.html text/plain \ + --build encrypted \ || exit 1 # tahoelafs.html: empty wiki with plugin for Tahoe-LAFS diff --git a/boot/boot.js b/boot/boot.js index c1356bc32..a28aab306 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -187,7 +187,7 @@ $tw.utils.deepDefaults = function(object /*, sourceObjectList */) { $tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) { if(source) { for (var p in source) { - if(object[p] == null) { + if(object[p] === null || object[p] === undefined) { object[p] = source[p]; } if(typeof object[p] === "object" && typeof source[p] === "object") { @@ -615,7 +615,7 @@ $tw.modules.execute = function(moduleName,moduleRoot) { tiddler = $tw.wiki.getTiddler(name) || $tw.wiki.getTiddler(name + ".js") || $tw.wiki.getTiddler(moduleName) || $tw.wiki.getTiddler(moduleName + ".js") , _exports = {}, sandbox = { - module: {}, + module: {exports: _exports}, //moduleInfo: moduleInfo, exports: _exports, console: console, @@ -967,19 +967,22 @@ $tw.Wiki = function(options) { this.registerPluginTiddlers = function(pluginType,titles) { var self = this, registeredTitles = [], - checkTiddler = function(tiddler) { + checkTiddler = function(tiddler,title) { if(tiddler && tiddler.fields.type === "application/json" && tiddler.fields["plugin-type"] === pluginType) { - pluginTiddlers.push(tiddler); - registeredTitles.push(tiddler.fields.title); + var disablingTiddler = self.getTiddler("$:/config/Plugins/Disabled/" + title); + if(title === "$:/core" || !disablingTiddler || (disablingTiddler.fields.text || "").trim() !== "yes") { + pluginTiddlers.push(tiddler); + registeredTitles.push(tiddler.fields.title); + } } }; if(titles) { $tw.utils.each(titles,function(title) { - checkTiddler(self.getTiddler(title)); + checkTiddler(self.getTiddler(title),title); }); } else { this.each(function(tiddler,title) { - checkTiddler(tiddler); + checkTiddler(tiddler,title); }); } return registeredTitles; @@ -1425,7 +1428,7 @@ $tw.loadTiddlersFromPath = function(filepath,excludeRegExp) { } else { // If not, read all the files in the directory $tw.utils.each(files,function(file) { - if(!excludeRegExp.test(file)) { + if(!excludeRegExp.test(file) && file !== "plugin.info") { tiddlers.push.apply(tiddlers,$tw.loadTiddlersFromPath(filepath + path.sep + file,excludeRegExp)); } }); @@ -1442,53 +1445,102 @@ Load the tiddlers from a plugin folder, and package them up into a proper JSON p */ $tw.loadPluginFolder = function(filepath,excludeRegExp) { excludeRegExp = excludeRegExp || $tw.boot.excludeRegExp; - var stat, files, pluginInfo, pluginTiddlers = [], f, file, titlePrefix, t; - if(fs.existsSync(filepath)) { - stat = fs.statSync(filepath); - if(stat.isDirectory()) { - // Read the plugin information - pluginInfo = JSON.parse(fs.readFileSync(filepath + path.sep + "plugin.info","utf8")); - // Read the plugin files - files = fs.readdirSync(filepath); - for(f=0; f + + + + \ No newline at end of file diff --git a/core/images/clone-button.tid b/core/images/clone-button.tid new file mode 100644 index 000000000..ecea96c31 --- /dev/null +++ b/core/images/clone-button.tid @@ -0,0 +1,9 @@ +title: $:/core/images/clone-button +tags: $:/tags/Image + + + + + + + \ No newline at end of file diff --git a/core/images/close-all-button.tid b/core/images/close-all-button.tid new file mode 100644 index 000000000..0d3e0f46d --- /dev/null +++ b/core/images/close-all-button.tid @@ -0,0 +1,15 @@ +title: $:/core/images/close-all-button +tags: $:/tags/Image + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/images/close-others-button.tid b/core/images/close-others-button.tid new file mode 100644 index 000000000..5bc26ca28 --- /dev/null +++ b/core/images/close-others-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/close-others-button +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/download-button.tid b/core/images/download-button.tid new file mode 100644 index 000000000..2530c7d32 --- /dev/null +++ b/core/images/download-button.tid @@ -0,0 +1,4 @@ +title: $:/core/images/download-button +tags: $:/tags/Image + + \ No newline at end of file diff --git a/core/images/export-button.tid b/core/images/export-button.tid new file mode 100644 index 000000000..24b07e150 --- /dev/null +++ b/core/images/export-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/export-button +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/full-screen-button.tid b/core/images/full-screen-button.tid new file mode 100644 index 000000000..ca96994c1 --- /dev/null +++ b/core/images/full-screen-button.tid @@ -0,0 +1,19 @@ +title: $:/core/images/full-screen-button +tags: $:/tags/Image + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/images/globe.tid b/core/images/globe.tid new file mode 100644 index 000000000..2edccf671 --- /dev/null +++ b/core/images/globe.tid @@ -0,0 +1,10 @@ +title: $:/core/images/globe +tags: $:/tags/Image + + + + + + + + \ No newline at end of file diff --git a/core/images/import-button.tid b/core/images/import-button.tid new file mode 100644 index 000000000..307809e5e --- /dev/null +++ b/core/images/import-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/import-button +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/locked-padlock.tid b/core/images/locked-padlock.tid new file mode 100644 index 000000000..ebcbd92e5 --- /dev/null +++ b/core/images/locked-padlock.tid @@ -0,0 +1,8 @@ +title: $:/core/images/locked-padlock +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/permalink-button.tid b/core/images/permalink-button.tid new file mode 100644 index 000000000..118b2f495 --- /dev/null +++ b/core/images/permalink-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/permalink-button +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/permaview-button.tid b/core/images/permaview-button.tid new file mode 100644 index 000000000..2684406b9 --- /dev/null +++ b/core/images/permaview-button.tid @@ -0,0 +1,10 @@ +title: $:/core/images/permaview-button +tags: $:/tags/Image + + + + + + + + \ No newline at end of file diff --git a/core/images/plugin-generic-language.tid b/core/images/plugin-generic-language.tid new file mode 100644 index 000000000..1c5aa3ce5 --- /dev/null +++ b/core/images/plugin-generic-language.tid @@ -0,0 +1,8 @@ +title: $:/core/images/plugin-generic-language +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/plugin-generic-plugin.tid b/core/images/plugin-generic-plugin.tid new file mode 100644 index 000000000..6f56da7a3 --- /dev/null +++ b/core/images/plugin-generic-plugin.tid @@ -0,0 +1,8 @@ +title: $:/core/images/plugin-generic-plugin +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/plugin-generic-theme.tid b/core/images/plugin-generic-theme.tid new file mode 100644 index 000000000..bfc667c79 --- /dev/null +++ b/core/images/plugin-generic-theme.tid @@ -0,0 +1,8 @@ +title: $:/core/images/plugin-generic-theme +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/refresh-button.tid b/core/images/refresh-button.tid new file mode 100644 index 000000000..31575e31c --- /dev/null +++ b/core/images/refresh-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/refresh-button +tags: $:/tags/Image + + + + + + diff --git a/core/images/right-arrow.tid b/core/images/right-arrow.tid new file mode 100644 index 000000000..73c2545ef --- /dev/null +++ b/core/images/right-arrow.tid @@ -0,0 +1,4 @@ +title: $:/core/images/right-arrow +tags: $:/tags/Image + + \ No newline at end of file diff --git a/core/images/star-filled.tid b/core/images/star-filled.tid new file mode 100644 index 000000000..11b43c2e4 --- /dev/null +++ b/core/images/star-filled.tid @@ -0,0 +1,8 @@ +title: $:/core/images/star-filled +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/storyview-classic.tid b/core/images/storyview-classic.tid new file mode 100644 index 000000000..86fa1c21e --- /dev/null +++ b/core/images/storyview-classic.tid @@ -0,0 +1,11 @@ +title: $:/core/images/storyview-classic +tags: $:/tags/Image + + + + + + + + + \ No newline at end of file diff --git a/core/images/storyview-pop.tid b/core/images/storyview-pop.tid new file mode 100644 index 000000000..442fc8e77 --- /dev/null +++ b/core/images/storyview-pop.tid @@ -0,0 +1,12 @@ +title: $:/core/images/storyview-pop +tags: $:/tags/Image + + + + + + + + + + \ No newline at end of file diff --git a/core/images/storyview-zoomin.tid b/core/images/storyview-zoomin.tid new file mode 100644 index 000000000..764c27993 --- /dev/null +++ b/core/images/storyview-zoomin.tid @@ -0,0 +1,9 @@ +title: $:/core/images/storyview-zoomin +tags: $:/tags/Image + + + + + + + \ No newline at end of file diff --git a/core/images/tag-button.tid b/core/images/tag-button.tid new file mode 100644 index 000000000..7d53a8a70 --- /dev/null +++ b/core/images/tag-button.tid @@ -0,0 +1,9 @@ +title: $:/core/images/tag-button +tags: $:/tags/Image + + + + + + + diff --git a/core/images/theme-button.tid b/core/images/theme-button.tid new file mode 100644 index 000000000..419a10924 --- /dev/null +++ b/core/images/theme-button.tid @@ -0,0 +1,12 @@ +title: $:/core/images/theme-button +tags: $:/tags/Image + + + + + + + + + + \ No newline at end of file diff --git a/core/images/unlocked-padlock.tid b/core/images/unlocked-padlock.tid new file mode 100644 index 000000000..fc0b2bf97 --- /dev/null +++ b/core/images/unlocked-padlock.tid @@ -0,0 +1,8 @@ +title: $:/core/images/unlocked-padlock +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index cba6e054f..dac85e315 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -4,23 +4,57 @@ AdvancedSearch/Caption: advanced search AdvancedSearch/Hint: Advanced search Cancel/Caption: cancel Cancel/Hint: Cancel editing this tiddler +Clone/Caption: clone +Clone/Hint: Clone this tiddler Close/Caption: close Close/Hint: Close this tiddler +CloseAll/Caption: close all +CloseAll/Hint: Close all tiddlers +CloseOthers/Caption: close others +CloseOthers/Hint: Close other tiddlers ControlPanel/Caption: control panel ControlPanel/Hint: Open control panel Delete/Caption: delete Delete/Hint: Delete this tiddler Edit/Caption: edit Edit/Hint: Edit this tiddler +Encryption/Caption: encryption +Encryption/Hint: Set or clear a password for saving this wiki +Encryption/ClearPassword/Caption: clear password +Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption +Encryption/SetPassword/Caption: set password +Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption +FullScreen/Caption: full-screen +FullScreen/Hint: Enter or leave full-screen mode +Import/Caption: import +Import/Hint: Import files Info/Caption: info Info/Hint: Show information for this tiddler +Home/Caption: home +Home/Hint: Open the default tiddlers +Language/Caption: language +Language/Hint: Choose the user interface language NewTiddler/Caption: new tiddler NewTiddler/Hint: Create a new tiddler +More/Caption: more +More/Hint: More actions +Permalink/Caption: permalink +Permalink/Hint: Set browser address bar to a direct link to this tiddler +Permaview/Caption: permaview +Permaview/Hint: Set browser address bar to a direct link to all the tiddlers in this story +Refresh/Caption: refresh +Refresh/Hint: Perform a full refresh of the wiki Save/Caption: save Save/Hint: Save this tiddler SaveWiki/Caption: save changes SaveWiki/Hint: Save changes +StoryView/Caption: storyview +StoryView/Hint: Choose the story visualisation HideSideBar/Caption: hide sidebar HideSideBar/Hint: Hide sidebar ShowSideBar/Caption: show sidebar ShowSideBar/Hint: Show sidebar +TagManager/Caption: tag manager +TagManager/Hint: Open tag manager +Theme/Caption: theme +Theme/Hint: Choose the display theme diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 88b1b3198..e35f38f1b 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -1,6 +1,10 @@ title: $:/language/ControlPanel/ Advanced/Caption: Advanced +Advanced/EditorTypes/Caption: Editor Types +Advanced/EditorTypes/Editor/Caption: Editor +Advanced/EditorTypes/Hint: These tiddlers determine which editor is used to edit specific tiddler types. +Advanced/EditorTypes/Type/Caption: Type Advanced/Hint: Internal information about this TiddlyWiki Advanced/LoadedModules/Caption: Loaded Modules Advanced/LoadedModules/Hint: These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process. @@ -15,6 +19,10 @@ Advanced/Settings/NavigationHistory/Caption: Navigation History Advanced/Settings/NavigationHistory/Hint: Update browser history when navigating to a tiddler: Advanced/Settings/NavigationHistory/No/Description: Do not update history Advanced/Settings/NavigationHistory/Yes/Description: Update history +Advanced/Settings/ToolbarButtons/Caption: Toolbar Buttons +Advanced/Settings/ToolbarButtons/Hint: Default toolbar button appearance: +Advanced/Settings/ToolbarButtons/Text/Description: Include text +Advanced/Settings/ToolbarButtons/Icons/Description: Include icon Advanced/TiddlerFields/Caption: Tiddler Fields Advanced/TiddlerFields/Hint: This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers). Appearance/Caption: Appearance @@ -32,6 +40,14 @@ Appearance/StoryView/Caption: Story View Appearance/StoryView/Prompt: Current view: Appearance/Theme/Caption: Theme Appearance/Theme/Prompt: Current theme: +Appearance/Toolbars/Caption: Toolbars +Appearance/Toolbars/Hint: Select which toolbar buttons are displayed +Appearance/Toolbars/EditToolbar/Caption: Edit Toolbar +Appearance/Toolbars/EditToolbar/Hint: Choose which buttons are displayed for tiddlers in edit mode +Appearance/Toolbars/ViewToolbar/Caption: View Toolbar +Appearance/Toolbars/ViewToolbar/Hint: Choose which buttons are displayed for tiddlers in view mode +Appearance/Toolbars/PageControls/Caption: Page Toolbar +Appearance/Toolbars/PageControls/Hint: Choose which buttons are displayed on the main page toolbar Basics/AnimDuration/Prompt: Animation duration: Basics/Caption: Basics Basics/DefaultTiddlers/BottomHint: Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering @@ -48,9 +64,12 @@ Basics/Title/Prompt: Title of this ~TiddlyWiki: Basics/Username/Prompt: Username for signing edits: Basics/Version/Prompt: ~TiddlyWiki version: Plugins/Caption: Plugins -Plugins/Fields/Description: Description -Plugins/Fields/Title: Title -Plugins/Fields/Version: Version +Plugins/Disable/Caption: disable +Plugins/Disable/Hint: Disable this plugin when reloading page +Plugins/Disabled/Status: (disabled) +Plugins/Empty/Hint: None +Plugins/Enable/Caption: enable +Plugins/Enable/Hint: Enable this plugin when reloading page Plugins/Language/Prompt: Languages Plugins/Plugin/Prompt: Plugins Plugins/Theme/Prompt: Themes diff --git a/core/language/en-GB/Docs/PaletteColours.multids b/core/language/en-GB/Docs/PaletteColours.multids index db9548452..778b679c5 100644 --- a/core/language/en-GB/Docs/PaletteColours.multids +++ b/core/language/en-GB/Docs/PaletteColours.multids @@ -6,6 +6,7 @@ alert-highlight: Alert highlight alert-muted-foreground: Alert muted foreground background: General background blockquote-bar: Blockquote bar +dirty-indicator: Unsaved changes indicator code-background: Code background code-border: Code border code-foreground: Code foreground diff --git a/core/language/en-GB/Import.multids b/core/language/en-GB/Import.multids new file mode 100644 index 000000000..536ace2aa --- /dev/null +++ b/core/language/en-GB/Import.multids @@ -0,0 +1,14 @@ +title: $:/language/Import/ + +Listing/Cancel/Caption: Cancel +Listing/Hint: These tiddlers are ready to import: +Listing/Import/Caption: Import +Listing/Select/Caption: Select +Listing/Status/Caption: Status +Listing/Title/Caption: Title +Upgrader/Plugins/Suppressed/Incompatible: Blocked incompatible or obsolete plugin +Upgrader/Plugins/Suppressed/Version: Blocked plugin (due to incoming <> being older than existing <>) +Upgrader/Plugins/Upgraded: Upgraded plugin from <> to <> +Upgrader/State/Suppressed: Blocked temporary state tiddler +Upgrader/System/Suppressed: Blocked system tiddler +Upgrader/ThemeTweaks/Created: Migrated theme tweak from <$text text=<>/> diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids index a58bf5bd5..ad8f3543c 100644 --- a/core/language/en-GB/Misc.multids +++ b/core/language/en-GB/Misc.multids @@ -8,6 +8,7 @@ ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<>/>"? ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<<title>>/>"? +DropMessage: Drop here (or click escape to cancel) InvalidFieldName: Illegal characters in field name "<$text text=<<fieldName>>/>". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`) MissingTiddler/Hint: Missing tiddler "<$text text=<<currentTiddler>>/>" - click {{$:/core/images/edit-button}} to create RecentChanges/DateFormat: DDth MMM YYYY @@ -30,3 +31,4 @@ TagManager/Colour/Heading: Colour TagManager/Count/Heading: Count TagManager/Icon/Heading: Icon TagManager/Tag/Heading: Tag +UnsavedChangesWarning: You have unsaved changes in TiddlyWiki diff --git a/core/language/en-GB/SideBar.multids b/core/language/en-GB/SideBar.multids index b2daeac2f..1ae4439dd 100644 --- a/core/language/en-GB/SideBar.multids +++ b/core/language/en-GB/SideBar.multids @@ -1,6 +1,7 @@ title: $:/language/SideBar/ All/Caption: All +Contents/Caption: Contents Drafts/Caption: Drafts Missing/Caption: Missing More/Caption: More @@ -10,8 +11,6 @@ Recent/Caption: Recent Shadows/Caption: Shadows System/Caption: System Tags/Caption: Tags -Tags/TagManager/Caption: Tag Manager Tags/Untagged/Caption: untagged Tools/Caption: Tools Types/Caption: Types - diff --git a/core/language/en-GB/TiddlerInfo.multids b/core/language/en-GB/TiddlerInfo.multids index 341cd9ffc..a395ce19b 100644 --- a/core/language/en-GB/TiddlerInfo.multids +++ b/core/language/en-GB/TiddlerInfo.multids @@ -18,3 +18,4 @@ References/Caption: References References/Empty: No tiddlers link to this one Tagging/Caption: Tagging Tagging/Empty: No tiddlers are tagged with this one +Tools/Caption: Tools diff --git a/core/language/en-GB/icon.tid b/core/language/en-GB/icon.tid new file mode 100644 index 000000000..1967b895f --- /dev/null +++ b/core/language/en-GB/icon.tid @@ -0,0 +1,13 @@ +title: $:/languages/en-GB/icon +type: image/svg+xml + +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30" width="1200" height="600"> +<clipPath id="t"> + <path d="M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"/> +</clipPath> +<path d="M0,0 v30 h60 v-30 z" fill="#00247d"/> +<path d="M0,0 L60,30 M60,0 L0,30" stroke="#fff" stroke-width="6"/> +<path d="M0,0 L60,30 M60,0 L0,30" clip-path="url(#t)" stroke="#cf142b" stroke-width="4"/> +<path d="M30,0 v30 M0,15 h60" stroke="#fff" stroke-width="10"/> +<path d="M30,0 v30 M0,15 h60" stroke="#cf142b" stroke-width="6"/> +</svg> diff --git a/core/modules/commander.js b/core/modules/commander.js index 8cf0d0b0b..35e45d12d 100644 --- a/core/modules/commander.js +++ b/core/modules/commander.js @@ -33,7 +33,10 @@ var Commander = function(commandTokens,callback,wiki,streams) { Add a string of tokens to the command queue */ Commander.prototype.addCommandTokens = function(commandTokens) { - Array.prototype.push.apply(this.commandTokens,commandTokens); + var params = commandTokens.slice(0); + params.unshift(0); + params.unshift(this.nextToken); + Array.prototype.splice.apply(this.commandTokens,params); }; /* diff --git a/core/modules/commands/init.js b/core/modules/commands/init.js index 674cde488..108124112 100644 --- a/core/modules/commands/init.js +++ b/core/modules/commands/init.js @@ -34,7 +34,7 @@ Command.prototype.execute = function() { for(var editionIndex=0; editionIndex<editions.length; editionIndex++) { var editionName = editions[editionIndex]; // Check the edition exists - var editionPath = path.resolve($tw.boot.corePath,$tw.config.editionsPath) + path.sep + editionName; + var editionPath = $tw.findLibraryItem(editionName,$tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar)); if(!$tw.utils.isDirectory(editionPath)) { return "Edition '" + editionName + "' not found"; } diff --git a/core/modules/commands/makelibrary.js b/core/modules/commands/makelibrary.js new file mode 100644 index 000000000..bb149fd16 --- /dev/null +++ b/core/modules/commands/makelibrary.js @@ -0,0 +1,70 @@ +/*\ +title: $:/core/modules/commands/makelibrary.js +type: application/javascript +module-type: command + +Command to pack all of the plugins in the library into a plugin tiddler of type "library" + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.info = { + name: "makelibrary", + synchronous: true +}; + +var UPGRADE_LIBRARY_TITLE = "$:/UpgradeLibrary"; + +var Command = function(params,commander,callback) { + this.params = params; + this.commander = commander; + this.callback = callback; +}; + +Command.prototype.execute = function() { + var wiki = this.commander.wiki, + fs = require("fs"), + path = require("path"), + upgradeLibraryTitle = this.params[0] || UPGRADE_LIBRARY_TITLE, + tiddlers = {}; + // Collect up the library plugins + var collectPlugins = function(folder) { + var pluginFolders = fs.readdirSync(folder); + for(var p=0; p<pluginFolders.length; p++) { + if(!$tw.boot.excludeRegExp.test(pluginFolders[p])) { + pluginFields = $tw.loadPluginFolder(path.resolve(folder,"./" + pluginFolders[p])); + if(pluginFields && pluginFields.title) { + tiddlers[pluginFields.title] = pluginFields; + } + } + } + }, + collectPublisherPlugins = function(folder) { + var publisherFolders = fs.readdirSync(folder); + for(var t=0; t<publisherFolders.length; t++) { + if(!$tw.boot.excludeRegExp.test(publisherFolders[t])) { + collectPlugins(path.resolve(folder,"./" + publisherFolders[t])); + } + } + }; + collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.pluginsPath)); + collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.themesPath)); + collectPlugins(path.resolve($tw.boot.corePath,$tw.config.languagesPath)); + // Save the upgrade library tiddler + var pluginFields = { + title: upgradeLibraryTitle, + type: "application/json", + "plugin-type": "library", + "text": JSON.stringify({tiddlers: tiddlers},null,$tw.config.preferences.jsonSpaces) + }; + wiki.addTiddler(new $tw.Tiddler(pluginFields)); + return null; +}; + +exports.Command = Command; + +})(); diff --git a/core/modules/filters.js b/core/modules/filters.js index 474928ba7..c9fae0b70 100644 --- a/core/modules/filters.js +++ b/core/modules/filters.js @@ -33,7 +33,7 @@ function parseFilterOperation(operators,filterString,p) { operator.prefix = filterString.charAt(p++); } // Get the operator name - var nextBracketPos = filterString.substring(p).search(/[\[\{\/]/); + var nextBracketPos = filterString.substring(p).search(/[\[\{<\/]/); if(nextBracketPos === -1) { throw "Missing [ in filter expression"; } @@ -54,24 +54,28 @@ function parseFilterOperation(operators,filterString,p) { p = nextBracketPos + 1; switch (bracket) { - case '{': // Curly brackets - operator.indirect = true; - nextBracketPos = filterString.indexOf('}',p); - break; - case '[': // Square brackets - nextBracketPos = filterString.indexOf(']',p); - break; - case '/': // regexp brackets - var rex = /^((?:[^\\\/]*|\\.)*)\/(?:\(([mygi]+)\))?/g, - rexMatch = rex.exec(filterString.substring(p)); - if(rexMatch) { - operator.regexp = new RegExp(rexMatch[1], rexMatch[2]); - nextBracketPos = p + rex.lastIndex - 1; - } - else { - throw "Unterminated regular expression in filter expression"; - } - break; + case "{": // Curly brackets + operator.indirect = true; + nextBracketPos = filterString.indexOf("}",p); + break; + case "[": // Square brackets + nextBracketPos = filterString.indexOf("]",p); + break; + case "<": // Angle brackets + operator.variable = true; + nextBracketPos = filterString.indexOf(">",p); + break; + case "/": // regexp brackets + var rex = /^((?:[^\\\/]*|\\.)*)\/(?:\(([mygi]+)\))?/g, + rexMatch = rex.exec(filterString.substring(p)); + if(rexMatch) { + operator.regexp = new RegExp(rexMatch[1], rexMatch[2]); + nextBracketPos = p + rex.lastIndex - 1; + } + else { + throw "Unterminated regular expression in filter expression"; + } + break; } if(nextBracketPos === -1) { @@ -193,6 +197,9 @@ exports.compileFilter = function(filterString) { if(operator.indirect) { operand = self.getTextReference(operator.operand,"",currTiddlerTitle); } + if(operator.variable) { + operand = widget.getVariable(operator.operand,{defaultValue: ""}); + } results = operatorFunction(accumulator,{ operator: operator.operator, operand: operand, diff --git a/core/modules/filters/plugintiddlers.js b/core/modules/filters/plugintiddlers.js index 22219a930..84d641587 100644 --- a/core/modules/filters/plugintiddlers.js +++ b/core/modules/filters/plugintiddlers.js @@ -18,7 +18,7 @@ Export our filter function exports.plugintiddlers = function(source,operator,options) { var results = []; source(function(tiddler,title) { - var pluginInfo = options.wiki.getPluginInfo(title); + var pluginInfo = options.wiki.getPluginInfo(title) || options.wiki.getTiddlerData(title,{tiddlers:[]}); if(pluginInfo) { $tw.utils.each(pluginInfo.tiddlers,function(fields,title) { results.push(title); diff --git a/core/modules/info/platform.js b/core/modules/info/platform.js new file mode 100644 index 000000000..f084d6c00 --- /dev/null +++ b/core/modules/info/platform.js @@ -0,0 +1,24 @@ +/*\ +title: $:/core/modules/info/platform.js +type: application/javascript +module-type: info + +Initialise basic platform $:/info/ tiddlers + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.getInfoTiddlerFields = function() { + var mapBoolean = function(value) {return value ? "yes" : "no"}, + infoTiddlerFields = []; + // Basics + infoTiddlerFields.push({title: "$:/info/browser", text: mapBoolean(!!$tw.browser)}); + infoTiddlerFields.push({title: "$:/info/node", text: mapBoolean(!!$tw.node)}); + return infoTiddlerFields; +}; + +})(); diff --git a/core/modules/parsers/parseutils.js b/core/modules/parsers/parseutils.js index baf1f93bf..c63e8f2c9 100644 --- a/core/modules/parsers/parseutils.js +++ b/core/modules/parsers/parseutils.js @@ -99,11 +99,13 @@ exports.parseStringLiteral = function(source,pos) { type: "string", start: pos }; - var reString = /(?:"([^"]*)")|(?:'([^']*)')/g; + var reString = /(?:"""([\s\S]*?)"""|"([^"]*)")|(?:'([^']*)')/g; reString.lastIndex = pos; var match = reString.exec(source); if(match && match.index === pos) { - node.value = match[1] === undefined ? match[2] : match[1]; + node.value = match[1] !== undefined ? match[1] :( + match[2] !== undefined ? match[2] : match[3] + ); node.end = pos + match[0].length; return node; } else { @@ -120,7 +122,7 @@ exports.parseMacroParameter = function(source,pos) { start: pos }; // Define our regexp - var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^\s>"'=]+)))/g; + var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^\s>"'=]+)))/g; // Skip whitespace pos = $tw.utils.skipWhiteSpace(source,pos); // Look for the parameter @@ -134,7 +136,9 @@ exports.parseMacroParameter = function(source,pos) { token.match[3] !== undefined ? token.match[3] : ( token.match[4] !== undefined ? token.match[4] : ( token.match[5] !== undefined ? token.match[5] : ( - "" + token.match[6] !== undefined ? token.match[6] : ( + "" + ) ) ) ) diff --git a/core/modules/parsers/wikiparser/rules/emphasis.js b/core/modules/parsers/wikiparser/rules/emphasis.js deleted file mode 100644 index 5950efbbe..000000000 --- a/core/modules/parsers/wikiparser/rules/emphasis.js +++ /dev/null @@ -1,79 +0,0 @@ -/*\ -title: $:/core/modules/parsers/wikiparser/rules/emphasis.js -type: application/javascript -module-type: wikirule - -Wiki text inline rule for emphasis. For example: - -``` - This is ''bold'' text - - This is //italic// text - - This is __underlined__ text - - This is ^^superscript^^ text - - This is ,,subscript,, text - - This is ~~strikethrough~~ text -``` - -\*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ -"use strict"; - -exports.name = "emphasis"; -exports.types = {inline: true}; - -exports.init = function(parser) { - this.parser = parser; - // Regexp to match - this.matchRegExp = /''|\/\/|__|\^\^|,,|~~/mg; -}; - -exports.parse = function() { - // Move past the match - this.parser.pos = this.matchRegExp.lastIndex; - // Figure out which element and closing regexp to use - var tag,reEnd; - switch(this.match[0]) { - case "''": // Bold - tag = "strong"; - reEnd = /''/mg; - break; - case "//": // Italics - tag = "em"; - reEnd = /\/\//mg; - break; - case "__": // Underline - tag = "u"; - reEnd = /__/mg; - break; - case "^^": // Superscript - tag = "sup"; - reEnd = /\^\^/mg; - break; - case ",,": // Subscript - tag = "sub"; - reEnd = /,,/mg; - break; - case "~~": // Strikethrough - tag = "strike"; - reEnd = /~~/mg; - break; - } - // Parse the run including the terminator - var tree = this.parser.parseInlineRun(reEnd,{eatTerminator: true}); - // Return the classed span - return [{ - type: "element", - tag: tag, - children: tree - }]; -}; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/emphasis/bold.js b/core/modules/parsers/wikiparser/rules/emphasis/bold.js new file mode 100644 index 000000000..3799feeb5 --- /dev/null +++ b/core/modules/parsers/wikiparser/rules/emphasis/bold.js @@ -0,0 +1,50 @@ +/*\ +title: $:/core/modules/parsers/wikiparser/rules/emphasis/bold.js +type: application/javascript +module-type: wikirule + +Wiki text inline rule for emphasis - bold. For example: + +``` + This is ''bold'' text +``` + +This wikiparser can be modified using the rules eg: + +``` +\rules except bold +\rules only bold +``` + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.name = "bold"; +exports.types = {inline: true}; + +exports.init = function(parser) { + this.parser = parser; + // Regexp to match + this.matchRegExp = /''/mg; +}; + +exports.parse = function() { + // Move past the match + this.parser.pos = this.matchRegExp.lastIndex; + + // Parse the run including the terminator + var tree = this.parser.parseInlineRun(/''/mg,{eatTerminator: true}); + + // Return the classed span + return [{ + type: "element", + tag: "strong", + children: tree + }]; +}; + +})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/emphasis/italic.js b/core/modules/parsers/wikiparser/rules/emphasis/italic.js new file mode 100644 index 000000000..3e0744c4d --- /dev/null +++ b/core/modules/parsers/wikiparser/rules/emphasis/italic.js @@ -0,0 +1,50 @@ +/*\ +title: $:/core/modules/parsers/wikiparser/rules/emphasis/italic.js +type: application/javascript +module-type: wikirule + +Wiki text inline rule for emphasis - italic. For example: + +``` + This is //italic// text +``` + +This wikiparser can be modified using the rules eg: + +``` +\rules except italic +\rules only italic +``` + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.name = "italic"; +exports.types = {inline: true}; + +exports.init = function(parser) { + this.parser = parser; + // Regexp to match + this.matchRegExp = /\/\//mg; +}; + +exports.parse = function() { + // Move past the match + this.parser.pos = this.matchRegExp.lastIndex; + + // Parse the run including the terminator + var tree = this.parser.parseInlineRun(/\/\//mg,{eatTerminator: true}); + + // Return the classed span + return [{ + type: "element", + tag: "em", + children: tree + }]; +}; + +})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js b/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js new file mode 100644 index 000000000..0fb34fc52 --- /dev/null +++ b/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js @@ -0,0 +1,50 @@ +/*\ +title: $:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js +type: application/javascript +module-type: wikirule + +Wiki text inline rule for emphasis - strikethrough. For example: + +``` + This is ~~strikethrough~~ text +``` + +This wikiparser can be modified using the rules eg: + +``` +\rules except strikethrough +\rules only strikethrough +``` + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.name = "strikethrough"; +exports.types = {inline: true}; + +exports.init = function(parser) { + this.parser = parser; + // Regexp to match + this.matchRegExp = /~~/mg; +}; + +exports.parse = function() { + // Move past the match + this.parser.pos = this.matchRegExp.lastIndex; + + // Parse the run including the terminator + var tree = this.parser.parseInlineRun(/~~/mg,{eatTerminator: true}); + + // Return the classed span + return [{ + type: "element", + tag: "strike", + children: tree + }]; +}; + +})(); diff --git a/core/modules/parsers/wikiparser/rules/emphasis/subscript.js b/core/modules/parsers/wikiparser/rules/emphasis/subscript.js new file mode 100644 index 000000000..12be0fbbc --- /dev/null +++ b/core/modules/parsers/wikiparser/rules/emphasis/subscript.js @@ -0,0 +1,50 @@ +/*\ +title: $:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js +type: application/javascript +module-type: wikirule + +Wiki text inline rule for emphasis - subscript. For example: + +``` + This is ,,subscript,, text +``` + +This wikiparser can be modified using the rules eg: + +``` +\rules except subscript +\rules only subscript +``` + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.name = "subscript"; +exports.types = {inline: true}; + +exports.init = function(parser) { + this.parser = parser; + // Regexp to match + this.matchRegExp = /,,/mg; +}; + +exports.parse = function() { + // Move past the match + this.parser.pos = this.matchRegExp.lastIndex; + + // Parse the run including the terminator + var tree = this.parser.parseInlineRun(/,,/mg,{eatTerminator: true}); + + // Return the classed span + return [{ + type: "element", + tag: "sub", + children: tree + }]; +}; + +})(); diff --git a/core/modules/parsers/wikiparser/rules/emphasis/superscript.js b/core/modules/parsers/wikiparser/rules/emphasis/superscript.js new file mode 100644 index 000000000..5a5330d8c --- /dev/null +++ b/core/modules/parsers/wikiparser/rules/emphasis/superscript.js @@ -0,0 +1,50 @@ +/*\ +title: $:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js +type: application/javascript +module-type: wikirule + +Wiki text inline rule for emphasis - superscript. For example: + +``` + This is ^^superscript^^ text +``` + +This wikiparser can be modified using the rules eg: + +``` +\rules except superscript +\rules only superscript +``` + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.name = "superscript"; +exports.types = {inline: true}; + +exports.init = function(parser) { + this.parser = parser; + // Regexp to match + this.matchRegExp = /\^\^/mg; +}; + +exports.parse = function() { + // Move past the match + this.parser.pos = this.matchRegExp.lastIndex; + + // Parse the run including the terminator + var tree = this.parser.parseInlineRun(/\^\^/mg,{eatTerminator: true}); + + // Return the classed span + return [{ + type: "element", + tag: "sup", + children: tree + }]; +}; + +})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/emphasis/underscore.js b/core/modules/parsers/wikiparser/rules/emphasis/underscore.js new file mode 100644 index 000000000..d36bd242d --- /dev/null +++ b/core/modules/parsers/wikiparser/rules/emphasis/underscore.js @@ -0,0 +1,50 @@ +/*\ +title: $:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js +type: application/javascript +module-type: wikirule + +Wiki text inline rule for emphasis - underscore. For example: + +``` + This is __underscore__ text +``` + +This wikiparser can be modified using the rules eg: + +``` +\rules except underscore +\rules only underscore +``` + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.name = "underscore"; +exports.types = {inline: true}; + +exports.init = function(parser) { + this.parser = parser; + // Regexp to match + this.matchRegExp = /__/mg; +}; + +exports.parse = function() { + // Move past the match + this.parser.pos = this.matchRegExp.lastIndex; + + // Parse the run including the terminator + var tree = this.parser.parseInlineRun(/__/mg,{eatTerminator: true}); + + // Return the classed span + return [{ + type: "element", + tag: "u", + children: tree + }]; +}; + +})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/html.js b/core/modules/parsers/wikiparser/rules/html.js index 0062d5988..71cdfd5dc 100644 --- a/core/modules/parsers/wikiparser/rules/html.js +++ b/core/modules/parsers/wikiparser/rules/html.js @@ -48,7 +48,7 @@ exports.parse = function() { // Advance the parser position to past the tag this.parser.pos = tag.end; // Check for an immediately following double linebreak - var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n]*\r?\n(?:[^\S\n]*\r?\n|$))/g); + var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g); // Set whether we're in block mode tag.isBlock = this.is.block || hasLineBreak; // Parse the body if we need to @@ -125,7 +125,7 @@ exports.parseTag = function(source,pos,options) { pos = token.end; // Check for a required line break if(options.requireLineBreak) { - token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n]*\r?\n(?:[^\S\n]*\r?\n|$))/g); + token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g); if(!token) { return null; } diff --git a/core/modules/parsers/wikiparser/rules/macrocallblock.js b/core/modules/parsers/wikiparser/rules/macrocallblock.js index 2a23ed777..d99c15a6c 100644 --- a/core/modules/parsers/wikiparser/rules/macrocallblock.js +++ b/core/modules/parsers/wikiparser/rules/macrocallblock.js @@ -35,12 +35,12 @@ exports.parse = function() { // Move past the macro call this.parser.pos = this.matchRegExp.lastIndex; var params = [], - reParam = /\s*(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^"'\s]+)))/mg, + reParam = /\s*(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^"'\s]+)))/mg, paramMatch = reParam.exec(paramString); while(paramMatch) { // Process this parameter var paramInfo = { - value: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] + value: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6] }; if(paramMatch[1]) { paramInfo.name = paramMatch[1]; diff --git a/core/modules/parsers/wikiparser/rules/macrocallinline.js b/core/modules/parsers/wikiparser/rules/macrocallinline.js index 54b953339..6e96d45b7 100644 --- a/core/modules/parsers/wikiparser/rules/macrocallinline.js +++ b/core/modules/parsers/wikiparser/rules/macrocallinline.js @@ -35,12 +35,12 @@ exports.parse = function() { // Move past the macro call this.parser.pos = this.matchRegExp.lastIndex; var params = [], - reParam = /\s*(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^"'\s]+)))/mg, + reParam = /\s*(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^"'\s]+)))/mg, paramMatch = reParam.exec(paramString); while(paramMatch) { // Process this parameter var paramInfo = { - value: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] + value: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5]|| paramMatch[6] }; if(paramMatch[1]) { paramInfo.name = paramMatch[1]; diff --git a/core/modules/parsers/wikiparser/rules/macrodef.js b/core/modules/parsers/wikiparser/rules/macrodef.js index fa91c50a6..a57e62c37 100644 --- a/core/modules/parsers/wikiparser/rules/macrodef.js +++ b/core/modules/parsers/wikiparser/rules/macrodef.js @@ -27,7 +27,7 @@ Instantiate parse rule exports.init = function(parser) { this.parser = parser; // Regexp to match - this.matchRegExp = /^\\define\s+([^(\s]+)\(\s*([^)]*)\)(\r?\n)?/mg; + this.matchRegExp = /^\\define\s+([^(\s]+)\(\s*([^)]*)\)(\s*\r?\n)?/mg; }; /* @@ -40,12 +40,12 @@ exports.parse = function() { var paramString = this.match[2], params = []; if(paramString !== "") { - var reParam = /\s*([A-Za-z0-9\-_]+)(?:\s*:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^"'\s]+)))?/mg, + var reParam = /\s*([A-Za-z0-9\-_]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^"'\s]+)))?/mg, paramMatch = reParam.exec(paramString); while(paramMatch) { // Save the parameter details var paramInfo = {name: paramMatch[1]}, - defaultValue = paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5]; + defaultValue = paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6]; if(defaultValue) { paramInfo["default"] = defaultValue; } @@ -58,7 +58,7 @@ exports.parse = function() { var reEnd; if(this.match[3]) { // If so, the end of the body is marked with \end - reEnd = /(\r?\n\\end\r?\n)/mg; + reEnd = /(\r?\n\\end(?:$|\r?\n))/mg; } else { // Otherwise, the end of the definition is marked by the end of the line reEnd = /(\r?\n)/mg; diff --git a/core/modules/parsers/wikiparser/rules/wikilink.js b/core/modules/parsers/wikiparser/rules/wikilink.js index 152b4e193..f4b543896 100644 --- a/core/modules/parsers/wikiparser/rules/wikilink.js +++ b/core/modules/parsers/wikiparser/rules/wikilink.js @@ -24,10 +24,10 @@ exports.name = "wikilink"; exports.types = {inline: true}; var textPrimitives = { - upperLetter: "[A-Z\u00c0-\u00de\u0150\u0170]", - lowerLetter: "[a-z0-9_\\-\u00df-\u00ff\u0151\u0171]", - anyLetter: "[A-Za-z0-9_\\-\u00c0-\u00de\u00df-\u00ff\u0150\u0170\u0151\u0171]", - anyLetterStrict: "[A-Za-z0-9\u00c0-\u00de\u00df-\u00ff\u0150\u0170\u0151\u0171]" + upperLetter: "[A-Z\u00c0-\u00d6\u00d8-\u00de\u0150\u0170]", + lowerLetter: "[a-z0-9\u00df-\u00f6\u00f8-\u00ff\u0151\u0171]", + anyLetter: "[A-Za-z0-9\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]", + blockPrefixLetters: "[A-Za-z0-9\-_\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]" }; textPrimitives.unWikiLink = "~"; @@ -54,9 +54,9 @@ exports.parse = function() { if(linkText.substr(0,1) === textPrimitives.unWikiLink) { return [{type: "text", text: linkText.substr(1)}]; } - // If the link has been preceded with a letter then don't treat it as a link + // If the link has been preceded with a blocked letter then don't treat it as a link if(this.match.index > 0) { - var preRegExp = new RegExp(textPrimitives.anyLetterStrict,"mg"); + var preRegExp = new RegExp(textPrimitives.blockPrefixLetters,"mg"); preRegExp.lastIndex = this.match.index-1; var preMatch = preRegExp.exec(this.parser.source); if(preMatch && preMatch.index === this.match.index-1) { diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js new file mode 100644 index 000000000..98ff08bdb --- /dev/null +++ b/core/modules/saver-handler.js @@ -0,0 +1,177 @@ +/*\ +title: $:/core/modules/saver-handler.js +type: application/javascript +module-type: global + +The saver handler tracks changes to the store and handles saving the entire wiki via saver modules. + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Instantiate the saver handler with the following options: +wiki: wiki to be synced +dirtyTracking: true if dirty tracking should be performed +*/ +function SaverHandler(options) { + var self = this; + this.wiki = options.wiki; + this.dirtyTracking = options.dirtyTracking; + // Make a logger + this.logger = new $tw.utils.Logger("saver-handler"); + // Initialise our savers + if($tw.browser) { + this.initSavers(); + } + // Only do dirty tracking if required + if(this.dirtyTracking) { + // Compile the dirty tiddler filter + this.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter)); + // Count of tiddlers that have been changed but not yet saved + this.numTasksInQueue = 0; + // Listen out for changes to tiddlers + this.wiki.addEventListener("change",function(changes) { + var filteredChanges = self.filterFn.call(self.wiki,function(callback) { + $tw.utils.each(changes,function(change,title) { + var tiddler = self.wiki.getTiddler(title); + callback(tiddler,title); + }); + }); + self.numTasksInQueue += filteredChanges.length; + self.updateDirtyStatus(); + }); + // Browser event handlers + if($tw.browser) { + // Set up our beforeunload handler + window.addEventListener("beforeunload",function(event) { + var confirmationMessage = undefined; + if(self.isDirty()) { + confirmationMessage = $tw.language.getString("UnsavedChangesWarning"); + event.returnValue = confirmationMessage; // Gecko + } + return confirmationMessage; + }); + } + } + // Install the save action handlers + if($tw.browser) { + $tw.rootWidget.addEventListener("tw-save-wiki",function(event) { + self.saveWiki({ + template: event.param, + downloadType: "text/plain" + }); + }); + $tw.rootWidget.addEventListener("tw-auto-save-wiki",function(event) { + self.saveWiki({ + method: "autosave", + template: event.param, + downloadType: "text/plain" + }); + }); + $tw.rootWidget.addEventListener("tw-download-file",function(event) { + self.saveWiki({ + method: "download", + template: event.param, + downloadType: "text/plain" + }); + }); + } +} + +SaverHandler.prototype.titleSyncFilter = "$:/config/SyncFilter"; +SaverHandler.prototype.titleAutoSave = "$:/config/AutoSave"; +SaverHandler.prototype.titleSavedNotification = "$:/language/Notifications/Save/Done"; + +/* +Select the appropriate saver modules and set them up +*/ +SaverHandler.prototype.initSavers = function(moduleType) { + moduleType = moduleType || "saver"; + // Instantiate the available savers + this.savers = []; + var self = this; + $tw.modules.forEachModuleOfType(moduleType,function(title,module) { + if(module.canSave(self)) { + self.savers.push(module.create(self.wiki)); + } + }); + // Sort the savers into priority order + this.savers.sort(function(a,b) { + if(a.info.priority < b.info.priority) { + return -1; + } else { + if(a.info.priority > b.info.priority) { + return +1; + } else { + return 0; + } + } + }); +}; + +/* +Save the wiki contents. Options are: + method: "save" or "download" + template: the tiddler containing the template to save + downloadType: the content type for the saved file +*/ +SaverHandler.prototype.saveWiki = function(options) { + options = options || {}; + var self = this, + method = options.method || "save", + template = options.template || "$:/core/save/all", + downloadType = options.downloadType || "text/plain", + text = this.wiki.renderTiddler(downloadType,template), + callback = function(err) { + if(err) { + alert("Error while saving:\n\n" + err); + } else { + $tw.notifier.display(self.titleSavedNotification); + if(options.callback) { + options.callback(); + } + } + }; + // Ignore autosave if disabled + if(method === "autosave" && this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes") { + return false; + } + // Call the highest priority saver that supports this method + for(var t=this.savers.length-1; t>=0; t--) { + var saver = this.savers[t]; + if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback)) { + this.logger.log("Saving wiki with method",method,"through saver",saver.info.name); + // Clear the task queue if we're saving (rather than downloading) + if(method !== "download") { + this.numTasksInQueue = 0; + this.updateDirtyStatus(); + } + return true; + } + } + return false; +}; + +/* +Checks whether the wiki is dirty (ie the window shouldn't be closed) +*/ +SaverHandler.prototype.isDirty = function() { + return this.numTasksInQueue > 0; +}; + +/* +Update the document body with the class "tw-dirty" if the wiki has unsaved/unsynced changes +*/ +SaverHandler.prototype.updateDirtyStatus = function() { + if($tw.browser) { + $tw.utils.toggleClass(document.body,"tw-dirty",this.isDirty()); + } +}; + +exports.SaverHandler = SaverHandler; + +})(); diff --git a/core/modules/startup/info.js b/core/modules/startup/info.js new file mode 100644 index 000000000..1ebf568f4 --- /dev/null +++ b/core/modules/startup/info.js @@ -0,0 +1,48 @@ +/*\ +title: $:/core/modules/startup/info.js +type: application/javascript +module-type: startup + +Initialise $:/info tiddlers via $:/temp/info-plugin pseudo-plugin + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +// Export name and synchronous status +exports.name = "info"; +exports.before = ["startup"]; +exports.after = ["load-modules"]; +exports.synchronous = true; + +exports.startup = function() { + // Collect up the info tiddlers + var infoTiddlerFields = {}; + // Give each info module a chance to fill in as many info tiddlers as they want + $tw.modules.forEachModuleOfType("info",function(title,moduleExports) { + if(moduleExports && moduleExports.getInfoTiddlerFields) { + var tiddlerFieldsArray = moduleExports.getInfoTiddlerFields(infoTiddlerFields); + $tw.utils.each(tiddlerFieldsArray,function(fields) { + if(fields) { + infoTiddlerFields[fields.title] = fields; + } + }); + } + }); + // Bake the info tiddlers into a plugin + var fields = { + title: "$:/temp/info-plugin", + type: "application/json", + "plugin-type": "info", + text: JSON.stringify({tiddlers: infoTiddlerFields},null,$tw.config.preferences.jsonSpaces) + }; + $tw.wiki.addTiddler(new $tw.Tiddler(fields)); + $tw.wiki.readPluginInfo(); + $tw.wiki.registerPluginTiddlers("info"); + $tw.wiki.unpackPluginTiddlers(); +}; + +})(); diff --git a/core/modules/startup/password.js b/core/modules/startup/password.js index a6d586401..3ff7e26c7 100644 --- a/core/modules/startup/password.js +++ b/core/modules/startup/password.js @@ -15,7 +15,7 @@ Password handling // Export name and synchronous status exports.name = "password"; exports.platforms = ["browser"]; -exports.after = ["rootwidget"]; +exports.after = ["startup"]; exports.synchronous = true; exports.startup = function() { diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index 5df33a908..f28d5b776 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -15,21 +15,11 @@ Setup the root widget and the core root widget handlers // Export name and synchronous status exports.name = "rootwidget"; exports.platforms = ["browser"]; -exports.after = ["load-modules"]; +exports.after = ["startup"]; exports.before = ["story"]; exports.synchronous = true; -var widget = require("$:/core/modules/widgets/widget.js"); - exports.startup = function() { - // Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers - $tw.rootWidget = new widget.widget({ - type: "widget", - children: [] - },{ - wiki: $tw.wiki, - document: document - }); // Install the modal message mechanism $tw.modal = new $tw.utils.Modal($tw.wiki); $tw.rootWidget.addEventListener("tw-modal",function(event) { @@ -45,27 +35,16 @@ exports.startup = function() { $tw.rootWidget.addEventListener("tw-scroll",function(event) { $tw.pageScroller.handleEvent(event); }); - // Install the save action handlers - $tw.rootWidget.addEventListener("tw-save-wiki",function(event) { - $tw.syncer.saveWiki({ - template: event.param, - downloadType: "text/plain" + var fullscreen = $tw.utils.getFullScreenApis(); + if(fullscreen) { + $tw.rootWidget.addEventListener("tw-full-screen",function(event) { + if(document[fullscreen._fullscreenElement]) { + document[fullscreen._exitFullscreen](); + } else { + document.documentElement[fullscreen._requestFullscreen](Element.ALLOW_KEYBOARD_INPUT); + } }); - }); - $tw.rootWidget.addEventListener("tw-auto-save-wiki",function(event) { - $tw.syncer.saveWiki({ - method: "autosave", - template: event.param, - downloadType: "text/plain" - }); - }); - $tw.rootWidget.addEventListener("tw-download-file",function(event) { - $tw.syncer.saveWiki({ - method: "download", - template: event.param, - downloadType: "text/plain" - }); - }); + } // If we're being viewed on a data: URI then give instructions for how to save if(document.location.protocol === "data:") { $tw.rootWidget.dispatchEvent({ diff --git a/core/modules/startup.js b/core/modules/startup/startup.js similarity index 62% rename from core/modules/startup.js rename to core/modules/startup/startup.js index c0dc16db4..377974ad6 100755 --- a/core/modules/startup.js +++ b/core/modules/startup/startup.js @@ -3,7 +3,7 @@ title: $:/core/modules/startup.js type: application/javascript module-type: startup -This is the main application logic for both the client and server +Miscellaneous startup logic for both the client and server. \*/ (function(){ @@ -20,6 +20,8 @@ exports.synchronous = true; // Set to `true` to enable performance instrumentation var PERFORMANCE_INSTRUMENTATION = false; +var widget = require("$:/core/modules/widgets/widget.js"); + exports.startup = function() { var modules,n,m,f; if($tw.browser) { @@ -50,19 +52,31 @@ exports.startup = function() { }); // Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup $tw.wiki.clearTiddlerEventQueue(); - // Set up the syncer object - $tw.syncer = new $tw.Syncer({wiki: $tw.wiki}); + // Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers + if($tw.browser) { + $tw.rootWidget = new widget.widget({ + type: "widget", + children: [] + },{ + wiki: $tw.wiki, + document: document + }); + } + // Find a working syncadaptor + $tw.syncadaptor = undefined; + $tw.modules.forEachModuleOfType("syncadaptor",function(title,module) { + if(!$tw.syncadaptor && module.adaptorClass) { + $tw.syncadaptor = new module.adaptorClass({wiki: $tw.wiki}); + } + }); + // Set up the syncer object if we've got a syncadaptor + if($tw.syncadaptor) { + $tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor}); + } + // Setup the saver handler + $tw.saverHandler = new $tw.SaverHandler({wiki: $tw.wiki, dirtyTracking: !$tw.syncadaptor}); // Host-specific startup if($tw.browser) { - // Set up our beforeunload handler - window.addEventListener("beforeunload",function(event) { - var confirmationMessage = undefined; - if($tw.syncer.isDirty()) { - confirmationMessage = "You have unsaved changes in TiddlyWiki"; - event.returnValue = confirmationMessage; // Gecko - } - return confirmationMessage; - }); // Install the popup manager $tw.popup = new $tw.utils.Popup({ rootElement: document.body diff --git a/core/modules/startup/story.js b/core/modules/startup/story.js index 3aff4ff85..fb23b2191 100644 --- a/core/modules/startup/story.js +++ b/core/modules/startup/story.js @@ -35,7 +35,10 @@ exports.startup = function() { // Set up location hash update $tw.wiki.addEventListener("change",function(changes) { if($tw.utils.hop(changes,DEFAULT_STORY_TITLE) || $tw.utils.hop(changes,DEFAULT_HISTORY_TITLE)) { - updateLocationHash(); + updateLocationHash({ + updateAddressBar: $tw.wiki.getTiddlerText(CONFIG_UPDATE_ADDRESS_BAR,"permaview").trim(), + updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim() + }); } }); // Listen for changes to the browser location hash @@ -46,12 +49,34 @@ exports.startup = function() { openStartupTiddlers({defaultToCurrentStory: true}); } },false) + // Listen for the tw-browser-refresh message + $tw.rootWidget.addEventListener("tw-browser-refresh",function(event) { + window.location.hash = ""; + window.location.reload(true); + }); // Listen for the tw-home message $tw.rootWidget.addEventListener("tw-home",function(event) { + window.location.hash = ""; var storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE), storyList = $tw.wiki.filterTiddlers(storyFilter); $tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: "", list: storyList},$tw.wiki.getModificationFields()); }); + // Listen for the tw-permalink message + $tw.rootWidget.addEventListener("tw-permalink",function(event) { + updateLocationHash({ + updateAddressBar: "permalink", + updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(), + targetTiddler: event.param || event.tiddlerTitle + }); + }); + // Listen for the tw-permaview message + $tw.rootWidget.addEventListener("tw-permaview",function(event) { + updateLocationHash({ + updateAddressBar: "permaview", + updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(), + targetTiddler: event.param || event.tiddlerTitle + }); + }); } }; @@ -107,30 +132,39 @@ function openStartupTiddlers(options) { } } -function updateLocationHash() { - var updateAddressBar = $tw.wiki.getTiddlerText(CONFIG_UPDATE_ADDRESS_BAR,"permaview").trim(); - if(updateAddressBar !== "no") { +/* +options: See below +options.updateAddressBar: "permalink", "permaview" or "no" (defaults to "permaview") +options.updateHistory: "yes" or "no" (defaults to "no") +options.targetTiddler: optional title of target tiddler for permalink +*/ +function updateLocationHash(options) { + if(options.updateAddressBar !== "no") { // Get the story and the history stack var storyList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE), - historyList = $tw.wiki.getTiddlerData(DEFAULT_HISTORY_TITLE,[]); - var targetTiddler = ""; - // The target tiddler is the one at the top of the stack - if(historyList.length > 0) { - targetTiddler = historyList[historyList.length-1].title; - } - // Blank the target tiddler if it isn't present in the story - if(storyList.indexOf(targetTiddler) === -1) { + historyList = $tw.wiki.getTiddlerData(DEFAULT_HISTORY_TITLE,[]), targetTiddler = ""; + if(options.targetTiddler) { + targetTiddler = options.targetTiddler; + } else { + // The target tiddler is the one at the top of the stack + if(historyList.length > 0) { + targetTiddler = historyList[historyList.length-1].title; + } + // Blank the target tiddler if it isn't present in the story + if(storyList.indexOf(targetTiddler) === -1) { + targetTiddler = ""; + } } // Assemble the location hash - if(updateAddressBar === "permalink") { + if(options.updateAddressBar === "permalink") { $tw.locationHash = "#" + encodeURIComponent(targetTiddler) } else { $tw.locationHash = "#" + encodeURIComponent(targetTiddler) + ":" + encodeURIComponent($tw.utils.stringifyList(storyList)); } // Only change the location hash if we must, thus avoiding unnecessary onhashchange events if($tw.utils.getLocationHash() !== $tw.locationHash) { - if($tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim() === "yes") { + if(options.updateHistory === "yes") { // Assign the location hash so that history is updated window.location.hash = $tw.locationHash; } else { diff --git a/core/modules/startup/syncer-browser.js b/core/modules/startup/syncer-browser.js deleted file mode 100644 index a79c5e631..000000000 --- a/core/modules/startup/syncer-browser.js +++ /dev/null @@ -1,34 +0,0 @@ -/*\ -title: $:/core/modules/startup/syncer-browser.js -type: application/javascript -module-type: startup - -Startup handling - -\*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ -"use strict"; - -// Export name and synchronous status -exports.name = "syncer-browser"; -exports.platforms = ["browser"]; -exports.after = ["rootwidget"]; -exports.synchronous = true; - -exports.startup = function() { - // Listen out for login/logout/refresh events in the browser - $tw.rootWidget.addEventListener("tw-login",function() { - $tw.syncer.handleLoginEvent(); - }); - $tw.rootWidget.addEventListener("tw-logout",function() { - $tw.syncer.handleLogoutEvent(); - }); - $tw.rootWidget.addEventListener("tw-server-refresh",function() { - $tw.syncer.handleRefreshEvent(); - }); -}; - -})(); diff --git a/core/modules/storyviews/classic.js b/core/modules/storyviews/classic.js index 9728ce4a1..90fab15a1 100644 --- a/core/modules/storyviews/classic.js +++ b/core/modules/storyviews/classic.js @@ -12,6 +12,8 @@ Views the story as a linear sequence /*global $tw: false */ "use strict"; +var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/#easeInOutCubic + var ClassicStoryView = function(listWidget) { this.listWidget = listWidget; } @@ -51,8 +53,8 @@ ClassicStoryView.prototype.insert = function(widget) { $tw.utils.forceLayout(targetElement); // Transition to the final position $tw.utils.setStyle(targetElement,[ - {transition: "opacity " + duration + "ms ease-in-out, " + - "margin-bottom " + duration + "ms ease-in-out"}, + {transition: "opacity " + duration + "ms " + easing + ", " + + "margin-bottom " + duration + "ms " + easing}, {marginBottom: currMarginBottom + "px"}, {opacity: "1.0"} ]); @@ -80,9 +82,9 @@ ClassicStoryView.prototype.remove = function(widget) { ]); $tw.utils.forceLayout(targetElement); $tw.utils.setStyle(targetElement,[ - {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms ease-in-out, " + - "opacity " + duration + "ms ease-in-out, " + - "margin-bottom " + duration + "ms ease-in-out"}, + {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", " + + "opacity " + duration + "ms " + easing + ", " + + "margin-bottom " + duration + "ms " + easing}, {transform: "translateX(-" + currWidth + "px)"}, {marginBottom: (-currHeight) + "px"}, {opacity: "0.0"} diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js index 7f210a7c8..42683566b 100644 --- a/core/modules/storyviews/zoomin.js +++ b/core/modules/storyviews/zoomin.js @@ -12,6 +12,8 @@ Zooms between individual tiddlers /*global $tw: false */ "use strict"; +var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/#easeInOutCubic + var ZoominListView = function(listWidget) { var self = this; this.listWidget = listWidget; @@ -77,7 +79,7 @@ ZoominListView.prototype.navigateTo = function(historyInfo) { this.currentTiddlerDomNode = targetElement; // Transform the target tiddler to its natural size $tw.utils.setStyle(targetElement,[ - {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms ease-in, opacity " + duration + "ms ease-in"}, + {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing}, {opacity: "1.0"}, {transform: "translateX(0px) translateY(0px) scale(1)"}, {zIndex: "500"}, @@ -88,7 +90,7 @@ ZoominListView.prototype.navigateTo = function(historyInfo) { x = zoomBounds.left - targetBounds.left - (sourceBounds.left - targetBounds.left) * scale; y = zoomBounds.top - targetBounds.top - (sourceBounds.top - targetBounds.top) * scale; $tw.utils.setStyle(prevCurrentTiddler,[ - {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms ease-in, opacity " + duration + "ms ease-in"}, + {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing}, {opacity: "0.0"}, {transformOrigin: "0 0"}, {transform: "translateX(" + x + "px) translateY(" + y + "px) scale(" + scale + ")"}, @@ -151,7 +153,7 @@ ZoominListView.prototype.remove = function(widget) { {display: "block"}, {transformOrigin: "50% 50%"}, {transform: "translateX(0px) translateY(0px) scale(10)"}, - {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms ease-in, opacity " + duration + "ms ease-in"}, + {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing}, {opacity: "0"}, {zIndex: "500"} ]); @@ -164,7 +166,7 @@ ZoominListView.prototype.remove = function(widget) { $tw.utils.setStyle(targetElement,[ {transformOrigin: "50% 50%"}, {transform: "translateX(0px) translateY(0px) scale(0.1)"}, - {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms ease-in, opacity " + duration + "ms ease-in"}, + {transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing}, {opacity: "0"}, {zIndex: "0"} ]); diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 60caf0983..b92d7a478 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -14,24 +14,15 @@ The syncer tracks changes to the store. If a syncadaptor is used then individual /* Instantiate the syncer with the following options: +syncadaptor: reference to syncadaptor to be used wiki: wiki to be synced */ function Syncer(options) { var self = this; this.wiki = options.wiki; + this.syncadaptor = options.syncadaptor // Make a logger this.logger = new $tw.utils.Logger("syncer" + ($tw.browser ? "-browser" : "") + ($tw.node ? "-server" : "")); - // Find a working syncadaptor - this.syncadaptor = undefined; - $tw.modules.forEachModuleOfType("syncadaptor",function(title,module) { - if(!self.syncadaptor && module.adaptorClass) { - self.syncadaptor = new module.adaptorClass(self); - } - }); - // Initialise our savers - if($tw.browser) { - this.initSavers(); - } // Compile the dirty tiddler filter this.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter)); // Record information for known tiddlers @@ -45,12 +36,32 @@ function Syncer(options) { this.wiki.addEventListener("change",function(changes) { self.syncToServer(changes); }); - // Listen out for lazyLoad events - if(this.syncadaptor) { - this.wiki.addEventListener("lazyLoad",function(title) { - self.handleLazyLoadEvent(title); + // Browser event handlers + if($tw.browser) { + // Set up our beforeunload handler + window.addEventListener("beforeunload",function(event) { + var confirmationMessage = undefined; + if(self.isDirty()) { + confirmationMessage = $tw.language.getString("UnsavedChangesWarning"); + event.returnValue = confirmationMessage; // Gecko + } + return confirmationMessage; + }); + // Listen out for login/logout/refresh events in the browser + $tw.rootWidget.addEventListener("tw-login",function() { + self.handleLoginEvent(); + }); + $tw.rootWidget.addEventListener("tw-logout",function() { + self.handleLogoutEvent(); + }); + $tw.rootWidget.addEventListener("tw-server-refresh",function() { + self.handleRefreshEvent(); }); } + // Listen out for lazyLoad events + this.wiki.addEventListener("lazyLoad",function(title) { + self.handleLazyLoadEvent(title); + }); // Get the login status this.getStatus(function (err,isLoggedIn) { // Do a sync from the server @@ -64,13 +75,13 @@ Constants Syncer.prototype.titleIsLoggedIn = "$:/status/IsLoggedIn"; Syncer.prototype.titleUserName = "$:/status/UserName"; Syncer.prototype.titleSyncFilter = "$:/config/SyncFilter"; -Syncer.prototype.titleAutoSave = "$:/config/AutoSave"; Syncer.prototype.titleSavedNotification = "$:/language/Notifications/Save/Done"; Syncer.prototype.taskTimerInterval = 1 * 1000; // Interval for sync timer Syncer.prototype.throttleInterval = 1 * 1000; // Defer saving tiddlers if they've changed in the last 1s... Syncer.prototype.fallbackInterval = 10 * 1000; // Unless the task is older than 10s Syncer.prototype.pollTimerInterval = 60 * 1000; // Interval for polling for changes from the adaptor + /* Read (or re-read) the latest tiddler info from the store */ @@ -90,78 +101,6 @@ Syncer.prototype.readTiddlerInfo = function() { }); }; -/* -Select the appropriate saver modules and set them up -*/ -Syncer.prototype.initSavers = function(moduleType) { - moduleType = moduleType || "saver"; - // Instantiate the available savers - this.savers = []; - var self = this; - $tw.modules.forEachModuleOfType(moduleType,function(title,module) { - if(module.canSave(self)) { - self.savers.push(module.create(self.wiki)); - } - }); - // Sort the savers into priority order - this.savers.sort(function(a,b) { - if(a.info.priority < b.info.priority) { - return -1; - } else { - if(a.info.priority > b.info.priority) { - return +1; - } else { - return 0; - } - } - }); -}; - -/* -Save the wiki contents. Options are: - method: "save" or "download" - template: the tiddler containing the template to save - downloadType: the content type for the saved file -*/ -Syncer.prototype.saveWiki = function(options) { - options = options || {}; - var self = this, - method = options.method || "save", - template = options.template || "$:/core/save/all", - downloadType = options.downloadType || "text/plain", - text = this.wiki.renderTiddler(downloadType,template), - callback = function(err) { - if(err) { - alert("Error while saving:\n\n" + err); - } else { - $tw.notifier.display(self.titleSavedNotification); - if(options.callback) { - options.callback(); - } - } - }; - // Ignore autosave if we've got a syncadaptor or autosave is disabled - if(method === "autosave") { - if(this.syncadaptor || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes") { - return false; - } - } - // Call the highest priority saver that supports this method - for(var t=this.savers.length-1; t>=0; t--) { - var saver = this.savers[t]; - if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback)) { - this.logger.log("Saving wiki with method",method,"through saver",saver.info.name); - // Clear the task queue if we're saving (rather than downloading) - if(method !== "download") { - this.readTiddlerInfo(); - this.taskQueue = {}; - } - return true; - } - } - return false; -}; - /* Checks whether the wiki is dirty (ie the window shouldn't be closed) */ @@ -169,6 +108,15 @@ Syncer.prototype.isDirty = function() { return (this.numTasksInQueue() > 0) || (this.numTasksInProgress() > 0); }; +/* +Update the document body with the class "tw-dirty" if the wiki has unsaved/unsynced changes +*/ +Syncer.prototype.updateDirtyStatus = function() { + if($tw.browser) { + $tw.utils.toggleClass(document.body,"tw-dirty",this.isDirty()); + } +}; + /* Save an incoming tiddler in the store, and updates the associated tiddlerInfo */ @@ -401,11 +349,10 @@ Syncer.prototype.enqueueSyncTask = function(task) { // this.logger.log("Queuing up sync task with type:",task.type,"title:",task.title); // If it is not in the queue, insert it this.taskQueue[task.title] = task; + this.updateDirtyStatus(); } // Process the queue - if(this.syncadaptor) { - $tw.utils.nextTick(function() {self.processTaskQueue.call(self);}); - } + $tw.utils.nextTick(function() {self.processTaskQueue.call(self);}); }; /* @@ -449,6 +396,7 @@ Syncer.prototype.processTaskQueue = function() { // Remove the task from the queue and add it to the in progress list delete this.taskQueue[task.title]; this.taskInProgress[task.title] = task; + this.updateDirtyStatus(); // Dispatch the task this.dispatchTask(task,function(err) { if(err) { @@ -456,6 +404,7 @@ Syncer.prototype.processTaskQueue = function() { } // Mark that this task is no longer in progress delete self.taskInProgress[task.title]; + self.updateDirtyStatus(); // Process the next task self.processTaskQueue.call(self); }); @@ -484,7 +433,7 @@ Syncer.prototype.chooseNextTask = function() { // Exclude the task if it is a save and the tiddler has been modified recently, but not hit the fallback time if(task.type === "save" && (now - task.lastModificationTime) < self.throttleInterval && (now - task.queueTime) < self.fallbackInterval) { - return; + return; } // Exclude the task if it is newer than the current best candidate if(candidateTask && candidateTask.queueTime < task.queueTime) { @@ -546,6 +495,8 @@ Syncer.prototype.dispatchTask = function(task,callback) { } // Invoke the callback callback(null); + },{ + tiddlerInfo: self.tiddlerInfo[task.title] }); } }; diff --git a/core/modules/tiddler.js b/core/modules/tiddler.js index 6529970d3..430e831fe 100644 --- a/core/modules/tiddler.js +++ b/core/modules/tiddler.js @@ -18,7 +18,7 @@ exports.hasTag = function(tag) { exports.isPlugin = function() { return this.fields.type === "application/json" && this.hasField("plugin-type"); -} +}; exports.isDraft = function() { return this.hasField("draft.of"); @@ -57,4 +57,52 @@ exports.getFieldStringBlock = function(options) { return fields.join("\n"); }; +/* +Compare two tiddlers for equality +tiddler: the tiddler to compare +excludeFields: array of field names to exclude from the comparison +*/ +exports.isEqual = function(tiddler,excludeFields) { + excludeFields = excludeFields || []; + var self = this, + differences = []; // Fields that have differences + // Add to the differences array + function addDifference(fieldName) { + // Check for this field being excluded + if(excludeFields.indexOf(fieldName) === -1) { + // Save the field as a difference + $tw.utils.pushTop(differences,fieldName); + } + } + // Returns true if the two values of this field are equal + function isFieldValueEqual(fieldName) { + var valueA = self.fields[fieldName], + valueB = tiddler.fields[fieldName]; + // Check for identical string values + if(typeof(valueA) === "string" && typeof(valueB) === "string" && valueA === valueB) { + return true; + } + // Check for identical array values + if($tw.utils.isArray(valueA) && $tw.utils.isArray(valueB) && $tw.utils.isArrayEqual(valueA,valueB)) { + return true; + } + // Otherwise the fields must be different + return false; + } + // Compare our fields + for(var fieldName in this.fields) { + if(!isFieldValueEqual(fieldName)) { + addDifference(fieldName); + } + } + // There's a difference for every field in the other tiddler that we don't have + for(fieldName in tiddler.fields) { + if(!(fieldName in this.fields)) { + addDifference(fieldName); + } + } + // Return whether there were any differences + return differences.length === 0; +}; + })(); diff --git a/core/modules/upgraders/plugins.js b/core/modules/upgraders/plugins.js new file mode 100644 index 000000000..91948ff73 --- /dev/null +++ b/core/modules/upgraders/plugins.js @@ -0,0 +1,75 @@ +/*\ +title: $:/core/modules/upgraders/plugins.js +type: application/javascript +module-type: upgrader + +Upgrader module that checks that plugins are newer than any already installed version + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +var UPGRADE_LIBRARY_TITLE = "$:/UpgradeLibrary"; + +var BLOCKED_PLUGINS = { + "$:/plugins/tiddlywiki/fullscreen": { + versions: ["*"] + } +}; + +exports.upgrade = function(wiki,titles,tiddlers) { + var self = this, + messages = {}, + upgradeLibrary, + getLibraryTiddler = function(title) { + if(!upgradeLibrary) { + upgradeLibrary = wiki.getTiddlerData(UPGRADE_LIBRARY_TITLE,{}); + upgradeLibrary.tiddlers = upgradeLibrary.tiddlers || {}; + } + return upgradeLibrary.tiddlers[title]; + }; + + // Go through all the incoming tiddlers + $tw.utils.each(titles,function(title) { + var incomingTiddler = tiddlers[title]; + // Check if we're dealing with a plugin + if(incomingTiddler && incomingTiddler["plugin-type"] && incomingTiddler["version"]) { + // Upgrade the incoming plugin if we've got a newer version in the upgrade library + var libraryTiddler = getLibraryTiddler(title); + if(libraryTiddler && libraryTiddler["plugin-type"] && libraryTiddler["version"]) { + if($tw.utils.checkVersions(libraryTiddler.version,incomingTiddler.version)) { + tiddlers[title] = libraryTiddler; + messages[title] = $tw.language.getString("Import/Upgrader/Plugins/Upgraded",{variables: {incoming: incomingTiddler.version, upgraded: libraryTiddler.version}}); + return; + } + } + // Suppress the incoming plugin if it is older than the currently installed one + var existingTiddler = wiki.getTiddler(title); + if(existingTiddler && existingTiddler.hasField("plugin-type") && existingTiddler.hasField("version")) { + // Reject the incoming plugin by blanking all its fields + if($tw.utils.checkVersions(existingTiddler.fields.version,incomingTiddler.version)) { + tiddlers[title] = Object.create(null); + messages[title] = $tw.language.getString("Import/Upgrader/Plugins/Suppressed/Version",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}}); + return; + } + } + } + if(incomingTiddler && incomingTiddler["plugin-type"]) { + // Check whether the plugin is on the blocked list + var blockInfo = BLOCKED_PLUGINS[title]; + if(blockInfo) { + if(blockInfo.versions.indexOf("*") !== -1 || (incomingTiddler.version && blockInfo.versions.indexOf(incomingTiddler.version) !== -1)) { + tiddlers[title] = Object.create(null); + messages[title] = $tw.language.getString("Import/Upgrader/Plugins/Suppressed/Incompatible"); + return; + } + } + } + }); + return messages; +}; + +})(); diff --git a/core/modules/upgraders/system.js b/core/modules/upgraders/system.js new file mode 100644 index 000000000..3dae00422 --- /dev/null +++ b/core/modules/upgraders/system.js @@ -0,0 +1,39 @@ +/*\ +title: $:/core/modules/upgraders/system.js +type: application/javascript +module-type: upgrader + +Upgrader module that suppresses certain system tiddlers that shouldn't be imported + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +var DONT_IMPORT_LIST = ["$:/StoryList","$:/HistoryList"], + DONT_IMPORT_PREFIX_LIST = ["$:/temp/","$:/state/"]; + +exports.upgrade = function(wiki,titles,tiddlers) { + var self = this, + messages = {}; + // Check for tiddlers on our list + $tw.utils.each(titles,function(title) { + if(DONT_IMPORT_LIST.indexOf(title) !== -1) { + tiddlers[title] = Object.create(null); + messages[title] = $tw.language.getString("Import/Upgrader/System/Suppressed"); + } else { + for(var t=0; t<DONT_IMPORT_PREFIX_LIST.length; t++) { + var prefix = DONT_IMPORT_PREFIX_LIST[t]; + if(title.substr(0,prefix.length) === prefix) { + tiddlers[title] = Object.create(null); + messages[title] = $tw.language.getString("Import/Upgrader/State/Suppressed"); + } + } + } + }); + return messages; +}; + +})(); diff --git a/core/modules/upgraders/themetweaks.js b/core/modules/upgraders/themetweaks.js new file mode 100644 index 000000000..8a15271e4 --- /dev/null +++ b/core/modules/upgraders/themetweaks.js @@ -0,0 +1,65 @@ +/*\ +title: $:/core/modules/upgraders/themetweaks.js +type: application/javascript +module-type: upgrader + +Upgrader module that handles the change in theme tweak storage introduced in 5.0.14-beta. + +Previously, theme tweaks were stored in two data tiddlers: + +* $:/themes/tiddlywiki/vanilla/metrics +* $:/themes/tiddlywiki/vanilla/settings + +Now, each tweak is stored in its own separate tiddler. + +This upgrader copies any values from the old format to the new. The old data tiddlers are not deleted in case they have been used to store additional indexes. + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +var MAPPINGS = { + "$:/themes/tiddlywiki/vanilla/metrics": { + "fontsize": "$:/themes/tiddlywiki/vanilla/metrics/fontsize", + "lineheight": "$:/themes/tiddlywiki/vanilla/metrics/lineheight", + "storyleft": "$:/themes/tiddlywiki/vanilla/metrics/storyleft", + "storytop": "$:/themes/tiddlywiki/vanilla/metrics/storytop", + "storyright": "$:/themes/tiddlywiki/vanilla/metrics/storyright", + "storywidth": "$:/themes/tiddlywiki/vanilla/metrics/storywidth", + "tiddlerwidth": "$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth" + }, + "$:/themes/tiddlywiki/vanilla/settings": { + "fontfamily": "$:/themes/tiddlywiki/vanilla/settings/fontfamily" + } +}; + +exports.upgrade = function(wiki,titles,tiddlers) { + var self = this, + messages = {}; + // Check for tiddlers on our list + $tw.utils.each(titles,function(title) { + var mapping = MAPPINGS[title]; + if(mapping) { + var tiddler = new $tw.Tiddler(tiddlers[title]), + tiddlerData = wiki.getTiddlerData(tiddler,{}); + for(var index in mapping) { + var mappedTitle = mapping[index]; + if(!tiddlers[mappedTitle] || tiddlers[mappedTitle].title !== mappedTitle) { + tiddlers[mappedTitle] = { + title: mappedTitle, + text: tiddlerData[index] + } + messages[mappedTitle] = $tw.language.getString("Import/Upgrader/ThemeTweaks/Created",{variables: { + from: title + "##" + index + }}) + } + } + } + }); + return messages; +}; + +})(); diff --git a/core/modules/utils/crypto.js b/core/modules/utils/crypto.js index 6b7db1fea..252ac0ee8 100644 --- a/core/modules/utils/crypto.js +++ b/core/modules/utils/crypto.js @@ -46,7 +46,17 @@ exports.decryptStoreArea = function(encryptedStoreArea,password) { } }; -exports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback) { + +/* +Attempt to extract the tiddlers from an encrypted store area using the current password. If that fails, the user is prompted for a password. +encryptedStoreArea: text of the TiddlyWiki encrypted store area +callback: function(tiddlers) called with the array of decrypted tiddlers + +The following configuration settings are supported: + +$tw.config.usePasswordVault: causes any password entered by the user to also be put into the system password vault +*/ +exports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback,options) { // Try to decrypt with the current password var tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea); if(tiddlers) { @@ -66,6 +76,9 @@ exports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback) { // Attempt to decrypt the tiddlers var tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea,data.password); if(tiddlers) { + if($tw.config.usePasswordVault) { + $tw.crypto.setPassword(data.password); + } callback(tiddlers); // Exit and remove the password prompt return true; diff --git a/core/modules/utils/dom/browser.js b/core/modules/utils/dom/browser.js index 8469fea0c..090d5768b 100644 --- a/core/modules/utils/dom/browser.js +++ b/core/modules/utils/dom/browser.js @@ -130,4 +130,31 @@ exports.convertEventName = function(eventName) { return newEventName; }; +/* +Return the names of the fullscreen APIs +*/ +exports.getFullScreenApis = function() { + var d = document, + db = d.body, + result = { + "_requestFullscreen": db.webkitRequestFullscreen !== undefined ? "webkitRequestFullscreen" : + db.mozRequestFullScreen !== undefined ? "mozRequestFullScreen" : + db.msRequestFullscreen !== undefined ? "msRequestFullscreen" : + db.requestFullscreen !== undefined ? "requestFullscreen" : "", + "_exitFullscreen": d.webkitExitFullscreen !== undefined ? "webkitExitFullscreen" : + d.mozCancelFullScreen !== undefined ? "mozCancelFullScreen" : + d.msExitFullscreen !== undefined ? "msExitFullscreen" : + d.exitFullscreen !== undefined ? "exitFullscreen" : "", + "_fullscreenElement": d.webkitFullscreenElement !== undefined ? "webkitFullscreenElement" : + d.mozFullScreenElement !== undefined ? "mozFullScreenElement" : + d.msFullscreenElement !== undefined ? "msFullscreenElement" : + d.fullscreenElement !== undefined ? "fullscreenElement" : "" + }; + if(!result._requestFullscreen || !result._exitFullscreen || !result._fullscreenElement) { + return null; + } else { + return result; + } +}; + })(); diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index 3d611f768..35f556262 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -29,7 +29,7 @@ exports.removeChildren = function(node) { }; exports.hasClass = function(el,className) { - return el && el.className && el.className.split(" ").indexOf(className) !== -1; + return el && el.className && el.className.toString().split(" ").indexOf(className) !== -1; }; exports.addClass = function(el,className) { @@ -96,8 +96,11 @@ exports.getBoundingPageRect = function(element) { Saves a named password in the browser */ exports.savePassword = function(name,password) { - if(window.localStorage) { - localStorage.setItem("tw5-password-" + name,password); + try { + if(window.localStorage) { + localStorage.setItem("tw5-password-" + name,password); + } + } catch(e) { } }; @@ -105,7 +108,11 @@ exports.savePassword = function(name,password) { Retrieve a named password from the browser */ exports.getPassword = function(name) { - return window.localStorage ? localStorage.getItem("tw5-password-" + name) : ""; + try { + return window.localStorage ? localStorage.getItem("tw5-password-" + name) : ""; + } catch(e) { + return ""; + } }; /* diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index 2ba4680ed..b0efaaa77 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -67,20 +67,27 @@ Modal.prototype.display = function(title,options) { modalFooter.appendChild(modalFooterButtons); modalWrapper.appendChild(modalFooter); // Render the title of the message - var titleText; - if(tiddler && tiddler.fields && tiddler.fields.subtitle) { - titleText = tiddler.fields.subtitle; - } else { - titleText = title; - } - var headerParser = this.wiki.parseText("text/vnd.tiddlywiki",titleText,{parseAsInline: true}), - headerWidgetNode = this.wiki.makeWidget(headerParser,{parentWidget: $tw.rootWidget, document: document}); + var headerWidgetNode = this.wiki.makeTranscludeWidget(title,{ + field: "subtitle", + children: [{ + type: "text", + attributes: { + text: { + type: "string", + value: title + }}}], + parentWidget: $tw.rootWidget, + document: document + }); headerWidgetNode.render(headerTitle,null); this.wiki.addEventListener("change",function(changes) { headerWidgetNode.refresh(changes,modalHeader,null); }); // Render the body of the message - var bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document}); + var bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{ + parentWidget: $tw.rootWidget, + document: document + }); bodyWidgetNode.render(modalBody,null); this.wiki.addEventListener("change",function(changes) { bodyWidgetNode.refresh(changes,modalBody,null); @@ -100,14 +107,31 @@ Modal.prototype.display = function(title,options) { modalFooterHelp.appendChild(link); modalFooterHelp.style.float = "left"; } - var footerText; - if(tiddler && tiddler.fields && tiddler.fields.footer) { - footerText = tiddler.fields.footer; - } else { - footerText = '<$button message="tw-close-tiddler" class="btn btn-primary">Close</$button>'; - } - var footerParser = this.wiki.parseText("text/vnd.tiddlywiki",footerText,{parseAsInline: true}), - footerWidgetNode = this.wiki.makeWidget(footerParser,{parentWidget: $tw.rootWidget, document: document}); + var footerWidgetNode = this.wiki.makeTranscludeWidget(title,{ + field: "footer", + children: [{ + type: "button", + attributes: { + message: { + type: "string", + value: "tw-close-tiddler" + }, + "class": { + type: "string", + value: "btn btn-primary" + } + }, + children: [{ + type: "text", + attributes: { + text: { + type: "string", + value: "Close" + }}} + ]}], + parentWidget: $tw.rootWidget, + document: document + }); footerWidgetNode.render(modalFooterButtons,null); this.wiki.addEventListener("change",function(changes) { footerWidgetNode.refresh(changes,modalFooterButtons,null); diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index 07cb95a7a..d13496c95 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -55,22 +55,63 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) { CheckboxWidget.prototype.getValue = function() { var tiddler = this.wiki.getTiddler(this.checkboxTitle); - return tiddler ? tiddler.hasTag(this.checkboxTag) : false; + if(tiddler) { + if(this.checkboxTag) { + return tiddler.hasTag(this.checkboxTag); + } + if(this.checkboxField) { + var value = tiddler.fields[this.checkboxField] || this.checkboxDefault || ""; + if(value === this.checkboxChecked) { + return true; + } + if(value === this.checkboxUnchecked) { + return false; + } + } + } else { + if(this.checkboxTag) { + return false; + } + if(this.checkboxField) { + if(this.checkboxDefault === this.checkboxChecked) { + return true; + } + if(this.checkboxDefault === this.checkboxUnchecked) { + return false; + } + } + } + return false; }; 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), - pos = newTags.indexOf(this.checkboxTag); + tiddler = this.wiki.getTiddler(this.checkboxTitle), + fallbackFields = {text: ""}, + newFields = {title: this.checkboxTitle}, + hasChanged = false; + // Set the tag if specified + if(this.checkboxTag && (!tiddler || tiddler.hasTag(this.checkboxTag) !== checked)) { + newFields.tags = tiddler ? (tiddler.fields.tags || []).slice(0) : []; + var pos = newFields.tags.indexOf(this.checkboxTag); if(pos !== -1) { - newTags.splice(pos,1); + newFields.tags.splice(pos,1); } if(checked) { - newTags.push(this.checkboxTag); + newFields.tags.push(this.checkboxTag); } - this.wiki.addTiddler(new $tw.Tiddler(tiddler,{tags: newTags},this.wiki.getModificationFields())); + hasChanged = true; + } + // Set the field if specified + if(this.checkboxField) { + var value = checked ? this.checkboxChecked : this.checkboxUnchecked; + if(!tiddler || tiddler.fields[this.checkboxField] !== value) { + newFields[this.checkboxField] = value; + hasChanged = true; + } + } + if(hasChanged) { + this.wiki.addTiddler(new $tw.Tiddler(fallbackFields,tiddler,newFields,this.wiki.getModificationFields())); } }; @@ -81,6 +122,10 @@ CheckboxWidget.prototype.execute = function() { // Get the parameters from the attributes this.checkboxTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); this.checkboxTag = this.getAttribute("tag"); + this.checkboxField = this.getAttribute("field"); + this.checkboxChecked = this.getAttribute("checked"); + this.checkboxUnchecked = this.getAttribute("unchecked"); + this.checkboxDefault = this.getAttribute("default"); // Make the child widgets this.makeChildWidgets(); }; @@ -90,7 +135,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ CheckboxWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes["class"]) { + if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.field || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes["class"]) { this.refreshSelf(); return true; } else { diff --git a/core/modules/widgets/dropzone.js b/core/modules/widgets/dropzone.js index 978048151..62f787a7e 100644 --- a/core/modules/widgets/dropzone.js +++ b/core/modules/widgets/dropzone.js @@ -192,10 +192,12 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) { }); } else if(item.kind === "string") { // Create tiddlers from string items + var type = item.type; item.getAsString(function(str) { var tiddlerFields = { title: self.wiki.generateNewTitle("Untitled"), - text: str + text: str, + type: type }; self.dispatchEvent({type: "tw-import-tiddlers", param: JSON.stringify([tiddlerFields])}); }); diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index 0782d5118..38b676e57 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -46,28 +46,11 @@ EditWidget.prototype.execute = function() { this.editIndex = this.getAttribute("index"); this.editClass = this.getAttribute("class"); this.editPlaceholder = this.getAttribute("placeholder"); - // Get the content type of the thing we're editing - var type; - if(this.editField === "text") { - var tiddler = this.wiki.getTiddler(this.editTitle); - if(tiddler) { - type = tiddler.fields.type; - } - } - type = type || "text/vnd.tiddlywiki"; // Choose the appropriate edit widget - var editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type); - if(!editorType) { - var typeInfo = $tw.config.contentTypeInfo[type]; - if(typeInfo && typeInfo.encoding === "base64") { - editorType = "binary"; - } else { - editorType = "text"; - } - } + this.editorType = this.getEditorType(); // Make the child widgets this.makeChildWidgets([{ - type: "edit-" + editorType, + type: "edit-" + this.editorType, attributes: { tiddler: {type: "string", value: this.editTitle}, field: {type: "string", value: this.editField}, @@ -78,12 +61,35 @@ EditWidget.prototype.execute = function() { }]); }; +EditWidget.prototype.getEditorType = function() { + // Get the content type of the thing we're editing + var type; + if(this.editField === "text") { + var tiddler = this.wiki.getTiddler(this.editTitle); + if(tiddler) { + type = tiddler.fields.type; + } + } + type = type || "text/vnd.tiddlywiki"; + var editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type); + if(!editorType) { + var typeInfo = $tw.config.contentTypeInfo[type]; + if(typeInfo && typeInfo.encoding === "base64") { + editorType = "binary"; + } else { + editorType = "text"; + } + } + return editorType; +}; + /* Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering */ EditWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index) { + // Refresh if an attribute has changed, or the type associated with the target tiddler has changed + if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) { this.refreshSelf(); return true; } else { diff --git a/core/modules/widgets/image.js b/core/modules/widgets/image.js index be2ea8b6f..1c4ba494e 100644 --- a/core/modules/widgets/image.js +++ b/core/modules/widgets/image.js @@ -105,6 +105,9 @@ ImageWidget.prototype.render = function(parent,nextSibling) { if(this.imageTooltip) { domNode.setAttribute("title",this.imageTooltip); } + if(this.imageAlt) { + domNode.setAttribute("alt",this.imageAlt); + } // Insert element parent.insertBefore(domNode,nextSibling); this.domNodes.push(domNode); @@ -120,6 +123,7 @@ ImageWidget.prototype.execute = function() { this.imageHeight = this.getAttribute("height"); this.imageClass = this.getAttribute("class"); this.imageTooltip = this.getAttribute("tooltip"); + this.imageAlt = this.getAttribute("alt"); }; /* diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index 111896219..b5cd89fd8 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -56,7 +56,11 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) { // Create our element var domNode = this.document.createElement("a"); // Assign classes - var classes = ["tw-tiddlylink"]; + var classes = []; + if(this.linkClasses) { + classes.push(this.linkClasses); + } + classes.push("tw-tiddlylink"); if(this.isShadow) { classes.push("tw-tiddlylink-shadow"); } @@ -182,6 +186,8 @@ LinkWidget.prototype.execute = function() { // Get the link title and aria label this.tooltip = this.getAttribute("tooltip"); this["aria-label"] = this.getAttribute("aria-label"); + // Get the link classes + this.linkClasses = this.getAttribute("class"); // Determine the link characteristics this.isMissing = !this.wiki.tiddlerExists(this.to); this.isShadow = this.wiki.isShadowTiddler(this.to); diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index 1edd19521..71a49ff2f 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -12,6 +12,8 @@ Navigator widget /*global $tw: false */ "use strict"; +var IMPORT_TITLE = "$:/Import"; + var Widget = require("$:/core/modules/widgets/widget.js").widget; var NavigatorWidget = function(parseTreeNode,options) { @@ -26,7 +28,8 @@ var NavigatorWidget = function(parseTreeNode,options) { {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"} + {type: "tw-import-tiddlers", handler: "handleImportTiddlersEvent"}, + {type: "tw-perform-import", handler: "handlePerformImportEvent"} ]); }; @@ -307,7 +310,8 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) { {title: draftTitle} } )); - } else if(!this.wiki.isDraftModified(title)) { + } + if(!isRename && !this.wiki.isDraftModified(title)) { event.type = "tw-cancel-tiddler"; this.dispatchEvent(event); } else if(isConfirmed) { @@ -401,7 +405,7 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) { return false; }; -// Import JSON tiddlers +// Import JSON tiddlers into a pending import tiddler NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) { var self = this; // Get the tiddlers @@ -410,54 +414,83 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) { tiddlers = JSON.parse(event.param); } catch(e) { } + // Get the current $:/Import tiddler + var importTiddler = this.wiki.getTiddler(IMPORT_TITLE), + importData = this.wiki.getTiddlerData(IMPORT_TITLE,{}), + newFields = new Object({ + title: IMPORT_TITLE, + type: "application/json", + "plugin-type": "import", + "status": "pending" + }), + incomingTiddlers = []; // Process each tiddler - var importedTiddlers = []; + importData.tiddlers = importData.tiddlers || {}; $tw.utils.each(tiddlers,function(tiddlerFields) { var title = tiddlerFields.title; - // Add it to the store - var imported = self.wiki.importTiddler(new $tw.Tiddler( - self.wiki.getCreationFields(), - self.wiki.getModificationFields(), - tiddlerFields - )); - if(imported) { - importedTiddlers.push(title); + if(title) { + incomingTiddlers.push(title); + importData.tiddlers[title] = tiddlerFields; } }); - // Get the story and history details - var storyList = this.getStoryList(), - history = []; - // Create the import report tiddler - if(importedTiddlers.length === 0) { - return false; + // Give the active upgrader modules a chance to process the incoming tiddlers + var messages = this.wiki.invokeUpgraders(incomingTiddlers,importData.tiddlers); + $tw.utils.each(messages,function(message,title) { + newFields["message-" + title] = message; + }); + // Deselect any suppressed tiddlers + $tw.utils.each(importData.tiddlers,function(tiddler,title) { + if($tw.utils.count(tiddler) === 0) { + newFields["selection-" + title] = "unchecked"; + } + }); + // Save the $:/Import tiddler + newFields.text = JSON.stringify(importData,null,$tw.config.preferences.jsonSpaces); + this.wiki.addTiddler(new $tw.Tiddler(importTiddler,newFields)); + // Update the story and history details + if(this.getVariable("tw-auto-open-on-import") !== "no") { + var storyList = this.getStoryList(), + history = []; + // Add it to the story + if(storyList.indexOf(IMPORT_TITLE) === -1) { + storyList.unshift(IMPORT_TITLE); + } + // And to history + history.push(IMPORT_TITLE); + // Save the updated story and history + this.saveStoryList(storyList); + this.addToHistory(history); } - var title; - if(importedTiddlers.length > 1) { - title = this.wiki.generateNewTitle("$:/temp/ImportReport"); - var tiddlerFields = { - title: title, - text: "# [[" + importedTiddlers.join("]]\n# [[") + "]]\n" - }; - this.wiki.addTiddler(new $tw.Tiddler( - self.wiki.getCreationFields(), - tiddlerFields, - self.wiki.getModificationFields() - )); - } else { - title = importedTiddlers[0]; - } - // Add it to the story - if(storyList.indexOf(title) === -1) { - storyList.unshift(title); - } - // And to history - history.push(title); - // Save the updated story and history - this.saveStoryList(storyList); - this.addToHistory(history); return false; }; +// +NavigatorWidget.prototype.handlePerformImportEvent = function(event) { + var self = this, + importTiddler = this.wiki.getTiddler(event.param), + importData = this.wiki.getTiddlerData(event.param,{tiddlers: {}}), + importReport = []; + // Add the tiddlers to the store + importReport.push("The following tiddlers were imported:\n"); + $tw.utils.each(importData.tiddlers,function(tiddlerFields) { + var title = tiddlerFields.title; + if(title && importTiddler && importTiddler.fields["selection-" + title] !== "unchecked") { + self.wiki.addTiddler(new $tw.Tiddler(tiddlerFields)); + importReport.push("# [[" + tiddlerFields.title + "]]"); + } + }); + // Replace the $:/Import tiddler with an import report + this.wiki.addTiddler(new $tw.Tiddler({ + title: IMPORT_TITLE, + text: importReport.join("\n"), + "status": "complete" + })); + // Navigate to the $:/Import tiddler + this.addToHistory([IMPORT_TITLE]); + // Send a notification event + this.dispatchEvent({type: "tw-auto-save-wiki"}); +}; + exports.navigator = NavigatorWidget; })(); diff --git a/core/modules/widgets/text.js b/core/modules/widgets/text.js index 4da2119ac..e3ebc4f70 100755 --- a/core/modules/widgets/text.js +++ b/core/modules/widgets/text.js @@ -30,8 +30,9 @@ TextNodeWidget.prototype.render = function(parent,nextSibling) { this.parentDomNode = parent; this.computeAttributes(); this.execute(); - var text = this.getAttribute("text",this.parseTreeNode.text), - textNode = this.document.createTextNode(text); + var text = this.getAttribute("text",this.parseTreeNode.text); + text = text.replace(/\r/mg,""); + var textNode = this.document.createTextNode(text); parent.insertBefore(textNode,nextSibling); this.domNodes.push(textNode); }; diff --git a/core/modules/widgets/tiddler.js b/core/modules/widgets/tiddler.js index fab6c9c29..1300bd991 100755 --- a/core/modules/widgets/tiddler.js +++ b/core/modules/widgets/tiddler.js @@ -44,16 +44,33 @@ TiddlerWidget.prototype.execute = function() { this.setVariable("missingTiddlerClass",(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tw-tiddler-exists" : "tw-tiddler-missing"); this.setVariable("shadowTiddlerClass",this.wiki.isShadowTiddler(this.tiddlerTitle) ? "tw-tiddler-shadow" : ""); this.setVariable("systemTiddlerClass",this.wiki.isSystemTiddler(this.tiddlerTitle) ? "tw-tiddler-system" : ""); + this.setVariable("tiddlerTagClasses",this.getTagClasses()) // Construct the child widgets this.makeChildWidgets(); }; +/* +Create a string of CSS classes derived from the tags of the current tiddler +*/ +TiddlerWidget.prototype.getTagClasses = function() { + var tiddler = this.wiki.getTiddler(this.tiddlerTitle); + if(tiddler) { + var tags = []; + $tw.utils.each(tiddler.fields.tags,function(tag) { + tags.push("tw-tagged-" + encodeURIComponent(tag)); + }); + return tags.join(" "); + } else { + return ""; + } +}; + /* Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering */ TiddlerWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.tiddler) { + if(changedAttributes.tiddler || changedTiddlers[this.tiddlerTitle]) { this.refreshSelf(); return true; } else { diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index 485220937..bc20d44c6 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -39,17 +39,10 @@ Compute the internal state of the widget TranscludeWidget.prototype.execute = function() { // Get our parameters this.transcludeTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); + this.transcludeSubTiddler = this.getAttribute("subtiddler"); this.transcludeField = this.getAttribute("field"); this.transcludeIndex = this.getAttribute("index"); this.transcludeMode = this.getAttribute("mode"); - // Check for recursion - var recursionMarker = this.makeRecursionMarker(); - if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) { - this.makeChildWidgets([{type: "text", text: "Recursive transclusion error in transclude widget"}]); - return; - } - // Set context variables for recursion detection - this.setVariable("transclusion",recursionMarker); // Parse the text reference var parseAsInline = !this.parseTreeNode.isBlock; if(this.transcludeMode === "inline") { @@ -61,8 +54,20 @@ TranscludeWidget.prototype.execute = function() { this.transcludeTitle, this.transcludeField, this.transcludeIndex, - {parseAsInline: parseAsInline}), + { + parseAsInline: parseAsInline, + subTiddler: this.transcludeSubTiddler + }), parseTreeNodes = parser ? parser.tree : this.parseTreeNode.children; + // Set context variables for recursion detection + var recursionMarker = this.makeRecursionMarker(); + this.setVariable("transclusion",recursionMarker); + // Check for recursion + if(parser) { + if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) { + parseTreeNodes = [{type: "text", text: "Recursive transclusion error in transclude widget"}]; + } + } // Construct the child widgets this.makeChildWidgets(parseTreeNodes); }; @@ -80,6 +85,8 @@ TranscludeWidget.prototype.makeRecursionMarker = function() { output.push(this.transcludeField || ""); output.push("|"); output.push(this.transcludeIndex || ""); + output.push("|"); + output.push(this.transcludeSubTiddler || ""); output.push("}"); return output.join(""); }; diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index 1069c6025..9424dd6d8 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -18,11 +18,8 @@ Create a widget object for a parse tree node options: see below Options include: wiki: mandatory reference to wiki associated with this render tree - variables: optional hashmap of context variables (see below) parentWidget: optional reference to a parent renderer node for the context chain document: optional document object to use instead of global document -Context variables include: - currentTiddler: title of the tiddler providing the context */ var Widget = function(parseTreeNode,options) { if(arguments.length > 0) { @@ -136,7 +133,7 @@ Widget.prototype.substituteVariableParameters = function(text,formalParams,actua Widget.prototype.substituteVariableReferences = function(text) { var self = this; - return text.replace(/\$\(([^\)\$]+)\)\$/g,function(match,p1,offset,string) { + return (text || "").replace(/\$\(([^\)\$]+)\)\$/g,function(match,p1,offset,string) { return self.getVariable(p1,{defaultValue: ""}); }); }; diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 684281e1f..1cc2c2fb8 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -554,6 +554,17 @@ exports.sortByList = function(array,listTitle) { } }; +exports.getSubTiddler = function(title,subTiddlerTitle) { + var bundleInfo = this.getPluginInfo(title) || this.getTiddlerData(title); + if(bundleInfo) { + var subTiddler = bundleInfo.tiddlers[subTiddlerTitle]; + if(subTiddler) { + return new $tw.Tiddler(subTiddler); + } + } + return null; +}; + /* Retrieve a tiddler as a JSON string of the fields */ @@ -571,16 +582,22 @@ exports.getTiddlerAsJson = function(title) { }; /* -Get a tiddlers content as a JavaScript object. How this is done depends on the type of the tiddler: +Get the content of a tiddler as a JavaScript object. How this is done depends on the type of the tiddler: application/json: the tiddler JSON is parsed into an object application/x-tiddler-dictionary: the tiddler is parsed as sequence of name:value pairs Other types currently just return null. + +titleOrTiddler: string tiddler title or a tiddler object +defaultData: default data to be returned if the tiddler is missing or doesn't contain data */ -exports.getTiddlerData = function(title,defaultData) { - var tiddler = this.getTiddler(title), +exports.getTiddlerData = function(titleOrTiddler,defaultData) { + var tiddler = titleOrTiddler, data; + if(!(tiddler instanceof $tw.Tiddler)) { + tiddler = this.getTiddler(tiddler) + } if(tiddler && tiddler.fields.text) { switch(tiddler.fields.type) { case "application/json": @@ -601,8 +618,8 @@ exports.getTiddlerData = function(title,defaultData) { /* Extract an indexed field from within a data tiddler */ -exports.extractTiddlerDataItem = function(title,index,defaultText) { - var data = this.getTiddlerData(title,Object.create(null)), +exports.extractTiddlerDataItem = function(titleOrTiddler,index,defaultText) { + var data = this.getTiddlerData(titleOrTiddler,Object.create(null)), text; if(data && $tw.utils.hop(data,index)) { text = data[index]; @@ -786,31 +803,38 @@ exports.parseTiddler = function(title,options) { }; exports.parseTextReference = function(title,field,index,options) { - if(field === "text" || (!field && !index)) { - // Force the tiddler to be lazily loaded - this.getTiddlerText(title); - // Parse it - return this.parseTiddler(title,options); + var tiddler,text; + if(options.subTiddler) { + tiddler = this.getSubTiddler(title,options.subTiddler); } else { - var text; - if(field) { - if(field === "title") { - text = title; - } else { - var tiddler = this.getTiddler(title); - if(!tiddler || !tiddler.hasField(field)) { - return null; - } - text = tiddler.fields[field]; - } - return this.parseText("text/vnd.tiddlywiki",text.toString(),options); - } else if(index) { - text = this.extractTiddlerDataItem(title,index,""); - if(text === undefined) { + tiddler = this.getTiddler(title); + if(field === "text" || (!field && !index)) { + this.getTiddlerText(title); // Force the tiddler to be lazily loaded + return this.parseTiddler(title,options); + } + } + if(field === "text" || (!field && !index)) { + if(tiddler && tiddler.fields) { + return this.parseText(tiddler.fields.type || "text/vnd.tiddlywiki",tiddler.fields.text,options); + } else { + return null; + } + } else if(field) { + if(field === "title") { + text = title; + } else { + if(!tiddler || !tiddler.hasField(field)) { return null; } - return this.parseText("text/vnd.tiddlywiki",text,options); + text = tiddler.fields[field]; } + return this.parseText("text/vnd.tiddlywiki",text.toString(),options); + } else if(index) { + text = this.extractTiddlerDataItem(tiddler,index,undefined); + if(text === undefined) { + return null; + } + return this.parseText("text/vnd.tiddlywiki",text,options); } }; @@ -856,19 +880,30 @@ exports.makeWidget = function(parser,options) { /* Make a widget tree for transclusion title: target tiddler title -options: as for wiki.makeWidget() (including parseAsInline) +options: as for wiki.makeWidget() plus: +options.field: optional field to transclude (defaults to "text") +options.children: optional array of children for the transclude widget */ exports.makeTranscludeWidget = function(title,options) { options = options || {}; var parseTree = {tree: [{ - type: "transclude", - attributes: { - tiddler: { - name: "tiddler", - type: "string", - value: title}}, - isBlock: !options.parseAsInline} + type: "element", + tag: "div", + children: [{ + type: "transclude", + attributes: { + tiddler: { + name: "tiddler", + type: "string", + value: title}}, + isBlock: !options.parseAsInline}]} ]}; + if(options.field) { + parseTree.tree[0].children[0].attributes.field = {type: "string", value: options.field}; + } + if(options.children) { + parseTree.tree[0].children[0].children = options.children; + } return $tw.wiki.makeWidget(parseTree,options); }; @@ -1085,27 +1120,16 @@ exports.readFile = function(file,callback) { Check whether the specified draft tiddler has been modified */ exports.isDraftModified = function(title) { - var tiddler = this.getTiddler(title); + var tiddler = this.getTiddler(title); if(!tiddler.isDraft()) { return false; } - var ignoredFields = ["created", "modified", "title", "draft.title", "draft.of", "tags"], + var ignoredFields = ["created", "modified", "title", "draft.title", "draft.of"], origTiddler = this.getTiddler(tiddler.fields["draft.of"]); if(!origTiddler) { return true; } - if(tiddler.fields["draft.title"] !== tiddler.fields["draft.of"]) { - return true; - } - if(!$tw.utils.isArrayEqual(tiddler.fields.tags,origTiddler.fields.tags)) { - return true; - } - return !Object.keys(tiddler.fields).every(function(field) { - if(ignoredFields.indexOf(field) >= 0) { - return true; - } - return tiddler.fields[field] === origTiddler.fields[field]; - }); + return !tiddler.isEqual(origTiddler,ignoredFields); }; /* @@ -1125,4 +1149,31 @@ exports.addToHistory = function(title,fromPageRect,historyTitle) { this.setTiddlerData(historyTitle,historyList,{"current-tiddler": titles[titles.length-1]}); }; +/* +Invoke the available upgrader modules +titles: array of tiddler titles to be processed +tiddlers: hashmap by title of tiddler fields of pending import tiddlers. These can be modified by the upgraders. An entry with no fields indicates a tiddler that was pending import has been suppressed. When entries are added to the pending import the tiddlers hashmap may have entries that are not present in the titles array +Returns a hashmap of messages keyed by tiddler title. +*/ +exports.invokeUpgraders = function(titles,tiddlers) { + // Collect up the available upgrader modules + var self = this; + if(!this.upgraderModules) { + this.upgraderModules = []; + $tw.modules.forEachModuleOfType("upgrader",function(title,module) { + if(module.upgrade) { + self.upgraderModules.push(module); + } + }); + } + // Invoke each upgrader in turn + var messages = {}; + for(var t=0; t<this.upgraderModules.length; t++) { + var upgrader = this.upgraderModules[t], + upgraderMessages = upgrader.upgrade(this,titles,tiddlers); + $tw.utils.extend(messages,upgraderMessages); + } + return messages; +}; + })(); diff --git a/core/palettes/Blanca.tid b/core/palettes/Blanca.tid index 6e13c94a5..74d4057fe 100644 --- a/core/palettes/Blanca.tid +++ b/core/palettes/Blanca.tid @@ -13,6 +13,7 @@ blockquote-bar: <<colour muted-foreground>> code-background: #f7f7f9 code-border: #e1e1e8 code-foreground: #dd1144 +dirty-indicator: #ff0000 download-background: #66cccc download-foreground: <<colour background>> dragger-background: <<colour foreground>> @@ -22,10 +23,10 @@ dropdown-border: <<colour muted-foreground>> dropdown-tab-background-selected: #fff dropdown-tab-background: #ececec dropzone-background: rgba(0,200,0,0.7) -external-link-background-hover: -external-link-background-visited: -external-link-background: -external-link-foreground-hover: +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid index 151da524f..183d3a951 100644 --- a/core/palettes/Blue.tid +++ b/core/palettes/Blue.tid @@ -13,6 +13,7 @@ blockquote-bar: <<colour muted-foreground>> code-background: #f7f7f9 code-border: #e1e1e8 code-foreground: #dd1144 +dirty-indicator: #ff0000 download-background: #34c734 download-foreground: <<colour foreground>> dragger-background: <<colour foreground>> @@ -22,10 +23,10 @@ dropdown-border: <<colour muted-foreground>> dropdown-tab-background-selected: #fff dropdown-tab-background: #ececec dropzone-background: rgba(0,200,0,0.7) -external-link-background-hover: -external-link-background-visited: -external-link-background: -external-link-foreground-hover: +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333353 diff --git a/core/palettes/BrightMute.tid b/core/palettes/BrightMute.tid new file mode 100644 index 000000000..3e292a5ad --- /dev/null +++ b/core/palettes/BrightMute.tid @@ -0,0 +1,105 @@ +title: $:/palettes/Muted +name: Muted +description: Bright tiddlers on a muted background +tags: $:/tags/Palette +type: application/x-tiddler-dictionary + +alert-background: #ffe476 +alert-border: #b99e2f +alert-highlight: #881122 +alert-muted-foreground: #b99e2f +background: #ffffff +blockquote-bar: <<colour muted-foreground>> +code-background: #f7f7f9 +code-border: #e1e1e8 +code-foreground: #dd1144 +dirty-indicator: #ff0000 +download-background: #34c734 +download-foreground: <<colour background>> +dragger-background: <<colour foreground>> +dragger-foreground: <<colour background>> +dropdown-background: <<colour background>> +dropdown-border: <<colour muted-foreground>> +dropdown-tab-background-selected: #fff +dropdown-tab-background: #ececec +dropzone-background: rgba(0,200,0,0.7) +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit +external-link-foreground-visited: #0000aa +external-link-foreground: #0000ee +foreground: #333333 +message-background: #ecf2ff +message-border: #cfd6e6 +message-foreground: #547599 +modal-backdrop: <<colour foreground>> +modal-background: <<colour background>> +modal-border: #999999 +modal-footer-background: #f5f5f5 +modal-footer-border: #dddddd +modal-header-border: #eeeeee +muted-foreground: #bbb +notification-background: #ffffdd +notification-border: #999999 +page-background: #6f6f70 +pre-background: #f5f5f5 +pre-border: #cccccc +primary: #29a6ee +sidebar-button-foreground: <<colour foreground>> +sidebar-controls-foreground-hover: #000000 +sidebar-controls-foreground: #c2c1c2 +sidebar-foreground-shadow: rgba(255,255,255,0) +sidebar-foreground: #d3d2d4 +sidebar-muted-foreground-hover: #444444 +sidebar-muted-foreground: #c0c0c0 +sidebar-tab-background-selected: #6f6f70 +sidebar-tab-background: #666667 +sidebar-tab-border-selected: #999 +sidebar-tab-border: #515151 +sidebar-tab-divider: #999 +sidebar-tab-foreground-selected: +sidebar-tab-foreground: #999 +sidebar-tiddler-link-foreground-hover: #444444 +sidebar-tiddler-link-foreground: #d1d0d2 +static-alert-foreground: #aaaaaa +tab-background-selected: #ffffff +tab-background: #d8d8d8 +tab-border-selected: #d8d8d8 +tab-border: #cccccc +tab-divider: #d8d8d8 +tab-foreground-selected: <<colour tab-foreground>> +tab-foreground: #666666 +table-border: #dddddd +table-footer-background: #a8a8a8 +table-header-background: #f0f0f0 +tag-background: #d5ad34 +tag-foreground: #ffffff +tiddler-background: <<colour background>> +tiddler-border: <<colour background>> +tiddler-controls-foreground-hover: #888888 +tiddler-controls-foreground-selected: #444444 +tiddler-controls-foreground: #cccccc +tiddler-editor-background: #f8f8f8 +tiddler-editor-border-image: #ffffff +tiddler-editor-border: #cccccc +tiddler-editor-fields-even: #e0e8e0 +tiddler-editor-fields-odd: #f0f4f0 +tiddler-info-background: #f8f8f8 +tiddler-info-border: #dddddd +tiddler-info-tab-background: #f8f8f8 +tiddler-link-background: <<colour background>> +tiddler-link-foreground: <<colour primary>> +tiddler-subtitle-foreground: #c0c0c0 +tiddler-title-foreground: #182955 +toolbar-new-button: +toolbar-options-button: +toolbar-save-button: +toolbar-info-button: +toolbar-edit-button: +toolbar-close-button: +toolbar-delete-button: +toolbar-cancel-button: +toolbar-done-button: +untagged-background: #999999 +very-muted-foreground: #888888 diff --git a/core/palettes/Contrast.tid b/core/palettes/Contrast.tid index 780df822a..4fc53d760 100644 --- a/core/palettes/Contrast.tid +++ b/core/palettes/Contrast.tid @@ -13,6 +13,7 @@ blockquote-bar: <<colour muted-foreground>> code-background: #f7f7f9 code-border: #e1e1e8 code-foreground: #dd1144 +dirty-indicator: #ff0000 download-background: #34c734 download-foreground: <<colour background>> dragger-background: <<colour foreground>> @@ -22,10 +23,10 @@ dropdown-border: <<colour muted-foreground>> dropdown-tab-background-selected: #fff dropdown-tab-background: #ececec dropzone-background: rgba(0,200,0,0.7) -external-link-background-hover: -external-link-background-visited: -external-link-background: -external-link-foreground-hover: +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 diff --git a/core/palettes/Rocker.tid b/core/palettes/Rocker.tid index 0fe14cbdc..d84c2a3f5 100644 --- a/core/palettes/Rocker.tid +++ b/core/palettes/Rocker.tid @@ -13,6 +13,7 @@ blockquote-bar: <<colour muted-foreground>> code-background: #f7f7f9 code-border: #e1e1e8 code-foreground: #dd1144 +dirty-indicator: #ff0000 download-background: #34c734 download-foreground: <<colour background>> dragger-background: <<colour foreground>> @@ -22,10 +23,10 @@ dropdown-border: <<colour muted-foreground>> dropdown-tab-background-selected: #fff dropdown-tab-background: #ececec dropzone-background: rgba(0,200,0,0.7) -external-link-background-hover: -external-link-background-visited: -external-link-background: -external-link-foreground-hover: +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid index 5dfb4edcd..00d63c002 100644 --- a/core/palettes/Vanilla.tid +++ b/core/palettes/Vanilla.tid @@ -13,6 +13,7 @@ blockquote-bar: <<colour muted-foreground>> code-background: #f7f7f9 code-border: #e1e1e8 code-foreground: #dd1144 +dirty-indicator: #ff0000 download-background: #34c734 download-foreground: <<colour background>> dragger-background: <<colour foreground>> @@ -22,10 +23,10 @@ dropdown-border: <<colour muted-foreground>> dropdown-tab-background-selected: #fff dropdown-tab-background: #ececec dropzone-background: rgba(0,200,0,0.7) -external-link-background-hover: -external-link-background-visited: -external-link-background: -external-link-foreground-hover: +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 @@ -47,7 +48,7 @@ pre-border: #cccccc primary: #5778d8 sidebar-button-foreground: <<colour foreground>> sidebar-controls-foreground-hover: #000000 -sidebar-controls-foreground: #ffffff +sidebar-controls-foreground: #aaaaaa sidebar-foreground-shadow: rgba(255,255,255, 0.8) sidebar-foreground: #acacac sidebar-muted-foreground-hover: #444444 diff --git a/core/plugin.info b/core/plugin.info index 5ad83fcc0..ce3e1b025 100644 --- a/core/plugin.info +++ b/core/plugin.info @@ -3,5 +3,6 @@ "description": "TiddlyWiki5 core plugin", "author": "JeremyRuston", "core-version": ">=5.0.0", - "plugin-priority": "0" + "plugin-priority": "0", + "list": "readme" } diff --git a/core/readme.tid b/core/readme.tid new file mode 100644 index 000000000..a65d54927 --- /dev/null +++ b/core/readme.tid @@ -0,0 +1,8 @@ +title: $:/core/readme + +This plugin contains TiddlyWiki's core components, comprising: + +* JavaScript code modules +* Icons +* Templates needed to create TiddlyWiki's user interface +* British English (''en-GB'') translations of the localisable strings used by the core diff --git a/core/templates/save-all.tid b/core/templates/save-all.tid index 2c60bacab..78a6738a2 100644 --- a/core/templates/save-all.tid +++ b/core/templates/save-all.tid @@ -1,6 +1,6 @@ title: $:/core/save/all \define saveTiddlerFilter() -[is[tiddler]] -[prefix[$:/state/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] +[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \end {{$:/core/templates/tiddlywiki5.html}} diff --git a/core/templates/save-empty.tid b/core/templates/save-empty.tid index ba44b52e6..6f0da4822 100644 --- a/core/templates/save-empty.tid +++ b/core/templates/save-empty.tid @@ -1,6 +1,6 @@ title: $:/core/save/empty \define saveTiddlerFilter() -[is[system]] -[prefix[$:/state/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] +[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \end {{$:/core/templates/tiddlywiki5.html}} diff --git a/core/templates/save-lazy-images.tid b/core/templates/save-lazy-images.tid index aa89b6587..ff3204729 100644 --- a/core/templates/save-lazy-images.tid +++ b/core/templates/save-lazy-images.tid @@ -1,6 +1,6 @@ title: $:/core/save/lazy-images \define saveTiddlerFilter() -[is[tiddler]] -[prefix[$:/state/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] +[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] \end {{$:/core/templates/tiddlywiki5.html}} diff --git a/core/ui/ControlPanel/Advanced/EditorTypes.tid b/core/ui/ControlPanel/Advanced/EditorTypes.tid new file mode 100644 index 000000000..18b504d6c --- /dev/null +++ b/core/ui/ControlPanel/Advanced/EditorTypes.tid @@ -0,0 +1,30 @@ +title: $:/core/ui/ControlPanel/Advanced/EditorTypes +tags: $:/tags/ControlPanel/Advanced +caption: {{$:/language/ControlPanel/Advanced/EditorTypes/Caption}} + +\define lingo-base() $:/language/ControlPanel/Advanced/EditorTypes/ + +<<lingo Hint>> + +<table> +<tbody> +<tr> +<th><<lingo Type/Caption>></th> +<th><<lingo Editor/Caption>></th> +</tr> +<$list filter="[all[shadows+tiddlers]prefix[$:/config/EditorTypeMappings/]sort[title]]"> +<tr> +<td> +<$link> +<$list filter="[all[current]removeprefix[$:/config/EditorTypeMappings/]]"> +<$text text={{!!title}}/> +</$list> +</$link> +</td> +<td> +<$view field="text"/> +</td> +</tr> +</$list> +</tbody> +</table> diff --git a/core/ui/ControlPanel/Advanced/Settings/ToolbarButtons.tid b/core/ui/ControlPanel/Advanced/Settings/ToolbarButtons.tid new file mode 100644 index 000000000..e3f1926f7 --- /dev/null +++ b/core/ui/ControlPanel/Advanced/Settings/ToolbarButtons.tid @@ -0,0 +1,10 @@ +title: $:/core/ui/ControlPanel/Advanced/Settings/ToolbarButtons +tags: $:/tags/ControlPanel/Advanced/Settings +caption: {{$:/language/ControlPanel/Advanced/Settings/ToolbarButtons/Caption}} + +\define lingo-base() $:/language/ControlPanel/Advanced/Settings/ToolbarButtons/ +<<lingo Hint>> + +<$checkbox tiddler="$:/config/Toolbar/Icons" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Toolbar/Icons"><<lingo Icons/Description>></$link> </$checkbox> + +<$checkbox tiddler="$:/config/Toolbar/Text" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Toolbar/Text"><<lingo Text/Description>></$link> </$checkbox> diff --git a/core/ui/ControlPanel/Appearance/Toolbars.tid b/core/ui/ControlPanel/Appearance/Toolbars.tid new file mode 100644 index 000000000..bcb0aa843 --- /dev/null +++ b/core/ui/ControlPanel/Appearance/Toolbars.tid @@ -0,0 +1,9 @@ +title: $:/core/ui/ControlPanel/Appearance/Toolbars +tags: $:/tags/ControlPanel/Appearance +caption: {{$:/language/ControlPanel/Appearance/Toolbars/Caption}} + +{{$:/language/ControlPanel/Appearance/Toolbars/Hint}} + +<div class="tw-control-panel"> +<<tabs "[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Appearance/Toolbars]!has[draft.of]]" "$:/core/ui/ControlPanel/Appearance/Toolbars/ViewToolbar" "$:/state/tabs/controlpanel/toolbars" "tw-vertical">> +</div> diff --git a/core/ui/ControlPanel/Appearance/Toolbars/EditToolbar.tid b/core/ui/ControlPanel/Appearance/Toolbars/EditToolbar.tid new file mode 100644 index 000000000..eccd2e0d3 --- /dev/null +++ b/core/ui/ControlPanel/Appearance/Toolbars/EditToolbar.tid @@ -0,0 +1,24 @@ +title: $:/core/ui/ControlPanel/Appearance/Toolbars/EditToolbar +tags: $:/tags/ControlPanel/Appearance/Toolbars +caption: {{$:/language/ControlPanel/Appearance/Toolbars/EditToolbar/Caption}} + +\define lingo-base() $:/language/TiddlerInfo/ +\define config-title() +$:/config/EditToolbarButtons/Visibility/$(listItem)$ +\end + +{{$:/language/ControlPanel/Appearance/Toolbars/EditToolbar/Hint}} + +<$set name="tw-config-toolbar-icons" value="yes"> + +<$set name="tw-config-toolbar-text" value="yes"> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"> + +<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"> <$transclude tiddler=<<listItem>> field="caption"/> <i class="tw-muted">-- <$transclude tiddler=<<listItem>> field="description"/></i></$checkbox> + +</$list> + +</$set> + +</$set> diff --git a/core/ui/ControlPanel/Appearance/Toolbars/PageControls.tid b/core/ui/ControlPanel/Appearance/Toolbars/PageControls.tid new file mode 100644 index 000000000..16fa8c957 --- /dev/null +++ b/core/ui/ControlPanel/Appearance/Toolbars/PageControls.tid @@ -0,0 +1,24 @@ +title: $:/core/ui/ControlPanel/Appearance/Toolbars/PageControls +tags: $:/tags/ControlPanel/Appearance/Toolbars +caption: {{$:/language/ControlPanel/Appearance/Toolbars/PageControls/Caption}} + +\define lingo-base() $:/language/TiddlerInfo/ +\define config-title() +$:/config/PageControlButtons/Visibility/$(listItem)$ +\end + +{{$:/language/ControlPanel/Appearance/Toolbars/PageControls/Hint}} + +<$set name="tw-config-toolbar-icons" value="yes"> + +<$set name="tw-config-toolbar-text" value="yes"> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> + +<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"> <$transclude tiddler=<<listItem>> field="caption"/> <i class="tw-muted">-- <$transclude tiddler=<<listItem>> field="description"/></i></$checkbox> + +</$list> + +</$set> + +</$set> diff --git a/core/ui/ControlPanel/Appearance/Toolbars/ViewToolbar.tid b/core/ui/ControlPanel/Appearance/Toolbars/ViewToolbar.tid new file mode 100644 index 000000000..ad50615af --- /dev/null +++ b/core/ui/ControlPanel/Appearance/Toolbars/ViewToolbar.tid @@ -0,0 +1,24 @@ +title: $:/core/ui/ControlPanel/Appearance/Toolbars/ViewToolbar +tags: $:/tags/ControlPanel/Appearance/Toolbars +caption: {{$:/language/ControlPanel/Appearance/Toolbars/ViewToolbar/Caption}} + +\define lingo-base() $:/language/TiddlerInfo/ +\define config-title() +$:/config/ViewToolbarButtons/Visibility/$(listItem)$ +\end + +{{$:/language/ControlPanel/Appearance/Toolbars/ViewToolbar/Hint}} + +<$set name="tw-config-toolbar-icons" value="yes"> + +<$set name="tw-config-toolbar-text" value="yes"> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"> + +<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"> <$transclude tiddler=<<listItem>> field="caption"/> <i class="tw-muted">-- <$transclude tiddler=<<listItem>> field="description"/></i></$checkbox> + +</$list> + +</$set> + +</$set> diff --git a/core/ui/ControlPanel/Plugins.tid b/core/ui/ControlPanel/Plugins.tid index 47c0e9663..a476a9290 100644 --- a/core/ui/ControlPanel/Plugins.tid +++ b/core/ui/ControlPanel/Plugins.tid @@ -3,32 +3,89 @@ tags: $:/tags/ControlPanel caption: {{$:/language/ControlPanel/Plugins/Caption}} \define lingo-base() $:/language/ControlPanel/Plugins/ -\define plugin-table(type) -<table> -<tbody> -<tr> -<th> -<<lingo Fields/Description>> -</th> -<th> -<<lingo Fields/Version>> -</th> -</tr> -<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]"> -<tr> -<td> -<$link to={{!!title}}> -''<$view field="description"><$view field="title"/></$view>''<br> +\define popup-state-macro() +$(qualified-state)$-$(currentTiddler)$ +\end +\define tabs-state-macro() +$(popup-state)$-$(pluginInfoType)$ +\end +\define plugin-icon-title() +$(currentTiddler)$/icon +\end +\define plugin-disable-title() +$:/config/Plugins/Disabled/$(currentTiddler)$ +\end +\define plugin-table-body(type,disabledMessage) +<div class="tw-plugin-info-chunk"> +<$reveal type="nomatch" state=<<popup-state>> text="yes"> +<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="yes"> +{{$:/core/images/right-arrow}} +</$button> +</$reveal> +<$reveal type="match" state=<<popup-state>> text="yes"> +<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="no"> +{{$:/core/images/down-arrow}} +</$button> +</$reveal> +</div> +<div class="tw-plugin-info-chunk"> +<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>> +<$transclude tiddler="$:/core/images/plugin-generic-$type$"/> +</$transclude> +</div> +<div class="tw-plugin-info-chunk"> +<div> +''<$view field="description"><$view field="title"/></$view>'' $disabledMessage$ +</div> +<div> <$view field="title"/> -</$link> -</td> -<td> +</div> +<div> <$view field="version"/> -</td> -</tr> +</div> +</div> +\end +\define plugin-table(type) +<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>> +<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]" emptyMessage=<<lingo "Empty/Hint">>> +<$set name="popup-state" value=<<popup-state-macro>>> +<$reveal type="nomatch" state=<<plugin-disable-title>> text="yes"> +<$link to={{!!title}} class="tw-plugin-info"> +<<plugin-table-body type:"$type$">> +</$link> +</$reveal> +<$reveal type="match" state=<<plugin-disable-title>> text="yes"> +<$link to={{!!title}} class="tw-plugin-info tw-plugin-info-disabled"> +<<plugin-table-body type:"$type$" disabledMessage:"<$macrocall $name='lingo' title='Disabled/Status'/>">> +</$link> +</$reveal> +<$reveal type="match" text="yes" state=<<popup-state>>> +<div class="tw-plugin-info-dropdown"> +<$list filter="[all[current]] -[[$:/core]]"> +<div style="float:right;"> +<$reveal type="nomatch" state=<<plugin-disable-title>> text="yes"> +<$button set=<<plugin-disable-title>> setTo="yes" title={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}> +<<lingo Disable/Caption>> +</$button> +</$reveal> +<$reveal type="match" state=<<plugin-disable-title>> text="yes"> +<$button set=<<plugin-disable-title>> setTo="no" title={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}> +<<lingo Enable/Caption>> +</$button> +</$reveal> +</div> </$list> -</tbody> -</table> +<$reveal type="nomatch" text="" state="!!list"> +<$macrocall $name="tabs" state=<<tabs-state-macro>> tabsList={{!!list}} default="readme" template="$:/core/ui/PluginInfo"/> +</$reveal> +<$reveal type="match" text="" state="!!list"> +No information provided +</$reveal> +</div> +</$reveal> +</$set> +</$list> +</$set> \end ! <<lingo Plugin/Prompt>> diff --git a/core/ui/ControlPanel/Saving.tid b/core/ui/ControlPanel/Saving.tid index d17e7a208..6c8aab42c 100644 --- a/core/ui/ControlPanel/Saving.tid +++ b/core/ui/ControlPanel/Saving.tid @@ -13,7 +13,7 @@ http://$(userName)$.tiddlyspot.com/backup/ </$set> </$reveal> \end -! <<lingo Saving/Heading>> +! <<lingo Heading>> |<<lingo AutoSave>> |{{$:/snippets/autosavestatus}} | diff --git a/core/ui/EditTemplate/controls.tid b/core/ui/EditTemplate/controls.tid index 93277362c..f2cfd6692 100644 --- a/core/ui/EditTemplate/controls.tid +++ b/core/ui/EditTemplate/controls.tid @@ -1,4 +1,11 @@ title: $:/core/ui/EditTemplate/controls tags: $:/tags/EditTemplate -<span class="tw-tiddler-controls titlebar"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> </span> +\define config-title() +$:/config/EditToolbarButtons/Visibility/$(listItem)$ +\end +<div class="tw-tiddler-title"> +<$view field="title"/> +<span class="tw-tiddler-controls titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span> +<div style="clear: both;"></div> +</div> diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index eaed3b31f..7c5a51a96 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -2,11 +2,18 @@ title: $:/core/ui/EditTemplate/fields tags: $:/tags/EditTemplate \define lingo-base() $:/language/EditTemplate/ +\define config-title() +$:/config/EditTemplateFields/Visibility/$(currentField)$ +\end +\define config-filter() +[[hide]] -[title{$(config-title)$}] +\end <$fieldmangler> <div class="tw-edit-fields"> <table class="tw-edit-fields"> <tbody> -<$list filter="[all[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]] +[sort[title]]" variable="currentField"> +<$list filter="[all[current]fields[]] +[sort[title]]" variable="currentField"> +<$list filter=<<config-filter>> variable="temp"> <tr class="tw-edit-field"> <td class="tw-edit-field-name"> <$text text=<<currentField>>/>:</td> @@ -18,6 +25,7 @@ tags: $:/tags/EditTemplate </td> </tr> </$list> +</$list> </tbody> </table> </div> diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index e8a68c4b4..5c9c15ca6 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -15,8 +15,8 @@ background-color:$(backgroundColor)$; <div class="tw-edit-add-tag"> <span class="tw-add-tag-name"> -<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} 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"> +<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> class="tw-edit-texteditor"/> +</span> <$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"> <$button message="tw-add-tag" param={{$:/temp/NewTagName}} set="$:/temp/NewTagName" setTo="" class=""> <<lingo Tags/Add/Button>> </$button> @@ -25,7 +25,7 @@ background-color:$(backgroundColor)$; <div class="tw-block-dropdown-wrapper"> -<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default=""> +<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default=""> <div class="tw-block-dropdown"> diff --git a/core/ui/EditTemplate/title.tid b/core/ui/EditTemplate/title.tid index af0ebced0..6953ae072 100644 --- a/core/ui/EditTemplate/title.tid +++ b/core/ui/EditTemplate/title.tid @@ -1,6 +1,4 @@ title: $:/core/ui/EditTemplate/title tags: $:/tags/EditTemplate -<$view field="title"/> - <$edit-text field="draft.title" class="titlebar tw-edit-texteditor"/> diff --git a/core/ui/EditTemplate/type.tid b/core/ui/EditTemplate/type.tid index ed4f89315..476d42cc3 100644 --- a/core/ui/EditTemplate/type.tid +++ b/core/ui/EditTemplate/type.tid @@ -2,10 +2,10 @@ title: $:/core/ui/EditTemplate/type tags: $:/tags/EditTemplate \define lingo-base() $:/language/EditTemplate/ -<p><$fieldmangler><em class="tw-edit"><<lingo Type/Prompt>></em> <$edit-text field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/typeDropdown">> class="tw-edit-typeeditor"/> <$button popup=<<qualify "$:/state/typeDropdown">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <$button message="tw-remove-field" param="type" class="btn-invisible btn-icon">{{$:/core/images/delete-button}}</$button></$fieldmangler></p> +<p><$fieldmangler><em class="tw-edit"><<lingo Type/Prompt>></em> <$edit-text field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/popup/type-dropdown">> class="tw-edit-typeeditor"/> <$button popup=<<qualify "$:/state/popup/type-dropdown">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <$button message="tw-remove-field" param="type" class="btn-invisible btn-icon">{{$:/core/images/delete-button}}</$button></$fieldmangler></p> <div class="tw-block-dropdown-wrapper"> -<$reveal state=<<qualify "$:/state/typeDropdown">> type="nomatch" text="" default=""> +<$reveal state=<<qualify "$:/state/popup/type-dropdown">> type="nomatch" text="" default=""> <div class="tw-block-dropdown tw-edit-type-dropdown"> <$linkcatcher to="!!type"> <$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group]]'> diff --git a/core/ui/EditToolbar/cancel.tid b/core/ui/EditToolbar/cancel.tid index b271f158e..179767779 100644 --- a/core/ui/EditToolbar/cancel.tid +++ b/core/ui/EditToolbar/cancel.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/EditToolbar/cancel +title: $:/core/ui/Buttons/cancel tags: $:/tags/EditToolbar +caption: {{$:/core/images/cancel-button}} {{$:/language/Buttons/Cancel/Caption}} +description: {{$:/language/Buttons/Cancel/Hint}} -<$button message="tw-cancel-tiddler" title={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class="btn-invisible">{{$:/core/images/cancel-button}}</$button> \ No newline at end of file +<$button message="tw-cancel-tiddler" title={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/cancel-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Cancel/Caption}}/> +</$list> +</$button> diff --git a/core/ui/EditToolbar/delete.tid b/core/ui/EditToolbar/delete.tid index a8f5881d4..1b5eec1be 100644 --- a/core/ui/EditToolbar/delete.tid +++ b/core/ui/EditToolbar/delete.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/EditToolbar/delete +title: $:/core/ui/Buttons/delete tags: $:/tags/EditToolbar +caption: {{$:/core/images/delete-button}} {{$:/language/Buttons/Delete/Caption}} +description: {{$:/language/Buttons/Delete/Hint}} -<$button message="tw-delete-tiddler" title={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class="btn-invisible">{{$:/core/images/delete-button}}</$button> \ No newline at end of file +<$button message="tw-delete-tiddler" title={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/delete-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Delete/Caption}}/> +</$list> +</$button> \ No newline at end of file diff --git a/core/ui/EditToolbar/save.tid b/core/ui/EditToolbar/save.tid index fcd40d461..65caeb5eb 100644 --- a/core/ui/EditToolbar/save.tid +++ b/core/ui/EditToolbar/save.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/EditToolbar/save +title: $:/core/ui/Buttons/save tags: $:/tags/EditToolbar +caption: {{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}} +description: {{$:/language/Buttons/Save/Hint}} -<$button message="tw-save-tiddler" title={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class="btn-invisible">{{$:/core/images/done-button}}</$button> \ No newline at end of file +<$button message="tw-save-tiddler" title={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/done-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Save/Caption}}/> +</$list> +</$button> \ No newline at end of file diff --git a/core/ui/ImportListing.tid b/core/ui/ImportListing.tid new file mode 100644 index 000000000..66c080ae7 --- /dev/null +++ b/core/ui/ImportListing.tid @@ -0,0 +1,56 @@ +title: $:/core/ui/ImportListing + +\define lingo-base() $:/language/Import/ +\define messageField() +message-$(payloadTiddler)$ +\end +\define selectionField() +selection-$(payloadTiddler)$ +\end +\define previewPopupState() +!!popup-$(payloadTiddler)$ +\end +<table> +<tbody> +<tr> +<th> +<<lingo Listing/Select/Caption>> +</th> +<th> +<<lingo Listing/Title/Caption>> +</th> +<th> +<<lingo Listing/Status/Caption>> +</th> +</tr> +<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler"> +<tr> +<td> +<$checkbox field=<<selectionField>> checked="checked" unchecked="unchecked" default="checked"/> +</td> +<td> +<$reveal type="nomatch" state=<<previewPopupState>> text="yes"> +<$button class="btn-invisible btn-dropdown" set=<<previewPopupState>> setTo="yes"> +{{$:/core/images/right-arrow}} <$text text=<<payloadTiddler>>/> +</$button> +</$reveal> +<$reveal type="match" state=<<previewPopupState>> text="yes"> +<$button class="btn-invisible btn-dropdown" set=<<previewPopupState>> setTo="no"> +{{$:/core/images/down-arrow}} <$text text=<<payloadTiddler>>/> +</$button> +</$reveal> +</td> +<td> +<$view field=<<messageField>>/> +</td> +</tr> +<tr> +<td colspan="3"> +<$reveal type="match" text="yes" state=<<previewPopupState>>> +<$transclude subtiddler=<<payloadTiddler>> mode="block"/> +</$reveal> +</td> +</tr> +</$list> +</tbody> +</table> diff --git a/core/ui/MissingTemplate.tid b/core/ui/MissingTemplate.tid index 5e2d36bd7..11b387547 100644 --- a/core/ui/MissingTemplate.tid +++ b/core/ui/MissingTemplate.tid @@ -1,10 +1,10 @@ title: $:/core/ui/MissingTemplate <div class="tw-tiddler-missing"> -<$button popup=<<qualify "$:/state/missingpopup">> class="btn-invisible tw-missing-tiddler-label"> +<$button popup=<<qualify "$:/state/popup/missing">> class="btn-invisible tw-missing-tiddler-label"> <$view field="title" format="text" /> </$button> -<$reveal state=<<qualify "$:/state/missingpopup">> type="popup" position="below" animate="yes"> +<$reveal state=<<qualify "$:/state/popup/missing">> type="popup" position="below" animate="yes"> <div class="tw-drop-down"> <$transclude tiddler="$:/core/ui/ListItemTemplate"/> <hr> diff --git a/core/ui/MoreSideBar/Tags.tid b/core/ui/MoreSideBar/Tags.tid index eda362e5f..63eab2673 100644 --- a/core/ui/MoreSideBar/Tags.tid +++ b/core/ui/MoreSideBar/Tags.tid @@ -2,8 +2,19 @@ title: $:/core/ui/MoreSideBar/Tags tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Tags/Caption}} -\define lingo-base() $:/language/SideBar/Tags/ -<$button to="$:/TagManager" class="btn"><<lingo TagManager/Caption>></$button> +<$set name="tw-config-toolbar-icons" value="yes"> + +<$set name="tw-config-toolbar-text" value="yes"> + +<$set name="tw-config-toolbar-class" value=""> + +{{$:/core/ui/Buttons/tag-manager}} + +</$set> + +</$set> + +</$set> <$list filter="[tags[]!is[system]sort[title]]"> diff --git a/core/ui/PageControls/SaveWikiButtonTemplate.tid b/core/ui/PageControls/SaveWikiButtonTemplate.tid new file mode 100644 index 000000000..1daafaaed --- /dev/null +++ b/core/ui/PageControls/SaveWikiButtonTemplate.tid @@ -0,0 +1,3 @@ +title: $:/config/SaveWikiButton/Template + +$:/core/save/all \ No newline at end of file diff --git a/core/ui/PageControls/closeall.tid b/core/ui/PageControls/closeall.tid new file mode 100644 index 000000000..676df6f12 --- /dev/null +++ b/core/ui/PageControls/closeall.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/close-all +tags: $:/tags/PageControls +caption: {{$:/core/images/close-all-button}} {{$:/language/Buttons/CloseAll/Caption}} +description: {{$:/language/Buttons/CloseAll/Hint}} + +<$button message="tw-close-all-tiddlers" title={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/close-all-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/CloseAll/Caption}}/> +</$list> +</$button> diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index b0ca856e4..aac9af0e5 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/PageControls/control-panel +title: $:/core/ui/Buttons/control-panel tags: $:/tags/PageControls +caption: {{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Caption}} +description: {{$:/language/Buttons/ControlPanel/Hint}} -<$button to="$:/ControlPanel" title={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class="btn-invisible">{{$:/core/images/options-button}}</$button> \ No newline at end of file +<$button to="$:/ControlPanel" title={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/options-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/ControlPanel/Caption}}/> +</$list> +</$button> diff --git a/core/ui/PageControls/encryption.tid b/core/ui/PageControls/encryption.tid new file mode 100644 index 000000000..43bd9b8de --- /dev/null +++ b/core/ui/PageControls/encryption.tid @@ -0,0 +1,25 @@ +title: $:/core/ui/Buttons/encryption +tags: $:/tags/PageControls +caption: {{$:/core/images/locked-padlock}} {{$:/language/Buttons/Encryption/Caption}} +description: {{$:/language/Buttons/Encryption/Hint}} + +<$reveal type="match" state="$:/isEncrypted" text="yes"> +<$button message="tw-clear-password" title={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/locked-padlock}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/> +</$list> +</$button> +</$reveal> +<$reveal type="nomatch" state="$:/isEncrypted" text="yes"> +<$button message="tw-set-password" title={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/unlocked-padlock}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> +</$list> +</$button> +</$reveal> diff --git a/core/ui/PageControls/full-screen.tid b/core/ui/PageControls/full-screen.tid new file mode 100644 index 000000000..791b2e218 --- /dev/null +++ b/core/ui/PageControls/full-screen.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/full-screen +tags: $:/tags/PageControls +caption: {{$:/core/images/full-screen-button}} {{$:/language/Buttons/FullScreen/Caption}} +description: {{$:/language/Buttons/FullScreen/Hint}} + +<$button message="tw-full-screen" title={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/full-screen-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/FullScreen/Caption}}/> +</$list> +</$button> diff --git a/core/ui/PageControls/home.tid b/core/ui/PageControls/home.tid new file mode 100644 index 000000000..d277f8208 --- /dev/null +++ b/core/ui/PageControls/home.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/home +tags: $:/tags/PageControls +caption: {{$:/core/images/home-button}} {{$:/language/Buttons/Home/Caption}} +description: {{$:/language/Buttons/Home/Hint}} + +<$button message="tw-home" title={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/home-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Home/Caption}}/> +</$list> +</$button> diff --git a/core/ui/PageControls/import.tid b/core/ui/PageControls/import.tid new file mode 100644 index 000000000..f0be94dca --- /dev/null +++ b/core/ui/PageControls/import.tid @@ -0,0 +1,16 @@ +title: $:/core/ui/Buttons/import +tags: $:/tags/PageControls +caption: {{$:/core/images/import-button}} {{$:/language/Buttons/Import/Caption}} +description: {{$:/language/Buttons/Import/Hint}} + +<div class="tw-file-input-wrapper"> +<$button title={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/import-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Import/Caption}}/> +</$list> +</$button> +<$browse/> +</div> diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid new file mode 100644 index 000000000..9c074b02a --- /dev/null +++ b/core/ui/PageControls/language.tid @@ -0,0 +1,52 @@ +title: $:/core/ui/Buttons/language +tags: $:/tags/PageControls +caption: {{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}} +description: {{$:/language/Buttons/Language/Hint}} + +\define flag-title() +$(languagePluginTitle)$/icon +\end +<$button popup=<<qualify "$:/state/popup/language">> title={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected"> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +<span class="tw-image-button"> +<$set name="languagePluginTitle" value={{$:/language}}> +<$image source=<<flag-title>>/> +</$set> +</span> +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Language/Caption}}/> +</$list> +</$button> +<$reveal state=<<qualify "$:/state/popup/language">> type="popup" position="below" animate="yes"> +<div class="tw-drop-down"> +<$linkcatcher to="$:/language"> +<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[title]]"> +<$link> +<span class="tw-drop-down-bullet"> +<$reveal type="match" state="$:/language" text=<<currentTiddler>>> +• +</$reveal> +<$reveal type="nomatch" state="$:/language" text=<<currentTiddler>>> +  +</$reveal> +</span> +<span class="tw-image-button"> +<$set name="languagePluginTitle" value=<<currentTiddler>>> +<$transclude subtiddler=<<flag-title>>> +<$list filter="[all[current]field:title[$:/languages/en-GB]]"> +<$transclude tiddler="$:/languages/en-GB/icon"/> +</$list> +</$transclude> +</$set> +</span> +<$view field="description"> +<$view field="name"> +<$view field="title"/> +</$view> +</$view> +</$link> +</$list> +</$linkcatcher> +</div> +</$reveal> diff --git a/core/ui/PageControls/more-page-actions.tid b/core/ui/PageControls/more-page-actions.tid new file mode 100644 index 000000000..24ffe8380 --- /dev/null +++ b/core/ui/PageControls/more-page-actions.tid @@ -0,0 +1,46 @@ +title: $:/core/ui/Buttons/more-page-actions +tags: $:/tags/PageControls +caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}} +description: {{$:/language/Buttons/More/Hint}} + +\define config-title() +$:/config/PageControlButtons/Visibility/$(listItem)$ +\end +<$button popup=<<qualify "$:/state/popup/more">> title={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected"> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/down-arrow}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/More/Caption}}/> +</$list> +</$button> +<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes"> + +<div class="tw-drop-down"> + +<$set name="tw-config-toolbar-icons" value="yes"> + +<$set name="tw-config-toolbar-text" value="yes"> + +<$set name="tw-config-toolbar-class" value="btn-invisible"> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" variable="listItem"> + +<$reveal type="match" state=<<config-title>> text="hide"> + +<$transclude tiddler=<<listItem>> mode="inline"/> + +</$reveal> + +</$list> + +</$set> + +</$set> + +</$set> + +</div> + +</$reveal> + diff --git a/core/ui/PageControls/newtiddler.tid b/core/ui/PageControls/newtiddler.tid index 576bdc7ad..087ecda86 100644 --- a/core/ui/PageControls/newtiddler.tid +++ b/core/ui/PageControls/newtiddler.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/PageControls/new-tiddler +title: $:/core/ui/Buttons/new-tiddler tags: $:/tags/PageControls +caption: {{$:/core/images/new-button}} {{$:/language/Buttons/NewTiddler/Caption}} +description: {{$:/language/Buttons/NewTiddler/Hint}} -<$button message="tw-new-tiddler" title={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class="btn-invisible">{{$:/core/images/new-button}}</$button> \ No newline at end of file +<$button message="tw-new-tiddler" title={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/new-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/NewTiddler/Caption}}/> +</$list> +</$button> diff --git a/core/ui/PageControls/refresh.tid b/core/ui/PageControls/refresh.tid new file mode 100644 index 000000000..00789a1d5 --- /dev/null +++ b/core/ui/PageControls/refresh.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/refresh +tags: $:/tags/PageControls +caption: {{$:/core/images/refresh-button}} {{$:/language/Buttons/Refresh/Caption}} +description: {{$:/language/Buttons/Refresh/Hint}} + +<$button message="tw-browser-refresh" title={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/refresh-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Refresh/Caption}}/> +</$list> +</$button> diff --git a/core/ui/PageControls/savewiki.tid b/core/ui/PageControls/savewiki.tid index 5e1285c54..b41a18921 100644 --- a/core/ui/PageControls/savewiki.tid +++ b/core/ui/PageControls/savewiki.tid @@ -1,4 +1,15 @@ -title: $:/core/ui/PageControls/save-wiki +title: $:/core/ui/Buttons/save-wiki tags: $:/tags/PageControls +caption: {{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}} +description: {{$:/language/Buttons/SaveWiki/Hint}} -<$button message="tw-save-wiki" title={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class="btn-invisible">{{$:/core/images/save-button}}</$button> \ No newline at end of file +<$button message="tw-save-wiki" param={{$:/config/SaveWikiButton/Template}} title={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tw-config-toolbar-class>>> +<span class="tw-dirty-indicator"> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/save-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/SaveWiki/Caption}}/> +</$list> +</span> +</$button> \ No newline at end of file diff --git a/core/ui/PageControls/storyview.tid b/core/ui/PageControls/storyview.tid new file mode 100644 index 000000000..22e86ba58 --- /dev/null +++ b/core/ui/PageControls/storyview.tid @@ -0,0 +1,37 @@ +title: $:/core/ui/Buttons/storyview +tags: $:/tags/PageControls +caption: {{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Caption}} +description: {{$:/language/Buttons/StoryView/Hint}} + +\define icon() +$:/core/images/storyview-$(storyview)$ +\end +<$button popup=<<qualify "$:/state/popup/storyview">> title={{$:/language/Buttons/StoryView/Hint}} aria-label={{$:/language/Buttons/StoryView/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected"> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +<$set name="storyview" value={{$:/view}}> +<$transclude tiddler=<<icon>>/> +</$set> +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/StoryView/Caption}}/> +</$list> +</$button> +<$reveal state=<<qualify "$:/state/popup/storyview">> type="popup" position="below" animate="yes"> +<div class="tw-drop-down"> +<$linkcatcher to="$:/view"> +<$list filter="[storyviews[]]" variable="storyview"> +<$link to=<<storyview>>> +<span class="tw-drop-down-bullet"> +<$reveal type="match" state="$:/view" text=<<storyview>>> +• +</$reveal> +<$reveal type="nomatch" state="$:/view" text=<<storyview>>> +  +</$reveal> +</span> +<$transclude tiddler=<<icon>>/> +<$text text=<<storyview>>/></$link> +</$list> +</$linkcatcher> +</div> +</$reveal> diff --git a/core/ui/PageControls/tag-button.tid b/core/ui/PageControls/tag-button.tid new file mode 100644 index 000000000..2becac341 --- /dev/null +++ b/core/ui/PageControls/tag-button.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/tag-manager +tags: $:/tags/PageControls +caption: {{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption}} +description: {{$:/language/Buttons/TagManager/Hint}} + +<$button to="$:/TagManager" title={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/tag-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/TagManager/Caption}}/> +</$list> +</$button> diff --git a/core/ui/PageControls/theme.tid b/core/ui/PageControls/theme.tid new file mode 100644 index 000000000..21296bb14 --- /dev/null +++ b/core/ui/PageControls/theme.tid @@ -0,0 +1,32 @@ +title: $:/core/ui/Buttons/theme +tags: $:/tags/PageControls +caption: {{$:/core/images/theme-button}} {{$:/language/Buttons/Theme/Caption}} +description: {{$:/language/Buttons/Theme/Hint}} + +<$button popup=<<qualify "$:/state/popup/theme">> title={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected"> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/theme-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Theme/Caption}}/> +</$list> +</$button> +<$reveal state=<<qualify "$:/state/popup/theme">> type="popup" position="below" animate="yes"> +<div class="tw-drop-down"> +<$linkcatcher to="$:/theme"> +<$list filter="[plugin-type[theme]sort[title]]" variable="themeTitle"> +<$link to=<<themeTitle>>> +<span class="tw-drop-down-bullet"> +<$reveal type="match" state="$:/theme" text=<<themeTitle>>> +• +</$reveal> +<$reveal type="nomatch" state="$:/theme" text=<<themeTitle>>> +  +</$reveal> +</span> +<$view tiddler=<<themeTitle>> field="name"/> +</$link> +</$list> +</$linkcatcher> +</div> +</$reveal> diff --git a/core/ui/PageStylesheet.tid b/core/ui/PageStylesheet.tid index ffca4baf0..b20c7670e 100644 --- a/core/ui/PageStylesheet.tid +++ b/core/ui/PageStylesheet.tid @@ -1,59 +1,9 @@ title: $:/core/ui/PageStylesheet -\define colour(name) -<$transclude tiddler={{$:/palette}} index="$name$"/> -\end -\define color(name) -<<colour $name$>> -\end -\define box-shadow(shadow) -``` - -webkit-box-shadow: $shadow$; - -moz-box-shadow: $shadow$; - box-shadow: $shadow$; -``` -\end -\define filter(filter) -``` - -webkit-filter: $filter$; - -moz-filter: $filter$; - filter: $filter$; -``` -\end -\define transition(transition) -``` - -webkit-transition: $transition$; - -moz-transition: $transition$; - transition: $transition$; -``` -\end -\define transform-origin(origin) -``` - -webkit-transform-origin: $origin$; - -moz-transform-origin: $origin$; - transform-origin: $origin$; -``` -\end -\define background-linear-gradient(gradient) -``` -background-image: linear-gradient($gradient$); -background-image: -o-linear-gradient($gradient$); -background-image: -moz-linear-gradient($gradient$); -background-image: -webkit-linear-gradient($gradient$); -background-image: -ms-linear-gradient($gradient$); -``` -\end -\define datauri(title) -<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}}/> -\end -\define if-sidebar(text) -<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal> -\end -\define if-no-sidebar(text) -<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal> -\end +<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]"> - -<$list filter="[all[shadows+tiddlers]tag[$:/tags/stylesheet]]"> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/stylesheet]!has[draft.of]]"> <$transclude/> </$list> + +</$importvariables> diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index 889286af5..3ce5cad36 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -6,6 +6,12 @@ tw-page-container tw-page-view-$(themeTitle)$ tw-language-$(languageTitle)$ <$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]"> +<$set name="tw-config-toolbar-icons" value={{$:/config/Toolbar/Icons}}> + +<$set name="tw-config-toolbar-text" value={{$:/config/Toolbar/Text}}> + +<$set name="tw-config-toolbar-class" value="btn-invisible"> + <$set name="themeTitle" value={{$:/view}}> <$set name="currentTiddler" value={{$:/language}}> @@ -40,4 +46,10 @@ tw-page-container tw-page-view-$(themeTitle)$ tw-language-$(languageTitle)$ </$set> +</$set> + +</$set> + +</$set> + </$importvariables> diff --git a/core/ui/PageTemplate/sidebar.tid b/core/ui/PageTemplate/sidebar.tid index 6e7351728..d202db60e 100644 --- a/core/ui/PageTemplate/sidebar.tid +++ b/core/ui/PageTemplate/sidebar.tid @@ -1,6 +1,9 @@ title: $:/core/ui/PageTemplate/sidebar tags: $:/tags/PageTemplate +\define config-title() +$:/config/PageControlButtons/Visibility/$(listItem)$ +\end <$scrollable fallthrough="no" class="tw-sidebar-scrollable"> <div class="sidebar-header"> @@ -20,13 +23,11 @@ tags: $:/tags/PageTemplate </div> <div class="tw-page-controls"> - <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> - +<$reveal type="nomatch" state=<<config-title>> text="hide"> <$transclude tiddler=<<listItem>> mode="inline"/> - +</$reveal> </$list> - </div> <$transclude tiddler="$:/core/ui/SideBarLists" mode="inline"/> diff --git a/core/ui/PageTemplate/story.tid b/core/ui/PageTemplate/story.tid index 7545b7c0b..ce81a621c 100644 --- a/core/ui/PageTemplate/story.tid +++ b/core/ui/PageTemplate/story.tid @@ -3,6 +3,26 @@ tags: $:/tags/PageTemplate <section class="story-river"> -<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/ViewTemplate" editTemplate="$:/core/ui/EditTemplate" storyview={{$:/view}} /> +<section class="story-backdrop"> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/AboveStory]!has[draft.of]]"> + +<$transclude/> + +</$list> + +</section> + +<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/ViewTemplate" editTemplate="$:/core/ui/EditTemplate" storyview={{$:/view}} /> + +<section class="story-frontdrop"> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]"> + +<$transclude/> + +</$list> + +</section> </section> diff --git a/core/ui/PluginInfo.tid b/core/ui/PluginInfo.tid new file mode 100644 index 000000000..08167f1ec --- /dev/null +++ b/core/ui/PluginInfo.tid @@ -0,0 +1,15 @@ +title: $:/core/ui/PluginInfo + +\define localised-info-tiddler-title() +$(currentTiddler)$/$(languageTitle)$/$(currentTab)$ +\end +\define info-tiddler-title() +$(currentTiddler)$/$(currentTab)$ +\end +<$transclude tiddler=<<localised-info-tiddler-title>> mode="block"> +<$transclude tiddler=<<currentTiddler>> subtiddler=<<localised-info-tiddler-title>> mode="block"> +<$transclude tiddler=<<currentTiddler>> subtiddler=<<info-tiddler-title>> mode="block"> +No ''"<$text text=<<currentTab>>/>"'' found +</$transclude> +</$transclude> +</$transclude> diff --git a/core/ui/SideBar/Tools.tid b/core/ui/SideBar/Tools.tid index 515bafed0..1c1cd7ea6 100644 --- a/core/ui/SideBar/Tools.tid +++ b/core/ui/SideBar/Tools.tid @@ -3,24 +3,26 @@ tags: $:/tags/SideBar caption: {{$:/language/SideBar/Tools/Caption}} \define lingo-base() $:/language/ControlPanel/ -<<lingo Tools/Import/Prompt>> <$browse/> - ---- - -{{$:/snippets/encryptionstatus}} - ---- +\define config-title() +$:/config/PageControlButtons/Visibility/$(listItem)$ +\end <<lingo Basics/Version/Prompt>> <<version>> ---- +<$set name="tw-config-toolbar-icons" value="yes"> -{{$:/snippets/viewswitcher}} +<$set name="tw-config-toolbar-text" value="yes"> ---- +<$set name="tw-config-toolbar-class" value=""> -{{$:/snippets/minithemeswitcher}} +<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> ---- +<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"> <$transclude tiddler=<<listItem>>/> <i class="tw-muted"><$transclude tiddler=<<listItem>> field="description"/></i></$checkbox> -{{$:/snippets/languageswitcher}} +</$list> + +</$set> + +</$set> + +</$set> diff --git a/core/ui/SideBarLists.tid b/core/ui/SideBarLists.tid index 79ff61241..e10c1d8e2 100644 --- a/core/ui/SideBarLists.tid +++ b/core/ui/SideBarLists.tid @@ -1,23 +1,34 @@ title: $:/core/ui/SideBarLists <div class="tw-sidebar-lists"> - <div class="tw-search"> - <$edit-text tiddler="$:/temp/search" type="search" tag="input"/> - <$reveal state="$:/temp/search" type="nomatch" text=""> - <$linkcatcher to="$:/temp/search"> - <$link to="" class="btn-invisible">{{$:/core/images/close-button}}</$link> - </$linkcatcher> - </$reveal> - <$reveal state="$:/temp/search" type="match" text=""> <$link to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="btn-invisible">…</$link> - </$reveal> - </div> - <$reveal state="$:/temp/search" type="nomatch" text=""> - <div class="tw-search-results"> - {{$:/language/Search/Matches}} - <$list filter="[!is[system]search{$:/temp/search}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/> - </div> - </$reveal> - <$reveal state="$:/temp/search" type="match" text=""> - <<tabs "[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]" "$:/core/ui/SideBar/Open" "$:/state/tab/sidebar">> - </$reveal> + +<div class="tw-search"> +<$edit-text tiddler="$:/temp/search" type="search" tag="input"/> +<$reveal state="$:/temp/search" type="nomatch" text=""> +<$linkcatcher to="$:/temp/search"> +<$link to="" class="btn-invisible">{{$:/core/images/close-button}}</$link> +</$linkcatcher> +</$reveal> +<$reveal state="$:/temp/search" type="match" text=""> <$link to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="btn-invisible">…</$link> +</$reveal> +</div> + +<$reveal state="$:/temp/search" type="nomatch" text=""> + +<div class="tw-search-results"> + +{{$:/language/Search/Matches}} + +<$list filter="[!is[system]search{$:/temp/search}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/> + +</div> + +</$reveal> + +<$reveal state="$:/temp/search" type="match" text=""> + +<<tabs "[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]" "$:/core/ui/SideBar/Open" "$:/state/tab/sidebar">> + +</$reveal> + </div> diff --git a/core/ui/TagManager.tid b/core/ui/TagManager.tid index 0bb7a7cb9..9e56fd011 100644 --- a/core/ui/TagManager.tid +++ b/core/ui/TagManager.tid @@ -1,19 +1,24 @@ title: $:/TagManager \define lingo-base() $:/language/TagManager/ -\define iconEditor(title) -<$edit-text field="icon" tag="input" size="20"/> <$button popup=<<qualify "$:/state/iconDropdown/$title$">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> -<div class="tw-block-dropdown-wrapper"> -<$reveal state=<<qualify "$:/state/iconDropdown/$title$">> type="nomatch" text="" default=""> -<$linkcatcher to="$title$!!icon"> -<div class="tw-block-dropdown tw-edit-type-dropdown"> -<$list filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] +[sort[title]]"> +\define iconEditorTab(type) +<$list filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[sort[title]] +[$type$is[system]]"> <$link to={{!!title}}> -<$view field="title"/> +<$transclude/> <$view field="title"/> </$link> </$list> -</div> +\end +\define iconEditor(title) +<div class="tw-drop-down-wrapper"> +<$edit-text field="icon" tag="input" size="20"/> <$button popup=<<qualify "$:/state/popup/icon/$title$">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> +<$reveal state=<<qualify "$:/state/popup/icon/$title$">> type="popup" position="belowleft" text="" default=""> +<div class="tw-drop-down"> +<$linkcatcher to="$title$!!icon"> +<<iconEditorTab type:"!">> +<hr/> +<<iconEditorTab type:"">> </$linkcatcher> +</div> </$reveal> </div> \end diff --git a/core/ui/TagTemplate.tid b/core/ui/TagTemplate.tid index 0767a5d69..b5111f891 100644 --- a/core/ui/TagTemplate.tid +++ b/core/ui/TagTemplate.tid @@ -5,11 +5,11 @@ background-color:$(backgroundColor)$; \end <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>>> +<$button popup=<<qualify "$:/state/popup/tag">> 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"/> +<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes"><div class="tw-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/> <hr> <$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/> </div> diff --git a/core/ui/TiddlerInfo.tid b/core/ui/TiddlerInfo.tid index d9753afb9..1156b7d07 100644 --- a/core/ui/TiddlerInfo.tid +++ b/core/ui/TiddlerInfo.tid @@ -1,3 +1,3 @@ title: $:/core/ui/TiddlerInfo -<<tabs "[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]" "$:/core/ui/TiddlerInfo/References">> +<<tabs "[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]" "$:/core/ui/TiddlerInfo/Tools">> diff --git a/core/ui/TiddlerInfo/Tools.tid b/core/ui/TiddlerInfo/Tools.tid new file mode 100644 index 000000000..c14d71692 --- /dev/null +++ b/core/ui/TiddlerInfo/Tools.tid @@ -0,0 +1,25 @@ +title: $:/core/ui/TiddlerInfo/Tools +tags: $:/tags/TiddlerInfo +caption: {{$:/language/TiddlerInfo/Tools/Caption}} + +\define lingo-base() $:/language/TiddlerInfo/ +\define config-title() +$:/config/ViewToolbarButtons/Visibility/$(listItem)$ +\end +<$set name="tw-config-toolbar-icons" value="yes"> + +<$set name="tw-config-toolbar-text" value="yes"> + +<$set name="tw-config-toolbar-class" value=""> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"> + +<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"> <$transclude tiddler=<<listItem>>/> <i class="tw-muted"><$transclude tiddler=<<listItem>> field="description"/></i></$checkbox> + +</$list> + +</$set> + +</$set> + +</$set> diff --git a/core/ui/UntaggedTemplate.tid b/core/ui/UntaggedTemplate.tid index 3bc170c8c..0318241f6 100644 --- a/core/ui/UntaggedTemplate.tid +++ b/core/ui/UntaggedTemplate.tid @@ -1,10 +1,10 @@ title: $:/core/ui/UntaggedTemplate \define lingo-base() $:/language/SideBar/ -<$button popup=<<qualify "$:/state/tagpopup">> class="btn-invisible tw-untagged-label tw-tag-label"> +<$button popup=<<qualify "$:/state/popup/tag">> class="btn-invisible tw-untagged-label tw-tag-label"> <<lingo Tags/Untagged/Caption>> </$button> -<$reveal state=<<qualify "$:/state/tagpopup">> type="popup" position="below"> +<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below"> <div class="tw-drop-down"> <$list filter="[untagged[]!is[system]] -[tags[]] +[sort[title]]" template="$:/core/ui/ListItemTemplate"/> </div> diff --git a/core/ui/ViewTemplate.tid b/core/ui/ViewTemplate.tid index 717b00699..baf83bb4d 100644 --- a/core/ui/ViewTemplate.tid +++ b/core/ui/ViewTemplate.tid @@ -1,8 +1,8 @@ title: $:/core/ui/ViewTemplate \define frame-classes() -tw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ +tw-tiddler-frame tw-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$ \end -<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/tiddlerInfo">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> +<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/popup/tiddler-info">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> </div> </$tiddler></$set></$set> diff --git a/core/ui/ViewTemplate/body.tid b/core/ui/ViewTemplate/body.tid index 4e3030c57..c983fd965 100644 --- a/core/ui/ViewTemplate/body.tid +++ b/core/ui/ViewTemplate/body.tid @@ -3,10 +3,14 @@ tags: $:/tags/ViewTemplate <div class="body"> +<$list filter="[all[current]!has[plugin-type]]"> + <$transclude> <$transclude tiddler="$:/language/MissingTiddler/Hint"/> </$transclude> +</$list> + </div> diff --git a/core/ui/ViewTemplate/import.tid b/core/ui/ViewTemplate/import.tid new file mode 100644 index 000000000..45dc72e6d --- /dev/null +++ b/core/ui/ViewTemplate/import.tid @@ -0,0 +1,19 @@ +title: $:/core/ui/ViewTemplate/import +tags: $:/tags/ViewTemplate + +\define lingo-base() $:/language/Import/ + +<$list filter="[all[current]field:plugin-type[import]]"> + +<div class="tw-import"> + +<<lingo Listing/Hint>> + +{{||$:/core/ui/ImportListing}} + +<$button message="tw-delete-tiddler" param=<<currentTiddler>>><<lingo Listing/Cancel/Caption>></$button> +<$button message="tw-perform-import" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button> + +</div> + +</$list> diff --git a/core/ui/ViewTemplate/plugin.tid b/core/ui/ViewTemplate/plugin.tid new file mode 100644 index 000000000..2c7d2081c --- /dev/null +++ b/core/ui/ViewTemplate/plugin.tid @@ -0,0 +1,8 @@ +title: $:/core/ui/ViewTemplate/plugin +tags: $:/tags/ViewTemplate + +<$list filter="[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]"> + +{{||$:/core/ui/TiddlerInfo/Advanced/PluginInfo}} + +</$list> diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 2193f8deb..492eb248c 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -4,10 +4,13 @@ tags: $:/tags/ViewTemplate \define title-styles() fill:$(foregroundColor)$; \end +\define config-title() +$:/config/ViewToolbarButtons/Visibility/$(listItem)$ +\end <div class="tw-tiddler-title"> <h2 class="titlebar"> <span class="tw-tiddler-controls"> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list> </span> <$set name="foregroundColor" value={{!!color}}> <span style=<<title-styles>>> diff --git a/core/ui/ViewToolbar/clone.tid b/core/ui/ViewToolbar/clone.tid new file mode 100644 index 000000000..51f41416c --- /dev/null +++ b/core/ui/ViewToolbar/clone.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/clone +tags: $:/tags/ViewToolbar +caption: {{$:/core/images/clone-button}} {{$:/language/Buttons/Clone/Caption}} +description: {{$:/language/Buttons/Clone/Hint}} + +<$button message="tw-new-tiddler" param=<<currentTiddler>> title={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/clone-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Clone/Caption}}/> +</$list> +</$button> diff --git a/core/ui/ViewToolbar/close-others.tid b/core/ui/ViewToolbar/close-others.tid new file mode 100644 index 000000000..48be05078 --- /dev/null +++ b/core/ui/ViewToolbar/close-others.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/close-others +tags: $:/tags/ViewToolbar +caption: {{$:/core/images/close-others-button}} {{$:/language/Buttons/CloseOthers/Caption}} +description: {{$:/language/Buttons/CloseOthers/Hint}} + +<$button message="tw-close-other-tiddlers" param=<<currentTiddler>> title={{$:/language/Buttons/CloseOthers/Hint}} aria-label={{$:/language/Buttons/CloseOthers/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/close-others-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/CloseOthers/Caption}}/> +</$list> +</$button> diff --git a/core/ui/ViewToolbar/close.tid b/core/ui/ViewToolbar/close.tid index 92a9c163f..2dd8e2a2b 100644 --- a/core/ui/ViewToolbar/close.tid +++ b/core/ui/ViewToolbar/close.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/ViewToolbar/close +title: $:/core/ui/Buttons/close tags: $:/tags/ViewToolbar +caption: {{$:/core/images/close-button}} {{$:/language/Buttons/Close/Caption}} +description: {{$:/language/Buttons/Close/Hint}} -<$button message="tw-close-tiddler" title={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="btn-invisible">{{$:/core/images/close-button}}</$button> \ No newline at end of file +<$button message="tw-close-tiddler" title={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/close-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Close/Caption}}/> +</$list> +</$button> \ No newline at end of file diff --git a/core/ui/ViewToolbar/edit.tid b/core/ui/ViewToolbar/edit.tid index ac398358a..602662dc0 100644 --- a/core/ui/ViewToolbar/edit.tid +++ b/core/ui/ViewToolbar/edit.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/ViewToolbar/edit +title: $:/core/ui/Buttons/edit tags: $:/tags/ViewToolbar +caption: {{$:/core/images/edit-button}} {{$:/language/Buttons/Edit/Caption}} +description: {{$:/language/Buttons/Edit/Hint}} -<$button message="tw-edit-tiddler" title={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class="btn-invisible">{{$:/core/images/edit-button}}</$button> \ No newline at end of file +<$button message="tw-edit-tiddler" title={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/edit-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Edit/Caption}}/> +</$list> +</$button> diff --git a/core/ui/ViewToolbar/info.tid b/core/ui/ViewToolbar/info.tid index 2fc1c8ab8..fd00d2cf2 100644 --- a/core/ui/ViewToolbar/info.tid +++ b/core/ui/ViewToolbar/info.tid @@ -1,4 +1,13 @@ -title: $:/core/ui/ViewToolbar/info +title: $:/core/ui/Buttons/info tags: $:/tags/ViewToolbar +caption: {{$:/core/images/info-button}} {{$:/language/Buttons/Info/Caption}} +description: {{$:/language/Buttons/Info/Hint}} -<$button popup=<<tiddlerInfoState>> title={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button> \ No newline at end of file +<$button popup=<<tiddlerInfoState>> title={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected"> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/info-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Info/Caption}}/> +</$list> +</$button> diff --git a/core/ui/ViewToolbar/more-tiddler-actions.tid b/core/ui/ViewToolbar/more-tiddler-actions.tid new file mode 100644 index 000000000..6bc6d49f6 --- /dev/null +++ b/core/ui/ViewToolbar/more-tiddler-actions.tid @@ -0,0 +1,30 @@ +title: $:/core/ui/Buttons/more-tiddler-actions +tags: $:/tags/ViewToolbar +caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}} +description: {{$:/language/Buttons/More/Hint}} + +\define config-title() +$:/config/ViewToolbarButtons/Visibility/$(listItem)$ +\end +<$button popup=<<qualify "$:/state/popup/more">> title={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected"> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/down-arrow}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/More/Caption}}/> +</$list> +</$button> +<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes"> +<div class="tw-drop-down"> +<$set name="tw-config-toolbar-icons" value="yes"> +<$set name="tw-config-toolbar-text" value="yes"> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem"> +<$reveal type="match" state=<<config-title>> text="hide"> +<$transclude tiddler=<<listItem>>/> +</$reveal> +</$list> +</$set> +</$set> +</div> +</$reveal> + diff --git a/core/ui/ViewToolbar/permalink.tid b/core/ui/ViewToolbar/permalink.tid new file mode 100644 index 000000000..ffac398c2 --- /dev/null +++ b/core/ui/ViewToolbar/permalink.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/permalink +tags: $:/tags/ViewToolbar +caption: {{$:/core/images/permalink-button}} {{$:/language/Buttons/Permalink/Caption}} +description: {{$:/language/Buttons/Permalink/Hint}} + +<$button message="tw-permalink" title={{$:/language/Buttons/Permalink/Hint}} aria-label={{$:/language/Buttons/Permalink/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/permalink-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Permalink/Caption}}/> +</$list> +</$button> diff --git a/core/ui/ViewToolbar/permaview.tid b/core/ui/ViewToolbar/permaview.tid new file mode 100644 index 000000000..be40d8e0b --- /dev/null +++ b/core/ui/ViewToolbar/permaview.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/permaview +tags: $:/tags/ViewToolbar $:/tags/PageControls +caption: {{$:/core/images/permaview-button}} {{$:/language/Buttons/Permaview/Caption}} +description: {{$:/language/Buttons/Permaview/Hint}} + +<$button message="tw-permaview" title={{$:/language/Buttons/Permaview/Hint}} aria-label={{$:/language/Buttons/Permaview/Caption}} class=<<tw-config-toolbar-class>>> +<$list filter="[<tw-config-toolbar-icons>prefix[yes]]"> +{{$:/core/images/permaview-button}} +</$list> +<$list filter="[<tw-config-toolbar-text>prefix[yes]]"> +<$text text={{$:/language/Buttons/Permaview/Caption}}/> +</$list> +</$button> diff --git a/core/wiki/DefaultTiddlers.tid b/core/wiki/DefaultTiddlers.tid index 7c4f151ff..02614643f 100644 --- a/core/wiki/DefaultTiddlers.tid +++ b/core/wiki/DefaultTiddlers.tid @@ -1,4 +1,3 @@ title: $:/DefaultTiddlers GettingStarted -[!is[system]has[modified]!sort[modified]limit[25]] \ No newline at end of file diff --git a/core/wiki/config/EditTemplateFields.multids b/core/wiki/config/EditTemplateFields.multids new file mode 100644 index 000000000..8f31786f2 --- /dev/null +++ b/core/wiki/config/EditTemplateFields.multids @@ -0,0 +1,14 @@ +title: $:/config/EditTemplateFields/Visibility/ + +title: hide +tags: hide +text: hide +creator: hide +created: hide +modified: hide +modifier: hide +type: hide +draft.title: hide +draft.of: hide +revision: hide +bag: hide diff --git a/core/wiki/config/EditorTypeMappings.multids b/core/wiki/config/EditorTypeMappings.multids new file mode 100644 index 000000000..f39a6e397 --- /dev/null +++ b/core/wiki/config/EditorTypeMappings.multids @@ -0,0 +1,8 @@ +title: $:/config/EditorTypeMappings/ + +image/gif: bitmap +image/jpeg: bitmap +image/jpg: bitmap +image/png: bitmap +image/x-icon: bitmap +text/vnd.tiddlywiki: text diff --git a/core/wiki/config/NavigationUpdateAddressBar.tid b/core/wiki/config/NavigationUpdateAddressBar.tid index 19b138dd0..a20df74ae 100644 --- a/core/wiki/config/NavigationUpdateAddressBar.tid +++ b/core/wiki/config/NavigationUpdateAddressBar.tid @@ -1,2 +1,2 @@ title: $:/config/Navigation/UpdateAddressBar -text: permaview +text: no diff --git a/core/wiki/config/PageControlButtons.multids b/core/wiki/config/PageControlButtons.multids new file mode 100644 index 000000000..164c454e3 --- /dev/null +++ b/core/wiki/config/PageControlButtons.multids @@ -0,0 +1,14 @@ +title: $:/config/PageControlButtons/Visibility/$:/ + +core/ui/Buttons/close-all: hide +core/ui/Buttons/encryption: hide +core/ui/Buttons/full-screen: hide +core/ui/Buttons/home: hide +core/ui/Buttons/refresh: hide +core/ui/Buttons/import: hide +core/ui/Buttons/language: hide +core/ui/Buttons/tag-manager: hide +core/ui/Buttons/more-page-actions: hide +core/ui/Buttons/permaview: hide +core/ui/Buttons/storyview: hide +core/ui/Buttons/theme: hide diff --git a/core/wiki/config/SyncFilter.tid b/core/wiki/config/SyncFilter.tid index e2447c2ac..548e2987c 100644 --- a/core/wiki/config/SyncFilter.tid +++ b/core/wiki/config/SyncFilter.tid @@ -1,3 +1,3 @@ title: $:/config/SyncFilter -[is[tiddler]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]] \ No newline at end of file +[is[tiddler]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status]] -[prefix[$:/state]] -[prefix[$:/temp]] \ No newline at end of file diff --git a/core/wiki/config/ToolbarIcons.tid b/core/wiki/config/ToolbarIcons.tid new file mode 100644 index 000000000..30299ee40 --- /dev/null +++ b/core/wiki/config/ToolbarIcons.tid @@ -0,0 +1,3 @@ +title: $:/config/Toolbar/Icons + +yes \ No newline at end of file diff --git a/core/wiki/config/ToolbarText.tid b/core/wiki/config/ToolbarText.tid new file mode 100644 index 000000000..39a2136a3 --- /dev/null +++ b/core/wiki/config/ToolbarText.tid @@ -0,0 +1,3 @@ +title: $:/config/Toolbar/Text + +no \ No newline at end of file diff --git a/core/wiki/config/ViewToolbarButtons.multids b/core/wiki/config/ViewToolbarButtons.multids new file mode 100644 index 000000000..998e49032 --- /dev/null +++ b/core/wiki/config/ViewToolbarButtons.multids @@ -0,0 +1,7 @@ +title: $:/config/ViewToolbarButtons/Visibility/$:/ + +core/ui/Buttons/clone: hide +core/ui/Buttons/close-others: hide +core/ui/Buttons/more-tiddler-actions: hide +core/ui/Buttons/permalink: hide +core/ui/Buttons/permaview: hide diff --git a/core/wiki/language.tid b/core/wiki/language.tid new file mode 100644 index 000000000..a8a74ee23 --- /dev/null +++ b/core/wiki/language.tid @@ -0,0 +1,3 @@ +title: $:/language + +$:/languages/en-GB \ No newline at end of file diff --git a/core/wiki/macros/CSS.tid b/core/wiki/macros/CSS.tid index 58b0252a2..4c4e3fd4f 100644 --- a/core/wiki/macros/CSS.tid +++ b/core/wiki/macros/CSS.tid @@ -2,9 +2,63 @@ title: $:/core/macros/CSS tags: $:/tags/Macro \define colour(name) -<$transclude tiddler={{$:/palette}} index="$name$"/> +<$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"/></$transclude> \end \define color(name) <<colour $name$>> \end + +\define box-shadow(shadow) +``` + -webkit-box-shadow: $shadow$; + -moz-box-shadow: $shadow$; + box-shadow: $shadow$; +``` +\end + +\define filter(filter) +``` + -webkit-filter: $filter$; + -moz-filter: $filter$; + filter: $filter$; +``` +\end + +\define transition(transition) +``` + -webkit-transition: $transition$; + -moz-transition: $transition$; + transition: $transition$; +``` +\end + +\define transform-origin(origin) +``` + -webkit-transform-origin: $origin$; + -moz-transform-origin: $origin$; + transform-origin: $origin$; +``` +\end + +\define background-linear-gradient(gradient) +``` +background-image: linear-gradient($gradient$); +background-image: -o-linear-gradient($gradient$); +background-image: -moz-linear-gradient($gradient$); +background-image: -webkit-linear-gradient($gradient$); +background-image: -ms-linear-gradient($gradient$); +``` +\end + +\define datauri(title) +<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}}/> +\end + +\define if-sidebar(text) +<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal> +\end + +\define if-no-sidebar(text) +<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal> +\end diff --git a/core/wiki/macros/tabs.tid b/core/wiki/macros/tabs.tid index cd5ed50f9..c7c749ed2 100644 --- a/core/wiki/macros/tabs.tid +++ b/core/wiki/macros/tabs.tid @@ -1,22 +1,30 @@ title: $:/core/macros/tabs tags: $:/tags/Macro -\define tabs(tabsList,default,state:"$:/state/tab",class) +\define tabs(tabsList,default,state:"$:/state/tab",class,template) <div class="tw-tab-set $class$"> <div class="tw-tab-buttons $class$"> - <$list filter="$tabsList$" variable="currentTab"> - <$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tw-tab-selected"> - <$transclude tiddler=<<currentTab>> field="caption"> - <$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/> - </$transclude> - </$button> - </$list> +<$list filter="$tabsList$" variable="currentTab"> +<$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tw-tab-selected"> +<$transclude tiddler=<<currentTab>> field="caption"> +<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/> +</$transclude> +</$button> +</$list> </div><div class="tw-tab-divider $class$"/><div class="tw-tab-content $class$"> - <$list filter="$tabsList$" variable="currentTab"> - <$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$"> - <$transclude tiddler=<<currentTab>> mode="block"/> - </$reveal> - </$list> +<$list filter="$tabsList$" variable="currentTab"> + +<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$"> + +<$transclude tiddler="$template$" mode="block"> + +<$transclude tiddler=<<currentTab>> mode="block"/> + +</$transclude> + +</$reveal> + +</$list> </div> </div> \end diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid new file mode 100644 index 000000000..08204c334 --- /dev/null +++ b/core/wiki/macros/toc.tid @@ -0,0 +1,79 @@ +title: $:/core/macros/toc +tags: $:/tags/Macro + +\define toc(tag,sort:"") +<ol> +<$list filter="[tag[$tag$]$sort$]"> +<li> +<$link> +<$view field="title"/> +</$link> +<$macrocall $name="toc" tag=<<currentTiddler>>/> +</li> +</$list> +</ol> +\end + +\define toc-expandable-body(tag,sort:"") +<$set name="toc-state" value=<<qualify "$:/state/toc/$tag$-$(currentTiddler)$">>> +<li> +<$link> +<$reveal type="nomatch" state=<<toc-state>> text="open"> +<$button set=<<toc-state>> setTo="open" class="btn-invisible"> +{{$:/core/images/right-arrow}} +</$button> +</$reveal> +<$reveal type="match" state=<<toc-state>> text="open"> +<$button set=<<toc-state>> setTo="close" class="btn-invisible"> +{{$:/core/images/down-arrow}} +</$button> +</$reveal> +<$view field="title"/> +</$link> +<$reveal type="match" state=<<toc-state>> text="open"> +<$macrocall $name="toc-expandable" tag=<<currentTiddler>> sort="$sort$"/> +</$reveal> +</li> +</$set> +\end + +\define toc-expandable(tag,sort:"") +<ol> +<$list filter="[tag[$tag$]$sort$]"> +<<toc-expandable-body tag:"$tag$" sort:"$sort$">> +</$list> +</ol> +\end + +\define toc-selective-expandable-body(tag,sort:"") +<$set name="toc-state" value=<<qualify "$:/state/toc/$tag$-$(currentTiddler)$">>> +<li> +<$link> +<$list filter="[all[current]tagging[]limit[1]]"> +<$reveal type="nomatch" state=<<toc-state>> text="open"> +<$button set=<<toc-state>> setTo="open" class="btn-invisible"> +{{$:/core/images/right-arrow}} +</$button> +</$reveal> +<$reveal type="match" state=<<toc-state>> text="open"> +<$button set=<<toc-state>> setTo="close" class="btn-invisible"> +{{$:/core/images/down-arrow}} +</$button> +</$reveal> +</$list> +<$view field="title"/> +</$link> +<$reveal type="match" state=<<toc-state>> text="open"> +<$macrocall $name="toc-selective-expandable" tag=<<currentTiddler>> sort="$sort$"/> +</$reveal> +</li> +</$set> +\end + +\define toc-selective-expandable(tag,sort:"") +<ol> +<$list filter="[tag[$tag$]$sort$]"> +<<toc-selective-expandable-body tag:"$tag$" sort:"$sort$">> +</$list> +</ol> +\end diff --git a/core/wiki/tags/EditToolbar.tid b/core/wiki/tags/EditToolbar.tid index 96d595b9b..29001a8de 100644 --- a/core/wiki/tags/EditToolbar.tid +++ b/core/wiki/tags/EditToolbar.tid @@ -1,2 +1,2 @@ title: $:/tags/EditToolbar -list: [[$:/core/ui/EditToolbar/delete]] [[$:/core/ui/EditToolbar/cancel]] [[$:/core/ui/EditToolbar/save]] +list: [[$:/core/ui/Buttons/delete]] [[$:/core/ui/Buttons/cancel]] [[$:/core/ui/Buttons/save]] diff --git a/core/wiki/tags/PageControls.tid b/core/wiki/tags/PageControls.tid index 94f4fee0c..233ef5443 100644 --- a/core/wiki/tags/PageControls.tid +++ b/core/wiki/tags/PageControls.tid @@ -1,2 +1,2 @@ title: $:/tags/PageControls -list: [[$:/core/ui/PageControls/new-tiddler]] [[$:/core/ui/PageControls/control-panel]] [[$:/core/ui/PageControls/save-wiki]] +list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]] diff --git a/core/wiki/tags/TiddlerInfo.tid b/core/wiki/tags/TiddlerInfo.tid index 910fc96a4..dc8ff2e49 100644 --- a/core/wiki/tags/TiddlerInfo.tid +++ b/core/wiki/tags/TiddlerInfo.tid @@ -1,3 +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]] +list: [[$:/core/ui/TiddlerInfo/Tools]] [[$:/core/ui/TiddlerInfo/References]] [[$:/core/ui/TiddlerInfo/Tagging]] [[$:/core/ui/TiddlerInfo/List]] [[$:/core/ui/TiddlerInfo/Listed]] [[$:/core/ui/TiddlerInfo/Fields]] diff --git a/core/wiki/tags/ViewToolbar.tid b/core/wiki/tags/ViewToolbar.tid index e64d0c90f..230a2d680 100644 --- a/core/wiki/tags/ViewToolbar.tid +++ b/core/wiki/tags/ViewToolbar.tid @@ -1,2 +1,2 @@ title: $:/tags/ViewToolbar -list: [[$:/core/ui/ViewToolbar/info]] [[$:/core/ui/ViewToolbar/edit]] [[$:/core/ui/ViewToolbar/close]] +list: [[$:/core/ui/Buttons/more-tiddler-actions]] [[$:/core/ui/Buttons/info]] [[$:/core/ui/Buttons/clone]] [[$:/core/ui/Buttons/edit]] [[$:/core/ui/Buttons/permalink]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/close-others]] [[$:/core/ui/Buttons/close]] diff --git a/editions/de-AT-DE/tiddlywiki.info b/editions/de-AT-DE/tiddlywiki.info index 6ac10e934..491fd43fe 100644 --- a/editions/de-AT-DE/tiddlywiki.info +++ b/editions/de-AT-DE/tiddlywiki.info @@ -1,6 +1,5 @@ { "plugins": [ - "tiddlywiki/fullscreen", "tiddlywiki/github-fork-ribbon" ], "themes": [ diff --git a/editions/empty/tiddlywiki.info b/editions/empty/tiddlywiki.info index 6a97b5666..7f28043c5 100644 --- a/editions/empty/tiddlywiki.info +++ b/editions/empty/tiddlywiki.info @@ -1,6 +1,5 @@ { "plugins": [ - "tiddlywiki/fullscreen" ], "themes": [ "tiddlywiki/vanilla", diff --git a/editions/fr-FR/tiddlywiki.info b/editions/fr-FR/tiddlywiki.info index f01cfe879..4ed881b2c 100644 --- a/editions/fr-FR/tiddlywiki.info +++ b/editions/fr-FR/tiddlywiki.info @@ -1,6 +1,5 @@ { "plugins": [ - "tiddlywiki/fullscreen" ], "themes": [ "tiddlywiki/vanilla", diff --git a/editions/markdowndemo/tiddlers/HelloThere.tid b/editions/markdowndemo/tiddlers/HelloThere.tid index 466d02f84..d3722582c 100644 --- a/editions/markdowndemo/tiddlers/HelloThere.tid +++ b/editions/markdowndemo/tiddlers/HelloThere.tid @@ -8,6 +8,14 @@ The MarkdownExample tiddler below is written in Markdown. Create wiki links with [link text](#TiddlerTitle) ``` +Markdown image syntax can be used to reference images by tiddler title or an external URI. For example: + +``` +![alt text](/path/to/img.jpg "Title") + +![alt text](Motovun Jack.jpg "Title") +``` + To add the plugin to your own TiddlyWiki5, just drag this link to the browser window: [[$:/plugins/tiddlywiki/markdown]] diff --git a/editions/test/tiddlers/tests/test-filters.js b/editions/test/tiddlers/tests/test-filters.js index 347fbe40a..a523fe5fe 100644 --- a/editions/test/tiddlers/tests/test-filters.js +++ b/editions/test/tiddlers/tests/test-filters.js @@ -270,6 +270,25 @@ describe("Filter tests", function() { expect(wiki.filterTiddlers("[modifier{!!modifier}] +[sort[title]]",fakeWidget).join(",")).toBe("$:/TiddlerTwo,a fourth tiddler,one,Tiddler Three"); }); + it("should handle variable operands", function() { + + var widget = require("$:/core/modules/widgets/widget.js"); + // Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers + var rootWidget = new widget.widget({ + type: "widget", + children: [{type: "widget", children: []}] + },{ + wiki: $tw.wiki, + document: $tw.document + }); + rootWidget.makeChildWidgets(); + var anchorWidget = rootWidget.children[0]; + rootWidget.setVariable("myVar","Tidd"); + rootWidget.setVariable("myVar2","JoeBloggs"); + expect(wiki.filterTiddlers("[prefix<myVar>] +[sort[title]]",anchorWidget).join(",")).toBe("Tiddler Three,TiddlerOne"); + expect(wiki.filterTiddlers("[modifier<myVar2>] +[sort[title]]",anchorWidget).join(",")).toBe("TiddlerOne"); + }); + it("should handle the before and after operators", function() { expect(wiki.filterTiddlers("[list[TiddlerSeventh]after[TiddlerOne]]").join(",")).toBe("Tiddler Three"); expect(wiki.filterTiddlers("[list[TiddlerSeventh]after[a fourth tiddler]]").join(",")).toBe("MissingTiddler"); diff --git a/editions/test/tiddlers/tests/test-tiddler.js b/editions/test/tiddlers/tests/test-tiddler.js new file mode 100644 index 000000000..f85ee9c6a --- /dev/null +++ b/editions/test/tiddlers/tests/test-tiddler.js @@ -0,0 +1,137 @@ +/*\ +title: test-tiddlers.js +type: application/javascript +tags: [[$:/tags/test-spec]] + +Tests the tiddler object + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +describe("Tiddler tests", function() { + + function compareTiddlers(fieldsA,fieldsB,excludeFields) { + var tiddlerA = new $tw.Tiddler(fieldsA), + tiddlerB = new $tw.Tiddler(fieldsB); + return tiddlerA.isEqual(tiddlerB,excludeFields); + } + + // Our tests + + it("should compare identical tiddlers", function() { + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + })).toEqual(true); + }); + + it("should compare different tiddlers", function() { + expect(compareTiddlers({ + title: "HelloThere2", + text: "one", + tags: ["one","two","three"] + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + })).toEqual(false); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","three"] + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + })).toEqual(false); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","two","three"], + caption: "Test" + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + })).toEqual(false); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"], + caption: "Test" + })).toEqual(false); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },{ + title: "HelloThere", + text: "one" + })).toEqual(false); + }); + + it("should compare different tiddlers with exclusions", function() { + expect(compareTiddlers({ + title: "HelloThere2", + text: "one", + tags: ["one","two","three"] + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },["title"])).toEqual(true); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","three"] + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },["tags"])).toEqual(true); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","two","three"], + caption: "Test" + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },["caption"])).toEqual(true); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },{ + title: "HelloThere", + text: "one", + tags: ["one","two","three"], + caption: "Test" + },["caption"])).toEqual(true); + expect(compareTiddlers({ + title: "HelloThere", + text: "one", + tags: ["one","two","three"] + },{ + title: "HelloThere", + text: "one" + },["tags"])).toEqual(true); + }); + +}); + +})(); diff --git a/editions/test/tiddlers/tests/test-wikitext.js b/editions/test/tiddlers/tests/test-wikitext.js index 223f3306e..271688cee 100644 --- a/editions/test/tiddlers/tests/test-wikitext.js +++ b/editions/test/tiddlers/tests/test-wikitext.js @@ -45,6 +45,16 @@ describe("WikiText tests", function() { it("should support attributes specified as macro invocations", function() { expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("<p><a class='tw-tiddlylink tw-tiddlylink-missing' href='#This%20is%20my%20''amazingly''%20groovy%20macro!'>This is a link</a></p>"); }); + it("should identify wikiwords to automatically link", function() { + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No wikilinks here").indexOf("<a") !== -1).toBe(false); + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","One WikiLink here").indexOf("<a") !== -1).toBe(true); + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No Wiki-Link here").indexOf("<a") !== -1).toBe(false); + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No Wiki×Link here").indexOf("<a") !== -1).toBe(false); + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No Wiki÷Link here").indexOf("<a") !== -1).toBe(false); + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No xWikiLink here").indexOf("<a") !== -1).toBe(false); + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No -WikiLink here").indexOf("<a") !== -1).toBe(false); + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No _WikiLink here").indexOf("<a") !== -1).toBe(false); + }); }); diff --git a/editions/testcommonjs/tiddlywiki.info b/editions/testcommonjs/tiddlywiki.info index e2c97c0ac..e84f1fb9e 100644 --- a/editions/testcommonjs/tiddlywiki.info +++ b/editions/testcommonjs/tiddlywiki.info @@ -1,6 +1,5 @@ { "plugins": [ - "tiddlywiki/fullscreen" ], "themes": [ "tiddlywiki/vanilla", diff --git a/editions/tw5.com-server/tiddlywiki.info b/editions/tw5.com-server/tiddlywiki.info index fc6bb51b3..fc60e20d7 100644 --- a/editions/tw5.com-server/tiddlywiki.info +++ b/editions/tw5.com-server/tiddlywiki.info @@ -11,5 +11,8 @@ ], "includeWikis": [ "../tw5.com" - ] + ], + "config": { + "default-tiddler-location": "../tw5.com/tiddlers" + } } diff --git a/editions/tw5.com/tiddlers/Acknowledgements.tid b/editions/tw5.com/tiddlers/Acknowledgements.tid index 1b0722fa0..34b154463 100644 --- a/editions/tw5.com/tiddlers/Acknowledgements.tid +++ b/editions/tw5.com/tiddlers/Acknowledgements.tid @@ -1,13 +1,9 @@ created: 20140129204112515 -modified: 20140129204114743 +modified: 20140801084114743 tags: introduction title: Acknowledgements type: text/vnd.tiddlywiki -TiddlyWiki5 wouldn't be possible without the ongoing support of the TiddlyWiki user and developer community. Their attention and feedback has made it possible to gain an understanding of what is wanted from the product, and their passion for it has taught me that it is worth the investment that I am making. +TiddlyWiki wouldn't be possible without the ongoing support of the TiddlyWiki community. Their attention and feedback has made it possible to gain an understanding of what is wanted from the product, and their passion for it has taught me that it is worth the investment. -TiddlyWiki5 stands on the shoulders of giants by incorporating code from these fine OpenSource projects: - -* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]] -* [[The Jasmine JavaScript Test Framework|http://pivotal.github.io/jasmine/]] -* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]] +{{$:/Acknowledgements}} diff --git a/editions/tw5.com/tiddlers/Contributing.tid b/editions/tw5.com/tiddlers/Contributing.tid index b18b625ce..5f41e1d6d 100644 --- a/editions/tw5.com/tiddlers/Contributing.tid +++ b/editions/tw5.com/tiddlers/Contributing.tid @@ -33,4 +33,4 @@ eg: `Jeremy Ruston, @Jermolene, 2011/11/22` !!!! Attribution -The CLA documents used for this project were created using [[Harmony Project Templates|http://www.harmonyagreements.org]]. "~HA-CLA-I-LIST Version 1.0" for "CLA-individual" and "~HA-CLA-E-LIST Version 1.0" for "CLA-entity" +The CLA documents used for this project were created using [[Harmony Project Templates|http://www.harmonyagreements.org]]. "HA-CLA-I-LIST Version 1.0" for "CLA-individual" and "HA-CLA-E-LIST Version 1.0" for "CLA-entity" diff --git a/editions/tw5.com/tiddlers/Developing plugins using Node.js and GitHub.tid b/editions/tw5.com/tiddlers/Developing plugins using Node.js and GitHub.tid index f8a52ed4b..6de630501 100644 --- a/editions/tw5.com/tiddlers/Developing plugins using Node.js and GitHub.tid +++ b/editions/tw5.com/tiddlers/Developing plugins using Node.js and GitHub.tid @@ -95,7 +95,7 @@ From the TW5 directory issue command the resultant file (index.html) will be placed in the build directory, the default build directory is `../jermolene.github.com` relative to TW5/ -!!6. Save you work on ~GitHub +!!6. Save your work on ~GitHub From `plugins/yourname/pluginname/` issue commands to: diff --git a/editions/tw5.com/tiddlers/GettingStarted.tid b/editions/tw5.com/tiddlers/GettingStarted.tid index 0cf537840..797c4df58 100644 --- a/editions/tw5.com/tiddlers/GettingStarted.tid +++ b/editions/tw5.com/tiddlers/GettingStarted.tid @@ -1,32 +1,20 @@ created: 20131129090249275 -modified: 20140206212022007 +modified: 20140811172052886 tags: introduction title: GettingStarted type: text/vnd.tiddlywiki -TiddlyWiki is very flexible, and there are many different ways to use it. Here we're focusing on using it as a standalone file in the browser, which is a good choice for most users as it doesn't require any special knowledge or tools. For more options you can also run [[TiddlyWiki on Node.js]]. +\define default-platform() +GettingStarted - $(browser-name)$ +\end +<$set name="browser-name" value={{$:/info/browser/name}}> +<$macrocall $name="tabs" state="$:/state/tabs/platform" tabsList="[prefix[GettingStarted - ]]" default=<<default-platform>> class="tw-vertical"/> +</$set> -[[Video Tutorials]] are available, too. +See also: -! The 'works anywhere' method - -{{Saving with the HTML5 fallback saver}} - -! The convenient and fast method - -Saving changes as described above is quite inconvenient because of the degree of manual intervention that browsers require. The following alternative method is recommended for everyone who is able to use Mozilla's [[Firefox]] browser. - -{{Saving with TiddlyFox}} - -! Other ways of saving changes - -[[Saving with Encryption]] explains how to use TiddlyWiki's built-in encryption to protect your content with a password. - -You can also try: - -* [[Using TiddlyWiki on TiddlyDesktop]], a custom desktop application for working with TiddlyWiki -* [[Saving on iPad/iPhone]] with the custom ''TWEdit'' app -* [[Saving on Android]] with the custom ''~AndTidWiki'' app -* [[Saving on InternetExplorer]] with the [[TiddlyIE]] extension, or via the [[Windows HTA Hack]] +* [[Saving with Encryption]] explains how to use TiddlyWiki's built-in encryption to protect your content with a password * [[Saving on TiddlySpot]], a free service that lets you use TiddlyWiki online * Running [[TiddlyWiki on node-webkit]], turning a single TiddlyWiki into a native application on your desktop +* [[Using TiddlyWiki on TiddlyDesktop]], a custom desktop application for working with TiddlyWiki +* You can also download this full TiddlyWiki including all the documentation: <a href="http://tiddlywiki.com/index.html" download="index.html">~http://tiddlywiki.com/index.html</a> diff --git a/editions/tw5.com/tiddlers/GuerillaWiki.tid b/editions/tw5.com/tiddlers/GuerillaWiki.tid new file mode 100644 index 000000000..2bc7ea3e3 --- /dev/null +++ b/editions/tw5.com/tiddlers/GuerillaWiki.tid @@ -0,0 +1,11 @@ +created: 20140817140917462 +modified: 20140817141027417 +tags: definitions +title: GuerillaWiki +type: text/vnd.tiddlywiki + +TiddlyWiki makes a great GuerillaWiki in situations where it is not practical to use a traditional wiki. + +For instance, in a corporate setting, persuading an over-worked IT department to install a Wiki server for you is seldom going to be possible overnight. And if your PC is locked down you can't install a conventional Wiki yourself. Equally, you can't go and use one of the public hosted Wiki services because your Information Security department would not allow all that corporate data to flow into an outside server. + +TiddlyWiki slices through those barriers by being usable on virtually all PCs. diff --git a/editions/tw5.com/tiddlers/HelloThere.tid b/editions/tw5.com/tiddlers/HelloThere.tid index 8f7e646bc..69c5191a8 100644 --- a/editions/tw5.com/tiddlers/HelloThere.tid +++ b/editions/tw5.com/tiddlers/HelloThere.tid @@ -1,12 +1,14 @@ created: 20130822170200000 -modified: 20140226201004198 +modified: 20140820153116300 tags: introduction title: HelloThere type: text/vnd.tiddlywiki -Welcome to TiddlyWiki, a complete interactive wiki in JavaScript. It can be used as a [[single HTML file in the browser|SingleFileApplication]] or as a powerful [[Node.js application|Node.js]]. It is highly customisable: the entire user interface is itself implemented in hackable WikiText. +Welcome to TiddlyWiki, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation. -This is version <<version>> of ~TiddlyWiki, a major reboot designed [[for the next 25 years|Future of TiddlyWiki]]. It is currently in beta (see the detailed ReleaseHistory). There is a RoadMap for moving to the full release. It is a great time to [[get involved|Community]] and support the future development of ~TiddlyWiki. +TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a [[single HTML file in the browser|SingleFileApplication]] or as a powerful [[Node.js application|Node.js]]. It is highly customisable: the entire user interface is itself implemented in hackable WikiText. + +This is version <<version-link>> of ~TiddlyWiki, a major reboot designed [[for the next 25 years|Future of TiddlyWiki]]. It is currently in beta (see the detailed ReleaseHistory) with a RoadMap for moving to the full release. It is a great time to [[get involved|Community]] and support the future development of ~TiddlyWiki. //~TiddlyWiki is a free, open source project that depends on [[your love and support|HelpingTiddlyWiki]] for its survival//. @@ -14,9 +16,7 @@ This is version <<version>> of ~TiddlyWiki, a major reboot designed [[for the ne <a class="tw-message-icon" href="http://tiddlywiki.com/" target="_blank">{{TiddlyWiki Classic.png}}</a> -!! TiddlyWikiClassic - http://classic.tiddlywiki.com +!! TiddlyWikiClassic -On this site, unless noted otherwise, "~TiddlyWiki" refers to the new version 5, and "~TiddlyWikiClassic" is used to identify the older version. - -The deep internal improvements mean that the new version of ~TiddlyWiki is not fully compatible with ~TiddlyWikiClassic. Existing content will need massaging, while plugins and themes will have to be completely rewritten. The upgrade path will get smoother as the new version matures. +The original "Classic" version of TiddlyWiki is still available at http://classic.tiddlywiki.com. Note that it is not fully backwards compatible: existing content will need massaging, while plugins and themes will have to be completely rewritten. The upgrade path will get smoother as the new version matures. </div> diff --git a/editions/tw5.com/tiddlers/HelpingTiddlyWiki.tid b/editions/tw5.com/tiddlers/HelpingTiddlyWiki.tid index c4fffca16..3b1353b54 100644 --- a/editions/tw5.com/tiddlers/HelpingTiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/HelpingTiddlyWiki.tid @@ -11,7 +11,7 @@ If you find TiddlyWiki useful, there are lots of ways you can help assure its fu OpenSource projects like ~TiddlyWiki thrive on the feedback and engagement of users. ~TiddlyWiki becomes more useful to everyone as more and more people use it. So, if you find ~TiddlyWiki useful, spread the word. The best possible way to assure its future is for it to become a hundred times more popular than before. * [[Tweet about TiddlyWiki|https://twitter.com/intent/tweet?text=I+love+TiddlyWiki+because...&source=tiddlywiki5]] -* [[Star the TiddlyWiki5 GitHub Repository|https://github.com/Jermolene/TiddlyWiki5/star]] +* [[Star the TiddlyWiki5 GitHub Repository|https://github.com/Jermolene/TiddlyWiki5]] ! Help improve the documentation and code diff --git a/editions/tw5.com/tiddlers/ImageGallery Example.tid b/editions/tw5.com/tiddlers/ImageGallery Example.tid new file mode 100644 index 000000000..61b94b605 --- /dev/null +++ b/editions/tw5.com/tiddlers/ImageGallery Example.tid @@ -0,0 +1,20 @@ +created: 20140809113603449 +modified: 20140809113849873 +tags: demo +title: ImageGallery Example +type: text/vnd.tiddlywiki + +Here is an example of using the ListWidget and the TranscludeWidget to show a grid of all system images (ie, tiddlers tagged [[$:/tags/Image]]). + +<style> +.my-gallery svg { +width: 6em; +height: 6em; +margin: 1em; +} +</style> +<div class="my-gallery"> +<$list filter="[all[tiddlers+shadows]tag[$:/tags/Image]]"> +<$transclude/> +</$list> +</div> diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha11.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha11.tid index 90cbf99b1..701de1eec 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha11.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha11.tid @@ -3,6 +3,7 @@ modified: 201311081754007 title: Release 5.0.0-alpha.11 tags: releasenote released: 201311081806 +caption: 5.0.0-alpha.11 This release is the culmination of a large scale refactoring of the widget mechanism of TiddlyWiki5. There are several changes to be aware of if upgrading from earlier versions: diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha12.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha12.tid index 6795ab793..a13d02a32 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha12.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha12.tid @@ -3,6 +3,7 @@ modified: 201311081854007 title: Release 5.0.0-alpha.12 tags: releasenote released: 201311082141 +caption: 5.0.0-alpha.12 //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.11...v5.0.0-alpha.12]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha13.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha13.tid index 7821a33b4..71df868dd 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha13.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha13.tid @@ -3,6 +3,7 @@ modified: 201311091122007 title: Release 5.0.0-alpha.13 tags: releasenote released: 201311091927 +caption: 5.0.0-alpha.13 //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.12...v5.0.0-alpha.13]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha14.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha14.tid index f610622ec..1233fb7f5 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha14.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha14.tid @@ -3,6 +3,7 @@ modified: 201311101922007 title: Release 5.0.0-alpha.14 tags: releasenote released: 201311102315 +caption: 5.0.0-alpha.14 //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.13...v5.0.0-alpha.14]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha15.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha15.tid index 1eb191fb2..ef36746c9 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha15.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha15.tid @@ -3,6 +3,7 @@ modified: 201311122050007 title: Release 5.0.0-alpha.15 tags: releasenote released: 201311191221 +caption: 5.0.0-alpha.15 //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.14...v5.0.0-alpha.15]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid index eb54c4dfe..dab118fc0 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.0-alpha.16 type: text/vnd.tiddlywiki released: 201311301325 +caption: 5.0.0-alpha.16 //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.15...v5.0.0-alpha.16]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha17.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha17.tid index 8d89955c7..c6ec61e55 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha17.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha17.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.0-alpha.17 type: text/vnd.tiddlywiki released: 201311301519 +caption: 5.0.0-alpha.17 //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.16...v5.0.0-alpha.17]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.10beta.tid b/editions/tw5.com/tiddlers/Release 5.0.10beta.tid index 88858a065..9c6a2f835 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.10beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.10beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.10-beta type: text/vnd.tiddlywiki released: 201404191305 +caption: 5.0.10-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.9-beta...v5.0.10-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.11beta.tid b/editions/tw5.com/tiddlers/Release 5.0.11beta.tid index df6c1f732..fef101d20 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.11beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.11beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.11-beta type: text/vnd.tiddlywiki released: 201405161600 +caption: 5.0.11-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.10-beta...v5.0.11-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.12beta.tid b/editions/tw5.com/tiddlers/Release 5.0.12beta.tid index a14554549..1df435481 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.12beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.12beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.12-beta type: text/vnd.tiddlywiki released: 201405170102 +caption: 5.0.12-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.11-beta...v5.0.12-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.13beta.tid b/editions/tw5.com/tiddlers/Release 5.0.13beta.tid index 6c9e5eda3..fff1ec8d4 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.13beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.13beta.tid @@ -1,21 +1,23 @@ created: 20140518150234142 -modified: 20140518150234142 +modified: 20140624094134118 tags: releasenote title: Release 5.0.13-beta type: text/vnd.tiddlywiki -released: 201405181600 +released: 201406240941 +caption: 5.0.13-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.12-beta...v5.0.13-beta]]// -!! Incompatible Changes +!! Accessibility Improvements -See [[Notes for upgrading to 5.0.13-beta]] for more details of these changes: +This release includes a number of features designed to improve the experience of TiddlyWiki with a screen reader. Particular thanks to [[@domasofan|https://github.com/domasofan]] for his feedback -* - -!! Documentation Improvements - -* +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/34e4166dc5f24519b000de66853d5b1aee8f1648]] label and title for show/hide sidebar buttons +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/346b2f86111815c746c993fa09b7f677fa0b4b37]] label and title for advanced search link +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/6f859c8d447a477a9120bdc308d1524558a80f20]] label and title for close buttons in "Open" sidebar tab +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/06b0f9adb7209870b46d42f832c1f7ad7a78976f]] ''aria-label'' support to the LinkWidget +* [[Switched|https://github.com/Jermolene/TiddlyWiki5/commit/bc9b67cbc3f363d48aafea86c077fcd5a9c0ca64]] to H1 tags for the page title and H2 tags for tiddler titles +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/eeedcb6d94a25d02e8fec45c89b30c7f2bcdde73]] label and title for tiddler and page toolbar buttons !! Usability Improvements @@ -23,8 +25,10 @@ See [[Notes for upgrading to 5.0.13-beta]] for more details of these changes: * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/3182a2d599f0e4b70a73fe369df4f398587dc1a9]] new SelectWidget * [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/f131c378934a86b741ab5b808437c95694dc5503]] behaviour of `text/html` tiddlers so that they are displayed within an HTML iframe element * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/9b576f2a8d39dcca37bcb709183a8f9b27f33ccf]] group headings to the content type dropdown in edit mode -* [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/4d70d5780e51cf0918fba15954cd47549e4e1a9f]] advanced navigation settings in $:/ControlPanel to use radio buttons +* [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/4d70d5780e51cf0918fba15954cd47549e4e1a9f]] advanced navigation settings in [[$:/ControlPanel]] to use radio buttons * [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/f7b8813a27141a78980eefa03df70a4a2de9d10b]] (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/3f25db0abe8cd28712c020f218506710cec004b6]]) behaviour of PermaLinks so that now [ext[http://tiddlywiki.com/#HelloThere]] just opens the single specified tiddler +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/0c48502e8ed214cee23537d06e7e87efd53592c7]] support for triple-quoted multi-line attributes with [[macros|Macros in WikiText]], [[widgets|Widgets in WikiText]] and [[HTML elements|HTML in WikiText]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/32099b85d3b12f9e590274cb7550e3e531131706]] TableOfContents tab for tw5.com edition !! Hackability Improvements @@ -33,19 +37,28 @@ See [[Notes for upgrading to 5.0.13-beta]] for more details of these changes: * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/d2796d0c9c7ed7a971ae6b0752d7418384072bb5]] new SetFieldCommand * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/305617b632fd6ecf25cd4be85f4dfb5a5a65dfef]] new SaveTiddlersCommand * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/f14ecf4eb8965f2e407ccac51d4277330221efe3]] support for system tag [[$:/tags/RawMarkup]] -* Extended [[FilterOperator: listed]] to work with any list field +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/0bdc5b5c70fbbf34aa459afcf0499fc9c8ae6374]] editor type mappings to control panel advanced tab +* [[Refactored|https://github.com/Jermolene/TiddlyWiki5/commit/1717c93d001ad184a08ca66d1bffb33fb5d32b3a]] CodeMirror (http://tiddlywiki.com/codemirrordemo.html) plugin for simpler configuration +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/b2e48d00e9ea068a22b5ac5c0a4c93e8ddbb4a8a]] support for [[Environment Variables on Node.js]] +* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/eee3a0cf8e5aa047f8596df06e28194409f38b01]] ServerCommand to allow a path prefix +* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/4238af2a405c14d22937d7c47a70bfb3d4e6f22d]] [[FilterOperator: listed]] to use any list field !! Bug Fixes +* Fixed [[here|https://github.com/Jermolene/TiddlyWiki5/commit/6fb992690d33940d3509d7d4d74538e7f458e063]] and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/0fae9ee99200e7eca30b9db0584c479d58841349]] the problem with state tiddlers being inadvertently saved * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/a03a15e7de32a1b41618146ac334b5cd7d432e91]] bug with TextWidget not refreshing correctly * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/d8a142fed5b22a8273d93ba05095e5f9c6929cb3]] problem with vertical tabs in Safari +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/b8aedf2ca3cfc870be5a46accbb2dc0ddbb6d451]] issue with images in Markdown !! Contributors -I ([[@Jermolene|https://github.com/Jermolene]]) would like to thank the contributors to this release who have generously given their time to helping improve TiddlyWiki: +[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki: -[[@BramChen|https://github.com/BramChen]] -[[@danielo515|https://github.com/danielo515]] -[[@IreneKnapp|https://github.com/IreneKnapp]] -[[@mwfogleman|https://github.com/mwfogleman]] -[[@xcazin|https://github.com/xcazin]] +* [[@BramChen|https://github.com/BramChen]] +* [[@buggyj|https://github.com/buggyj]] +* [[@csugden|https://github.com/csugden]] +* [[@danielo515|https://github.com/danielo515]] +* [[@IreneKnapp|https://github.com/IreneKnapp]] +* [[@jayfresh|https://github.com/jayfresh]] +* [[@mwfogleman|https://github.com/mwfogleman]] +* [[@xcazin|https://github.com/xcazin]] diff --git a/editions/tw5.com/tiddlers/Release 5.0.14beta.tid b/editions/tw5.com/tiddlers/Release 5.0.14beta.tid new file mode 100644 index 000000000..0a4c13d43 --- /dev/null +++ b/editions/tw5.com/tiddlers/Release 5.0.14beta.tid @@ -0,0 +1,88 @@ +caption: 5.0.14-beta +created: 20140718150234142 +modified: 20140813153116300 +tags: releasenote +title: Release 5.0.14-beta +type: text/vnd.tiddlywiki +released: 201408131731 + +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.13-beta...v5.0.14-beta]]// + +!! Major Changes + +!!! Improved Control Panel Plugins Tab + +The ''Plugins'' tab of the [[control panel|$:/ControlPanel]] has been improved with the addition of documentation tabs that plugins can use to show documentation. There is also a larger draggable area for dragging tiddlers across to other wikis. + +!!! Configurable Button Toolbars + +The page toolbar and the tiddler toolbars can now be configured with several new buttons - see the [[control panel|$:/ControlPanel]] under the ''Appearance'' and ''Toolbars'' tabs. + +The sidebar tools tab now shows all the available page controls, allowing them to be invoked or checked to appear in the toolbar. The tiddler info area now includes a tools tab that includes buttons for all the tiddler actions. + +!!! Upgrade Mechanism + +There are two components: + +* A more flexible ImportMechanism that: +** Presents incoming tiddlers as a pending import list that allows the user to inspect them and, if necessary, explicitly deselect them from the actual import +** Provides UpgraderModules with an opportunity to process each incoming tiddler +*** The [[plugin upgrader|$:/core/modules/upgraders/plugins.js]] module handles version checking of plugins and upgrading them from a special UpgradeLibrary plugin tiddler +*** The [[system upgrader|$:/core/modules/upgraders/system.js]] module is responsible for suppressing the importing of certain system tiddlers (currently [[$:/StoryList]] and [[$:/HistoryList]]) +*** The [[themetweak upgrader|$:/core/modules/upgraders/themetweaks.js]] module handles migrating theme tweaks from their pre-5.0.14-beta format (see below) +* An UpgradePlugin and associated edition that provides a custom, single-purpose user interface for upgrading standalone TiddlyWiki files - see http://tiddlywiki.com/upgrade.html + +!!! Improvements to CamelCase Recognition + +TiddlyWiki now takes a much more conservative approach to recognising CamelCase terms that should be automatically linked. Previously, the dash and underscore were treated as lower case letters, leading to a number of false positives. See the [[GitHub bug #337|https://github.com/Jermolene/TiddlyWiki5/issues/337]] for details. + +!!! Automatic Permalinking Off by Default + +With previous beta releases of TiddlyWiki the browser address bar is automatically updated so that it dynamically reflects the tiddlers that are currently open. This makes it easier to get a permalink for copying and pasting elsewhere, but it leads to much confusion for casual users who don't always understand why unexpected tiddlers are being displayed after they have refreshed the page in the browser. + +For 5.0.14-beta, the setting has been changed. Visit [[control panel|$:/ControlPanel]] ''Advanced''/''Settings'' to switch the setting back to "Include the target tiddler and the current story sequence". + +!! Usability Improvements + +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/f6d7d87a3d49f816ccc050bdf4a5394eed37dd51]] previews to the icon dropdown in the [[tag manager|$:/TagManager]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/56945d91d327489478fc44dce5234ece35a01abb]] an indication of unsaved changes by changing the colour of the save changes button +* [[Split|https://github.com/Jermolene/TiddlyWiki5/commit/7aa6c7c06d8b5359f183e6b9f6f57cf89611cda8]] the wikitext emphasis parsers into separate modules so that they can be independently controlled with the `\rules` pragma +* [[Refactored|https://github.com/Jermolene/TiddlyWiki5/commit/f43cd5ba9c6e5eda221ec738174e61e34fad2b8d]] (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/a3de93b4eb8b108239b2e4b496308026e9e9eef8]]) ReleaseHistory to place the releases into vertical tabs +* [[Stopped|https://github.com/Jermolene/TiddlyWiki5/commit/3ff7462afd5414b92680c6b6e67274be79233224]] saving [[$:/HistoryList]], thus avoiding it uncontrollably increasing in size +* [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/73cf1bfdb3cd238ac7800162f58d44a8bb60019b]] (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/d5e4b9b5d1e7db5ad4d769433cc934ef08265f57]]) print stylesheet to remove page background +* [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/07f13b310d300631267936ad8bc55a338369afc0]] display of plugin tiddlers so that their constituent tiddlers are shown, rather than the raw JSON +* [[Moved|https://github.com/Jermolene/TiddlyWiki5/commit/799a5b059a40a51fdeb1dae7a0eb5bf8a79f5106]] the functionality of the fullscreen plugin into the core + +!! Hackability Improvements + +* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/c23f6af4b5c59f4d09dd8d6704e1939bb9d5b2d3]] TiddlerWidget to add a CSS class corresponding to each tag present on displayed tiddlers +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/d357e1706c91d17a72fb19fedf43e57071fc7dd6]] support for hiding specified fields in the tiddler editor +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/be040ea8a2cc8962f1a28a313e4c9ebc2d5c0e31]] support for variable operands in filters (see [[Introduction to Filters]]) +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/1f16ef6fa88b51d2dad7c8e57fcff014950a7442]] support for widget messages [[tw-permalink|WidgetMessage: tw-permalink]] and [[tw-permaview|WidgetMessage: tw-permaview]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/browser-sniff]] browser sniffing plugin so that tiddlywiki.com can present the correct browser-specific documentation +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/ef67cc3fd9b267a522598abccdfbb93fbfca240c]] a configuration option for specifying the default location for saving new tiddlers in the client-server configuration +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/b4d47858e587c96f3a68cc28cffff181ec45f55f]] support for the InfoMechanism +* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/f08f57c5d24eb0146ac2cb77472a5fc5f135f1e9]] CheckboxWidget to allow it to toggle fields as well as tags +* [[Refactored|https://github.com/Jermolene/TiddlyWiki5/commit/21c137a66c37f010b36697bb6bed5321138fbb9f]] [[control panel|$:/ControlPanel]] theme tweaks to be stored in individual tiddlers +* [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/e18d8a88661a1c2caa1b722841747c75ca6af437]] the TabsMacro to allow tabs to be templated +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/91acad0f7ce8637945a953dfcb122cd31292626d]] (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/8612bc4006e717e4fa3c562fa72a85650206b66f]]) SystemTags support for inserting content above and below the story river +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/f793816dfa687ae7791143b33487fd5f95f3265c]] support for transcluding plugin subtiddlers with the TranscludeWidget +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/c73853288c5b4b0716da94fea2f2edec09345643]] (and [[here|https://github.com/Jermolene/TiddlyWiki5/commit/08f775eac8cb053d08c1c561e65a5eeb87c4c6b6]]) support for importing from `*.htm` and `*.hta` files as well as the existing support for `*.html` files +* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/73d7e85e11c7732080ca8bc4321ebb12afbac09c]] the "sticky titles" theme so that it works when tiddlers are in edit mode + +!! Bug Fixes + +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/5b3b62f93da4b7b19e24ccf72d9ce20b9edce6d5]] bug with execution order of BuildCommand targets +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/d93da81671a704377209fc1871425c3a7c5db35a]] bug with missing hover colours for external links +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/465f4ac46903070759a572d183c498c5579cb922]] problem with refreshing modal dialogues +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/3351ae7e29cbf3bed6fc1925ef33664bcc59fef5]] issue with cookies disabled on Firefox +* [[Relax|https://github.com/Jermolene/TiddlyWiki5/commit/5260899d8b090e8886e41e3aa770fdcf5967ad8c]] the requirement for a newline immediately the closing `\end` of a macro definition + +!! Contributors + +[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki: + +* [[@BramChen|https://github.com/BramChen]] +* [[@pmario|https://github.com/pmario]] +* [[@ssokolow|https://github.com/ssokolow]] +* [[@xcazin|https://github.com/xcazin]] diff --git a/editions/tw5.com/tiddlers/Release 5.0.15beta.tid b/editions/tw5.com/tiddlers/Release 5.0.15beta.tid new file mode 100644 index 000000000..5b5445a58 --- /dev/null +++ b/editions/tw5.com/tiddlers/Release 5.0.15beta.tid @@ -0,0 +1,42 @@ +caption: 5.0.15-beta +created: 20140812150234142 +modified: 20140820153116300 +tags: releasenote +title: Release 5.0.15-beta +type: text/vnd.tiddlywiki +released: 201408202255 + +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.14-beta...v5.0.15-beta]]// + +!! Usability Improvements + +* [[Simplified|https://github.com/Jermolene/TiddlyWiki5/commit/c57b00996855f10d9b7fa2aa4e9deb2a2a607d7f]] shadow default tiddlers +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/32a7ee2683ace619599f0ab73028307ca33f4e4c]] the ability to disable plugins (see PluginMechanism) with a user interface in [[control panel|$:/ControlPanel]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/4b05608ad5e77043b01495825ea0f0e76c378760]] page control button for invoking the [[tag manager|$:/TagManager]] +* [[Simplified|https://github.com/Jermolene/TiddlyWiki5/commit/c4b76ceb0bc786bcceb12fc3417bb8c4bfde27a9]] downloading an offline copy of a client-server wiki +* [[Blocked|https://github.com/Jermolene/TiddlyWiki5/commit/2bbe9f76ecf8fc89c789e72be00ac19e811195ee]] temporary state tiddlers from import/upgrade + +!! Hackability Improvements + +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/c912fed55d94c9bef2d541cd55f458b12172941c]] a banner to the edit template encouraging improvements to the documentation +* [[Refactored|https://github.com/Jermolene/TiddlyWiki5/commit/f75af2c983e10e8a82639890b993fb5cf042d610]] `saver-handler.js` out of `syncer.js` +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/8cf726275c19ed5b4a0ed1cf8354d64d1bc29da5]] TableOfContentsMacro support +* Simplified startup module organisation (see [[Startup Modules.svg]]) +* [[Changed|https://github.com/Jermolene/TiddlyWiki5/commit/25777b147fa4ed2f915150aec503ad1e094e6043]] the overlay text for the DropzoneWidget to make it translateable +* [[Introduced|https://github.com/Jermolene/TiddlyWiki5/commit/920e11e7921f777170aa2f9e1836c000fec2e26d]] a new [[refresh button|WidgetMessage: tw-browser-refresh]] and reverted [[home button|WidgetMessage: tw-home]] behaviour +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/fbf307c648ae0e92679c54f7d03f197a75b4e101]] ''alt'' attribute to the ImageWidget + +!! Bug Fixes + +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/c8830d32f74b8c228553f11f7f55b5be45ae6471]] problem with building TiddlyWiki under Windows +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/34461cb2fe554331a0269fd7795b1d6a879fcba9]] unclickable download ink in upgrade wizard +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/9e85ddfec78dd8df71e6173100dce659417551f4]] missing language flag in ''empty.html'' +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/18592fe8f810d1858ca040da1a7c4a81fb74cfed]] problem with switching the type of a tiddler between the bitmap and text editor +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/fe6623d7feed1a9068e15bfac57be0b0924e8915]] foreground colour for tag pills in the sidebar +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/c912fed55d94c9bef2d541cd55f458b12172941c]] problem with github source links for tiddlywiki.com not working for titles containing colons + +!! Contributors + +[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki: + +* [[@BramChen|https://github.com/BramChen]] diff --git a/editions/tw5.com/tiddlers/Release 5.0.1alpha.tid b/editions/tw5.com/tiddlers/Release 5.0.1alpha.tid index 72b1fac93..c1fc01f4d 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.1alpha.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.1alpha.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.1-alpha type: text/vnd.tiddlywiki released: 201312061753 +caption: 5.0.1-alpha //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.17...v5.0.1-alpha]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.2beta.tid b/editions/tw5.com/tiddlers/Release 5.0.2beta.tid index 94104da6e..7847a8670 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.2beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.2beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.2-beta type: text/vnd.tiddlywiki released: 201312151436 +caption: 5.0.2-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.1-alpha...v5.0.2-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.3beta.tid b/editions/tw5.com/tiddlers/Release 5.0.3beta.tid index 501d3ae8f..b9d70efeb 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.3beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.3beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.3-beta type: text/vnd.tiddlywiki released: 201312151700 +caption: 5.0.3-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.2-beta...v5.0.3-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.4beta.tid b/editions/tw5.com/tiddlers/Release 5.0.4beta.tid index f8c252831..b615a8207 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.4beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.4beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.4-beta type: text/vnd.tiddlywiki released: 201312221544 +caption: 5.0.4-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.3-beta...v5.0.4-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.5beta.tid b/editions/tw5.com/tiddlers/Release 5.0.5beta.tid index f794a5c95..209b03725 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.5beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.5beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.5-beta type: text/vnd.tiddlywiki released: 201312241430 +caption: 5.0.5-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.4-beta...v5.0.5-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.6beta.tid b/editions/tw5.com/tiddlers/Release 5.0.6beta.tid index 1dbd85c6f..677949ef4 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.6beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.6beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.6-beta type: text/vnd.tiddlywiki released: 201401031714 +caption: 5.0.6-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.5-beta...v5.0.6-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.7beta.tid b/editions/tw5.com/tiddlers/Release 5.0.7beta.tid index ff19e7de1..0803cf401 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.7beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.7beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.7-beta type: text/vnd.tiddlywiki released: 201401262107 +caption: 5.0.7-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.6-beta...v5.0.7-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.8beta.tid b/editions/tw5.com/tiddlers/Release 5.0.8beta.tid index e67cd64a2..8b3e5d9e1 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.8beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.8beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.8-beta type: text/vnd.tiddlywiki released: 201402281551 +caption: 5.0.8-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.7-beta...v5.0.8-beta]]// diff --git a/editions/tw5.com/tiddlers/Release 5.0.9beta.tid b/editions/tw5.com/tiddlers/Release 5.0.9beta.tid index d99a7f2fc..2d936418e 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.9beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.9beta.tid @@ -4,6 +4,7 @@ tags: releasenote title: Release 5.0.9-beta type: text/vnd.tiddlywiki released: 201404152139 +caption: 5.0.9-beta //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.8-beta...v5.0.9-beta]]// diff --git a/editions/tw5.com/tiddlers/ReleaseHistory.tid b/editions/tw5.com/tiddlers/ReleaseHistory.tid index 773e6cd77..d7076c5c1 100644 --- a/editions/tw5.com/tiddlers/ReleaseHistory.tid +++ b/editions/tw5.com/tiddlers/ReleaseHistory.tid @@ -1,22 +1,8 @@ created: 20131109105400007 -modified: 20140119201607494 +modified: 20140701201607494 title: ReleaseHistory type: text/vnd.tiddlywiki Here are the details of recent releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named. -<$list filter="[tag[releasenote]!sort[created]]"> - -<div> - -<h1><$link to={{!!title}}><$view field="title"/></$link></h1> -<div>''Release date: <$view field="released" format="date" template="DDth MMM YYYY at 0hh:0mm">TBA</$view>''</div> -<div> - -<$transclude/> - -</div> - -</div> - -</$list> \ No newline at end of file +<<tabs "[tag[releasenote]!sort[created]]" "Release 5.0.15-beta" "$:/state/tab2" "tw-vertical" "ReleaseHistoryTemplate">> diff --git a/editions/tw5.com/tiddlers/ReleaseHistoryTemplate.tid b/editions/tw5.com/tiddlers/ReleaseHistoryTemplate.tid new file mode 100644 index 000000000..2f4eb2500 --- /dev/null +++ b/editions/tw5.com/tiddlers/ReleaseHistoryTemplate.tid @@ -0,0 +1,7 @@ +title: ReleaseHistoryTemplate + +<h2><$link to=<<currentTab>>><$view tiddler=<<currentTab>> field="title"/></$link></h2> + +^^Released <$view tiddler=<<currentTab>> field="released" format="date" template="DDth MMM YYYY at 0hh:0mm">TBA</$view>^^ + +<$transclude tiddler=<<currentTab>> /> diff --git a/editions/tw5.com/tiddlers/Saving on Safari.tid b/editions/tw5.com/tiddlers/Saving on Safari.tid new file mode 100644 index 000000000..137802ed3 --- /dev/null +++ b/editions/tw5.com/tiddlers/Saving on Safari.tid @@ -0,0 +1,23 @@ +created: 20140811171304926 +modified: 20140811171800263 +tags: howto +title: Saving on Safari +type: text/vnd.tiddlywiki + +This method of saving changes is clunky because it requires manual intervention for each save. + +# [[Download]] an empty TiddlyWiki by clicking this button: +#> {{$:/editions/tw5.com/snippets/download-empty-button}} +#> If the button doesn't work save this link: http://tiddlywiki.com/empty.html +#> Your browser may ask you to accept the download before it begins +# Locate the file you just downloaded +#* You may rename it, but be sure to keep the `.html` or `.htm` extension +# Open the file in Safari +# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''done'' button +# Save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar +# A popup "Download changes" window is displayed that includes a link labelled //Right-click to save changes// +# Right-click on the link and select "Download Linked File As..." from the popup menu +# Navigate to the folder containing your wiki HTML file and select the existing file +# Click the "Save" button +# Click "Replace" to confirm replacing the existing file +# Verify that your changes have been saved correctly diff --git a/editions/tw5.com/tiddlers/TableOfContents.tid b/editions/tw5.com/tiddlers/TableOfContents.tid new file mode 100644 index 000000000..c30ab83a9 --- /dev/null +++ b/editions/tw5.com/tiddlers/TableOfContents.tid @@ -0,0 +1,352 @@ +caption: {{$:/language/SideBar/Contents/Caption}} +created: 20140809114010378 +list-after: $:/core/ui/SideBar/Open +modified: 20140809114018461 +tags: $:/tags/SideBar +title: TableOfContents +type: text/vnd.tiddlywiki + +\define toc-heading(caption,body) +<$reveal type="nomatch" state=<<qualify "$:/state/toc/$caption$">> text="show"> +<$button set=<<qualify "$:/state/toc/$caption$">> setTo="show" class="btn-invisible">{{$:/core/images/right-arrow}} $caption$ +</$button> +</$reveal> +<$reveal type="match" state=<<qualify "$:/state/toc/$caption$">> text="show"> +<$button set=<<qualify "$:/state/toc/$caption$">> setTo="hide" class="btn-invisible">{{$:/core/images/down-arrow}} $caption$ +</$button> +</$reveal> +<$reveal type="match" state=<<qualify "$:/state/toc/$caption$">> text="show" retain="yes" animate="yes"> + +$body$ + +</$reveal> +\end +<div class="tw-table-of-contents"> + +# Guide +## <<toc-heading "Introduction" " +## [[GettingStarted]] +## [[The First Rule of Using TiddlyWiki]] +## [[Features]] +## [[Examples]] +## [[Video Tutorials]] +## [[Resources]] +## [[ReportingBugs]] +## [[TableOfContents]] +">> +## <<toc-heading "Concepts" " +## Basics +### [[Tiddlers]] +### [[Philosophy of Tiddlers]] +### [[Fields|TiddlerFields]] +### [[Tags|TiddlerTags]] +### [[Links|TiddlerLinks]] +### [[CamelCase]] +### [[WikiText]] +### [[Macros]] +### [[Searching]] +### [[SystemTiddlers]] +### [[Plugins]] & [[ShadowTiddlers]] +## Advanced +### [[ColourPalettes]] +### [[ContentType]] +### [[CurrentTiddler]] +### [[DataTiddlers]] +### [[DateFormat]] +### [[ListField]] +### [[Structuring TiddlyWiki]] +### [[SystemTags]] +### [[TemplateTiddlers]] +### [[TextReference]] +### [[TiddlerFilters]] +">> +## <<toc-heading "~TiddlyWiki in the Browser" " +## Saving +### [[AutoSave]] +### [[Saving on a PHP Server]] +### [[Saving on Android]] +### [[Saving on InternetExplorer]] +### [[Saving on iPad/iPhone]] +### [[Saving on TiddlySpot]] +### [[Saving with Encryption]] +### [[Saving with the HTML5 fallback saver]] +### [[Saving with TiddlyFox]] +### [[Saving with TiddlyFox on Android]] +### [[Saving with TiddlyIE]] +### [[Using TiddlyWiki on TiddlyDesktop]] +### [[Windows HTA Hack]] +## Features +### [[ExternalImages]] +### [[ImportTiddlers]] +### [[KeyboardShortcuts]] +### [[PermaLinks]] +### [[SafeMode]] +### [[Upgrading]] +### [[Using Stylesheets]] +### [[UsingSVG]] +">> +## <<toc-heading "~TiddlyWiki on Node.js" " +## Basics +### [[Installing TiddlyWiki on Node.js]] +### [[Using TiddlyWiki on Node.js]] +### [[Environment Variables on Node.js]] +### [[Upgrading TiddlyWiki on Node.js]] +## Concepts +### [[TiddlerFiles]] +### [[MultiTiddlerFiles]] +### [[TiddlyWikiFolders]] +### [[LazyLoading]] +## Tasks +### [[Building TiddlyWikiClassic]] +### [[Generating Static Sites with TiddlyWiki]] +### [[How to build a TiddlyWiki5 from individual tiddlers]] +### [[Scripts for TiddlyWiki on Node.js]] +### [[Using a custom path prefix with the client-server edition]] +### [[Using TiddlyWiki for GitHub Pages project documentation]] +">> +## <<toc-heading "Tips" " +## [[Adding a Twitter Follow button]] +## [[Creating SubStories]] +## [[Editing Tiddlers with Emacs]] +## [[GoogleChromeTips]] +## [[ImageGallery Example]] +## [[Making curved text with SVG]] +## [[Preserving open tiddlers at startup]] +## [[Setting a favicon]] +## [[Sharing a TiddlyWiki on Dropbox]] +## [[TaskManagementExample]] +## [[TitlesPolicy]] +">> +# Reference +## <<toc-heading "~WikiText" " +## [[Block Quotes|Block Quotes in WikiText]] +## [[Code Blocks|Code Blocks in WikiText]] +## [[Dashes|Dashes in WikiText]] +## [[Definitions|Definitions in WikiText]] +## [[Formatting|Formatting in WikiText]] +## [[Hard Linebreaks|Hard Linebreaks in WikiText]] +## [[Headings|Headings in WikiText]] +## [[Horizontal Rules|Horizontal Rules in WikiText]] +## [[HTML|HTML in WikiText]] +## [[Images|Images in WikiText]] +## [[Linking|Linking in WikiText]] +## [[Lists|Lists in WikiText]] +## [[Macros|Macros in WikiText]] +## [[Paragraphs|Paragraphs in WikiText]] +## [[Styles and Classes|Styles and Classes in WikiText]] +## [[Tables|Tables in WikiText]] +## [[Transclusion|Transclusion in WikiText]] +## [[Typed Blocks|Typed Blocks in WikiText]] +## [[Widgets|Widgets in WikiText]] +## WikiText +">> +## <<toc-heading "Macros" " +## [[Macros]] +## [[changecount|ChangeCountMacro]] +## [[makedatauri|MakeDataUriMacro]] +## [[qualify|QualifyMacro]] +## [[tabs|TabsMacro]] +## [[version|VersionMacro]] +">> +## <<toc-heading "Widgets" " +## [[Browse|BrowseWidget]] +## [[Button|ButtonWidget]] +## [[Checkbox|CheckboxWidget]] +## [[Count|CountWidget]] +## [[Dropzone|DropzoneWidget]] +## [[EditBitmap|EditBitmapWidget]] +## [[EditText|EditTextWidget]] +## [[Edit|EditWidget]] +## [[Encrypt|EncryptWidget]] +## [[FieldMangler|FieldManglerWidget]] +## [[Fields|FieldsWidget]] +## [[Grid|GridWidget]] +## [[Image|ImageWidget]] +## [[ImportVariables|ImportVariablesWidget]] +## [[Keyboard|KeyboardWidget]] +## [[LinkCatcher|LinkCatcherWidget]] +## [[Link|LinkWidget]] +## [[List|ListWidget]] +## [[MacroCall|MacroCallWidget]] +## [[Navigator|NavigatorWidget]] +## [[Password|PasswordWidget]] +## [[Radio|RadioWidget]] +## [[Reveal|RevealWidget]] +## [[Scrollable|ScrollableWidget]] +## [[Select|SelectWidget]] +## [[SetVariable|SetVariableWidget]] +## [[Set|SetWidget]] +## [[Text|TextWidget]] +## [[Tiddler|TiddlerWidget]] +## [[Transclude|TranscludeWidget]] +## [[View|ViewWidget]] +">> +## <<toc-heading "Widget Messages" " +## WidgetMessages +## [[tw-auto-save-wiki|WidgetMessage: tw-auto-save-wiki]] +## [[tw-cancel-tiddler|WidgetMessage: tw-cancel-tiddler]] +## [[tw-clear-password|WidgetMessage: tw-clear-password]] +## [[tw-close-all-tiddlers|WidgetMessage: tw-close-all-tiddlers]] +## [[tw-close-other-tiddlers|WidgetMessage: tw-close-other-tiddlers]] +## [[tw-close-tiddler|WidgetMessage: tw-close-tiddler]] +## [[tw-delete-tiddler|WidgetMessage: tw-delete-tiddler]] +## [[tw-download-file|WidgetMessage: tw-download-file]] +## [[tw-edit-tiddler|WidgetMessage: tw-edit-tiddler]] +## [[tw-full-screen|WidgetMessage: tw-full-screen]] +## [[tw-home|WidgetMessage: tw-home]] +## [[tw-import-tiddlers|WidgetMessage: tw-import-tiddlers]] +## [[tw-login|WidgetMessage: tw-login]] +## [[tw-logout|WidgetMessage: tw-logout]] +## [[tw-modal|WidgetMessage: tw-modal]] +## [[tw-navigate|WidgetMessage: tw-navigate]] +## [[tw-new-tiddler|WidgetMessage: tw-new-tiddler]] +## [[tw-notify|WidgetMessage: tw-notify]] +## [[tw-perform-import|WidgetMessage: tw-perform-import]] +## [[tw-permalink|WidgetMessage: tw-permalink]] +## [[tw-permaview|WidgetMessage: tw-permaview]] +## [[tw-save-tiddler|WidgetMessage: tw-save-tiddler]] +## [[tw-save-wiki|WidgetMessage: tw-save-wiki]] +## [[tw-server-refresh|WidgetMessage: tw-server-refresh]] +## [[tw-set-password|WidgetMessage: tw-set-password]] +">> +## <<toc-heading "Filter Operators" " +## FilterOperators +## [[after|FilterOperator: after]] +## [[all|FilterOperator: all]] +## [[backlinks|FilterOperator: backlinks]] +## [[before|FilterOperator: before]] +## [[bf|FilterOperator: bf]] +## [[butfirst|FilterOperator: butfirst]] +## [[butlast|FilterOperator: butlast]] +## [[commands|FilterOperator: commands]] +## [[each|FilterOperator: each]] +## [[eachday|FilterOperator: eachday]] +## [[field|FilterOperator: field]] +## [[first|FilterOperator: first]] +## [[get|FilterOperator: get]] +## [[has|FilterOperator: has]] +## [[indexes|FilterOperator: indexes]] +## [[is|FilterOperator: is]] +## [[last|FilterOperator: last]] +## [[limit|FilterOperator: limit]] +## [[links|FilterOperator: links]] +## [[list|FilterOperator: list]] +## [[listed|FilterOperator: listed]] +## [[modules|FilterOperator: modules]] +## [[moduletypes|FilterOperator: moduletypes]] +## [[next|FilterOperator: next]] +## [[nsort|FilterOperator: nsort]] +## [[nsortcs|FilterOperator: nsortcs]] +## [[nth|FilterOperator: nth]] +## [[plugintiddlers|FilterOperator: plugintiddlers]] +## [[prefix|FilterOperator: prefix]] +## [[previous|FilterOperator: previous]] +## [[removeprefix|FilterOperator: removeprefix]] +## [[rest|FilterOperator: rest]] +## [[reverse|FilterOperator: reverse]] +## [[sameday|FilterOperator: sameday]] +## [[search|FilterOperator: search]] +## [[shadowsource|FilterOperator: shadowsource]] +## [[sort|FilterOperator: sort]] +## [[sortcs|FilterOperator: sortcs]] +## [[tag|FilterOperator: tag]] +## [[tagging|FilterOperator: tagging]] +## [[tags|FilterOperator: tags]] +## [[title|FilterOperator: title]] +## [[untagged|FilterOperator: untagged]] +">> +## <<toc-heading "Commands" " +## [[Build|BuildCommand]] +## [[ClearPassword|ClearPasswordCommand]] +## [[Help|HelpCommand]] +## [[Init|InitCommand]] +## [[Load|LoadCommand]] +## [[Output|OutputCommand]] +## [[Password|PasswordCommand]] +## [[RenderTiddler|RenderTiddlerCommand]] +## [[RenderTiddlers|RenderTiddlersCommand]] +## [[SaveTiddler|SaveTiddlerCommand]] +## [[SaveTiddlers|SaveTiddlersCommand]] +## [[Server|ServerCommand]] +## [[SetField|SetFieldCommand]] +## [[Verbose|VerboseCommand]] +## [[Version|VersionCommand]] +">> +# Advanced +## <<toc-heading "Mechanisms" " +## [[AlertMechanism]] +## [[BootMechanism]] +## [[DraftMechanism]] +## [[EncryptionMechanism]] +## [[HistoryMechanism]] +## [[LazyLoadingMechanism]] +## [[Modules]] +## [[ModuleType]] +## [[ParsingMechanism]] +## [[PluginMechanism]] +## [[PopupMechanism]] +## [[RenderingMechanism]] +## [[StartupMechanism]] +## [[StateMechanism]] +## [[TestingMechanism]] +## [[TiddlerFilter Formal Grammar]] +## [[TranslationMechanism]] +">> +## <<toc-heading "Developers" " +## Basics +### [[TiddlyWiki for Developers]] +### [[TiddlyWiki Architecture]] +### [[Working with the TiddlyWiki5 repository]] +### [[TiddlyWiki5 Development Environment]] +### [[TiddlyWiki Coding Style Guidelines]] +## Concepts +### [[JavaScript Macros]] +### [[Naming of System Tiddlers]] +### [[SyncAdaptorModules]] +### [[TiddlyWiki5 Versioning]] +### [[WidgetModules]] +### [[WikiRuleModules]] +## Tasks +### [[Developing plugins using Node.js and GitHub]] +### [[How to create a translation for TiddlyWiki]] +### [[Releasing a new version of TiddlyWiki5]] +### [[TiddlyWiki on node-webkit]] +### [[How to create plugins in the browser]] +">> +# About +## <<toc-heading "About" " +## [[Acknowledgements]] +## [[Community]] +## [[Contributing]] +## [[Download]] +## [[Future of TiddlyWiki]] +## [[HelloThere]] +## [[HelpingTiddlyWiki]] +## [[RoadMap]] +## [[TalkyTalky]] +">> +## <<toc-heading "Releases" " +## [[Release 5.0.0-alpha.11]] +## [[Release 5.0.0-alpha.12]] +## [[Release 5.0.0-alpha.13]] +## [[Release 5.0.0-alpha.14]] +## [[Release 5.0.0-alpha.15]] +## [[Release 5.0.0-alpha.16]] +## [[Release 5.0.0-alpha.17]] +## [[Release 5.0.1-alpha]] +## [[Release 5.0.2-beta]] +## [[Release 5.0.3-beta]] +## [[Release 5.0.4-beta]] +## [[Release 5.0.5-beta]] +## [[Release 5.0.6-beta]] +## [[Release 5.0.7-beta]] +## [[Release 5.0.8-beta]] +## [[Release 5.0.9-beta]] +## [[Release 5.0.10-beta]] +## [[Release 5.0.11-beta]] +## [[Release 5.0.12-beta]] +## [[Release 5.0.13-beta]] +## [[Release 5.0.14-beta]] +">> + +</div> diff --git a/editions/tw5.com/tiddlers/Upgrading.tid b/editions/tw5.com/tiddlers/Upgrading.tid index 0f7d95a1e..bf5fcbbfb 100644 --- a/editions/tw5.com/tiddlers/Upgrading.tid +++ b/editions/tw5.com/tiddlers/Upgrading.tid @@ -1,57 +1,40 @@ created: 20131202102427114 -modified: 20140419133900452 +modified: 20140716133900452 tags: howto title: Upgrading type: text/vnd.tiddlywiki -There are several methods for upgrading an existing TiddlyWiki version 5 document to a new release. There is a [[different procedure|Upgrading TiddlyWiki on Node.js]] for upgrading [[TiddlyWiki on Node.js]]. +The process described here is for upgrading standalone TiddlyWiki files. There is a [[different procedure|Upgrading TiddlyWiki on Node.js]] for upgrading [[TiddlyWiki on Node.js]]. <<< -Regardless of which method you use, remember the [[The First Rule of Using TiddlyWiki]]: +When upgrading, please remember the [[The First Rule of Using TiddlyWiki]]: //You are responsible for looking after your own data; take care to make backups, especially when upgrading the ~TiddlyWiki core// <<< -<div class="tw-message-box"> - -<a class="tw-message-icon" href="http://tiddlywiki.com/" target="_blank">{{TiddlyWiki Classic.png}}</a> - -!! Upgrading from TiddlyWikiClassic - -Remember that TiddlyWiki version 5 is not fully backwards compatible with the older TiddlyWikiClassic. It is recommended that users of TiddlyWikiClassic should not attempt to upgrade their existing files until the new version is more mature. - -</div> +Remember that TiddlyWiki version 5 is not fully backwards compatible with the older TiddlyWikiClassic. ! Online upgrading This process will work on most desktop browsers. Note that none of your personal data leaves your browser with this process. # Locate your TiddlyWiki file in the file system (ie using Windows Explorer, the Finder on Mac OS X, or your file manager on Linux) -# Visit http://tiddlywiki.com/empty.html in your browser +# Visit http://tiddlywiki.com/upgrade.html in your browser # Drag your old TiddlyWiki HTML file into the browser window #* If the file is encrypted you will be prompted for the password -#* Your tiddlers should be imported -# Set a password if you want to use encryption +# Review the list of tiddlers that will be upgraded +# Click ''Upgrade'' # Save changes to save the new version -This will download a file called ''empty.html'' to your computer. This file is the upgrade of your old file. You may need to open the location where ''empty.html'' was downloaded, rename ''empty.html'' with the name of the old file you are upgrading, and replace the old file by moving the new file in its place. - -//For the moment you'll also need to manually update any plugins that are not included in empty.html:// - -># Open the control panel to the ''Plugins'' tab in your upgraded wiki -># Check the version numbers of the plugins you are using; any plugins with an older version than the version of [[$:/core]] will probably need updating -># Locate a wiki with the plugins you need to update and open the control panel ''Plugins'' tab ->#* http://tiddlywiki.com/d3demo.html for the D3 plugin ->#* http://tiddlywiki.com/codemirrordemo.html for the CodeMirror plugin ->#* http://tiddlywiki.com/markdowndemo.html for the MarkDown plugin ->#* http://tiddlywiki.com/ for most of the others -># Drag the plugin links one by one back to your own wiki. You should see the version numbers update in the control panel -># Save your wiki +This will download a file called ''upgrade.html'' to your computer. This file is the upgrade of your old file. You may need to open the location where ''upgrade.html'' was downloaded, rename ''upgrade.html'' with the name of the old file you are upgrading, and replace the old file by moving the new file in its place. ! Offline upgrading -You can also download http://tiddlywiki.com/empty.html locally and perform the same drag-and-drop procedure to upgrade your files. +You can also download http://tiddlywiki.com/upgrade.html locally and perform the same drag-and-drop procedure to upgrade your files. ! Problems with Upgrades -Particularly during the beta, it is possible for a customisation applied in a previous version to break when upgraded to the latest version. Use SafeMode to investigate and fix these problems. +Particularly during the beta, it is possible for a customisation applied in a previous version to break when upgraded to the latest version. There are two techniques you can use to help track down issues: + +* Try repeating the upgrade having selectively unchecked any tiddlers that may be applying customisations to TiddlyWiki +* Use SafeMode to disable all customisations of shadow tiddlers diff --git a/editions/tw5.com/tiddlers/commands/InitCommand.tid b/editions/tw5.com/tiddlers/commands/InitCommand.tid index 56919407e..8a3f8bbdb 100644 --- a/editions/tw5.com/tiddlers/commands/InitCommand.tid +++ b/editions/tw5.com/tiddlers/commands/InitCommand.tid @@ -1,7 +1,11 @@ created: 20140223195548209 -modified: 20140223195738745 +modified: 20140617212529392 tags: command title: InitCommand type: text/vnd.tiddlywiki {{$:/language/Help/init}} + +See also: + +* [[Environment Variables on Node.js]] diff --git a/editions/tw5.com/tiddlers/Articles.tid b/editions/tw5.com/tiddlers/community/Articles.tid similarity index 85% rename from editions/tw5.com/tiddlers/Articles.tid rename to editions/tw5.com/tiddlers/community/Articles.tid index 7f8207a53..58426bc6a 100644 --- a/editions/tw5.com/tiddlers/Articles.tid +++ b/editions/tw5.com/tiddlers/community/Articles.tid @@ -16,7 +16,7 @@ Submit new entries to this collection of articles via GitHub, Twitter or by post !!! <a href={{!!url}} target="_blank"><$text text={{!!url}}/></a> -<div class="tw-subtitle">Updated <$view field="modified" format="relativedate"/></div> +<div class="tw-subtitle">Posted <$view field="modified" format="relativedate"/></div> <$transclude/> diff --git a/editions/tw5.com/tiddlers/community/Community.tid b/editions/tw5.com/tiddlers/community/Community.tid new file mode 100644 index 000000000..d0ad43274 --- /dev/null +++ b/editions/tw5.com/tiddlers/community/Community.tid @@ -0,0 +1,7 @@ +created: 20130909151600000 +modified: 20140321090723435 +tags: community +title: Community +type: text/vnd.tiddlywiki + +<<tabs "Forums Latest Resources Examples Articles Groups" "Latest">> diff --git a/editions/tw5.com/tiddlers/Examples.tid b/editions/tw5.com/tiddlers/community/Examples.tid similarity index 86% rename from editions/tw5.com/tiddlers/Examples.tid rename to editions/tw5.com/tiddlers/community/Examples.tid index 7148e3112..76cdf8b65 100644 --- a/editions/tw5.com/tiddlers/Examples.tid +++ b/editions/tw5.com/tiddlers/community/Examples.tid @@ -18,7 +18,7 @@ Submit new entries to this collection via GitHub, Twitter or by posting in the [ !!! <a href={{!!url}} target="_blank"><$text text={{!!url}}/></a> -<div class="tw-subtitle">Updated <$view field="modified" format="relativedate"/></div> +<div class="tw-subtitle">Posted <$view field="modified" format="relativedate"/></div> <$transclude/> diff --git a/editions/tw5.com/tiddlers/Community.tid b/editions/tw5.com/tiddlers/community/Forums.tid similarity index 55% rename from editions/tw5.com/tiddlers/Community.tid rename to editions/tw5.com/tiddlers/community/Forums.tid index 3a93bfc95..03583b17a 100644 --- a/editions/tw5.com/tiddlers/Community.tid +++ b/editions/tw5.com/tiddlers/community/Forums.tid @@ -1,12 +1,7 @@ -created: 20130909151600000 -modified: 20140321090723435 +title: Forums +created: 20140721121924384 +modified: 20140721121924384 tags: community -title: Community -type: text/vnd.tiddlywiki - -TiddlyWiki is made much more useful by its vibrant community of users and OpenSource developers. - -! Community Forums The ~TiddlyWiki discussion groups are mailing lists for talking about ~TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. @@ -17,16 +12,4 @@ The ~TiddlyWiki discussion groups are mailing lists for talking about ~TiddlyWik * Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]] * Watch recordings of our regular [[TiddlyWiki Hangouts]] -New releases of TiddlyWiki, TiddlyDesktop and TiddlyFox are announced via the discussion groups and Twitter. - -! Local ~TiddlyWiki Interest Groups - -Local meetings of ~TiddlyWiki enthusiasts around the world: - -* [[OXTWIG]], the ''Oxford ~TiddlyWiki Interest Group'' meets monthly in Oxford, UK to share experiences of using TiddlyWiki - -//If you are a ~TiddlyWiki enthusiast please consider starting a local TWIG in your area, it's a great way to spread the word about using TiddlyWiki// - -! Links - -<<tabs "Latest Resources Examples Articles" "Latest">> +New releases of TiddlyWiki, TiddlyDesktop and TiddlyFox are announced via the discussion groups and Twitter (you can also subscribe to an Atom/RSS feed of [[TiddlyWiki releases from GitHub|https://github.com/jermolene/tiddlywiki5/releases.atom]]) diff --git a/editions/tw5.com/tiddlers/community/Groups.tid b/editions/tw5.com/tiddlers/community/Groups.tid new file mode 100644 index 000000000..123a5fd7b --- /dev/null +++ b/editions/tw5.com/tiddlers/community/Groups.tid @@ -0,0 +1,13 @@ +title: Groups +created: 20140721121924384 +modified: 20140721121924384 +tags: community + +! Local ~TiddlyWiki Interest Groups + +Local meetings of ~TiddlyWiki enthusiasts around the world: + +* [[OXTWIG]], the ''Oxford ~TiddlyWiki Interest Group'' meets monthly in Oxford, UK to share experiences of using TiddlyWiki + +//If you are a ~TiddlyWiki enthusiast please consider starting a local TWIG in your area, it's a great way to spread the word about using TiddlyWiki// + diff --git a/editions/tw5.com/tiddlers/Latest.tid b/editions/tw5.com/tiddlers/community/Latest.tid similarity index 84% rename from editions/tw5.com/tiddlers/Latest.tid rename to editions/tw5.com/tiddlers/community/Latest.tid index ef87ae768..f0857975b 100644 --- a/editions/tw5.com/tiddlers/Latest.tid +++ b/editions/tw5.com/tiddlers/community/Latest.tid @@ -16,7 +16,7 @@ The latest news, articles, resources and examples. !!! <a href={{!!url}} target="_blank"><$text text={{!!url}}/></a> -<div class="tw-subtitle">Updated <$view field="modified" format="relativedate"/></div> +<div class="tw-subtitle">Posted <$view field="modified" format="relativedate"/></div> <$transclude/> diff --git a/editions/tw5.com/tiddlers/community/ReportingBugs.tid b/editions/tw5.com/tiddlers/community/ReportingBugs.tid index 904f8d97b..4e98c0ea0 100644 --- a/editions/tw5.com/tiddlers/community/ReportingBugs.tid +++ b/editions/tw5.com/tiddlers/community/ReportingBugs.tid @@ -1,6 +1,6 @@ created: 20140604204709181 modified: 20140604205253392 -tags: resources tips +tags: tips title: ReportingBugs type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/Resources.tid b/editions/tw5.com/tiddlers/community/Resources.tid similarity index 86% rename from editions/tw5.com/tiddlers/Resources.tid rename to editions/tw5.com/tiddlers/community/Resources.tid index f74bd36d6..93bc1286d 100644 --- a/editions/tw5.com/tiddlers/Resources.tid +++ b/editions/tw5.com/tiddlers/community/Resources.tid @@ -16,7 +16,7 @@ These resources created by the TiddlyWiki [[Community]] help you get the best ou !!! <a href={{!!url}} target="_blank"><$text text={{!!url}}/></a> -<div class="tw-subtitle">Updated <$view field="modified" format="relativedate"/></div> +<div class="tw-subtitle">Posted <$view field="modified" format="relativedate"/></div> <$transclude/> diff --git a/editions/tw5.com/tiddlers/links/articles/Creating a baby journal with TiddlyWiki.tid b/editions/tw5.com/tiddlers/community/articles/Creating a baby journal with TiddlyWiki.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/articles/Creating a baby journal with TiddlyWiki.tid rename to editions/tw5.com/tiddlers/community/articles/Creating a baby journal with TiddlyWiki.tid diff --git a/editions/tw5.com/tiddlers/links/articles/Install and run TiddlyWiki on a CentOS 6 VPS using Nginx.tid b/editions/tw5.com/tiddlers/community/articles/Install and run TiddlyWiki on a CentOS 6 VPS using Nginx.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/articles/Install and run TiddlyWiki on a CentOS 6 VPS using Nginx.tid rename to editions/tw5.com/tiddlers/community/articles/Install and run TiddlyWiki on a CentOS 6 VPS using Nginx.tid diff --git a/editions/tw5.com/tiddlers/links/articles/Moongift on TiddlyWiki.tid b/editions/tw5.com/tiddlers/community/articles/Moongift on TiddlyWiki.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/articles/Moongift on TiddlyWiki.tid rename to editions/tw5.com/tiddlers/community/articles/Moongift on TiddlyWiki.tid diff --git a/editions/tw5.com/tiddlers/links/articles/Shining Ark Using TiddlyWiki.tid b/editions/tw5.com/tiddlers/community/articles/Shining Ark Using TiddlyWiki.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/articles/Shining Ark Using TiddlyWiki.tid rename to editions/tw5.com/tiddlers/community/articles/Shining Ark Using TiddlyWiki.tid diff --git a/editions/tw5.com/tiddlers/links/articles/TiddlyWiki 5 im Betatest.tid b/editions/tw5.com/tiddlers/community/articles/TiddlyWiki 5 im Betatest.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/articles/TiddlyWiki 5 im Betatest.tid rename to editions/tw5.com/tiddlers/community/articles/TiddlyWiki 5 im Betatest.tid diff --git a/editions/tw5.com/tiddlers/community/articles/Un wiki sur votre BiblioBox avec TiddlyWiki.tid b/editions/tw5.com/tiddlers/community/articles/Un wiki sur votre BiblioBox avec TiddlyWiki.tid new file mode 100644 index 000000000..38db0cf90 --- /dev/null +++ b/editions/tw5.com/tiddlers/community/articles/Un wiki sur votre BiblioBox avec TiddlyWiki.tid @@ -0,0 +1,14 @@ +created: 20140716085406905 +modified: 20140716084548184 +tags: articles +title: "Un wiki sur votre BiblioBox avec TiddlyWiki" from A Penguin in Redmond +type: text/vnd.tiddlywiki +url: http://bibliobox.net/blog/post/2014/07/16/un-wiki-sur-votre-bibliobox-avec-tiddlywiki + +A guide (in French) to using TiddlyWiki on the [[BiblioBox|http://bibliobox.net/]], a variation of the [[PirateBox|http://daviddarts.com/piratebox/]] mobile communication and file sharing system. + +<<< +I've known TiddlyWiki since its beginning in 2004. For personal or professional needs, I used it regularly for notepad staff in 2007 and 2012. But I admit I ignored the tool during the past two years. And then I said yesterday: but why not put TiddlyWiki on a BiblioBox? Because it is a single HTML file with javascript. In addition I knew the existence of a server version for saving online amendments. +<<< + +//Hand optimised from a translation by Google Translate// diff --git a/editions/tw5.com/tiddlers/community/examples/PETTIL.tid b/editions/tw5.com/tiddlers/community/examples/PETTIL.tid new file mode 100644 index 000000000..e84c657c7 --- /dev/null +++ b/editions/tw5.com/tiddlers/community/examples/PETTIL.tid @@ -0,0 +1,17 @@ +created: 20140716085406905 +modified: 20140716084548184 +tags: examples +title: "PETTIL - Forth for the Commodore PET" by Charlie Hitselberger +type: text/vnd.tiddlywiki +url: http://chitselb.com/files/tiddlypettil.html + +A fast Forth interpreter for the [[Commodore PET|http://en.wikipedia.org/wiki/Commodore_PET]], written in 6502 assembly language. The TiddlyWiki containing program documentation is automatically generated from the source code: see https://github.com/chitselb/pettil. + +<<< +Objectives of the project are, in no particular order: + +* make a Forth that runs on my Commodore PET 2001 +* have fun +* improve my "6502 assembly golf" skills +* find other people who are interested in this project +<<< diff --git a/editions/tw5.com/tiddlers/links/examples/freedombits.tid b/editions/tw5.com/tiddlers/community/examples/freedombits.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/examples/freedombits.tid rename to editions/tw5.com/tiddlers/community/examples/freedombits.tid diff --git a/editions/tw5.com/tiddlers/links/examples/johnnotebase.tid b/editions/tw5.com/tiddlers/community/examples/johnnotebase.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/examples/johnnotebase.tid rename to editions/tw5.com/tiddlers/community/examples/johnnotebase.tid diff --git a/editions/tw5.com/tiddlers/links/examples/thesisnotebook.tid b/editions/tw5.com/tiddlers/community/examples/thesisnotebook.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/examples/thesisnotebook.tid rename to editions/tw5.com/tiddlers/community/examples/thesisnotebook.tid diff --git a/editions/tw5.com/tiddlers/links/resources/BJHacks.tid b/editions/tw5.com/tiddlers/community/resources/BJHacks.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/BJHacks.tid rename to editions/tw5.com/tiddlers/community/resources/BJHacks.tid diff --git a/editions/tw5.com/tiddlers/links/resources/BrainTest.tid b/editions/tw5.com/tiddlers/community/resources/BrainTest.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/BrainTest.tid rename to editions/tw5.com/tiddlers/community/resources/BrainTest.tid diff --git a/editions/tw5.com/tiddlers/links/resources/Hosting TiddlyWiki5 on GoogleDrive b/editions/tw5.com/tiddlers/community/resources/Hosting TiddlyWiki5 on GoogleDrive similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/Hosting TiddlyWiki5 on GoogleDrive rename to editions/tw5.com/tiddlers/community/resources/Hosting TiddlyWiki5 on GoogleDrive diff --git a/editions/tw5.com/tiddlers/links/resources/MathJax Plugin by Martin Kantor.tid b/editions/tw5.com/tiddlers/community/resources/MathJax Plugin by Martin Kantor.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/MathJax Plugin by Martin Kantor.tid rename to editions/tw5.com/tiddlers/community/resources/MathJax Plugin by Martin Kantor.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TW5 Magick.tid b/editions/tw5.com/tiddlers/community/resources/TW5 Magick.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TW5 Magick.tid rename to editions/tw5.com/tiddlers/community/resources/TW5 Magick.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TW5 Mall.tid b/editions/tw5.com/tiddlers/community/resources/TW5 Mall.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TW5 Mall.tid rename to editions/tw5.com/tiddlers/community/resources/TW5 Mall.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TW5 Tribal Knowledge.tid b/editions/tw5.com/tiddlers/community/resources/TW5 Tribal Knowledge.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TW5 Tribal Knowledge.tid rename to editions/tw5.com/tiddlers/community/resources/TW5 Tribal Knowledge.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TWeb.at from Mario Pietsch.tid b/editions/tw5.com/tiddlers/community/resources/TWeb.at from Mario Pietsch.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TWeb.at from Mario Pietsch.tid rename to editions/tw5.com/tiddlers/community/resources/TWeb.at from Mario Pietsch.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TiddlyWiki 5 vis.js plug-in.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki 5 vis.js plug-in.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TiddlyWiki 5 vis.js plug-in.tid rename to editions/tw5.com/tiddlers/community/resources/TiddlyWiki 5 vis.js plug-in.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TiddlyWiki Notes.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki Notes.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TiddlyWiki Notes.tid rename to editions/tw5.com/tiddlers/community/resources/TiddlyWiki Notes.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TiddlyWiki Posts.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki Posts.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TiddlyWiki Posts.tid rename to editions/tw5.com/tiddlers/community/resources/TiddlyWiki Posts.tid diff --git a/editions/tw5.com/tiddlers/community/resources/TiddlyWiki for Scholars.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki for Scholars.tid new file mode 100644 index 000000000..2203f5c33 --- /dev/null +++ b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki for Scholars.tid @@ -0,0 +1,12 @@ +created: 20140720085406905 +modified: 20140720084548184 +tags: resources +title: "TiddlyWiki for Scholars" by Alberto Molina +type: text/vnd.tiddlywiki +url: http://tw5.scholars.tiddlyspot.com/ + +An early release of an edition of TiddlyWiki customised for rigorous, academic notetaking. + +<<< +TiddlyWiki for Scholars is a personal customization of TiddlyWiki 5.0.13-beta I made for note-taking from readings, but it can be useful for other purposes. The idea behind this adaptation is to show and to allow creating relevant data related to the current tiddler without leaving the tiddler. +<<< diff --git a/editions/tw5.com/tiddlers/links/resources/TiddlyWiki-zh.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki-zh.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TiddlyWiki-zh.tid rename to editions/tw5.com/tiddlers/community/resources/TiddlyWiki-zh.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TiddlyWiki5 Coding.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki5 Coding.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TiddlyWiki5 Coding.tid rename to editions/tw5.com/tiddlers/community/resources/TiddlyWiki5 Coding.tid diff --git a/editions/tw5.com/tiddlers/links/resources/TiddlyWiki5 Playground.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki5 Playground.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/TiddlyWiki5 Playground.tid rename to editions/tw5.com/tiddlers/community/resources/TiddlyWiki5 Playground.tid diff --git a/editions/tw5.com/tiddlers/links/resources/Wills gTD.tid b/editions/tw5.com/tiddlers/community/resources/Wills gTD.tid similarity index 100% rename from editions/tw5.com/tiddlers/links/resources/Wills gTD.tid rename to editions/tw5.com/tiddlers/community/resources/Wills gTD.tid diff --git a/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid b/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid index 8af3fab1e..28f543cfa 100644 --- a/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid +++ b/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid @@ -5,3 +5,5 @@ title: CurrentTiddler type: text/vnd.tiddlywiki The CurrentTiddler is the current tiddler during WikiText processing. A context tiddler is set by the TiddlerWidget. It allows you to write references like `<$view field="title" format="link"/>` in TemplateTiddlers without explicitly specifying the tiddler that it applies to. + +The title of the current tiddler is contained in the widget variable ''currentTiddler''. diff --git a/editions/tw5.com/tiddlers/concepts/DataTiddlers.tid b/editions/tw5.com/tiddlers/concepts/DataTiddlers.tid index 95c26bae1..ab59b3696 100644 --- a/editions/tw5.com/tiddlers/concepts/DataTiddlers.tid +++ b/editions/tw5.com/tiddlers/concepts/DataTiddlers.tid @@ -25,7 +25,7 @@ The tiddler dictionary format is an alternative syntax for data tiddlers: * The ContentType field `type` is set to `application/x-tiddler-dictionary` * The `text` field consists of one or more lines of the form `<name>:<value>` -For example, the [[metrics of the Vanilla theme|$:/themes/tiddlywiki/vanilla/metrics]] are a tiddler dictionary. +For example, palettes such as the [[default Vanilla palette|$:/palettes/Vanilla]] are tiddler dictionaries. ! Accessing data within data tiddlers diff --git a/editions/tw5.com/tiddlers/concepts/ExternalImages.tid b/editions/tw5.com/tiddlers/concepts/ExternalImages.tid index 0e394dc91..3c4e8ab5e 100644 --- a/editions/tw5.com/tiddlers/concepts/ExternalImages.tid +++ b/editions/tw5.com/tiddlers/concepts/ExternalImages.tid @@ -16,6 +16,8 @@ An external image is an ordinary image tiddler that has a ''_canonical_uri'' fie To manually create an external image just create the tiddler with the appropriate image content type, and add a ''_canonical_uri'' field with a URI pointing to the actual image location. +''IMPORTANT:'' Double-check your spelling. ``_canonical_uri`` is spelled [[URI|https://en.wikipedia.org/wiki/URI#The_relationship_between_URIs.2C_URLs.2C_and_URNs]], not URL. + ! Creating external images under Node.js The following steps are used to create a static HTML file version of a wiki accompanied by an ''images'' folder containing the referenced external images: diff --git a/editions/tw5.com/tiddlers/concepts/SystemTags.tid b/editions/tw5.com/tiddlers/concepts/SystemTags.tid index 1ca539491..28df98240 100644 --- a/editions/tw5.com/tiddlers/concepts/SystemTags.tid +++ b/editions/tw5.com/tiddlers/concepts/SystemTags.tid @@ -1,26 +1,32 @@ created: 20130822080600000 -modified: 20131228161338857 +modified: 20140707161338857 tags: concepts title: SystemTags type: text/vnd.tiddlywiki System tags are used to give special behaviour to tiddlers: -* [[$:/tags/stylesheet]] to indicate that a tiddler should be applied as a CSS stylesheet -* [[$:/tags/TiddlerInfo]] for tiddler info panel tabs -* [[$:/tags/ControlPanel]] for control panel tabs -* [[$:/tags/SideBar]] for sidebar tabs -* [[$:/tags/MoreSideBar]] for tabs in the "more" sidebar -* [[$:/tags/ViewTemplate]] for the view template -* [[$:/tags/ViewToolbar]] for the view mode tiddler toolbar -* [[$:/tags/EditTemplate]] for the edit template -* [[$:/tags/EditToolbar]] for the edit mode tiddler toolbar -* [[$:/tags/PageControls]] for the page control tools in the sidebar -* [[$:/tags/PageTemplate]] for the main page elements -* [[$:/tags/RawMarkup]] for raw markup to be included in the generated HTML file +* {{$:/tags/AboveStory||$:/core/ui/TagTemplate}} for elements to be placed at the top of the story river +* {{$:/tags/BelowStory||$:/core/ui/TagTemplate}} for elements to be placed at the bottom of the story river +* {{$:/tags/ControlPanel||$:/core/ui/TagTemplate}} for control panel tabs +* {{$:/tags/EditTemplate||$:/core/ui/TagTemplate}} for the edit template +* {{$:/tags/EditToolbar||$:/core/ui/TagTemplate}} for the edit mode tiddler toolbar +* {{$:/tags/MoreSideBar||$:/core/ui/TagTemplate}} for tabs in the "more" sidebar +* {{$:/tags/PageControls||$:/core/ui/TagTemplate}} for the page control tools in the sidebar +* {{$:/tags/PageTemplate||$:/core/ui/TagTemplate}} for the main page elements +* {{$:/tags/RawMarkup||$:/core/ui/TagTemplate}} for raw markup to be included in the generated HTML file +* {{$:/tags/SideBar||$:/core/ui/TagTemplate}} for sidebar tabs +* {{$:/tags/stylesheet||$:/core/ui/TagTemplate}} to indicate that a tiddler should be applied as a CSS stylesheet +* {{$:/tags/TiddlerInfo||$:/core/ui/TagTemplate}} for tiddler info panel tabs +* {{$:/tags/ViewTemplate||$:/core/ui/TagTemplate}} for the view template +* {{$:/tags/ViewToolbar||$:/core/ui/TagTemplate}} for the view mode tiddler toolbar ! System tags in use These are the system tags in use in this wiki: -{{{ [all[shadows+tiddlers]tags[]prefix[$:/]] +[sort[title]] }}} +<ul> +<$list filter="[all[shadows+tiddlers]tags[]prefix[$:/]sort[title]]"> +<li>{{||$:/core/ui/TagTemplate}}</li> +</$list> +</ul> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/concepts/Tiddlers.tid b/editions/tw5.com/tiddlers/concepts/Tiddlers.tid index 4e475452c..53e768d0f 100644 --- a/editions/tw5.com/tiddlers/concepts/Tiddlers.tid +++ b/editions/tw5.com/tiddlers/concepts/Tiddlers.tid @@ -1,11 +1,9 @@ created: 20130825213500000 -modified: 20140214213936575 +modified: 20140621092710560 tags: concepts title: Tiddlers type: text/vnd.tiddlywiki -Tiddlers are the smallest unit of information in TiddlyWiki. Other systems have analogous concepts with more prosaic names: like "items", "entries", "entities" or "records". Even though "tiddler" is a vaguely preposterous name it at least has the virtue of being confusingly distinctive rather than confusingly generic. - -Tiddlers can be structured with [[links|TiddlerLinks]] and tags. +Tiddlers are the smallest unit of information in TiddlyWiki. Other systems have analogous concepts with more prosaic names: like "items", "entries", "entities" or "records". Even though "tiddler" is a bit of a preposterous name it has the virtue of being confusingly distinctive rather than confusingly generic. Internally, tiddlers are an immutable dictionary of name:value pairs called fields. The only field that is required is the `title` field, but useful tiddlers also have a `text` field, and some or all of the standard fields listed in TiddlerFields. diff --git a/editions/tw5.com/tiddlers/concepts/TiddlyWikiFolders.tid b/editions/tw5.com/tiddlers/concepts/TiddlyWikiFolders.tid index 6b127b307..3ef478926 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlyWikiFolders.tid +++ b/editions/tw5.com/tiddlers/concepts/TiddlyWikiFolders.tid @@ -1,5 +1,5 @@ created: 20130825214200000 -modified: 20140427210453175 +modified: 20140720210453175 tags: dev title: TiddlyWikiFolders type: text/vnd.tiddlywiki @@ -29,6 +29,8 @@ The `tiddlywiki.info` file in a wiki folder contains a JSON object comprising th Configuration options include: +* ''default-tiddler-location'' - a string path to the default location for the filesystem adaptor to save new tiddlers (resolved relative to the wiki folder) + * ''retain-original-tiddler-path'' - If true, the server will generate a tiddler [[$:/config/OriginalTiddlerPaths]] containing the original file paths of each tiddler in the wiki For example: diff --git a/editions/tw5.com/tiddlers/dev/Environment Variables on Node.js.tid b/editions/tw5.com/tiddlers/dev/Environment Variables on Node.js.tid new file mode 100644 index 000000000..0c3b2347d --- /dev/null +++ b/editions/tw5.com/tiddlers/dev/Environment Variables on Node.js.tid @@ -0,0 +1,21 @@ +created: 20140617211749290 +modified: 20140617212340133 +title: Environment Variables on Node.js +type: text/vnd.tiddlywiki + +[[TiddlyWiki on Node.js]] supports the following OS environment variables for specifying a colon-delimited list of paths to search for plugins and editions: + +* `TIDDLYWIKI_PLUGIN_PATH` - Search path for ordinary plugins +* `TIDDLYWIKI_THEME_PATH` - Search path for themes +* `TIDDLYWIKI_LANGUAGE_PATH` - Search path for languages +* `TIDDLYWIKI_EDITION_PATH` - Search path for editions (used by the InitCommand) + +The additional paths should each point to folders structured like the equivalent directories in the TiddlyWiki5 GitHub repository: the plugin, theme and language directories contain `publisher/pluginname/<files>` while the edition directories contain `editionname/<files>` + +For example: + +``` +TIDDLYWIKI_PLUGIN_PATH=~/MyPluginStore +tiddlywiki mywiki --build index +``` + diff --git a/editions/tw5.com/tiddlers/dev/Procedure for releasing a new version of TiddlyWiki5.tid b/editions/tw5.com/tiddlers/dev/Procedure for releasing a new version of TiddlyWiki5.tid index f4614e6dd..560c0b4ee 100644 --- a/editions/tw5.com/tiddlers/dev/Procedure for releasing a new version of TiddlyWiki5.tid +++ b/editions/tw5.com/tiddlers/dev/Procedure for releasing a new version of TiddlyWiki5.tid @@ -1,11 +1,13 @@ created: 20131130132123707 -modified: 20140126212123707 +modified: 20140619212123707 tags: dev title: Releasing a new version of TiddlyWiki5 type: text/vnd.tiddlywiki # Adjust the release date of the latest release tiddler (eg, [[Release 5.0.7-beta]]) -# Make sure the ''Jermolene/TiddlyWiki5'' is fully committed +# Ensure ReleaseHistory has the new version as the default tab +# Adjust the modified time of HelloThere +# Make sure ''Jermolene/TiddlyWiki5'' is fully committed # Edit `package.json` to the new version number # Run `bld.sh` to build the deployment files # Restore `package.json` to the previous version number diff --git a/editions/tw5.com/tiddlers/dev/TiddlerFilter Formal Grammar.tid b/editions/tw5.com/tiddlers/dev/TiddlerFilter Formal Grammar.tid index b2ae39ff7..8f29fc39d 100644 --- a/editions/tw5.com/tiddlers/dev/TiddlerFilter Formal Grammar.tid +++ b/editions/tw5.com/tiddlers/dev/TiddlerFilter Formal Grammar.tid @@ -1,5 +1,5 @@ created: 20140210141217955 -modified: 20140303091312363 +modified: 20140725091312363 tags: dev title: TiddlerFilter Formal Grammar type: text/vnd.tiddlywiki @@ -34,7 +34,7 @@ Whitespace is matched with javascript "\s+", which matches space, tab, carriage ''<opt-operator-suffix>'' ::= ''<string>'' | "" -''<operand>'' ::= "[" ''<search-string>'' "]" | "{" ''<indirect-search-string>'' "}" | ''<regex>'' +''<operand>'' ::= "[" ''<search-string>'' "]" | "{" ''<indirect-search-string>'' "}" | "<" ''<variable-name-string>'' ">" | ''<regex>'' ''<regex>'' ::= "/" ''<string>'' "/" ''<opt-regex-args>'' diff --git a/editions/tw5.com/tiddlers/dev/TiddlyWiki Architecture.tid b/editions/tw5.com/tiddlers/dev/TiddlyWiki Architecture.tid index 5ef5063f0..e5b9a8f67 100644 --- a/editions/tw5.com/tiddlers/dev/TiddlyWiki Architecture.tid +++ b/editions/tw5.com/tiddlers/dev/TiddlyWiki Architecture.tid @@ -18,3 +18,51 @@ DOM events trigger actions on widgets which update the tiddler store. The update {{Server Architecture.svg}} +When programming TiddlyWiki 5 plugins which make changes outside the scope of the included examples, you will need a more in-depth understanding of TiddlyWiki's internal architecture. + +! Model + +TiddlyWiki's data model is a fairly simple key-value store. + +* Each tiddler is simply an object with a `fields` member containing members such as `title`, `text`, `tags` and so on. +* The core `Wiki` class defined in `boot/boot.js` implements simple associative array behaviours like insertion, deletion, iteration, listing keys, and get-by-key. +* The code in `core/modules/wiki.js` then extends the `Wiki` class with functionality such as event dispatch and various cache-backed methods such as `getTiddlersWithTag`. + +The active tiddler store can be accessed via `$tw.wiki` as in this example: + +```js +$tw.wiki.makeTiddlerIterator($tw.wiki.getTiddlersWithTag('timeline') + )(function(tiddler, title) { + // Skip templates + if (tiddler.fields.tags.indexOf('templates') >= 0) { return; } + + do_something(tiddler); +}); +``` + +Data which should not be visible to end users under normal operation (eg. internal components, plugins, persisted state for GUI widgets) is stored in [[system tiddlers|SystemTiddlers]] organized via a set of [[namespaces|Naming of System Tiddlers]]. + +The similarity between filesystem paths and system tiddler names is intentional and will be used to provide a hierarchical browsing interface in a future TiddlyWiki release. + +! View + +TiddlyWiki's view layer has a //lot// in common with desktop widget toolkits and this is the part which is most likely to trip up newcomers. There are two facets to it: + +!! Role of the DOM +Because TiddlyWiki may re-render content, plugins should treat the DOM as write-only. + +In other words, any state you store in the DOM could vanish at any instant and you need to use TiddlyWiki's internal [[StateMechanism]] instead. + +In a desktop application, the base widget class defines a method such as `paint(canvas)` which is called in response to `expose` events or "data has changed" messages. + +In TiddlyWiki, the `Widget` class in `core/modules/widgets/widgets.js` defines a `render(parent, nextSibling)` method which TiddlyWiki calls in response to various events such as changes in the model. + +(The potential inefficiency of this approach is mitigated via a `refresh(changedTiddlers)` method which TiddlyWiki calls to ask your widget whether its current rendering is stale.) + +!! Locus of Control + +While TiddlyWiki's extended [[WikiText]] is similar in design to HTML templating languages with logic constructs, you can't just ignore it and assemble all of your content in raw Javascript because it is used to define most of TiddlyWiki's UI. + +In this respect, it's closer to a glue language like Qt Quick or Python with Javascript filling the "create new components" role of C/C++ in widget toolkits like Qt and GTK+. + +To familiarize yourself with this, read [[Widgets in WikiText]] and [[Introduction to Filters]]. then examine the internals for a tiddler like [[TaskManagementExample]]. diff --git a/editions/tw5.com/tiddlers/dev/TiddlyWiki Coding Style Guidelines.tid b/editions/tw5.com/tiddlers/dev/TiddlyWiki Coding Style Guidelines.tid index 64b04f04f..f50c7c2b8 100644 --- a/editions/tw5.com/tiddlers/dev/TiddlyWiki Coding Style Guidelines.tid +++ b/editions/tw5.com/tiddlers/dev/TiddlyWiki Coding Style Guidelines.tid @@ -3,7 +3,7 @@ tags: dev ! Motivation -TiddlyWiki is a large project with many interested parties. It benefits everyone if the code is as easy to read as possible. A key part of that it must be written and laid out consistently. +TiddlyWiki is a large project with many interested parties. It benefits everyone if the code is as easy to read as possible. A key part of that it must be written and laid out consistently -- the code should read as though it were written by a single author. ! Guidelines diff --git a/editions/tw5.com/tiddlers/dev/Using TiddlyWiki on Node.js.tid b/editions/tw5.com/tiddlers/dev/Using TiddlyWiki on Node.js.tid index f117feefe..8810b1cd3 100644 --- a/editions/tw5.com/tiddlers/dev/Using TiddlyWiki on Node.js.tid +++ b/editions/tw5.com/tiddlers/dev/Using TiddlyWiki on Node.js.tid @@ -1,5 +1,5 @@ created: 20131219100520659 -modified: 20131219163807594 +modified: 20140617212408196 tags: howto title: Using TiddlyWiki on Node.js type: text/vnd.tiddlywiki @@ -25,3 +25,7 @@ tiddlywiki [<wikipath>] [--<command> [<arg>[,<arg>]]] The available commands are: <ul><$list filter="[tag[command]]"><li><$link to={{!!title}}><$view field="title"/></$link></li></$list></ul> + +See also: + +* [[Environment Variables on Node.js]] diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator field.tid b/editions/tw5.com/tiddlers/filters/FilterOperator field.tid index 46bd5dac7..feb54b162 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator field.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator field.tid @@ -10,6 +10,6 @@ The operand is the value to match, and the suffix is used to identify the field. |!Filter String |!Description | |`[field:modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston` | -|`[modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston | +|`[modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston` | Note that if an unknown filter operator `[unknown[xxx]]` is encountered it is interpreted as `[field:unknown[xxx]]`. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid b/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid index 7e51d6601..972b382cc 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid @@ -4,7 +4,7 @@ tags: filters title: FilterOperator: nsort type: text/vnd.tiddlywiki -The ''nsort'' filter operator sorts the current list as numeric values. String values are sorted case insensitively (upper and lower case letters are considered equivalent). Preceding the operator with `!` reverses the sort order. +The ''nsort'' filter operator sorts the current list as numeric values, along the field specified in the operand (which defaults to `title`). String values are sorted case insensitively (upper and lower case letters are considered equivalent). Preceding the operator with `!` reverses the sort order. For example: diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid b/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid index 5d963bdc2..e31723d78 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid @@ -4,7 +4,7 @@ tags: filters title: FilterOperator: nsortcs type: text/vnd.tiddlywiki -The ''nsortcs'' filter operator sorts the current list as numeric values. String values are sorted case sensitively (upper and lower case letters are considered different). Preceding the operator with `!` reverses the sort order. +The ''nsortcs'' filter operator sorts the current list as numeric values, along the field specified in the operand (which defaults to `title`). String values are sorted case sensitively (upper and lower case letters are considered different). Preceding the operator with `!` reverses the sort order. For example: diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid b/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid index 5d849e4ad..f705e613c 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid @@ -4,7 +4,7 @@ tags: filters commonfilters title: FilterOperator: sort type: text/vnd.tiddlywiki -The ''sort'' filter operator sorts the current list case insensitively (upper and lower case letters are considered equivalent). Preceding the operator with `!` reverses the sort order. +The ''sort'' filter operator sorts the current list case insensitively (upper and lower case letters are considered equivalent), along the field specified in the operand (which defaults to `title`). Preceding the operator with `!` reverses the sort order. For example: @@ -12,4 +12,6 @@ For example: |`one two three four +[sort[]]` |Returns `four`, `one`, `three`, `two` | |`one two Three four +[sort[]]` |Returns `four`, `one`, `Three`, `two` | +For an example of use with explicit operands, see [[FilterOperator: limit]]. + See also [[FilterOperator: nsort]], [[FilterOperator: sortcs]] and [[FilterOperator: nsortcs]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid b/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid index 9b9e435ba..6b37d60fc 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid @@ -4,7 +4,7 @@ tags: filters title: FilterOperator: sortcs type: text/vnd.tiddlywiki -The ''sortcs'' filter operator sorts the current list case sensitively (upper and lower case letters are considered different). Preceding the operator with `!` reverses the sort order. +The ''sortcs'' filter operator sorts the current list case sensitively (upper and lower case letters are considered different), along the field specified in the operand (which defaults to `title`). Preceding the operator with `!` reverses the sort order. For example: diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid b/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid index 546b50313..32c9788e4 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid @@ -13,6 +13,6 @@ For example: |`[all[shadows]tag[mytag]]` |Returns all ShadowTiddlers tagged `mytag` | |`[all[shadows+tiddlers]tag[mytag]]` |Returns all ShadowTiddlers and non-ShadowTiddlers tagged `mytag` | |`[!tag[mytag]]` |Returns all tiddlers not tagged `mytag` | -|`[tag[mytag]!tag[exclude]]` |Returns all tiddlers tagged `mytag` that are not tagged `mytag` | +|`[tag[mytag]!tag[exclude]]` |Returns all tiddlers tagged `mytag` that are not tagged `exclude` | See also [[FilterOperator: tagging]], [[FilterOperator: tags]] and [[FilterOperator: untagged]]. diff --git a/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid b/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid index 87fa10bd9..7f69f571f 100644 --- a/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid +++ b/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid @@ -1,5 +1,5 @@ created: 20140410101941871 -modified: 20140410103229640 +modified: 20140725103229640 tags: introduction title: Introduction to Filters type: text/vnd.tiddlywiki @@ -67,6 +67,16 @@ If a filter operator is written with curly brackets around the operand then it i [search{$:/temp/search}] ``` +! Variable Operands + +If a filter operator is written with angle brackets around the operand then it is taken to be the name of a variable containing the actual value. For example, this filter selects all tiddlers containing the title of the current tiddler: + +``` +[search<currentTiddler>] +``` + +(Note that the `currentTiddler` variable is used to track the current tiddler). + ! Regular Expression Operands The "field" filter also accepts [[regular expressions|http://en.wikipedia.org/wiki/Regular_expression]] with the syntax `/regexp/(modifier)`. For example: diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Android.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Android.tid new file mode 100644 index 000000000..320ae3556 --- /dev/null +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Android.tid @@ -0,0 +1,7 @@ +caption: Android +created: 20140811171036268 +modified: 20140811171041595 +title: GettingStarted - Android +type: text/vnd.tiddlywiki + +{{Saving on Android}} diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Chrome.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Chrome.tid new file mode 100644 index 000000000..32f4ee66f --- /dev/null +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Chrome.tid @@ -0,0 +1,9 @@ +caption: Chrome +created: 20140811165935523 +modified: 20140811170107969 +title: GettingStarted - Chrome +type: text/vnd.tiddlywiki + +TiddlyWiki on Google Chrome can only save changes using the HTML5-compatible fallback saver module. + +{{Saving with the HTML5 fallback saver}} diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid new file mode 100644 index 000000000..c6c975472 --- /dev/null +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid @@ -0,0 +1,9 @@ +caption: Firefox +created: 20140811170425199 +modified: 20140811170527083 +title: GettingStarted - Firefox +type: text/vnd.tiddlywiki + +Firefox provides the best user experience for using TiddlyWiki with the TiddlyFox browser extension. + +{{Saving with TiddlyFox}} diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Internet Explorer.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Internet Explorer.tid new file mode 100644 index 000000000..da9ee9e55 --- /dev/null +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Internet Explorer.tid @@ -0,0 +1,9 @@ +caption: Internet Explorer +created: 20140811172058274 +modified: 20140811172247864 +title: GettingStarted - Internet Explorer +type: text/vnd.tiddlywiki + +{{Saving with TiddlyIE}} + +The [[Windows HTA Hack]] describes an alternative method of using TiddlyWiki with Internet Explorer. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Node.js.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Node.js.tid new file mode 100644 index 000000000..a4af8c340 --- /dev/null +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Node.js.tid @@ -0,0 +1,7 @@ +caption: Node.js +created: 20140811172010003 +modified: 20140811172012677 +title: GettingStarted - Node.js +type: text/vnd.tiddlywiki + +{{Installing TiddlyWiki on Node.js}} diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Safari.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Safari.tid new file mode 100644 index 000000000..3e56b985f --- /dev/null +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Safari.tid @@ -0,0 +1,10 @@ +caption: Safari +created: 20140811171121022 +modified: 20140811171247643 +title: GettingStarted - Safari +type: text/vnd.tiddlywiki + +TiddlyWiki on Safari can only save changes using the HTML5-compatible fallback saver module. + +{{Saving on Safari}} + diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - iOS.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - iOS.tid new file mode 100644 index 000000000..67f107621 --- /dev/null +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - iOS.tid @@ -0,0 +1,7 @@ +caption: iPad/iPhone +created: 20140811170918707 +modified: 20140811170921731 +title: GettingStarted - iOS +type: text/vnd.tiddlywiki + +{{Saving on iPad/iPhone}} diff --git a/editions/tw5.com/tiddlers/howtos/How to create a translation for TiddlyWiki.tid b/editions/tw5.com/tiddlers/howtos/How to create a translation for TiddlyWiki.tid index ffe6fc6b7..71623bb63 100644 --- a/editions/tw5.com/tiddlers/howtos/How to create a translation for TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/howtos/How to create a translation for TiddlyWiki.tid @@ -4,14 +4,12 @@ tags: howto title: How to create a translation for TiddlyWiki type: text/vnd.tiddlywiki -Making a translation - -Prerequisites: +! Prerequisites * [[TiddlyWiki on Node.js]] * A GitHub account to submit the translation to tiddlywiki.com -Quick and dirty instructions: +! Setting Up # Fork the TiddlyWiki GitHub repository (https://github.com/Jermolene/TiddlyWiki5) #* If your GitHub username is JoeBloggs, your fork will be https://github.com/JoeBloggs/TiddlyWiki5 @@ -42,3 +40,9 @@ Content of `plugin.info` for Joe Bloggs' Welsh translation: ``` MultiTiddlerFiles make it possible to pack the text of several tiddlers in a single text file, simplifying some editing tasks. + +! Handling Updates + +Sometimes the master en-GB language tiddlers are updated with revised content or new items. The best way to keep track of language-related commits to ~TiddlyWiki5:master is to monitor this RSS/Atom feed: + +https://github.com/Jermolene/TiddlyWiki5/commits/master/core/language.atom diff --git a/editions/tw5.com/tiddlers/howtos/How to use TiddlyWiki5 as a standalone HTML file with AndTidWiki.tid b/editions/tw5.com/tiddlers/howtos/How to use TiddlyWiki5 as a standalone HTML file with AndTidWiki.tid deleted file mode 100644 index 7dfc7952b..000000000 --- a/editions/tw5.com/tiddlers/howtos/How to use TiddlyWiki5 as a standalone HTML file with AndTidWiki.tid +++ /dev/null @@ -1,8 +0,0 @@ -created: 201308251614 -modified: 201308251614 -tags: howto -title: How to use TiddlyWiki5 as a standalone HTML file with AndTidWiki - -The AndTidWiki app for Android devices makes it possible to edit and save changes to TiddlyWiki5, including working offline without a network connection. - -//Note that AndTidWiki is published independently of TiddlyWiki// \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/howtos/Improving TiddlyWiki Documentation.tid b/editions/tw5.com/tiddlers/howtos/Improving TiddlyWiki Documentation.tid new file mode 100644 index 000000000..3dd1a9bdf --- /dev/null +++ b/editions/tw5.com/tiddlers/howtos/Improving TiddlyWiki Documentation.tid @@ -0,0 +1,19 @@ +title: Improving TiddlyWiki Documentation +tags: howto +created: 20140820151051019 +modified: 20140820151051019 + +Anyone can submit improvements to the TiddlyWiki documentation that appears on http://tiddlywiki.com. + +# Create an account on https://github.com if you don't already have one +# On http://tiddlywiki.com, click "edit" on the tiddler you want to improve +# You should see a pink banner with the text: //Can you help us improve this documentation? Find out how to edit this tiddler on ~GitHub// +# Click on the external link ...''this tiddler on ~GitHub'' +# A new browser tab should open ready to edit the tiddler on github.com +# Below the edit box for the tiddler text you should see a box labelled ''Propose file change'' +# Enter a brief title to explain the change (eg, "Clarify attribute syntax instability") +# If necessary, enter a longer description too +# Click the green button labelled ''Propose file change'' +# On the following screen, click the green button labelled ''Create pull request'' + +[[Jermolene|https://github.com/Jermolene]] or one of the other core developers will then have the opportunity to merge your pull request so that it is incorporated into the next build of http://tiddlywiki.com. diff --git a/editions/tw5.com/tiddlers/images/Startup Modules.svg b/editions/tw5.com/tiddlers/images/Startup Modules.svg index 5343ece9c..2d809d46a 100644 --- a/editions/tw5.com/tiddlers/images/Startup Modules.svg +++ b/editions/tw5.com/tiddlers/images/Startup Modules.svg @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="34 26 601 430" width="601pt" height="430pt" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata> Produced by OmniGraffle 6.0.5 <dc:date>2014-05-05 16:00Z</dc:date></metadata><defs><font-face font-family="Menlo" font-size="11" panose-1="2 11 6 9 3 8 4 2 2 4" units-per-em="1000" underline-position="-63.476562" underline-thickness="43.945312" slope="0" x-height="546.875" cap-height="729.0039" ascent="928.22266" descent="-235.83984" font-weight="500"><font-face-src><font-face-name name="Menlo-Regular"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -4 10 8" markerWidth="10" markerHeight="8" color="#bdbdbd"><g><path d="M 8 0 L 0 -3 L 0 3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Menlo" font-size="8" panose-1="2 11 6 9 3 8 4 2 2 4" units-per-em="1000" underline-position="-63.476562" underline-thickness="43.945312" slope="0" x-height="546.875" cap-height="729.0039" ascent="928.22266" descent="-235.83984" font-weight="500"><font-face-src><font-face-name name="Menlo-Regular"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Startup TasksLayer 2browserbrowser+serverserverLayer 1load-modulesstartupfaviconstoryrenderfull-screengoogle-analyticsafterafterbeforeafteraftercommandsaftersyncer-browserafterrootwidgetafterafterpasswordafter + Produced by OmniGraffle 6.0.5 2014-08-14 08:00ZStartup TasksLayer 2browserbrowser+serverserverLayer 1load-modulesstartupfaviconstoryrenderinfogoogle-analyticsafterafterbeforeafteraftercommandsafterrootwidgetafterafterpasswordafterbefore diff --git a/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Expandable Example.tid b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Expandable Example.tid new file mode 100644 index 000000000..41f1e473c --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Expandable Example.tid @@ -0,0 +1,11 @@ +title: TableOfContentsMacro Expandable Example +caption: Expandable +tags: table-of-contents-example + +!! Expandable Table of Contents + +<$macrocall $name="wikitext-example-without-html" +src="
+<> +
+"/> diff --git a/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Selective Expandable Example.tid b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Selective Expandable Example.tid new file mode 100644 index 000000000..a42be8291 --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Selective Expandable Example.tid @@ -0,0 +1,11 @@ +title: TableOfContentsMacro Selective Expandable Example +caption: Selective Expandable +tags: table-of-contents-example + +!! Selective Expandable Table of Contents + +<$macrocall $name="wikitext-example-without-html" +src="
+<> +
+"/> diff --git a/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Simple Example.tid b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Simple Example.tid new file mode 100644 index 000000000..385aa4c33 --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Simple Example.tid @@ -0,0 +1,11 @@ +title: TableOfContentsMacro Simple Example +caption: Simple +tags: table-of-contents-example + +!! Simple Table of Contents + +<$macrocall $name="wikitext-example-without-html" +src="
+<> +
+"/> diff --git a/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Sorted Expandable Example.tid b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Sorted Expandable Example.tid new file mode 100644 index 000000000..ec3a50dfa --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro Sorted Expandable Example.tid @@ -0,0 +1,11 @@ +title: TableOfContentsMacro Sorted Expandable Example +caption: Sorted Expandable +tags: table-of-contents-example + +!! Sorted Expandable Table of Contents + +<$macrocall $name="wikitext-example-without-html" +src="
+<> +
+"/> diff --git a/editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid new file mode 100644 index 000000000..73e56ff38 --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid @@ -0,0 +1,29 @@ +title: TableOfContentsMacro +tags: macros +modified: 20140818180307785 + +The table of contents macro produces a hierarchical tree of tiddlers based on their tags. + +The top level entries of the table of contents are defined by a root tag. The subentries under each of those entries are tagged with the title of the entry. Entries can be ordered using the `list` field as described in TiddlerTags. + +There are several variants of the macro: + +* `<>` produces a simple hierarchical tree of links +* `<>` produces an expandable tree of links +* `<>` produces an expandable tree of links where the expand/contract buttons are only shown for entries that possess child nodes + +! Parameters + +|!Position |!Name |!Description |!Default | +|1st |tag |The root tag that identifies the top level of the hierarchy | | +|2nd |sort |Optional sorting subfilter (eg `sort[title]`) | | + +The ''tag'' and ''sort'' parameters are combined to make a filter expression of the form: + +``` +[tag[$tag$]$sort$] +``` + +! Examples + +<> diff --git a/editions/tw5.com/tiddlers/macros/TabsMacro.tid b/editions/tw5.com/tiddlers/macros/TabsMacro.tid index cbccf492e..9279adadf 100644 --- a/editions/tw5.com/tiddlers/macros/TabsMacro.tid +++ b/editions/tw5.com/tiddlers/macros/TabsMacro.tid @@ -1,5 +1,5 @@ created: 20131228162203521 -modified: 20140509223527667 +modified: 20140702113527667 tags: macros title: TabsMacro type: text/vnd.tiddlywiki @@ -15,15 +15,20 @@ By default the tab control arranges the tabs horizontally with the content under |2nd |default |Name of the tiddler containing the default tab | | |3rd |state |String to distinguish multiple tabs within the same tiddler (use of the system tiddler prefix is recommended) |''$:/state/tab'' | |4th |class |Additional CSS classes for the three wrappers DIV of the tab | | +|5th |template |Optional template through which to render the tab content | | + +Within the template the title of the current tab is available in the widget variable ''currentTab''. ! Examples -Here is an example of the tabs macro: +Here are some examples of the tabs macro: ``` -<> +<> + +<> ``` -<> +<> -<> +<> diff --git a/editions/tw5.com/tiddlers/mechanisms/InfoMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/InfoMechanism.tid new file mode 100644 index 000000000..f44860f35 --- /dev/null +++ b/editions/tw5.com/tiddlers/mechanisms/InfoMechanism.tid @@ -0,0 +1,14 @@ +created: 20140720164948099 +modified: 20140720165248031 +tags: mechanism +title: InfoMechanism +type: text/vnd.tiddlywiki + +System tiddlers in the namespace `$:/info/` are used to expose information about the system (including the current browser) so that WikiText applications can adapt themselves to available features. + +! Information Tiddlers + +|!Title |!Description | +|[[$:/info/browser]] |Running in the browser? ("yes" or "no") | +|[[$:/info/node]] |Running under [[Node.js]]? ("yes" or "no") | + diff --git a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid index 5ea0a4922..d271885e8 100644 --- a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid +++ b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid @@ -1,5 +1,5 @@ created: 20130826122000000 -modified: 20131214094840608 +modified: 20140815094840608 tags: mechanism title: PluginMechanism type: text/vnd.tiddlywiki @@ -32,6 +32,7 @@ Plugins are stored as tiddlers with the following fields: |type |Must be ''application/json'' | |plugin-type |Can be ''plugin'' (default) or ''theme'' | |text |JSON encoding of the list of tiddlers comprising the plugin | +|list |Names of exposed plugin information tiddlers (see below) | |dependents |List of dependent plugins (currently only implemented for themes) | ! Plugin folders @@ -50,7 +51,8 @@ The JSON structure for plugin tiddlers is as follows: "version": "1.2.3-alpha3", "core-version": ">=5.0.0", "source": "http://tiddlywiki.com/MyPlugin", - "plugin-type": "plugin" + "plugin-type": "plugin", + "list": "readme license history" } ``` @@ -84,3 +86,33 @@ Plugins can also be included manually by copying them into the `plugins` subfold The wiki object keeps track of all of the currently loaded plugins. If a request for a tiddler isn't in the store then the wiki looks through the cascade of plugins to find the requested tiddler. It is a similar idea to the way that shadow tiddlers are implemented in classic TiddlyWiki. In the browser, any constituent tiddlers that are JavaScript modules (ie shadow tiddlers of content type `application/javascript` and possessing the field `module-type`) are executed during startup processing. + +!! Disabling Plugins + +Plugins can be disabled by creating a tiddler titled `$:/config/Plugins/Disabled/` concatenated with the plugin title, and setting its text to `yes`. + +For example, to disable the plugin `$:/plugins/tiddlywiki/highlight`, the title would be: + +``` +$:/config/Plugins/Disabled/$:/plugins/tiddlywiki/highlight +``` + +! Information Tiddlers for Plugins + +Plugin authors are encouraged to provide special information and documentation tiddlers that TiddlyWiki can include as plugin information tabs in the [[control panel|$:/ControlPanel]]. + +Plugins should provide an icon contained in a tiddler with the title formed of `/icon` (for example, [[$:/core/icon]]). + +Plugins expose the names of the individual information tabs that they wish to display in the `list` field of the plugin tiddler. By convention, some or all of the following should be provided: + +* ''readme'': basic information about the plugin +* ''license'': the license under which the plugin is published + +The process used to generate the title of the information tiddler is as follows: + +# `//` (for example, ''$:/core/en-GB/readme'') +# `/` (for example, ''$:/core/readme'') + +Thus, plugins can provide language-specific versions of each information tiddler. + +Note that information tiddlers should not reference other tiddlers within the plugin. This is because plugins containing themes or languages are dynamically switched in and out as they are selected, and so their information tiddlers may not be available for viewing. The control panel uses the 'subtiddler' attribute of the TranscludeWidget to access these tiddlers, which works independently of the plugin switching mechanism. diff --git a/editions/tw5.com/tiddlers/mechanisms/UpgradeMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/UpgradeMechanism.tid new file mode 100644 index 000000000..3660e7e5b --- /dev/null +++ b/editions/tw5.com/tiddlers/mechanisms/UpgradeMechanism.tid @@ -0,0 +1,38 @@ +title: UpgradeMechanism +modified: 20140711090154150 +created: 20140711090154150 +tags: mechanism + +# Open upgrade.html +# Includes a data tiddler called `$:/UpgradeLibrary` that contains the latest compatible versions of all plugins in the library +# Drag in old wiki file +# Place tiddlers into a data tiddler `$:/Import` that is typed as a "pending import" +# Kick off import processing for each tiddler +## Give each "upgrader" module a chance to inspect the incoming tiddlers +## Upgrader modules can trigger actions for each tiddler: +##* Display a warning message +##* Don't import +##* Replace with another tiddler from the upgrade library +##* Disable incompatible plugins +# Display the newly created pending import tiddler through a new view template segment +## Displays the payload tiddlers as a list of titles and checkboxes, with a dropdown showing the full details of the tiddler +## Perhaps we also suppress the usual JSON display for data tiddlers behind a reveal widget +# The user can adjust the selection checkboxes +# Clicking "done" unpacks the selected tiddlers from the pending import tiddler +# The pending import tiddler and the upgrade library tiddler are excluded from the subsequent save operation + +! ToDo + +* Incoming tiddler preview +* ~~Better display text for plugins~~ +* ~~Better handling of encrypted upgrades~~ +* Docs +* ~~Add upgrade plugin containing instructions and one-shot UI~~ +* ~~Suppressing $:/UpgradeLibrary and upgrade plugin from save~~ +* ~~Checkboxes~~ +* ~~Visual difference for suppressed tiddlers~~ +* Translation of upgrade wizard + +! NoToDo + +* Grouping plugins - not possible without extending the core diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-auto-save-wiki.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-auto-save-wiki.tid new file mode 100644 index 000000000..d5b99be0c --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-auto-save-wiki.tid @@ -0,0 +1,11 @@ +created: 20140811112343634 +modified: 20140811114420597 +tags: message +title: WidgetMessage: tw-auto-save-wiki +type: text/vnd.tiddlywiki + +The autosave wiki message causes the current saver module to perform a background save if it is required. + +The autosave wiki message should be generated whenever changes are made to the store. For example, the navigator widget generates the autosave wiki message as part of its handling of the [[WidgetMessage: tw-save-tiddler]], [[WidgetMessage: tw-delete-tiddler]] and [[WidgetMessage: tw-perform-import]]. + +The autosave wiki message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SaverModule|SaverModules]]. Not all SaverModules can handle autosaving. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-browser-refresh.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-browser-refresh.tid new file mode 100644 index 000000000..f4eb53295 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-browser-refresh.tid @@ -0,0 +1,9 @@ +created: 20140819110529062 +modified: 20140819110529062 +tags: message +title: WidgetMessage: tw-browser-refresh +type: text/vnd.tiddlywiki + +The `tw-browser-refresh` message removs any [[permalink|PermaLinks]] from the browser address bar and refreshes the page, causing the re-display of the [[$:/DefaultTiddlers]], and re-initialisation of any plugin tiddlers. It does not require any properties on the `event` object. + +The refresh message is usually generated with the ButtonWidget and is handled by the core. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-download-file.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-download-file.tid new file mode 100644 index 000000000..2b14dd92e --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-download-file.tid @@ -0,0 +1,14 @@ +created: 20140811112201235 +modified: 20140811115140378 +tags: message +title: WidgetMessage: tw-download-file +type: text/vnd.tiddlywiki + +The download file message causes the current saver module to prompt the user to download the result of parsing a specified template tiddler as a file. It requires the following properties on the `event` object: + +|!Name |!Description | +|param |Title of a tiddler to use as a template for the new tiddler | + +The download file message is usually generated with the ButtonWidget. + +The download file message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SaverModule|SaverModules]]. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-full-screen.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-full-screen.tid new file mode 100644 index 000000000..305b8c778 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-full-screen.tid @@ -0,0 +1,9 @@ +created: 20140811112400855 +modified: 20140811113627373 +tags: message +title: WidgetMessage: tw-full-screen +type: text/vnd.tiddlywiki + +The fullscreen message toggles the "fullscreen" mode of the browser, if it supports it. + +The fullscreen message is handled by the TiddlyWiki core. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-home.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-home.tid index 8d8e908da..ffb5084f4 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-home.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-home.tid @@ -1,9 +1,9 @@ -created: 20140312223013470 -modified: 20140312223134387 +created: 20140819110529062 +modified: 20140819110529062 tags: message title: WidgetMessage: tw-home type: text/vnd.tiddlywiki -The `tw-home` message resets the story list to the tiddlers defined in [[$:/DefaultTiddlers]]. It does not require any properties on the `event` object. +The `tw-home` message closes any open tiddlers and re-opens the default tiddlers set in [[$:/DefaultTiddlers]]. It also remove any [[permalink|PermaLinks]] from the browser address bar. It does not require any properties on the `event` object. -The cancel tiddler message is usually generated with the ButtonWidget and is handled by the core. +The home message is usually generated with the ButtonWidget and is handled by the core. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-import-tiddlers.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-import-tiddlers.tid index e1bd46db7..69328cda9 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-import-tiddlers.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-import-tiddlers.tid @@ -1,14 +1,19 @@ -created: 20140226084658099 -modified: 20140226195055502 +created: 20140716084658099 +modified: 20140716195055502 tags: message navigator-message title: WidgetMessage: tw-import-tiddlers type: text/vnd.tiddlywiki -The `tw-import-tiddlers` message inserts a list of tiddlers into the store. If multiple tiddlers are imported then a report is displayed; if only one tiddler is imported then it is displayed instead. The import message requires the following properties on the `event` object: +The `tw-import-tiddlers` message inserts a list of tiddlers into the pending import tiddler [[$:/Import]]. It also applies any active ''upgrader'' modules to each tiddler as it arrives (see the UpgradeMechanism for more details). |!Name |!Description | |param |JSON text of the array of tiddlers to be imported | -This message is handled by the NavigatorWidget. - The import tiddlers message is usually generated with the DropzoneWidget or the BrowseWidget, and is handled by the NavigatorWidget. + +! Configuration Variables + +The variable `tw-auto-open-on-import` controls whether the `tw-import-tiddlers` message automatically triggers the display of the pending import tiddler [[$:/Import]]: + +* ''no'': The pending import tiddler is not opened in the story +* ''yes'': The pending import tiddler is opened in th story. This is the default diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-login.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-login.tid new file mode 100644 index 000000000..38eda7164 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-login.tid @@ -0,0 +1,10 @@ +created: 20140811112445887 +modified: 20140811113336694 +tags: message +title: WidgetMessage: tw-login +type: text/vnd.tiddlywiki + +The login message prompts the user for a username and password and attempts to login to the current serverside host. The tiddler [[$:/status/IsLoggedIn]] reflects the current login status with the values "yes" or "no", and [[$:/status/UserName]] reflects the current username. + +The login message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SyncAdaptorModule|SyncAdaptorModules]] (typically the ''tiddlywiki/tiddlywebadaptor'' plugin). + diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-logout.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-logout.tid new file mode 100644 index 000000000..a499fdb25 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-logout.tid @@ -0,0 +1,9 @@ +created: 20140811112457311 +modified: 20140811113344084 +tags: message +title: WidgetMessage: tw-logout +type: text/vnd.tiddlywiki + +The logout message attempts to log the user out of the current serverside host. The tiddler [[$:/status/IsLoggedIn]] reflects the current login status with the values "yes" or "no", and [[$:/status/UserName]] reflects the current username. + +The logout message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SyncAdaptorModule|SyncAdaptorModules]] (typically the ''tiddlywiki/tiddlywebadaptor'' plugin). diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-modal.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-modal.tid new file mode 100644 index 000000000..84decfc1f --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-modal.tid @@ -0,0 +1,12 @@ +created: 20140811112133701 +modified: 20140811120203685 +tags: message +title: WidgetMessage: tw-modal +type: text/vnd.tiddlywiki + +The modal message displays a specified tiddler in a modal overlay that dims the main page. It requires the following properties on the `event` object: + +|!Name |!Description | +|param |Title of the tiddler to be displayed | + +The modal message is usually generated with the ButtonWidget. The modal message is handled by the TiddlyWiki core. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-new-tiddler.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-new-tiddler.tid index 351d3838c..c2778a1d8 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-new-tiddler.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-new-tiddler.tid @@ -1,5 +1,5 @@ created: 20140226194405353 -modified: 20140226194729158 +modified: 20140724194729158 tags: message navigator-message title: WidgetMessage: tw-new-tiddler type: text/vnd.tiddlywiki @@ -11,3 +11,11 @@ The new tiddler message creates a new draft tiddler and adds it to the current s |navigateFromTitle |Title of the tiddler from which the navigation to the new tiddler was initiated | The new tiddler message is usually generated with the LinkWidget or the ButtonWidget and is handled by the NavigatorWidget. + +! Example + +To make a button that creates new tiddlers tagged "task", create a tiddler called "TaskTemplate" with that tag, and then make your button like this: + +``` +<$button message="tw-new-tiddler" param="TaskTemplate">New Task +``` diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-notify.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-notify.tid new file mode 100644 index 000000000..97c72408d --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-notify.tid @@ -0,0 +1,12 @@ +created: 20140811112304772 +modified: 20140811120248738 +tags: message +title: WidgetMessage: tw-notify +type: text/vnd.tiddlywiki + +The notify message briefly displays a specified tiddler as a small alert in the upper right corner of the page. It requires the following properties on the `event` object: + +|!Name |!Description | +|param |Title of the tiddler to be displayed | + +The notify message is handled by the TiddlyWiki core. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-perform-import.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-perform-import.tid new file mode 100644 index 000000000..1053e02f5 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-perform-import.tid @@ -0,0 +1,14 @@ +created: 20140716084242809 +modified: 20140716084341303 +tags: message navigator-message +title: WidgetMessage: tw-perform-import +type: text/vnd.tiddlywiki + +The perform import message copies tiddlers from a specified plugin into the main store. See the UpgradeMechanism for an overview of how it is used by the core. + +|!Name |!Description | +|param |Title of the pending import tiddler. Defaults to ''$:/Import'' | + +To select which tiddlers are to be imported, fields with names formed from `selection-` plus the title of the tiddler are used. The value ''unchecked'' causes the tiddler to be skipped from the import. + +The perform import message is usually generated with the ButtonWidget and is handled by the NavigatorWidget. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-permalink.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-permalink.tid new file mode 100644 index 000000000..6f1d0e486 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-permalink.tid @@ -0,0 +1,15 @@ +created: 20140723103751357 +modified: 20140723103751357 +tags: message +title: WidgetMessage: tw-permalink +type: text/vnd.tiddlywiki + +The `tw-permalink` message changes the browser address bar to form a [[permalink|PermaLinks]] to a specified tiddler, defaulting to the current tiddler. + +The permalink message supports the following properties on the `event` object: + +|!Name |!Description | +|param |Title of the tiddler to be permalinked | +|tiddlerTitle |The current tiddler (used by default if the tiddler title isn't specified in the `param`) | + +The permalink message can be generated by the ButtonWidget, and is handled by the story mechanism. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-permaview.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-permaview.tid new file mode 100644 index 000000000..8c42b8249 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-permaview.tid @@ -0,0 +1,15 @@ +created: 20140723103751357 +modified: 20140723103751357 +tags: message +title: WidgetMessage: tw-permaview +type: text/vnd.tiddlywiki + +The `tw-permaview` message changes the browser address bar to form a [[permaview|PermaLinks]] that specifies all the open tiddlers in the main story river, and the tiddler to be navigated, defaulting to the current tiddler. + +The permaview message supports the following properties on the `event` object: + +|!Name |!Description | +|param |Title of the tiddler to be navigated within the permaview | +|tiddlerTitle |The current tiddler (used by default if the tiddler title isn't specified in the `param`) | + +The permaview message can be generated by the ButtonWidget, and is handled by the story mechanism. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-save-wiki.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-save-wiki.tid new file mode 100644 index 000000000..bff780fe0 --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-save-wiki.tid @@ -0,0 +1,11 @@ +created: 20140811112325641 +modified: 20140811115149288 +tags: message +title: WidgetMessage: tw-save-wiki +type: text/vnd.tiddlywiki + +The save wiki message causes the current saver module to perform a full save operation. The save operation can involve user interaction, unlike the [[WidgetMessage: tw-auto-save-wiki]]/ + +The save wiki message is usually generated by the ButtonWidget. + +The save wiki message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SaverModule|SaverModules]]. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-server-refresh.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-server-refresh.tid new file mode 100644 index 000000000..fcf56e28e --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tw-server-refresh.tid @@ -0,0 +1,9 @@ +created: 20140811112435281 +modified: 20140811113453568 +tags: message +title: WidgetMessage: tw-server-refresh +type: text/vnd.tiddlywiki + +The server refresh message attempts to synchronise the latest changes to the current serverside host. + +The server refresh message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SyncAdaptorModule|SyncAdaptorModules]] (typically the ''tiddlywiki/tiddlywebadaptor'' plugin). diff --git a/editions/tw5.com/tiddlers/moduletypes/SyncAdaptorModules.tid b/editions/tw5.com/tiddlers/moduletypes/SyncAdaptorModules.tid index 3ec089631..5396f2081 100644 --- a/editions/tw5.com/tiddlers/moduletypes/SyncAdaptorModules.tid +++ b/editions/tw5.com/tiddlers/moduletypes/SyncAdaptorModules.tid @@ -1,5 +1,5 @@ created: 20130825162100000 -modified: 20131129094907624 +modified: 20140814094907624 tags: dev moduletypes title: SyncAdaptorModules type: text/vnd.tiddlywiki @@ -27,12 +27,16 @@ Nothing should be exported if the adaptor detects that it isn't capable of opera Adaptor modules must handle the following methods. -!! `Constructor(syncer)` +!! `Constructor(options)` Initialises a new adaptor instance. |!Parameter |!Description | -|syncer |Syncer object that is using this adaptor | +|options |See below | + +Options include: + +* ''options.wiki'': reference to wiki to use with this syncadaptor !! `getTiddlerInfo(tiddler)` @@ -91,10 +95,11 @@ Loads a tiddler from the server. |title |Title of tiddler to be retrieved | |callback |Callback function invoked with parameter `err,tiddlerFields` | -!! `deleteTiddler(title,callback)` +!! `deleteTiddler(title,callback,tiddlerInfo)` Delete a tiddler from the server. |!Parameter |!Description | |title |Title of tiddler to be deleted | |callback |Callback function invoked with parameter `err` | +|tiddlerInfo |The tiddlerInfo maintained by the syncer for this tiddler | diff --git a/editions/tw5.com/tiddlers/roadmap/RoadMap.tid b/editions/tw5.com/tiddlers/roadmap/RoadMap.tid index 69870b7f7..bd0e09293 100644 --- a/editions/tw5.com/tiddlers/roadmap/RoadMap.tid +++ b/editions/tw5.com/tiddlers/roadmap/RoadMap.tid @@ -1,44 +1,30 @@ created: 20130823203800000 -modified: 20140612181726794 +modified: 20140809112946299 tags: planning title: RoadMap type: text/vnd.tiddlywiki -TiddlyWiki is under rapid development at the moment as it moves through beta to a full release. +TiddlyWiki is under rapid development at the moment as it moves through beta to a full release. That is the point at which it is declared stable enough for general use. It will continue to improve and evolve, but constrained to remain backwards compatible so that plugins and content created for version 5.0 will continue to work into the future. -! Beta +The plan is for the full release to take place in September 2014, around the time of TiddlyWiki's tenth anniversary. -During the beta ~TiddlyWiki will be practical for cautious everyday use but as we perfect the product there will occasionally be situations where we have to make changes that are not backwards compatible. These occasions will be clearly marked in the release notes. +! Deferred Tasks -The following additional features are planned or under consideration for implementation during the beta: +Some important features were deferred to be added after the beta: -* Features to improve user data integrity -** Optional defensive backups with TiddlyFox and TiddlyDesktop -* Features required for large scale adoption -** Improve upgrade process -** Establish plugin library -** Proper use of ARIA roles +* Establish online plugin library * Fixing hangovers from TiddlyWikiClassic -** ~TiddlyWiki file format (to avoid illegal attribute names) -** Tiddler object format (to provide true polymorphism of field values) -* Perfecting WikiText -** ~~Global macros~~ -** ~~`[img[url]]` for remote image embedding, and `[ext[url]]` for explicit external links~~ -** Further ~WikiText features -* Productivity features -** Import wizard allowing individual tiddlers to be selected for import -** Aliases -** Search and replace -** Tiddler renaming -** Rich link tooltips, incorporating a preview -** Keyboard shortcuts -** Keyboard snippet expansion in the text editor -** List editor with drag and drop -** Selective/weighted searching by title, body and fields -** Maths notation +* ~TiddlyWiki file format (to avoid illegal attribute names) +* Tiddler object format (to provide true polymorphism of field values) +* Aliases (alternative titles for tiddlers) +* Search and replace +* Tiddler renaming +* Rich link tooltips, incorporating a preview +* More keyboard shortcuts +* Keyboard snippet expansion in the text editor +* List editor with drag and drop +* Selective/weighted searching by title, body and fields +* Maths notation Also see the issues list on GitHub: https://github.com/Jermolene/TiddlyWiki5 -! General Release - -TiddlyWiki will [[leave beta|TiddlyWiki5 Versioning]] and become a full release in the first half of 2014. That is the point at which it is declared stable enough for general use. It will continue to improve and evolve after this point, although constrained to remain backwards compatible so that plugins and content created for version 5.0 will continue to work into the indefinite future. diff --git a/editions/tw5.com/tiddlers/samples/SampleTabFour.tid b/editions/tw5.com/tiddlers/samples/SampleTabFour.tid new file mode 100644 index 000000000..05418dc0e --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/SampleTabFour.tid @@ -0,0 +1,5 @@ +title: SampleTabFour +tags: sampletab + +This is the fourth of our sample tabs. + diff --git a/editions/tw5.com/tiddlers/samples/SampleTabOne.tid b/editions/tw5.com/tiddlers/samples/SampleTabOne.tid new file mode 100644 index 000000000..73781924f --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/SampleTabOne.tid @@ -0,0 +1,5 @@ +title: SampleTabOne +tags: sampletab + +This is the first of our sample tabs. + diff --git a/editions/tw5.com/tiddlers/samples/SampleTabThree.tid b/editions/tw5.com/tiddlers/samples/SampleTabThree.tid new file mode 100644 index 000000000..ecd92496a --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/SampleTabThree.tid @@ -0,0 +1,5 @@ +title: SampleTabThree +tags: sampletab + +This is the third of our sample tabs. + diff --git a/editions/tw5.com/tiddlers/samples/SampleTabTwo.tid b/editions/tw5.com/tiddlers/samples/SampleTabTwo.tid new file mode 100644 index 000000000..47deb5765 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/SampleTabTwo.tid @@ -0,0 +1,5 @@ +title: SampleTabTwo +tags: sampletab + +This is the second of our sample tabs. + diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/Contents.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/Contents.tid new file mode 100644 index 000000000..62d806068 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/Contents.tid @@ -0,0 +1,6 @@ +title: Contents +list: First Second Third Fourth + +Sample data for TableOfContentsMacro. + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/First.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/First.tid new file mode 100644 index 000000000..72650711c --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/First.tid @@ -0,0 +1,5 @@ +title: First +tags: Contents +list: FirstOne FirstTwo FirstThree + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/FirstOne.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/FirstOne.tid new file mode 100644 index 000000000..238aeda27 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/FirstOne.tid @@ -0,0 +1,4 @@ +title: FirstOne +tags: First + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/FirstThree.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/FirstThree.tid new file mode 100644 index 000000000..4a5fcb683 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/FirstThree.tid @@ -0,0 +1,4 @@ +title: FirstThree +tags: First + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/FirstTwo.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/FirstTwo.tid new file mode 100644 index 000000000..a30891722 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/FirstTwo.tid @@ -0,0 +1,4 @@ +title: FirstTwo +tags: First + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/Fourth.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/Fourth.tid new file mode 100644 index 000000000..a09fe0467 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/Fourth.tid @@ -0,0 +1,4 @@ +title: Fourth +tags: Contents + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/Second.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/Second.tid new file mode 100644 index 000000000..c87c88a7a --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/Second.tid @@ -0,0 +1,4 @@ +title: Second +tags: Contents + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/SecondOne.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondOne.tid new file mode 100644 index 000000000..2d9898b33 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondOne.tid @@ -0,0 +1,4 @@ +title: SecondOne +tags: Second + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThree.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThree.tid new file mode 100644 index 000000000..f1b0f1268 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThree.tid @@ -0,0 +1,5 @@ +title: SecondThree +tags: Second +list: SecondThreeOne SecondThreeTwo SecondThreeThree + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeOne.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeOne.tid new file mode 100644 index 000000000..22d2e83c9 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeOne.tid @@ -0,0 +1,4 @@ +title: SecondThreeOne +tags: SecondThree + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeThree.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeThree.tid new file mode 100644 index 000000000..7b632ad4b --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeThree.tid @@ -0,0 +1,4 @@ +title: SecondThreeThree +tags: SecondThree + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeTwo.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeTwo.tid new file mode 100644 index 000000000..4578ff7d0 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondThreeTwo.tid @@ -0,0 +1,4 @@ +title: SecondThreeTwo +tags: SecondThree + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/SecondTwo.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondTwo.tid new file mode 100644 index 000000000..302838c89 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/SecondTwo.tid @@ -0,0 +1,4 @@ +title: SecondTwo +tags: Second + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/Third.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/Third.tid new file mode 100644 index 000000000..8d5f734e8 --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/Third.tid @@ -0,0 +1,5 @@ +title: Third +tags: Contents +list: ThirdOne ThirdTwo ThirdThree + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdOne.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdOne.tid new file mode 100644 index 000000000..e090c269f --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdOne.tid @@ -0,0 +1,4 @@ +title: ThirdOne +tags: Third + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdThree.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdThree.tid new file mode 100644 index 000000000..ec781f15f --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdThree.tid @@ -0,0 +1,4 @@ +title: ThirdThree +tags: Third + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdTwo.tid b/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdTwo.tid new file mode 100644 index 000000000..cbbdb7aab --- /dev/null +++ b/editions/tw5.com/tiddlers/samples/TableOfContents/ThirdTwo.tid @@ -0,0 +1,4 @@ +title: ThirdTwo +tags: Third + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/saving/Saving on Android.tid b/editions/tw5.com/tiddlers/saving/Saving on Android.tid index ba7b2b2f3..19da4c8e8 100644 --- a/editions/tw5.com/tiddlers/saving/Saving on Android.tid +++ b/editions/tw5.com/tiddlers/saving/Saving on Android.tid @@ -1,9 +1,9 @@ created: 20130825161400000 -modified: 20131203112539560 +modified: 20140811171026344 tags: howto title: Saving on Android type: text/vnd.tiddlywiki -The AndTidWiki app for Android devices makes it possible to edit and save changes to TiddlyWiki5, including working offline without a network connection. +The AndTidWiki app for Android devices makes it possible to edit and save changes to TiddlyWiki5, including working offline without a network connection. [[Download it here|https://play.google.com/store/apps/details?id=de.mgsimon.android.andtidwiki]]. //Note that AndTidWiki is published independently of TiddlyWiki// \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid b/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid index cea136d5e..cfde40243 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid @@ -1,10 +1,10 @@ created: 20131129092604900 -modified: 20140226201353048 +modified: 20140811170321179 tags: howto title: Saving with the HTML5 fallback saver type: text/vnd.tiddlywiki -This method of saving changes is clunky but has the advantage of working on almost all desktop browsers, and many mobile browsers. +This method of saving changes is clunky because it requires manual intervention for each save. It has the advantage of working on almost all desktop browsers, and many mobile browsers. # [[Download]] an empty TiddlyWiki by clicking this button: #> {{$:/editions/tw5.com/snippets/download-empty-button}} @@ -13,8 +13,8 @@ This method of saving changes is clunky but has the advantage of working on almo # Locate the file you just downloaded #* You may rename it, but be sure to keep the `.html` or `.htm` extension # Open the file in your browser -# Try creating a new tiddler using the ''plus'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''tick'' button -# Save your changes by clicking the {{$:/core/images/save-button}} ''download'' button in the sidebar +# Try creating a new tiddler using the ''new tiddler'' {{$:/core/images/new-button}} button in the sidebar. Type some content for the tiddler, and click the {{$:/core/images/done-button}} ''done'' button +# Save your changes by clicking the {{$:/core/images/save-button}} ''save changes'' button in the sidebar # Your browser will download a new copy of the wiki incorporating your changes # Locate the newly downloaded file and open it in your browser # Verify that your changes have been saved correctly diff --git a/editions/tw5.com/tiddlers/system/EditTemplateSources.tid b/editions/tw5.com/tiddlers/system/EditTemplateSources.tid new file mode 100644 index 000000000..0ce4e58b5 --- /dev/null +++ b/editions/tw5.com/tiddlers/system/EditTemplateSources.tid @@ -0,0 +1,20 @@ +title: $:/editions/tw5.com/EditTemplate/Sources +tags: $:/tags/EditTemplate +list-after: $:/core/ui/EditTemplate/title + +\define makeGitHubLink() +https://github.com/Jermolene/TiddlyWiki5/edit/master/editions/tw5.com/tiddlers/$(githubLink)$ +\end +\define innerMakeGitHubLink(linkText) +<$set name="githubLink" value={{$:/config/OriginalTiddlerPaths##$(draftOfTiddler)$}}> +> class="tw-tiddlylink-external" target="_blank">$linkText$ + +\end +\define outerMakeGitHubLink(linkText) +<$set name="draftOfTiddler" value={{$(currentTiddler)$!!draft.of}}> +<> + +\end +
+{{$:/core/images/star-filled}} Can you help us improve this documentation? [[Find out how|Improving TiddlyWiki Documentation]] to edit <> +
diff --git a/editions/tw5.com/tiddlers/system/download-empty.tid b/editions/tw5.com/tiddlers/system/download-empty.tid index 280ac2a61..e34226189 100644 --- a/editions/tw5.com/tiddlers/system/download-empty.tid +++ b/editions/tw5.com/tiddlers/system/download-empty.tid @@ -1,7 +1,7 @@ title: $:/editions/tw5.com/download-empty \define saveTiddlerFilter() -[[$:/core]] [[$:/isEncrypted]] [[$:/plugins/tiddlywiki/fullscreen]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] +[[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \end \define savingEmpty() yes diff --git a/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid b/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid index bf2a7143d..efd6c8c18 100644 --- a/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid +++ b/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid @@ -1,4 +1,6 @@ title: $:/editions/tw5.com/github-fork-ribbon tags: $:/tags/PageControls +caption: ~GitHub ribbon +description: ~GitHub ribbon for tw5.com -
<$link to="ReleaseHistory"><>
\ No newline at end of file +
<$link to="ReleaseHistory"><>
\ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/tw5.com-styles.tid b/editions/tw5.com/tiddlers/system/tw5.com-styles.tid index cc993ff26..8a49e0349 100644 --- a/editions/tw5.com/tiddlers/system/tw5.com-styles.tid +++ b/editions/tw5.com/tiddlers/system/tw5.com-styles.tid @@ -4,16 +4,18 @@ tags: $:/tags/stylesheet @media (min-width: 600px) { .tw-link-info { - -moz-column-count: 2; - -moz-column-gap: 10px; - -webkit-column-count: 2; - -webkit-column-gap: 10px; - column-count: 2; - column-gap: 10px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; } .tw-link-info-item { - width: 100%; + max-width: 25em; + margin-right: 10px; } } @@ -39,3 +41,47 @@ tags: $:/tags/stylesheet padding: 1em; height: 400px; } + +.tw-improvement-banner { + font-size: 0.7em; + background: #fcc; + padding-left: 5px; + margin-top: 6px; + margin-bottom: 12px; + <> +} + +@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) { + + .tw-improvement-banner { + } + +} + +@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) { + + .tw-improvement-banner { + margin-right: -23px; + margin-left: -53px; + } + + .tw-improvement-banner:before { + display: block; + position: absolute; + width: 0; + height: 0; + content: " "; + margin-left: -5px; + margin-top: -10px; + border-top: 5px solid transparent; + border-left: 5px solid transparent; + border-right: 5px solid #C07E7E; + border-bottom: 5px solid #C07E7E; + } + +} + +.tw-improvement-banner svg { + width: 1em; + height: 1em; +} diff --git a/editions/tw5.com/tiddlers/system/version-link-macro.tid b/editions/tw5.com/tiddlers/system/version-link-macro.tid new file mode 100644 index 000000000..4acef82ac --- /dev/null +++ b/editions/tw5.com/tiddlers/system/version-link-macro.tid @@ -0,0 +1,6 @@ +title: $:/editions/tw5.com/version-link-macro +tags: $:/tags/Macro + +\define version-link() +[[$(version)$|Release $(version)$]] +\end diff --git a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid index a17090702..3ac13ba40 100644 --- a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid @@ -1,11 +1,14 @@ title: CheckboxWidget created: 201310241419 -modified: 201310300837 +modified: 201407110837 tags: widget ! Introduction -The checkbox widget displays an HTML `` element that is dynamically bound to the presence or absence of a specified tag on a specified tiddler. +The checkbox widget displays an HTML `` element that is dynamically bound to either: + +* the presence or absence of a specified tag on a specified tiddler +* the value of a specified field of a specified tiddler ! Content and Attributes @@ -14,3 +17,27 @@ The content of the `<$checkbox>` widget is displayed within an HTML `