Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
| Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | JX.Leader.broadcast( | ||||
| 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(); | ||||
| if (!response.showAnyNotification) { | |||||
| return; | |||||
| } | |||||
| // Show the notification itself. | // Show the notification itself. | ||||
| new JX.Notification() | new JX.Notification() | ||||
| .setContent(JX.$H(response.content)) | .setContent(JX.$H(response.content)) | ||||
| .setDesktopReady(response.desktopReady) | |||||
| .setWebReady(response.webReady) | |||||
| .setKey(response.primaryObjectPHID) | .setKey(response.primaryObjectPHID) | ||||
| .setShowAsDesktopNotification(response.showDesktopNotification) | |||||
| .setTitle(response.title) | .setTitle(response.title) | ||||
| .setBody(response.body) | .setBody(response.body) | ||||
| .setHref(response.href) | .setHref(response.href) | ||||
| .setIcon(response.icon) | .setIcon(response.icon) | ||||
| .show(); | .show(); | ||||
| // If the notification affected an object on this page, show a | // If the notification affected an object on this page, show a | ||||
| // permanent reload notification if we aren't already. | // permanent reload notification if we aren't already. | ||||
| ▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines | |||||