mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 17:02:41 +01:00
d119b051e8
Summary: This is //extremely// basic but dead simple and should cover us for v1, I think. Let me know what features you need. Test Plan: Used UI example page. Reviewers: allenjohnashton, ddfisher, keebuhm Reviewed By: ddfisher CC: aran, ender Maniphest Tasks: T944 Differential Revision: https://secure.phabricator.com/D2732
29 lines
642 B
JavaScript
29 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()
|
|
});
|
|
|
|
});
|