1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-28 13:51:25 +00:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Jermolene
ba7bd21cd7 Version update 2013-11-08 21:41:04 +00:00
Jermolene
16230549b7 Add release note for alpha12 2013-11-08 21:40:20 +00:00
Jermolene
03c6263e58 Tag the releasenote 2013-11-08 21:34:57 +00:00
Jermolene
e54148033b Fix client server edition syncing 2013-11-08 21:34:47 +00:00
Jermolene
f75cddfe53 Stop having a separate defaultTiddlers for the client server edition 2013-11-08 21:34:27 +00:00
Jermolene
ee63db8811 Docs update 2013-11-08 21:03:38 +00:00
Jeremy Ruston
620eebd754 Docs update 2013-11-08 20:46:39 +00:00
Jeremy Ruston
ec481415f9 Fixes for TiddlyWeb 2013-11-08 20:18:26 +00:00
10 changed files with 26 additions and 32 deletions

View File

@@ -180,6 +180,7 @@ var Command = function(params,commander,callback) {
}
});
tiddlerFields["revision"] = state.wiki.getChangeCount(title);
tiddlerFields.type = tiddlerFields.type || "text/vnd.tiddlywiki";
tiddlers.push(tiddlerFields);
});
var text = JSON.stringify(tiddlers);
@@ -207,6 +208,7 @@ var Command = function(params,commander,callback) {
}
});
tiddlerFields["revision"] = state.wiki.getChangeCount(title);
tiddlerFields.type = tiddlerFields.type || "text/vnd.tiddlywiki";
response.writeHead(200, {"Content-Type": "application/json"});
response.end(JSON.stringify(tiddlerFields),"utf8");
} else {

View File

@@ -181,7 +181,7 @@ Syncer.prototype.syncFromServer = function() {
for(var t=0; t<tiddlers.length; t++) {
// Get the incoming tiddler fields, and the existing tiddler
var tiddlerFields = tiddlers[t],
incomingRevision = tiddlerFields.revision,
incomingRevision = tiddlerFields.revision + "",
tiddler = self.wiki.getTiddler(tiddlerFields.title),
tiddlerInfo = self.tiddlerInfo[tiddlerFields.title],
currRevision = tiddlerInfo ? tiddlerInfo.revision : null;

View File

@@ -690,6 +690,9 @@ 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);
} else {
var tiddler,text;

View File

@@ -1,4 +0,0 @@
title: TiddlyWiki5 Personal Client Server Edition
modified: 201304152100
Experimental clientserver edition of TiddlyWiki5.

View File

@@ -1,14 +0,0 @@
created: 201308231804000
creator: JeremyRuston
modified: 201311081422000
modifier: JeremyRuston
title: $:/DefaultTiddlers
[[TiddlyWiki5 Personal Client Server Edition]]
HelloThere
Features
[[Release 5.0.0-alpha.11]]
Community
[[TiddlyWiki5 Editions]]
RoadMap
Docs

View File

@@ -3,6 +3,7 @@ creator: JeremyRuston
modified: 201311081754007
modifier: JeremyRuston
title: Release 5.0.0-alpha.11
tags: releasenote
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:
@@ -24,5 +25,4 @@ This release is the culmination of a large scale refactoring of the widget mecha
** EditTextWidget and EditBitmapWidget
** SetVariableWidget
* Widget attribute names have been made more consistent. In particular, `tiddler` is used to reference a tiddler by title, not `title`
* It is no longer possible to import the macro definitions within another tiddler by transcluding that tiddler

View File

@@ -0,0 +1,8 @@
created: 201311081754007
creator: JeremyRuston
modified: 201311081754007
modifier: JeremyRuston
title: Release 5.0.0-alpha.12
tags: releasenote
This minor release just contains fixes for the syncer and related adaptor modules for the TiddlyWeb edition and for TiddlyWiki5's integrated server.

View File

@@ -2,6 +2,7 @@ title: $:/DefaultTiddlers
HelloThere
Features
[[Release 5.0.0-alpha.12]]
[[Release 5.0.0-alpha.11]]
Community
[[TiddlyWiki5 Editions]]

View File

@@ -1,7 +1,7 @@
{
"name": "tiddlywiki",
"preferGlobal": "true",
"version": "5.0.0-alpha.11",
"version": "5.0.0-alpha.12",
"author": "Jeremy Ruston <jeremy@jermolene.com>",
"description": "a non-linear personal web notebook",
"contributors": [

View File

@@ -130,6 +130,7 @@ TiddlyWebAdaptor.prototype.getCsrfToken = function() {
Get an array of skinny tiddler fields from the server
*/
TiddlyWebAdaptor.prototype.getSkinnyTiddlers = function(callback) {
var self = this;
$tw.utils.httpRequest({
url: this.host + "recipes/" + this.recipe + "/tiddlers.json",
callback: function(err,data) {
@@ -140,10 +141,7 @@ TiddlyWebAdaptor.prototype.getSkinnyTiddlers = function(callback) {
// Process the tiddlers to make sure the revision is a string
var tiddlers = JSON.parse(data);
for(var t=0; t<tiddlers.length; t++) {
var tiddlerFields = tiddlers[t];
if(typeof tiddlerFields.revision === "number") {
tiddlerFields.revision = tiddlerFields.revision.toString();
}
var tiddlerFields = self.convertTiddlerFromTiddlyWebFormat(tiddlers[t]);
}
// Invoke the callback with the skinny tiddlers
callback(null,tiddlers);
@@ -189,7 +187,7 @@ TiddlyWebAdaptor.prototype.loadTiddler = function(title,callback) {
return callback(err);
}
// Invoke the callback
callback(null,self.convertTiddlerFromTiddlyWebFormat(data));
callback(null,self.convertTiddlerFromTiddlyWebFormat(JSON.parse(data)));
}
});
};
@@ -237,19 +235,19 @@ TiddlyWebAdaptor.prototype.convertTiddlerToTiddlyWebFormat = function(tiddler) {
}
});
}
// Convert the type "text/x-tiddlywiki" into null
// Default the content type and convert the type "text/x-tiddlywiki" into null
if(result.type === "text/x-tiddlywiki") {
result.type = null;
}
};
result.type = result.type || "text/vnd.tiddlywiki";
return JSON.stringify(result,null,$tw.config.preferences.jsonSpaces);
};
/*
Convert a field set in TiddlyWeb format into ordinary TiddlyWiki5 format
*/
TiddlyWebAdaptor.prototype.convertTiddlerFromTiddlyWebFormat = function(data) {
var tiddlerFields = JSON.parse(data),
self = this,
TiddlyWebAdaptor.prototype.convertTiddlerFromTiddlyWebFormat = function(tiddlerFields) {
var self = this,
result = {};
// Transfer the fields, pulling down the `fields` hashmap
$tw.utils.each(tiddlerFields,function(element,title,object) {