diff --git a/core/images/open-window.tid b/core/images/open-window.tid new file mode 100644 index 000000000..337c582a1 --- /dev/null +++ b/core/images/open-window.tid @@ -0,0 +1,9 @@ +title: $:/core/images/open-window +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 f90c138ef..9cd9c6fd5 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -52,6 +52,8 @@ NewJournalHere/Caption: new journal here NewJournalHere/Hint: Create a new journal tiddler tagged with this one NewTiddler/Caption: new tiddler NewTiddler/Hint: Create a new tiddler +OpenWindow/Caption: open in new window +OpenWindow/Hint: Open tiddler in new window Permalink/Caption: permalink Permalink/Hint: Set browser address bar to a direct link to this tiddler Permaview/Caption: permaview diff --git a/core/modules/startup/windows.js b/core/modules/startup/windows.js new file mode 100644 index 000000000..cb4c755f5 --- /dev/null +++ b/core/modules/startup/windows.js @@ -0,0 +1,63 @@ +/*\ +title: $:/core/modules/startup/windows.js +type: application/javascript +module-type: startup + +Setup root widget handlers for the messages concerned with opening external browser windows + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +// Export name and synchronous status +exports.name = "windows"; +exports.platforms = ["browser"]; +exports.after = ["startup"]; +exports.synchronous = true; + +exports.startup = function() { + $tw.rootWidget.addEventListener("tm-open-window",function(event) { + // Get the parameters + var title = event.param || event.tiddlerTitle, + paramObject = event.paramObject || {}, + template = paramObject.template || "$:/core/ui/ViewTemplate/body", + width = paramObject.width || "700", + height = paramObject.height || "600"; + // Open the window + var srcWindow = window.open("","external-" + title,"width=" + width + ",height=" + height), + srcDocument = srcWindow.document; + srcWindow.onclose = function(event) { + console.log("closing popup"); + }; + srcWindow.addEventListener("close",function(event) { + console.log("closing2 popup"); + },false); + srcDocument.write(""); + srcDocument.close(); + // Set up the styles + var styleWidgetNode = $tw.wiki.makeTranscludeWidget("$:/core/ui/PageStylesheet",{document: $tw.fakeDocument}), + styleContainer = $tw.fakeDocument.createElement("style"); + styleWidgetNode.render(styleContainer,null); + var styleElement = srcDocument.createElement("style"); + styleElement.innerHTML = styleContainer.textContent; + srcDocument.head.insertBefore(styleElement,srcDocument.head.firstChild); + $tw.wiki.addEventListener("change",function(changes) { + if(styleWidgetNode.refresh(changes,styleContainer,null)) { + styleElement.innerHTML = styleContainer.textContent; + } + }); + // Render the text of the tiddler + var parser = $tw.wiki.parseTiddler(template), + widgetNode = $tw.wiki.makeWidget(parser,{document: srcDocument, variables: {currentTiddler: title}}); + widgetNode.render(srcDocument.body,null); + $tw.wiki.addEventListener("change",function(changes) { + widgetNode.refresh(changes); + }); + + }); +}; + +})(); diff --git a/core/palettes/Contrast.tid b/core/palettes/Contrast.tid deleted file mode 100644 index 438b1d159..000000000 --- a/core/palettes/Contrast.tid +++ /dev/null @@ -1,109 +0,0 @@ -title: $:/palettes/Contrast -name: Contrast -description: High contrast and unambiguous -tags: $:/tags/Palette -type: application/x-tiddler-dictionary - -alert-background: #f00 -alert-border: #000 -alert-highlight: #fff -alert-muted-foreground: #800 -background: #000 -blockquote-bar: <> -button-background: #000 -button-foreground: #fff -button-border: #fff -code-background: #000 -code-border: #fff -code-foreground: #fff -dirty-indicator: #f00 -download-background: #080 -download-foreground: <> -dragger-background: <> -dragger-foreground: <> -dropdown-background: <> -dropdown-border: <> -dropdown-tab-background-selected: #fff -dropdown-tab-background: #fff -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: #00a -external-link-foreground: #00e -foreground: #fff -message-background: #fff -message-border: #000 -message-foreground: #000 -modal-backdrop: <> -modal-background: <> -modal-border: #fff -modal-footer-background: #000 -modal-footer-border: #fff -modal-header-border: #fff -muted-foreground: #999 -notification-background: #000 -notification-border: #fff -page-background: #000 -pre-background: #000 -pre-border: #fff -primary: #00f -sidebar-button-foreground: <> -sidebar-controls-foreground-hover: #000000 -sidebar-controls-foreground: #ffffff -sidebar-foreground-shadow: rgba(255,0,0, 0.5) -sidebar-foreground: #ffffff -sidebar-muted-foreground-hover: #444444 -sidebar-muted-foreground: #fff -sidebar-tab-background-selected: #000 -sidebar-tab-background: <> -sidebar-tab-border-selected: <> -sidebar-tab-border: <> -sidebar-tab-divider: <> -sidebar-tab-foreground-selected: #fff -sidebar-tab-foreground: <> -sidebar-tiddler-link-foreground-hover: #fff -sidebar-tiddler-link-foreground: <> -site-title-foreground: <> -static-alert-foreground: #aaaaaa -tab-background-selected: #000 -tab-background: #fff -tab-border-selected: #fff -tab-border: #fff -tab-divider: #fff -tab-foreground-selected: #fff -tab-foreground: #000 -table-border: #dddddd -table-footer-background: #a8a8a8 -table-header-background: #f0f0f0 -tag-background: #d5ad34 -tag-foreground: #ffffff -tiddler-background: <> -tiddler-border: #fff -tiddler-controls-foreground-hover: #ddd -tiddler-controls-foreground-selected: #fdd -tiddler-controls-foreground: #fff -tiddler-editor-background: #000 -tiddler-editor-border-image: #fff -tiddler-editor-border: #cccccc -tiddler-editor-fields-even: #000 -tiddler-editor-fields-odd: #000 -tiddler-info-background: #000 -tiddler-info-border: #fff -tiddler-info-tab-background: #000 -tiddler-link-background: <> -tiddler-link-foreground: <> -tiddler-subtitle-foreground: #c0c0c0 -tiddler-title-foreground: #fff -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/ContrastDark.tid b/core/palettes/ContrastDark.tid new file mode 100644 index 000000000..d437369c0 --- /dev/null +++ b/core/palettes/ContrastDark.tid @@ -0,0 +1,109 @@ +title: $:/palettes/ContrastLight +name: Contrast (Light) +description: High contrast and unambiguous (light version) +tags: $:/tags/Palette +type: application/x-tiddler-dictionary + +alert-background: #f00 +alert-border: <> +alert-highlight: <> +alert-muted-foreground: #800 +background: #fff +blockquote-bar: <> +button-background: <> +button-foreground: <> +button-border: <> +code-background: <> +code-border: <> +code-foreground: <> +dirty-indicator: #f00 +download-background: #080 +download-foreground: <> +dragger-background: <> +dragger-foreground: <> +dropdown-background: <> +dropdown-border: <> +dropdown-tab-background-selected: <> +dropdown-tab-background: <> +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: #00a +external-link-foreground: #00e +foreground: #000 +message-background: <> +message-border: <> +message-foreground: <> +modal-backdrop: <> +modal-background: <> +modal-border: <> +modal-footer-background: <> +modal-footer-border: <> +modal-header-border: <> +muted-foreground: #999 +notification-background: <> +notification-border: <> +page-background: <> +pre-background: <> +pre-border: <> +primary: #00f +sidebar-button-foreground: <> +sidebar-controls-foreground-hover: <> +sidebar-controls-foreground: <> +sidebar-foreground-shadow: rgba(0,0,0, 0) +sidebar-foreground: <> +sidebar-muted-foreground-hover: #444444 +sidebar-muted-foreground: <> +sidebar-tab-background-selected: <> +sidebar-tab-background: <> +sidebar-tab-border-selected: <> +sidebar-tab-border: <> +sidebar-tab-divider: <> +sidebar-tab-foreground-selected: <> +sidebar-tab-foreground: <> +sidebar-tiddler-link-foreground-hover: <> +sidebar-tiddler-link-foreground: <> +site-title-foreground: <> +static-alert-foreground: #aaaaaa +tab-background-selected: <> +tab-background: <> +tab-border-selected: <> +tab-border: <> +tab-divider: <> +tab-foreground-selected: <> +tab-foreground: <> +table-border: #dddddd +table-footer-background: #a8a8a8 +table-header-background: #f0f0f0 +tag-background: #000 +tag-foreground: #fff +tiddler-background: <> +tiddler-border: <> +tiddler-controls-foreground-hover: #ddd +tiddler-controls-foreground-selected: #fdd +tiddler-controls-foreground: <> +tiddler-editor-background: <> +tiddler-editor-border-image: <> +tiddler-editor-border: #cccccc +tiddler-editor-fields-even: <> +tiddler-editor-fields-odd: <> +tiddler-info-background: <> +tiddler-info-border: <> +tiddler-info-tab-background: <> +tiddler-link-background: <> +tiddler-link-foreground: <> +tiddler-subtitle-foreground: <> +tiddler-title-foreground: <> +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: <> +very-muted-foreground: #888888 diff --git a/core/palettes/ContrastLight.tid b/core/palettes/ContrastLight.tid new file mode 100644 index 000000000..37435531a --- /dev/null +++ b/core/palettes/ContrastLight.tid @@ -0,0 +1,109 @@ +title: $:/palettes/ContrastDark +name: Contrast (Dark) +description: High contrast and unambiguous (dark version) +tags: $:/tags/Palette +type: application/x-tiddler-dictionary + +alert-background: #f00 +alert-border: <> +alert-highlight: <> +alert-muted-foreground: #800 +background: #000 +blockquote-bar: <> +button-background: <> +button-foreground: <> +button-border: <> +code-background: <> +code-border: <> +code-foreground: <> +dirty-indicator: #f00 +download-background: #080 +download-foreground: <> +dragger-background: <> +dragger-foreground: <> +dropdown-background: <> +dropdown-border: <> +dropdown-tab-background-selected: <> +dropdown-tab-background: <> +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: #00a +external-link-foreground: #00e +foreground: #fff +message-background: <> +message-border: <> +message-foreground: <> +modal-backdrop: <> +modal-background: <> +modal-border: <> +modal-footer-background: <> +modal-footer-border: <> +modal-header-border: <> +muted-foreground: #999 +notification-background: <> +notification-border: <> +page-background: <> +pre-background: <> +pre-border: <> +primary: #00f +sidebar-button-foreground: <> +sidebar-controls-foreground-hover: <> +sidebar-controls-foreground: <> +sidebar-foreground-shadow: rgba(0,0,0, 0) +sidebar-foreground: <> +sidebar-muted-foreground-hover: #444444 +sidebar-muted-foreground: <> +sidebar-tab-background-selected: <> +sidebar-tab-background: <> +sidebar-tab-border-selected: <> +sidebar-tab-border: <> +sidebar-tab-divider: <> +sidebar-tab-foreground-selected: <> +sidebar-tab-foreground: <> +sidebar-tiddler-link-foreground-hover: <> +sidebar-tiddler-link-foreground: <> +site-title-foreground: <> +static-alert-foreground: #aaaaaa +tab-background-selected: <> +tab-background: <> +tab-border-selected: <> +tab-border: <> +tab-divider: <> +tab-foreground-selected: <> +tab-foreground: <> +table-border: #dddddd +table-footer-background: #a8a8a8 +table-header-background: #f0f0f0 +tag-background: #fff +tag-foreground: #000 +tiddler-background: <> +tiddler-border: <> +tiddler-controls-foreground-hover: #ddd +tiddler-controls-foreground-selected: #fdd +tiddler-controls-foreground: <> +tiddler-editor-background: <> +tiddler-editor-border-image: <> +tiddler-editor-border: #cccccc +tiddler-editor-fields-even: <> +tiddler-editor-fields-odd: <> +tiddler-info-background: <> +tiddler-info-border: <> +tiddler-info-tab-background: <> +tiddler-link-background: <> +tiddler-link-foreground: <> +tiddler-subtitle-foreground: <> +tiddler-title-foreground: <> +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: <> +very-muted-foreground: #888888 diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index e3c0cca67..e25aa7425 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -70,7 +70,7 @@ This plugin is already installed at version <$text text=<>/> \end \define display-server-assets(type) -Search: <$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input" focus="true"/> +Search: <$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input"/> <$reveal state="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" type="nomatch" text=""> <$button class="tc-btn-invisible"> <$action-setfield $tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" $field="text" $value=""/> diff --git a/core/ui/ViewToolbar/open-window.tid b/core/ui/ViewToolbar/open-window.tid new file mode 100644 index 000000000..6c885fc94 --- /dev/null +++ b/core/ui/ViewToolbar/open-window.tid @@ -0,0 +1,13 @@ +title: $:/core/ui/Buttons/open-window +tags: $:/tags/ViewToolbar +caption: {{$:/core/images/open-window}} {{$:/language/Buttons/OpenWindow/Caption}} +description: {{$:/language/Buttons/OpenWindow/Hint}} + +<$button message="tm-open-window" tooltip={{$:/language/Buttons/OpenWindow/Hint}} aria-label={{$:/language/Buttons/OpenWindow/Caption}} class=<>> +<$list filter="[prefix[yes]]"> +{{$:/core/images/open-window}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/OpenWindow/Caption}}/> + + \ No newline at end of file diff --git a/editions/dev/tiddlers/from tw5.com/How to create plugins in the browser.tid b/editions/dev/tiddlers/from tw5.com/How to create plugins in the browser.tid index f723e33b9..0314e3119 100644 --- a/editions/dev/tiddlers/from tw5.com/How to create plugins in the browser.tid +++ b/editions/dev/tiddlers/from tw5.com/How to create plugins in the browser.tid @@ -1,5 +1,5 @@ created: 2014013122133816 -modified: 20141111122437656 +modified: 20150502082437656 tags: howto title: How to create plugins in the browser type: text/vnd.tiddlywiki @@ -31,6 +31,7 @@ Click the link to the plugin tiddler to open it. Assuming it doesn't currently e |!Field |!Value | |''dependents'' |Space separated list of dependent plugins (use square brackets for titles containing spaces) | |''description'' |Plugin description | +|''name'' |Plugin name (only needed for themes) | |''plugin-type'' |Either "plugin" for a regular plugin, "theme" for a theme, or "language" for a language pack | |''type'' |Set to "application/json" | |''version'' |Set to the version number of the plugin (eg "0.0.1") | diff --git a/editions/dev/tiddlers/from tw5.com/TiddlyWiki Coding Style Guidelines.tid b/editions/dev/tiddlers/from tw5.com/TiddlyWiki Coding Style Guidelines.tid index ca2420ad7..0d2da8ece 100644 --- a/editions/dev/tiddlers/from tw5.com/TiddlyWiki Coding Style Guidelines.tid +++ b/editions/dev/tiddlers/from tw5.com/TiddlyWiki Coding Style Guidelines.tid @@ -1,4 +1,4 @@ -modified: 20141016083333808 +modified: 20150430153333808 title: TiddlyWiki Coding Style Guidelines tags: dev @@ -25,9 +25,9 @@ See the following example for layout of basic JavaScript constructs: Multiline comments are used to introduce a block of code such as a function definition */ function demoFunction(param,more) { - // Proper sentence capitalisation for comments - if(condition == "something") { - // No space between "if" and the brackets; always spaces around binary operators + // Proper sentence capitalisation for comments; prefer strict equality checks + if(condition === "something") { + // Always use braces, even when optional; no space between "if" and the brackets; always spaces around binary operators something = somethingElse; myOtherFunction(one,two); // No whitespace within function parameters do { diff --git a/editions/prerelease/tiddlers/palette.tid b/editions/prerelease/tiddlers/palette.tid index 7c541fcf1..afd78912b 100644 --- a/editions/prerelease/tiddlers/palette.tid +++ b/editions/prerelease/tiddlers/palette.tid @@ -1,3 +1,3 @@ title: $:/palette -$:/palettes/Contrast \ No newline at end of file +$:/palettes/Vanilla \ No newline at end of file diff --git a/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid b/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid index cb3e8cbfb..3de79fc5a 100644 --- a/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid +++ b/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid @@ -1,10 +1,53 @@ title: TiddlyWiki Pre-release -modified: 20141013204930183 +modified: 20150428204930183 + +\define colour-picker(tiddler,colour) +<$edit-text tiddler="""$tiddler$""" index="""$colour$""" type="color" tag="input"/> +\end This is a pre-release build of TiddlyWiki. It is provided for testing purposes. Please don't try to use it for anything important -- you should use the latest official release from http://tiddlywiki.com. -Try out the experimental system tiddler browser: +! Features for 5.1.9 -[[$:/core/ui/MoreSideBar/Explore]] +!! New Tiddler Toolbar Button: "Open in new window" + +An experimental new tiddler toolbar button opens a single tiddler in a separate pop-up browser window. The tiddler will be dynamically updated just as in the main window. There are several uses: + +* Arranging reference tiddlers for easy access while editing in the main window +* Making good use of multi-screen layouts +* Printing the content of a single tiddler +* Running presentations in a separate window while maintaining notes in the main window + +!! Improvements for visually impaired users + +* Improved monochrome palette variants: +** <$button> +<$action-setfield $tiddler="$:/theme" text="$:/themes/tiddlywiki/vanilla"/> +<$action-setfield $tiddler="$:/palette" text="$:/palettes/ContrastDark"/> +Dark palette +. Foreground: <>, Background: <> +** <$button> +<$action-setfield $tiddler="$:/theme" text="$:/themes/tiddlywiki/vanilla"/> +<$action-setfield $tiddler="$:/palette" text="$:/palettes/ContrastLight"/> +Light palette +. Foreground: <>, Background: <> +** <$button> +<$action-setfield $tiddler="$:/theme" text="$:/themes/tiddlywiki/snowwhite"/> +<$action-setfield $tiddler="$:/palette" text="$:/palettes/Vanilla"/> +Revert + + +! Features held back for later release + +These unfinished features are included in this prerelease build, but are not planned for inclusion in the next release. + +* <$button> +<$action-setfield $tiddler="$:/view" text="stacked"/> +Set "Stacked" story view + <$button> +<$action-setfield $tiddler="$:/view" text="classic"/> +Revert + +* [[Hierarchical system tiddler browser|$:/core/ui/MoreSideBar/Explore]] diff --git a/editions/prerelease/tiddlers/theme.tid b/editions/prerelease/tiddlers/theme.tid index 36b7610c7..58690c397 100644 --- a/editions/prerelease/tiddlers/theme.tid +++ b/editions/prerelease/tiddlers/theme.tid @@ -1,3 +1,3 @@ title: $:/theme -$:/themes/tiddlywiki/vanilla \ No newline at end of file +$:/themes/tiddlywiki/snowwhite \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/community/resources/SeeAlso_by_Matias_Goldman.tid b/editions/tw5.com/tiddlers/community/resources/SeeAlso_by_Matias_Goldman.tid new file mode 100644 index 000000000..22a646aea --- /dev/null +++ b/editions/tw5.com/tiddlers/community/resources/SeeAlso_by_Matias_Goldman.tid @@ -0,0 +1,14 @@ +created: 20150430154234863 +modified: 20150430154355656 +tags: Resources +title: SeeAlso by Matias Goldman +type: text/vnd.tiddlywiki +url: http://seealso.tiddlyspot.com + +A simple technique for adding tag-based cross references to the default view template. + +{{!!url}} + +<<< +See also: - is a feature to generate a "See also:" section after the tiddler text, somewhat like in Wikipedia articles. +<<< diff --git a/editions/tw5.com/tiddlers/community/resources/TWGuides by Andreas Hahn.tid b/editions/tw5.com/tiddlers/community/resources/TWGuides by Andreas Hahn.tid index 3ee84c79d..9af92fc0d 100644 --- a/editions/tw5.com/tiddlers/community/resources/TWGuides by Andreas Hahn.tid +++ b/editions/tw5.com/tiddlers/community/resources/TWGuides by Andreas Hahn.tid @@ -1,5 +1,5 @@ created: 20140920124011558 -modified: 20140920124011558 +modified: 20150430154230509 tags: Resources title: TWGuides by Andreas Hahn type: text/vnd.tiddlywiki @@ -7,6 +7,8 @@ url: http://twguides.org/ A collection of community tips and tutorials curated by Andreas Hahn, including a handy "customiser" that simplifies creating an empty TiddlyWiki with selected plugins and enhancements. +Updated to include [[Tinka|http://twguides.org/tinka.html]], a plugin that "provides a GUI to create and modify plugins more easily, therefore saving time on the packaging process". + {{!!url}} <<<