1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 10:42:41 +01:00
phorge-phorge/webroot/rsrc/js/application/uiexample/notification-example.js

30 lines
642 B
JavaScript
Raw Normal View History

/**
* @requires phabricator-notification
* javelin-stratcom
* javelin-behavior
* @provides javelin-behavior-phabricator-notification-example
*/
JX.behavior('phabricator-notification-example', function(config) {
JX.Stratcom.listen(
'click',
'notification-example',
function(e) {
e.kill();
var notification = new JX.Notification()
.setContent('It is ' + new Date().toString());
notification.listen(
'activate',
function(e) {
if (!confirm("Close notification?")) {
e.kill();
}
});
notification.show()
});
});