Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14080795
D17388.id41811.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D17388.id41811.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -376,7 +376,7 @@
'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => 'caade6f2',
'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => 'fb20ac8d',
'rsrc/js/application/aphlict/behavior-aphlict-status.js' => '5e2634b9',
- 'rsrc/js/application/aphlict/behavior-desktop-notifications-control.js' => 'edd1ba66',
+ 'rsrc/js/application/aphlict/behavior-desktop-notifications-control.js' => 'd5a2d665',
'rsrc/js/application/calendar/behavior-day-view.js' => '4b3c4443',
'rsrc/js/application/calendar/behavior-event-all-day.js' => 'b41537c9',
'rsrc/js/application/calendar/behavior-month-view.js' => 'fe33e256',
@@ -621,7 +621,7 @@
'javelin-behavior-dashboard-query-panel-select' => '453c5375',
'javelin-behavior-dashboard-tab-panel' => 'd4eecc63',
'javelin-behavior-day-view' => '4b3c4443',
- 'javelin-behavior-desktop-notifications-control' => 'edd1ba66',
+ 'javelin-behavior-desktop-notifications-control' => 'd5a2d665',
'javelin-behavior-detect-timezone' => '4c193c96',
'javelin-behavior-device' => 'bb1dd507',
'javelin-behavior-diff-preview-link' => '051c7832',
@@ -2060,6 +2060,13 @@
'javelin-dom',
'javelin-stratcom',
),
+ 'd5a2d665' => array(
+ 'javelin-behavior',
+ 'javelin-stratcom',
+ 'javelin-dom',
+ 'javelin-uri',
+ 'phabricator-notification',
+ ),
'd6a7e717' => array(
'multirow-row-manager',
'javelin-install',
@@ -2154,13 +2161,6 @@
'javelin-dom',
'phabricator-draggable-list',
),
- 'edd1ba66' => array(
- 'javelin-behavior',
- 'javelin-stratcom',
- 'javelin-dom',
- 'javelin-uri',
- 'phabricator-notification',
- ),
'edf8a145' => array(
'javelin-behavior',
'javelin-uri',
diff --git a/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php b/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php
--- a/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php
+++ b/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php
@@ -88,15 +88,25 @@
'for this Phabricator instance. Consult your browser settings / '.
'documentation to figure out how to clear this setting, do so, '.
'and then re-visit this page to grant permission.'));
+
+ $message_id = celerity_generate_unique_node_id();
+
+ $message_container = phutil_tag(
+ 'span',
+ array(
+ 'id' => $message_id,
+ ));
+
$status_box = id(new PHUIInfoView())
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
->setID($status_id)
->setIsHidden(true)
- ->appendChild($accept_ask);
+ ->appendChild($message_container);
$control_config = array(
'controlID' => $control_id,
'statusID' => $status_id,
+ 'messageID' => $message_id,
'browserStatusID' => $browser_status_id,
'defaultMode' => 0,
'desktopMode' => 1,
diff --git a/webroot/rsrc/js/application/aphlict/behavior-desktop-notifications-control.js b/webroot/rsrc/js/application/aphlict/behavior-desktop-notifications-control.js
--- a/webroot/rsrc/js/application/aphlict/behavior-desktop-notifications-control.js
+++ b/webroot/rsrc/js/application/aphlict/behavior-desktop-notifications-control.js
@@ -19,22 +19,26 @@
return el;
}
function updateFormStatus(permission) {
- var statusEl = findEl(config.statusID);
- if (!statusEl) {
+ var status_node = findEl(config.statusID);
+ if (!status_node) {
return;
}
+
+ var message_node = JX.$(config.messageID);
+
switch (permission) {
case 'default':
- JX.DOM.setContent(statusEl.firstChild, config.cancelAsk);
+ JX.DOM.setContent(message_node, config.cancelAsk);
break;
case 'granted':
- JX.DOM.setContent(statusEl.firstChild, config.grantedAsk);
+ JX.DOM.setContent(message_node, config.grantedAsk);
break;
case 'denied':
- JX.DOM.setContent(statusEl.firstChild, config.deniedAsk);
+ JX.DOM.setContent(message_node, config.deniedAsk);
break;
}
- JX.DOM.show(statusEl);
+
+ JX.DOM.show(status_node);
}
function updateBrowserStatus(permission) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 4:48 PM (16 h, 34 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6778931
Default Alt Text
D17388.id41811.diff (4 KB)
Attached To
Mode
D17388: Fix bad JS rendering in "Allow Desktop Notifications" workflow
Attached
Detach File
Event Timeline
Log In to Comment