Merge branch 'master' into publishing-framework

This commit is contained in:
jeremy@jermolene.com
2021-06-01 13:17:47 +01:00
257 changed files with 1783 additions and 480 deletions
@@ -75,7 +75,14 @@ FileSystemAdaptor.prototype.getTiddlerFileInfo = function(tiddler,callback) {
/*
Save a tiddler and invoke the callback with (err,adaptorInfo,revision)
*/
FileSystemAdaptor.prototype.saveTiddler = function(tiddler,callback,options) {
FileSystemAdaptor.prototype.saveTiddler = function(tiddler,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
var self = this;
var syncerInfo = options.tiddlerInfo || {};
this.getTiddlerFileInfo(tiddler,function(err,fileInfo) {
@@ -117,14 +124,28 @@ Load a tiddler and invoke the callback with (err,tiddlerFields)
We don't need to implement loading for the file system adaptor, because all the tiddler files will have been loaded during the boot process.
*/
FileSystemAdaptor.prototype.loadTiddler = function(title,callback) {
FileSystemAdaptor.prototype.loadTiddler = function(title,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
callback(null,null);
};
/*
Delete a tiddler and invoke the callback with (err)
*/
FileSystemAdaptor.prototype.deleteTiddler = function(title,callback,options) {
FileSystemAdaptor.prototype.deleteTiddler = function(title,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
var self = this,
fileInfo = this.boot.files[title];
// Only delete the tiddler if we have writable information for the file
@@ -13,7 +13,6 @@ description: Generate QR code for this tiddler
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text=" "/>
<$text text={{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton!!short-caption}}/>
</span>
</$list>
+24 -3
View File
@@ -99,7 +99,14 @@ SaveTrailSyncAdaptor.prototype.getTiddlerInfo = function(tiddler) {
/*
Save a tiddler and invoke the callback with (err,adaptorInfo,revision)
*/
SaveTrailSyncAdaptor.prototype.saveTiddler = function(tiddler,callback) {
SaveTrailSyncAdaptor.prototype.saveTiddler = function(tiddler,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
if($tw.wiki.checkTiddlerText(ENABLE_TIDDLER_TITLE,"yes")) {
var isDraft = $tw.utils.hop(tiddler.fields,"draft.of");
if(!isDraft || $tw.wiki.checkTiddlerText(ENABLE_DRAFTS_TIDDLER_TITLE,"yes")) {
@@ -112,14 +119,28 @@ SaveTrailSyncAdaptor.prototype.saveTiddler = function(tiddler,callback) {
/*
Load a tiddler and invoke the callback with (err,tiddlerFields)
*/
SaveTrailSyncAdaptor.prototype.loadTiddler = function(title,callback) {
SaveTrailSyncAdaptor.prototype.loadTiddler = function(title,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
callback(null,null);
};
/*
Delete a tiddler and invoke the callback with (err)
*/
SaveTrailSyncAdaptor.prototype.deleteTiddler = function(title,callback,options) {
SaveTrailSyncAdaptor.prototype.deleteTiddler = function(title,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
callback(null,null);
};
@@ -17,7 +17,7 @@ Slice this text tiddler into chunks
{{$:/plugins/tiddlywiki/text-slicer/images/text-slicer-icon}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"> Slice tiddler</span>
<span class="tc-btn-text">Slice tiddler</span>
</$list>
</$button>
</$list>
@@ -4,6 +4,6 @@ tags: $:/tags/SyncerDropdown
<$reveal state="$:/status/IsLoggedIn" type="match" text="yes">
<$button tooltip="Get latest changes from the server" aria-label="Refresh from server" class="tc-btn-invisible">
<$action-sendmessage $message="tm-server-refresh"/>
{{$:/core/images/refresh-button}} <span class="tc-btn-text"><$text text="Get latest changes from the server"/></span>
{{$:/core/images/refresh-button}}<span class="tc-btn-text"><$text text="Get latest changes from the server"/></span>
</$button>
</$reveal>
@@ -182,7 +182,14 @@ TiddlyWebAdaptor.prototype.getSkinnyTiddlers = function(callback) {
/*
Save a tiddler and invoke the callback with (err,adaptorInfo,revision)
*/
TiddlyWebAdaptor.prototype.saveTiddler = function(tiddler,callback,options) {
TiddlyWebAdaptor.prototype.saveTiddler = function(tiddler,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
var self = this;
if(this.isReadOnly) {
return callback(null,options.tiddlerInfo.adaptorInfo);
@@ -216,7 +223,14 @@ TiddlyWebAdaptor.prototype.saveTiddler = function(tiddler,callback,options) {
/*
Load a tiddler and invoke the callback with (err,tiddlerFields)
*/
TiddlyWebAdaptor.prototype.loadTiddler = function(title,callback) {
TiddlyWebAdaptor.prototype.loadTiddler = function(title,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
var self = this;
$tw.utils.httpRequest({
url: this.host + "recipes/" + encodeURIComponent(this.recipe) + "/tiddlers/" + encodeURIComponent(title),
@@ -235,7 +249,14 @@ Delete a tiddler and invoke the callback with (err)
options include:
tiddlerInfo: the syncer's tiddlerInfo for this tiddler
*/
TiddlyWebAdaptor.prototype.deleteTiddler = function(title,callback,options) {
TiddlyWebAdaptor.prototype.deleteTiddler = function(title,options,callback) {
// Check for pre v5.2.0 method signature:
if(typeof callback !== "function" && typeof options === "function"){
var optionsArg = callback;
callback = options;
options = optionsArg;
}
options = options || {};
var self = this;
if(this.isReadOnly) {
return callback(null,options.tiddlerInfo.adaptorInfo);