From dcf4e93a3283e3e93cc14e50366f9b0252870835 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 14:46:00 +0100 Subject: [PATCH 1/8] Add suffix and removesuffix filters --- core/modules/filters/removesuffix.js | 28 +++++++++++++++ core/modules/filters/suffix.js | 36 +++++++++++++++++++ .../filters/FilterOperator prefix.tid | 2 +- .../filters/FilterOperator removeprefix.tid | 2 +- .../filters/FilterOperator removesuffix.tid | 14 ++++++++ .../filters/FilterOperator suffix.tid | 15 ++++++++ 6 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 core/modules/filters/removesuffix.js create mode 100644 core/modules/filters/suffix.js create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid diff --git a/core/modules/filters/removesuffix.js b/core/modules/filters/removesuffix.js new file mode 100644 index 000000000..5f0da8b82 --- /dev/null +++ b/core/modules/filters/removesuffix.js @@ -0,0 +1,28 @@ +/*\ +title: $:/core/modules/filters/removesuffix.js +type: application/javascript +module-type: filteroperator + +Filter operator for removing a suffix from each title in the list. Titles that do not end with the suffix are removed. + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Export our filter function +*/ +exports.removesuffix = function(source,operator,options) { + var results = []; + source(function(tiddler,title) { + if(title.substr(-operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { + results.push(title.substr(operator.operand.length)); + } + }); + return results; +}; + +})(); diff --git a/core/modules/filters/suffix.js b/core/modules/filters/suffix.js new file mode 100644 index 000000000..45e8900c4 --- /dev/null +++ b/core/modules/filters/suffix.js @@ -0,0 +1,36 @@ +/*\ +title: $:/core/modules/filters/suffix.js +type: application/javascript +module-type: filteroperator + +Filter operator for checking if a title ends with a suffix + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Export our filter function +*/ +exports.suffix = function(source,operator,options) { + var results = []; + if(operator.prefix === "!") { + source(function(tiddler,title) { + if(title.substr(-operator.operand.length).toLowerCase() !== operator.operand.toLowerCase()) { + results.push(title); + } + }); + } else { + source(function(tiddler,title) { + if(title.substr(-operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { + results.push(title); + } + }); + } + return results; +}; + +})(); diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid index 5e36ed09a..fc846ad3d 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid @@ -12,4 +12,4 @@ For example: |`[tag[task]!prefix[hidden]]` |Returns tiddlers tagged `task` whose titles do not start with `hidden` | |`[prefix[$:/]]` |Equivalent to `[is[system]]` | -See also [[FilterOperator: removeprefix]]. +See also [[FilterOperator: removeprefix]], [[FilterOperator: removesuffix]] and [[FilterOperator: removesuffix]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid index a02833c4e..0448c92be 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid @@ -11,4 +11,4 @@ For example: |!Filter String |!Description | |`tid-one tid-two three +[removeprefix[tid-]]` |Returns `one`, `two` | -See also [[FilterOperator: prefix]]. +See also [[FilterOperator: prefix]], [[FilterOperator: suffix]] and [[FilterOperator: removesuffix]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid new file mode 100644 index 000000000..6b2fd18ad --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid @@ -0,0 +1,14 @@ +created: 20140828133830424 +modified: 20140828133830424 +tags: filters +title: FilterOperator: removesuffix +type: text/vnd.tiddlywiki + +The ''removesuffix'' filter operator returns the titles in the current list that end with a specified suffix with the suffix removed. + +For example: + +|!Filter String |!Description | +|`tid-one tid-two three +[removeprefix[tid-]]` |Returns `one`, `two` | + +See also [[FilterOperator: suffix]], [[FilterOperator: prefix]] and [[FilterOperator: removeprefix]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid new file mode 100644 index 000000000..b154938d8 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid @@ -0,0 +1,15 @@ +created: 20140828133830424 +modified: 20140828133830424 +tags: filters +title: FilterOperator: suffix +type: text/vnd.tiddlywiki + +The ''suffix'' filter operator returns the titles in the current list that end with a specified suffix. If the ''suffix'' operator is preceded by `!` then it returns the titles that do not end with the specified suffix. + +For example: + +|!Filter String |!Description | +|`[tag[task]!suffix[hidden]]` |Returns tiddlers tagged `task` whose titles do not end with `hidden` | +|`[suffix[.jpg]]` |Returns tiddlers whose titles end with `.jpg` | + +See also [[FilterOperator: removesuffix]], [[FilterOperator: prefix]] and [[FilterOperator: removeprefix]]. From 2e3221c4e0e8f4b2af5e6be4b9d04569e1bceda1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 14:48:03 +0100 Subject: [PATCH 2/8] Fix for removesuffic operator --- core/modules/filters/removesuffix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/filters/removesuffix.js b/core/modules/filters/removesuffix.js index 5f0da8b82..4256fe49f 100644 --- a/core/modules/filters/removesuffix.js +++ b/core/modules/filters/removesuffix.js @@ -19,7 +19,7 @@ exports.removesuffix = function(source,operator,options) { var results = []; source(function(tiddler,title) { if(title.substr(-operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { - results.push(title.substr(operator.operand.length)); + results.push(title.substr(0,title.length - operator.operand.length)); } }); return results; From ad40223d6b9bed435d9381611cb9de1841b53df6 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 15:16:14 +0100 Subject: [PATCH 3/8] Revert incorrect refreshing of tiddler widget Mistakenly, I had changed the tiddler widget to refresh itself when the value of the target tiddler changed. This is not in fact necessary; it only needs to refresh itself when the identity of the target tiddler changes. Fixes #744 --- core/modules/widgets/tiddler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/tiddler.js b/core/modules/widgets/tiddler.js index 1300bd991..0a49a4155 100755 --- a/core/modules/widgets/tiddler.js +++ b/core/modules/widgets/tiddler.js @@ -70,7 +70,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ TiddlerWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.tiddler || changedTiddlers[this.tiddlerTitle]) { + if(changedAttributes.tiddler) { this.refreshSelf(); return true; } else { From 748caecca0dfbec71270c9d22d3200c3f76968e2 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 15:16:54 +0100 Subject: [PATCH 4/8] Fix tiddler info default tab Mistakenly omitted from b437f1b450f5f2a3104a9086f7c674299b53b9bc --- core/ui/TiddlerInfo.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/TiddlerInfo.tid b/core/ui/TiddlerInfo.tid index 894cd7c0c..3e51e4855 100644 --- a/core/ui/TiddlerInfo.tid +++ b/core/ui/TiddlerInfo.tid @@ -1,3 +1,3 @@ title: $:/core/ui/TiddlerInfo -<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]" default="$:/core/ui/TiddlerInfo/References"/> \ No newline at end of file +<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]" default={{$:/config/TiddlerInfo/Default}}/> \ No newline at end of file From 112a9a95d95e9f62f110c97a4faaf537c5c100b1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 15:27:10 +0100 Subject: [PATCH 5/8] Make prefix/suffix operators be case sensitive I think it was a mistake for them to be case insensitive in the first place. https://groups.google.com/d/topic/tiddlywiki/dzpFsRCC5D8/discussion If case insensitivity is required then regexps can be used instead. --- core/modules/filters/prefix.js | 4 ++-- core/modules/filters/removeprefix.js | 2 +- core/modules/filters/removesuffix.js | 2 +- core/modules/filters/suffix.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/modules/filters/prefix.js b/core/modules/filters/prefix.js index 470dbfd1a..49bb8110f 100644 --- a/core/modules/filters/prefix.js +++ b/core/modules/filters/prefix.js @@ -19,13 +19,13 @@ exports.prefix = function(source,operator,options) { var results = []; if(operator.prefix === "!") { source(function(tiddler,title) { - if(title.substr(0,operator.operand.length).toLowerCase() !== operator.operand.toLowerCase()) { + if(title.substr(0,operator.operand.length) !== operator.operand) { results.push(title); } }); } else { source(function(tiddler,title) { - if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { + if(title.substr(0,operator.operand.length) === operator.operand) { results.push(title); } }); diff --git a/core/modules/filters/removeprefix.js b/core/modules/filters/removeprefix.js index b7f5c5cf4..3e93dcd00 100644 --- a/core/modules/filters/removeprefix.js +++ b/core/modules/filters/removeprefix.js @@ -18,7 +18,7 @@ Export our filter function exports.removeprefix = function(source,operator,options) { var results = []; source(function(tiddler,title) { - if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { + if(title.substr(0,operator.operand.length) === operator.operand) { results.push(title.substr(operator.operand.length)); } }); diff --git a/core/modules/filters/removesuffix.js b/core/modules/filters/removesuffix.js index 4256fe49f..0dac6e598 100644 --- a/core/modules/filters/removesuffix.js +++ b/core/modules/filters/removesuffix.js @@ -18,7 +18,7 @@ Export our filter function exports.removesuffix = function(source,operator,options) { var results = []; source(function(tiddler,title) { - if(title.substr(-operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { + if(title.substr(-operator.operand.length) === operator.operand) { results.push(title.substr(0,title.length - operator.operand.length)); } }); diff --git a/core/modules/filters/suffix.js b/core/modules/filters/suffix.js index 45e8900c4..a93733cc8 100644 --- a/core/modules/filters/suffix.js +++ b/core/modules/filters/suffix.js @@ -19,13 +19,13 @@ exports.suffix = function(source,operator,options) { var results = []; if(operator.prefix === "!") { source(function(tiddler,title) { - if(title.substr(-operator.operand.length).toLowerCase() !== operator.operand.toLowerCase()) { + if(title.substr(-operator.operand.length) !== operator.operand) { results.push(title); } }); } else { source(function(tiddler,title) { - if(title.substr(-operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { + if(title.substr(-operator.operand.length) === operator.operand) { results.push(title); } }); From df8758e38f77f3cfa63c52ca542e4a1c360fe734 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 15:40:00 +0100 Subject: [PATCH 6/8] Release note update --- editions/tw5.com/tiddlers/Release 5.0.16beta.tid | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/Release 5.0.16beta.tid b/editions/tw5.com/tiddlers/Release 5.0.16beta.tid index f44ab9168..096eacc93 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.16beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.16beta.tid @@ -7,17 +7,25 @@ type: text/vnd.tiddlywiki //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.15-beta...v5.0.16-beta]]// +!! Incompatible Changes + +These changes have the potential to break existing tiddlers. + +* [[Changed|https://github.com/Jermolene/TiddlyWiki5/commit/112a9a95d95e9f62f110c97a4faaf537c5c100b1]] prefix/removeprefix filter operators to be case-sensitive + !! Usability Improvements * [[Amended|https://github.com/Jermolene/TiddlyWiki5/commit/e47852cb141b384ad2a9097eca795545cb5b2494]] behaviour of the [[tw-browser-refresh|WidgetMessage: tw-browser-refresh]] message so that it no longer clears the location hash !! Hackability Improvements -* +* [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/d2a5a12f2d6b6ccc36dd22a70ac2def08d1d3722]] TableOfContentsMacro to use the caption field if present +* [[Configurability|https://github.com/Jermolene/TiddlyWiki5/commit/b437f1b450f5f2a3104a9086f7c674299b53b9bc]] for the default tab shown in the tiddler info panel (see [[Configuring the default TiddlerInfo tab]]) +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/dcf4e93a3283e3e93cc14e50366f9b0252870835]] [[suffix|FilterOperator: suffix]] and [[removesuffix|FilterOperator: removesuffix]] filter operators !! Bug Fixes -* +* [[Reverted|https://github.com/Jermolene/TiddlyWiki5/commit/ad40223d6b9bed435d9381611cb9de1841b53df6]] incorrect refreshing of the tiddler widget !! Contributors From d8c3691bd1e6b16092c37c9217ddfff16bd13a4a Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 17:17:50 +0100 Subject: [PATCH 7/8] Removed unneeded CSS classes Part of #764 --- boot/boot.js | 11 +++-------- core/language/en-GB/Modals/Download.tid | 2 +- core/language/en-GB/Modals/SaveInstructions.tid | 2 +- core/modules/utils/dom/modal.js | 5 ----- core/wiki/encryptionstatus.tid | 6 +++--- editions/tahoelafs/tiddlers/HelloThere.tid | 4 ++-- editions/tw5.com/tiddlers/Features.tid | 4 ++-- .../tw5.com/tiddlers/mechanisms/AlertMechanism.tid | 2 +- editions/tw5.com/tiddlers/samples/SampleWizard.tid | 4 ++-- editions/tw5.com/tiddlers/samples/SampleWizard2.tid | 4 ++-- languages/de-DE/Modals/Download.tid | 2 +- languages/de-DE/Modals/SaveInstructions.tid | 2 +- languages/fr-FR/Modals/Download.tid | 2 +- languages/fr-FR/Modals/SaveInstructions.tid | 2 +- languages/it-IT/Modals/Download.tid | 2 +- languages/it-IT/Modals/SaveInstructions.tid | 2 +- languages/ja-JP/Modals/Download.tid | 2 +- languages/ja-JP/Modals/SaveInstructions.tid | 2 +- languages/zh-Hans/Modals/Download.tid | 2 +- languages/zh-Hans/Modals/SaveInstructions.tid | 2 +- languages/zh-Hant/Modals/SaveInstructions.tid | 2 +- plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid | 6 +++--- 22 files changed, 31 insertions(+), 41 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index a28aab306..17b5a2707 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -480,18 +480,15 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) { children = [dm("h1",{text: options.serviceName})]; if(!options.noUserName) { children.push(dm("input",{ - attributes: {type: "text", name: "username", placeholder: "Username"}, - "class": "input-small" + attributes: {type: "text", name: "username", placeholder: "Username"} })); } children.push(dm("input",{ - attributes: {type: "password", name: "password", placeholder: "Password"}, - "class": "input-small" + attributes: {type: "password", name: "password", placeholder: "Password"} })); if(options.canCancel) { children.push(dm("button",{ text: "Cancel", - "class": "btn", eventListeners: [{ name: "click", handlerFunction: function(event) { @@ -503,11 +500,9 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) { } children.push(dm("button",{ attributes: {type: "submit"}, - text: submitText, - "class": "btn" + text: submitText })); var form = dm("form",{ - "class": "form-inline", attributes: {autocomplete: "off"}, children: children }); diff --git a/core/language/en-GB/Modals/Download.tid b/core/language/en-GB/Modals/Download.tid index 6f366abe5..46b818dad 100644 --- a/core/language/en-GB/Modals/Download.tid +++ b/core/language/en-GB/Modals/Download.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/Download type: text/vnd.tiddlywiki subtitle: Download changes -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Close +footer: <$button message="tw-close-tiddler">Close help: http://tiddlywiki.com/static/DownloadingChanges.html Your browser only supports manual saving. diff --git a/core/language/en-GB/Modals/SaveInstructions.tid b/core/language/en-GB/Modals/SaveInstructions.tid index 7f95f0bb7..13d031959 100644 --- a/core/language/en-GB/Modals/SaveInstructions.tid +++ b/core/language/en-GB/Modals/SaveInstructions.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/SaveInstructions type: text/vnd.tiddlywiki subtitle: Save your work -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Close +footer: <$button message="tw-close-tiddler">Close help: http://tiddlywiki.com/static/SavingChanges.html Your changes to this wiki need to be saved as a ~TiddlyWiki HTML file. diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index b0efaaa77..b2b3ca2c1 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -55,7 +55,6 @@ Modal.prototype.display = function(title,options) { $tw.utils.addClass(modalWrapper,"modal"); $tw.utils.addClass(modalHeader,"modal-header"); $tw.utils.addClass(modalBody,"modal-body"); - $tw.utils.addClass(modalLink,"btn btn-large btn-block btn-success"); $tw.utils.addClass(modalFooter,"modal-footer"); // Join them together wrapper.appendChild(modalBackdrop); @@ -115,10 +114,6 @@ Modal.prototype.display = function(title,options) { message: { type: "string", value: "tw-close-tiddler" - }, - "class": { - type: "string", - value: "btn btn-primary" } }, children: [{ diff --git a/core/wiki/encryptionstatus.tid b/core/wiki/encryptionstatus.tid index 6e9399c7d..b67d4bc19 100644 --- a/core/wiki/encryptionstatus.tid +++ b/core/wiki/encryptionstatus.tid @@ -3,10 +3,10 @@ title: $:/snippets/encryptionstatus \define lingo-base() $:/language/ControlPanel/Tools/Encryption/ <$reveal type="match" state="$:/isEncrypted" text="yes"> <> -<$button message="tw-clear-password" class="btn btn-danger"><> -<$button message="tw-set-password" class="btn btn-warning"><> +<$button message="tw-clear-password"><> +<$button message="tw-set-password"><> <$reveal type="nomatch" state="$:/isEncrypted" text="yes"> <> -<$button message="tw-set-password" class="btn btn-warning"><> +<$button message="tw-set-password"><> \ No newline at end of file diff --git a/editions/tahoelafs/tiddlers/HelloThere.tid b/editions/tahoelafs/tiddlers/HelloThere.tid index eedf29602..7dfca783b 100644 --- a/editions/tahoelafs/tiddlers/HelloThere.tid +++ b/editions/tahoelafs/tiddlers/HelloThere.tid @@ -2,5 +2,5 @@ title: HelloThere This is an experimental edition of TiddlyWiki5 for use with [[Tahoe-LAFS|https://tahoe-lafs.org/]]. At this point it is largely for experimentation by @zooko. Click the ''save changes'' button to PUT the updated TiddlyWiki HTML file back to the server. -<$button message="tw-new-tiddler" class="btn btn-success">New Tiddler -<$button message="tw-save-wiki" class="btn btn-primary">Save Changes +<$button message="tw-new-tiddler">New Tiddler +<$button message="tw-save-wiki">Save Changes diff --git a/editions/tw5.com/tiddlers/Features.tid b/editions/tw5.com/tiddlers/Features.tid index 476fe118e..142946ee0 100644 --- a/editions/tw5.com/tiddlers/Features.tid +++ b/editions/tw5.com/tiddlers/Features.tid @@ -5,7 +5,7 @@ title: Features type: text/vnd.tiddlywiki \define alert-demo() -<$fieldmangler tiddler="SampleAlert"><$set name="currentTiddler" value="SampleAlert"><$button message="tw-add-tag" param="$:/tags/Alert" class="btn btn-inverse">alerts +<$fieldmangler tiddler="SampleAlert"><$set name="currentTiddler" value="SampleAlert"><$button message="tw-add-tag" param="$:/tags/Alert">alerts \end * The ability to save changes on almost any desktop HTML5 compatible-browser, with custom apps to enable [[Saving on iPad/iPhone]] and [[Android|Saving on Android]], and a cross-platform [[Firefox extension|Saving with TiddlyFox]] that even runs on Android * Support for pluggable themes and colour palettes (see the [[control panel|$:/ControlPanel]]) @@ -15,7 +15,7 @@ type: text/vnd.tiddlywiki * Integrated [[AES encryption|Saving with Encryption]] * TiddlyWiki isn't just a wiki - you can build custom applications with it like this TaskManagementExample * Full internationalization support, with TiddlyWiki itself available in several languages (see the [[control panel|$:/ControlPanel]]) -* Familiar user interface elements like <>, <$button message="tw-modal" param="SampleWizard" class="btn btn-inverse">wizards and <$button message="tw-notify" param="SampleNotification" class="btn btn-inverse">notifications +* Familiar user interface elements like <>, <$button message="tw-modal" param="SampleWizard">wizards and <$button message="tw-notify" param="SampleNotification">notifications * Easily [[import|ImportTiddlers]] content via drag and drop, copy and paste, or browsing for local files * Clone existing tiddlers (for example, <$button message="tw-new-tiddler" param=<>>clone this tiddler) * TiddlyWiki is [[surprisingly scalable|Scalability]] to many thousands of tiddlers and megabytes of content diff --git a/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid index b5138e0c2..ad056f22c 100644 --- a/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid +++ b/editions/tw5.com/tiddlers/mechanisms/AlertMechanism.tid @@ -6,7 +6,7 @@ type: text/vnd.tiddlywiki Alerts are displayed as yellow boxes overlaying the main TiddlyWiki window. Each one corresponds to a tiddler with the tag [[$:/tags/Alert]]. Clicking the delete icon on an alert deletes the corresponding tiddler. -Here's a demo <$fieldmangler tiddler="SampleAlert"><$set name="currentTiddler" value="SampleAlert"><$button message="tw-add-tag" param="$:/tags/Alert" class="btn btn-inverse">alert. +Here's a demo <$fieldmangler tiddler="SampleAlert"><$set name="currentTiddler" value="SampleAlert"><$button message="tw-add-tag" param="$:/tags/Alert">alert. Alert tiddlers should have the following fields: diff --git a/editions/tw5.com/tiddlers/samples/SampleWizard.tid b/editions/tw5.com/tiddlers/samples/SampleWizard.tid index 2ef450994..59e01c647 100644 --- a/editions/tw5.com/tiddlers/samples/SampleWizard.tid +++ b/editions/tw5.com/tiddlers/samples/SampleWizard.tid @@ -1,10 +1,10 @@ title: SampleWizard tags: demo subtitle: I'm a modal wizard -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Close +footer: <$button message="tw-close-tiddler">Close This is a modal wizard dialogue, stored in the tiddler SampleWizard. {{Motovun Jack.jpg}} -You can <$button message="tw-modal" param="SampleWizard2" class="btn btn-inverse">nest wizards. +You can <$button message="tw-modal" param="SampleWizard2">nest wizards. diff --git a/editions/tw5.com/tiddlers/samples/SampleWizard2.tid b/editions/tw5.com/tiddlers/samples/SampleWizard2.tid index bbc985d42..c486fbaa2 100644 --- a/editions/tw5.com/tiddlers/samples/SampleWizard2.tid +++ b/editions/tw5.com/tiddlers/samples/SampleWizard2.tid @@ -1,8 +1,8 @@ title: SampleWizard2 tags: demo subtitle: I'm another modal wizard -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Close +footer: <$button message="tw-close-tiddler">Close This is another modal wizard dialogue, stored in the tiddler SampleWizard2. -You can <$button message="tw-modal" param="SampleWizard" class="btn btn-inverse">nest wizards. +You can <$button message="tw-modal" param="SampleWizard">nest wizards. diff --git a/languages/de-DE/Modals/Download.tid b/languages/de-DE/Modals/Download.tid index 4ac992cd5..f4fb25c7b 100644 --- a/languages/de-DE/Modals/Download.tid +++ b/languages/de-DE/Modals/Download.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/Download type: text/vnd.tiddlywiki subtitle: Änderungen Speichern -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Schließen +footer: <$button message="tw-close-tiddler">Schließen help: http://tiddlywiki.com/static/DownloadingChanges.html Ihr Browser unterstützt nur manuelles Speichern. diff --git a/languages/de-DE/Modals/SaveInstructions.tid b/languages/de-DE/Modals/SaveInstructions.tid index ffb7436f3..c3b87aa7b 100644 --- a/languages/de-DE/Modals/SaveInstructions.tid +++ b/languages/de-DE/Modals/SaveInstructions.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/SaveInstructions type: text/vnd.tiddlywiki subtitle: Aktuellen Stand speichern -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Schließen +footer: <$button message="tw-close-tiddler">Schließen help: http://tiddlywiki.com/static/SavingChanges.html Ihre Änderungen sollen als ~TiddlyWiki HTML Datei gespeichert werden. diff --git a/languages/fr-FR/Modals/Download.tid b/languages/fr-FR/Modals/Download.tid index 411208abe..14bf27cc1 100644 --- a/languages/fr-FR/Modals/Download.tid +++ b/languages/fr-FR/Modals/Download.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/Download type: text/vnd.tiddlywiki subtitle: Télécharger vos modifications -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Fermer +footer: <$button message="tw-close-tiddler">Fermer help: http://tiddlywiki.com/static/DownloadingChanges.html Votre navigateur ne supporte que l'enregistrement manuel. diff --git a/languages/fr-FR/Modals/SaveInstructions.tid b/languages/fr-FR/Modals/SaveInstructions.tid index 81d0820b2..496585606 100644 --- a/languages/fr-FR/Modals/SaveInstructions.tid +++ b/languages/fr-FR/Modals/SaveInstructions.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/SaveInstructions type: text/vnd.tiddlywiki subtitle: Enregistrez votre travail -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Fermer +footer: <$button message="tw-close-tiddler">Fermer help: http://tiddlywiki.com/static/SavingChanges.html Les modifications effectuées dans ce wiki doivent être sauvegardées sous forme de fichier ~TiddlyWiki HTML. diff --git a/languages/it-IT/Modals/Download.tid b/languages/it-IT/Modals/Download.tid index b8e6617a2..489262066 100644 --- a/languages/it-IT/Modals/Download.tid +++ b/languages/it-IT/Modals/Download.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/Download type: text/vnd.tiddlywiki subtitle: Download changes -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Chiudi +footer: <$button message="tw-close-tiddler">Chiudi help: http://tiddlywiki.com/static/DownloadingChanges.html Il tuo browser supporta solo il salvataggio manuale. diff --git a/languages/it-IT/Modals/SaveInstructions.tid b/languages/it-IT/Modals/SaveInstructions.tid index feea2ee64..c0aae5f7b 100644 --- a/languages/it-IT/Modals/SaveInstructions.tid +++ b/languages/it-IT/Modals/SaveInstructions.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/SaveInstructions type: text/vnd.tiddlywiki subtitle: Save your work -footer: <$button message="tw-close-tiddler" class="btn btn-primary">Chiudi +footer: <$button message="tw-close-tiddler">Chiudi help: http://tiddlywiki.com/static/SavingChanges.html Le modifiche a questo wiki devono essere salvate come un file ~TiddlyWiki HTML. diff --git a/languages/ja-JP/Modals/Download.tid b/languages/ja-JP/Modals/Download.tid index 2c2443cc4..9d3f47799 100644 --- a/languages/ja-JP/Modals/Download.tid +++ b/languages/ja-JP/Modals/Download.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/Download type: text/vnd.tiddlywiki subtitle: 変更のダウンロード -footer: <$button message="tw-close-tiddler" class="btn btn-primary">閉じる +footer: <$button message="tw-close-tiddler">閉じる help: http://tiddlywiki.com/static/DownloadingChanges.html このブラウザは手動での保存しかできません。 diff --git a/languages/ja-JP/Modals/SaveInstructions.tid b/languages/ja-JP/Modals/SaveInstructions.tid index 5cfa9ba2d..60b54ce2a 100644 --- a/languages/ja-JP/Modals/SaveInstructions.tid +++ b/languages/ja-JP/Modals/SaveInstructions.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/SaveInstructions type: text/vnd.tiddlywiki subtitle: 作業内容を保存する -footer: <$button message="tw-close-tiddler" class="btn btn-primary">閉じる +footer: <$button message="tw-close-tiddler">閉じる help: http://tiddlywiki.com/static/SavingChanges.html この wiki への変更内容を ~TiddlyWiki HTML ファイルとして保存する必要があります。 diff --git a/languages/zh-Hans/Modals/Download.tid b/languages/zh-Hans/Modals/Download.tid index 3e6aa2989..84fdb31bf 100644 --- a/languages/zh-Hans/Modals/Download.tid +++ b/languages/zh-Hans/Modals/Download.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/Download type: text/vnd.tiddlywiki subtitle: Download changes -footer: <$button message="tw-close-tiddler" class="btn btn-primary">关闭 +footer: <$button message="tw-close-tiddler">关闭 help: http://tiddlywiki.com/ 您的浏览器只支援手动保存。 diff --git a/languages/zh-Hans/Modals/SaveInstructions.tid b/languages/zh-Hans/Modals/SaveInstructions.tid index c2bd2cb3e..ffd390428 100644 --- a/languages/zh-Hans/Modals/SaveInstructions.tid +++ b/languages/zh-Hans/Modals/SaveInstructions.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/SaveInstructions type: text/vnd.tiddlywiki subtitle: Save your work -footer: <$button message="tw-close-tiddler" class="btn btn-primary">关闭 +footer: <$button message="tw-close-tiddler">关闭 help: http://tiddlywiki.com/static/SavingChanges.html 您对此 wiki 的变更需被保存为 ~TiddlyWiki HTML 文件。 diff --git a/languages/zh-Hant/Modals/SaveInstructions.tid b/languages/zh-Hant/Modals/SaveInstructions.tid index 3b0e72048..1aa875cad 100644 --- a/languages/zh-Hant/Modals/SaveInstructions.tid +++ b/languages/zh-Hant/Modals/SaveInstructions.tid @@ -1,7 +1,7 @@ title: $:/language/Modals/SaveInstructions type: text/vnd.tiddlywiki subtitle: Save your work -footer: <$button message="tw-close-tiddler" class="btn btn-primary">關閉 +footer: <$button message="tw-close-tiddler">關閉 help: http://tiddlywiki.com/static/SavingChanges.html 您對此 wiki 的變更需被儲存為 ~TiddlyWiki HTML 檔案。 diff --git a/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid b/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid index 1a8da7155..8e085a823 100644 --- a/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid +++ b/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid @@ -3,10 +3,10 @@ caption: Server tags: $:/tags/ControlPanel <$reveal state="$:/status/IsLoggedIn" type="nomatch" text="yes"> -Log in to ~TiddlyWeb: <$button message="tw-login" class="btn btn-info">Login +Log in to ~TiddlyWeb: <$button message="tw-login">Login <$reveal state="$:/status/IsLoggedIn" type="match" text="yes"> -Logged in as {{$:/status/UserName}} <$button message="tw-logout" class="btn btn-warning">Logout +Logged in as {{$:/status/UserName}} <$button message="tw-logout">Logout ---- @@ -17,4 +17,4 @@ Host configuration: <$edit-text tiddler="$:/config/tiddlyweb/host" tag="input" d ---- -<$button message="tw-server-refresh" class="btn btn-warning">Refresh to fetch changes from the server immediately +<$button message="tw-server-refresh">Refresh to fetch changes from the server immediately From 63d7fd8457e8937a97bcc1a7b173b82f67eda521 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 17:21:40 +0100 Subject: [PATCH 8/8] Rename "titlebar" class to "tc-titlebar" Part of #764 --- core/ui/EditTemplate/controls.tid | 2 +- core/ui/EditTemplate/title.tid | 2 +- core/ui/ViewTemplate/title.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/ui/EditTemplate/controls.tid b/core/ui/EditTemplate/controls.tid index f2cfd6692..98247ff17 100644 --- a/core/ui/EditTemplate/controls.tid +++ b/core/ui/EditTemplate/controls.tid @@ -6,6 +6,6 @@ $:/config/EditToolbarButtons/Visibility/$(listItem)$ \end
<$view field="title"/> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<> text="hide"><$transclude tiddler=<>/> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<> text="hide"><$transclude tiddler=<>/>
diff --git a/core/ui/EditTemplate/title.tid b/core/ui/EditTemplate/title.tid index 6953ae072..271de8cfd 100644 --- a/core/ui/EditTemplate/title.tid +++ b/core/ui/EditTemplate/title.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditTemplate/title tags: $:/tags/EditTemplate -<$edit-text field="draft.title" class="titlebar tw-edit-texteditor"/> +<$edit-text field="draft.title" class="tc-titlebar tw-edit-texteditor"/> diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 492eb248c..25e746b41 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -8,7 +8,7 @@ fill:$(foregroundColor)$; $:/config/ViewToolbarButtons/Visibility/$(listItem)$ \end
-

+

<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<> text="hide"><$transclude tiddler=<>/> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 9a0701138..c3c27f9e6 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -594,7 +594,7 @@ button.tw-tag-label, span.tw-tag-label { } .tw-site-title, -.titlebar { +.tc-titlebar { font-weight: 300; font-size: 2.35em; line-height: 1.2em; @@ -606,7 +606,7 @@ button.tw-tag-label, span.tw-tag-label { color: <>; } -.titlebar img { +.tc-titlebar img { height: 1em; }