1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-19 16:24:51 +00:00

Flickr macros: fix pagination after first page

Make sure that the widget we create to run the actions also has access to the event handlers attached to the rootwidget.
This commit is contained in:
jeremy@jermolene.com 2023-04-26 17:51:18 +01:00
parent 7f2d7ab54c
commit 1cb5716d69
2 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ HttpClient.prototype.handleHttpRequest = function(event) {
wiki.addTiddler(new $tw.Tiddler(wiki.getTiddler(requestTrackerTitle),{
status: success,
}));
wiki.invokeActionString(completionActions,undefined,$tw.utils.extend({},contextVariables,results));
wiki.invokeActionString(completionActions,undefined,$tw.utils.extend({},contextVariables,results),{parentWidget: $tw.rootWidget});
// console.log("Back!",err,data,xhr);
},
progress: function(lengthComputable,loaded,total) {
@ -119,7 +119,7 @@ HttpClient.prototype.handleHttpRequest = function(event) {
lengthComputable: lengthComputable ? "yes" : "no",
loaded: loaded,
total: total
});
},{parentWidget: $tw.rootWidget});
}
});
}

View File

@ -1418,8 +1418,8 @@ exports.checkTiddlerText = function(title,targetText,options) {
/*
Execute an action string without an associated context widget
*/
exports.invokeActionString = function(actions,event,variables) {
var widget = this.makeWidget(null,{});
exports.invokeActionString = function(actions,event,variables,options) {
var widget = this.makeWidget(null,{parentWidget: options.parentWidget});
widget.invokeActionString(actions,null,event,variables);
};