mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 10:42:41 +01:00
30 lines
642 B
JavaScript
30 lines
642 B
JavaScript
|
/**
|
||
|
* @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()
|
||
|
});
|
||
|
|
||
|
});
|