diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids
index 0d41e89a3..e7dfd68c3 100644
--- a/core/language/en-GB/Misc.multids
+++ b/core/language/en-GB/Misc.multids
@@ -3,6 +3,7 @@ title: $:/language/
ClassicWarning/Hint: This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details.
ClassicWarning/Upgrade/Caption: upgrade
CloseAll/Button: close all
+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=<>/>"?
InvalidFieldName: Illegal characters in field name "<$text text=<>/>". Fields can only contain lowercase letters and the characters underscore (`_`), hyphen (`-`) and period (`.`)
diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js
index b98a9d224..7848c4e94 100644
--- a/core/modules/utils/utils.js
+++ b/core/modules/utils/utils.js
@@ -379,7 +379,7 @@ Returns an object with the following fields, all optional:
*/
exports.parseTextReference = function(textRef) {
// Separate out the title, field name and/or JSON indices
- var reTextRef = /^\s*([^!#]+)?(?:(?:!!([^\s]+))|(?:##([^\s]+)))?\s*/mg,
+ var reTextRef = /^\s*([^!#]+)?(?:(?:!!([^\s]+))|(?:##(.+)))?\s*/mg,
match = reTextRef.exec(textRef);
if(match && reTextRef.lastIndex === textRef.length) {
// Return the parts
diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js
index 21fc35c73..c58caa2e3 100755
--- a/core/modules/widgets/navigator.js
+++ b/core/modules/widgets/navigator.js
@@ -333,11 +333,23 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
originalTitle = draftTiddler.fields["draft.of"],
storyList = this.getStoryList();
if(draftTiddler && originalTitle) {
+ // Ask for confirmation if the tiddler text has changed
+ var isConfirmed = true;
+ if(this.wiki.getTiddlerText(draftTitle) !== this.wiki.getTiddlerText(originalTitle)) {
+ isConfirmed = confirm($tw.language.getString(
+ "ConfirmCancelTiddler",
+ {variables:
+ {title: draftTitle}
+ }
+ ));
+ }
// Remove the draft tiddler
- this.wiki.deleteTiddler(draftTitle);
- this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
- this.addToHistory(originalTitle,event.navigateFromClientRect);
- this.saveStoryList(storyList);
+ if(isConfirmed) {
+ this.wiki.deleteTiddler(draftTitle);
+ this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
+ this.addToHistory(originalTitle,event.navigateFromClientRect);
+ this.saveStoryList(storyList);
+ }
}
return false;
};
diff --git a/editions/tw5.com/tiddlers/Release 5.0.9beta.tid b/editions/tw5.com/tiddlers/Release 5.0.9beta.tid
index 50aa2494d..fa179d767 100644
--- a/editions/tw5.com/tiddlers/Release 5.0.9beta.tid
+++ b/editions/tw5.com/tiddlers/Release 5.0.9beta.tid
@@ -12,7 +12,6 @@ type: text/vnd.tiddlywiki
* New ''Filter'' tab in [[$:/AdvancedSearch]]
* Initial implementation of CecilyView
* Overhaul of inconsistencies in TiddlerFilters (see [[Changes to filters in 5.0.9-beta]])
-*
!! Documentation Improvements
@@ -32,10 +31,7 @@ type: text/vnd.tiddlywiki
* [[Enhance|https://github.com/Jermolene/TiddlyWiki5/commit/f48701544eda4f79af86b1ad44340e7182bcf024]] viewing of system tiddlers by fading down the `$:/` prefix
* [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/dd3ee2a603cba35770a8f109e070f271d72861f8]] [[$:/TagManager]] to allow icons to be assigned to tags
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/87c4839fed789b80e0942014c05175e36aacc157]] support for `list-before` and `list-after` fields for controlling tag ordering (see TiddlerTags for details)
-
-!! Scalability Improvements
-
-*
+* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/3afa26b9a318d913ba162d93a63036cb4a94be59]] request for confirmation before abandoning edits to a tiddler
!! Hackability Improvements
diff --git a/editions/tw5.com/tiddlers/widgets/ListWidget.tid b/editions/tw5.com/tiddlers/widgets/ListWidget.tid
index 1e2ec848d..08b69e2c5 100644
--- a/editions/tw5.com/tiddlers/widgets/ListWidget.tid
+++ b/editions/tw5.com/tiddlers/widgets/ListWidget.tid
@@ -33,7 +33,7 @@ The `<$list>` widget can optionally render draft tiddlers through a different te
!! `storyview` attribute
-The `storyview` attribute gives the specifies the name of an optional module that can animate changes to the list (including navigation). The core ships with the following storyview modules:
+The `storyview` attribute specifies the name of an optional module that can animate changes to the list (including navigation). The core ships with the following storyview modules:
* `classic`: renders the list as an ordered sequence of tiddlers
* `zoomin`: just renders the current tiddler from the list, with a zoom animation for navigating between tiddlers
diff --git a/languages/zh-Hans/Misc.multids b/languages/zh-Hans/Misc.multids
index 40f0483ae..33726e749 100644
--- a/languages/zh-Hans/Misc.multids
+++ b/languages/zh-Hans/Misc.multids
@@ -3,8 +3,9 @@ title: $:/language/
ClassicWarning/Hint: 此条目以经典版 TiddlyWiki 标记格式撰写,不完全相容新版 TiddlyWiki 的格式,详细信息请参阅:http://tiddlywiki.com/static/Upgrading。
ClassicWarning/Upgrade/Caption: 升级
CloseAll/Button: 全部关闭
-ConfirmDeleteTiddler: 您确定要删除条目 "<$text text=<>/>" ?
-ConfirmOverwriteTiddler: 您确定要覆写条目 "<$text text=<>/>" ?
+ConfirmCancelTiddler: 您确定要放弃对条目 "<$text text=<>/>" 的更改?
+ConfirmDeleteTiddler: 您确定要删除条目 "<$text text=<>/>"?
+ConfirmOverwriteTiddler: 您确定要覆写条目 "<$text text=<>/>"?
InvalidFieldName: 栏位名称 "<$text text=<>/>" 包含无效字符,栏位名称只能包含小写字母和底线 (`_`)、 连字号 (`-`) 和小数点 (`.`)
MissingTiddler/Hint: 佚失条目 "<$text text=<>/>" - 点击 {{$:/core/images/edit-button}} 可创建此条目
RecentChanges/DateFormat: YYYY年0MM月0DD日
diff --git a/languages/zh-Hant/Misc.multids b/languages/zh-Hant/Misc.multids
index 1789bfe85..c553c6a69 100644
--- a/languages/zh-Hant/Misc.multids
+++ b/languages/zh-Hant/Misc.multids
@@ -3,8 +3,9 @@ title: $:/language/
ClassicWarning/Hint: 此條目以經典版 TiddlyWiki 標記格式撰寫,不完全相容新版 TiddlyWiki 的格式,詳細資訊請參閱:http://tiddlywiki.com/static/Upgrading。
ClassicWarning/Upgrade/Caption: 升級
CloseAll/Button: 全部關閉
-ConfirmDeleteTiddler: 您確定要刪除條目 "<$text text=<>/>" ?
-ConfirmOverwriteTiddler: 您確定要覆寫條目 "<$text text=<>/>" ?
+ConfirmCancelTiddler: 您確定要放棄對條目 "<$text text=<>/>" 的更改?
+ConfirmDeleteTiddler: 您確定要刪除條目 "<$text text=<>/>"?
+ConfirmOverwriteTiddler: 您確定要覆寫條目 "<$text text=<>/>"?
InvalidFieldName: 欄位名稱 "<$text text=<>/>" 包含無效字元,欄位名稱只能包含小寫字母和底線 (`_`)、 連接號 (`-`) 和小數點 (`.`)
MissingTiddler/Hint: 佚失條目 "<$text text=<>/>" - 點擊 {{$:/core/images/edit-button}} 可建立此條目
RecentChanges/DateFormat: YYYY年0MM月0DD日
diff --git a/plugins/tiddlywiki/cecily/cecily.js b/plugins/tiddlywiki/cecily/cecily.js
index 84c331182..e24977325 100644
--- a/plugins/tiddlywiki/cecily/cecily.js
+++ b/plugins/tiddlywiki/cecily/cecily.js
@@ -84,7 +84,8 @@ Load the current map
CecilyStoryView.prototype.loadMap = function() {
this.map = this.listWidget.wiki.getTiddlerData(this.getMapTiddlerTitle(),{
positions: {},
- newTiddlerPosition: {x: 0, y: 0}
+ newTiddlerPosition: {x: 0, y: 0},
+ width: 660
});
};
@@ -99,6 +100,7 @@ CecilyStoryView.prototype.positionTiddler = function(title,domNode) {
var pos = this.lookupTiddlerInMap(title,domNode),
scale = pos.w/domNode.offsetWidth;
$tw.utils.setStyle(domNode,[
+ {width: this.map.width + "px"},
{transformOrigin: "0% 0%"},
{transform: "translateX(" + pos.x + "px) translateY(" + pos.y + "px) scale(" + scale + ")"}
]);
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index e7a77a295..446a56caa 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -1,6 +1,9 @@
title: $:/themes/tiddlywiki/vanilla/base
tags: [[$:/tags/stylesheet]]
+\define if-no-sidebar(text)
+<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$$reveal>
+\end
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline
/*
** Start with the normalize CSS reset, and then belay some of its effects
@@ -463,6 +466,17 @@ a.tw-tiddlylink-external:hover {
width: {{$:/themes/tiddlywiki/vanilla/metrics##storywidth}};
padding: 42px 42px 42px 42px;
}
+
+
+
+<>
+
}
@media print {
@@ -526,6 +540,14 @@ a.tw-tiddlylink-external:hover {
width: {{$:/themes/tiddlywiki/vanilla/metrics##tiddlerwidth}};
}
+<>
+
.tw-tiddler-info {
margin: 0 -42px 0 -42px;
}