mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-28 13:51:25 +00:00
Compare commits
8 Commits
v5.0.0-alp
...
v5.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba7bd21cd7 | ||
|
|
16230549b7 | ||
|
|
03c6263e58 | ||
|
|
e54148033b | ||
|
|
f75cddfe53 | ||
|
|
ee63db8811 | ||
|
|
620eebd754 | ||
|
|
ec481415f9 |
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
title: TiddlyWiki5 Personal Client Server Edition
|
||||
modified: 201304152100
|
||||
|
||||
Experimental clientserver edition of TiddlyWiki5.
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
8
editions/tw5.com/tiddlers/Release 5.0.0alpha12.tid
Normal file
8
editions/tw5.com/tiddlers/Release 5.0.0alpha12.tid
Normal 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.
|
||||
@@ -2,6 +2,7 @@ title: $:/DefaultTiddlers
|
||||
|
||||
HelloThere
|
||||
Features
|
||||
[[Release 5.0.0-alpha.12]]
|
||||
[[Release 5.0.0-alpha.11]]
|
||||
Community
|
||||
[[TiddlyWiki5 Editions]]
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user