mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +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:
parent
6f8ee52e90
commit
ff57b4084a
@ -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();
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user