1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Extend notification handler to accept variables

Now we can provide variables to be passed to the rendering of the
notification text
This commit is contained in:
Jermolene 2016-07-03 14:55:41 +01:00
parent 6f8ee52e90
commit ff57b4084a
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ exports.startup = function() {
// Install the notification mechanism
$tw.notifier = new $tw.utils.Notifier($tw.wiki);
$tw.rootWidget.addEventListener("tm-notify",function(event) {
$tw.notifier.display(event.param);
$tw.notifier.display(event.param,{variables: event.paramObject});
});
// Install the scroller
$tw.pageScroller = new $tw.utils.PageScroller();

View File

@ -1,5 +1,5 @@
created: 20140811112304772
modified: 20140811120248738
modified: 20160701140248738
tags: Messages
title: WidgetMessage: tm-notify
type: text/vnd.tiddlywiki
@ -9,5 +9,6 @@ The notify message briefly displays a specified tiddler as a small alert in the
|!Name |!Description |
|param |Title of the tiddler to be displayed |
|paramObject |Hashmap of variables to be provided to the notification |
The notify message is handled by the TiddlyWiki core.