http://trac.tiddlywiki.org/changeset/12274
MartinBudden
2010-07-19 06:39:54 -0700 (Mon, 19 Jul 2010)
44
Ticket #1208
Bug with option chkToggleLinks
---------------
U Trunk/core/js/Story.js
---------------
Modified: Trunk/core/js/Story.js
===================================================================
--- Trunk/core/js/Story.js 2010-07-19 12:54:09 UTC (rev 12273)
+++ Trunk/core/js/Story.js 2010-07-19 13:39:54 UTC (rev 12274)
@@ -64,7 +64,7 @@
//# Display a given tiddler with a given template. If the tiddler is already
displayed but with a different
//# template, it is switched to the specified template. If the tiddler does
not exist, and if server hosting
-//# custom fields were provided, then an attempt is made to retrieve the
tiddler from the server
+//# custom fields were provided, then an attempt is made to retrieve the
tiddler from the server
//# srcElement - reference to element from which this one is being opened -or-
//# special positions "top", "bottom"
//# tiddler - tiddler or title of tiddler to display
@@ -81,10 +81,12 @@
var title = (tiddler instanceof Tiddler) ? tiddler.title : tiddler;
var tiddlerElem = this.getTiddler(title);
if(tiddlerElem) {
- if(toggle)
- this.closeTiddler(title,true);
- else
+ if(toggle) {
+ if(tiddlerElem.getAttribute("dirty") != "true")
+ this.closeTiddler(title,true);
+ } else {
this.refreshTiddler(title,template,false,customFields);
+ }
} else {
var place = this.getContainer();
var before = this.positionTiddler(srcElement);
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.