Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | JX.behavior('aphlict-listen', function(config) { | ||||
} | } | ||||
// Respond to a response from Phabricator about a specific notification. | // Respond to a response from Phabricator about a specific notification. | ||||
function onNotification(response) { | function onNotification(response) { | ||||
if (!response.pertinent) { | if (!response.pertinent) { | ||||
return; | return; | ||||
} | } | ||||
JX.Leader.broadcast(null, { | JX.Leader.broadcast( | ||||
response.uniqueID, | |||||
{ | |||||
type: 'notification.individual', | type: 'notification.individual', | ||||
data: response | data: response | ||||
}); | }); | ||||
} | } | ||||
JX.Stratcom.listen('aphlict-notification-message', null, function(e) { | JX.Stratcom.listen('aphlict-notification-message', null, function(e) { | ||||
JX.Stratcom.invoke('notification-panel-update', null, {}); | JX.Stratcom.invoke('notification-panel-update', null, {}); | ||||
var response = e.getData(); | var response = e.getData(); | ||||
// Show the notification itself. | // Show the notification itself. | ||||
new JX.Notification() | new JX.Notification() | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |