Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14016377
D11991.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
11 KB
Referenced Files
None
Subscribers
None
D11991.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
@@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => 'a9770fbb',
- 'core.pkg.js' => 'a77025a1',
+ 'core.pkg.js' => '5a1c336d',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '6641cdd5',
'differential.pkg.js' => '3fab5259',
@@ -346,12 +346,12 @@
'rsrc/image/texture/table_header_hover.png' => '038ec3b9',
'rsrc/image/texture/table_header_tall.png' => 'd56b434f',
'rsrc/js/application/aphlict/Aphlict.js' => '2be71d56',
- 'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => 'cc2d9c80',
+ 'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => '830b3278',
'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => '851f167c',
'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761',
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
- 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'a88a26cc',
+ 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'd32db212',
'rsrc/js/application/conpherence/behavior-menu.js' => '869e3445',
'rsrc/js/application/conpherence/behavior-pontificate.js' => '86df5915',
'rsrc/js/application/conpherence/behavior-widget-pane.js' => '40b1ff90',
@@ -541,7 +541,7 @@
'inline-comment-summary-css' => 'eb5f8e8c',
'javelin-aphlict' => '2be71d56',
'javelin-behavior' => '61cbc29a',
- 'javelin-behavior-aphlict-dropdown' => 'cc2d9c80',
+ 'javelin-behavior-aphlict-dropdown' => '830b3278',
'javelin-behavior-aphlict-listen' => '851f167c',
'javelin-behavior-aphlict-status' => 'ea681761',
'javelin-behavior-aphront-basic-tokenizer' => 'b3a4b884',
@@ -582,7 +582,7 @@
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
'javelin-behavior-doorkeeper-tag' => 'e5822781',
- 'javelin-behavior-durable-column' => 'a88a26cc',
+ 'javelin-behavior-durable-column' => 'd32db212',
'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-fancy-datepicker' => 'c51ae228',
'javelin-behavior-global-drag-and-drop' => '07f199d8',
@@ -1400,6 +1400,16 @@
'82ce2142' => array(
'aphront-typeahead-control-css',
),
+ '830b3278' => array(
+ 'javelin-behavior',
+ 'javelin-request',
+ 'javelin-stratcom',
+ 'javelin-vector',
+ 'javelin-dom',
+ 'javelin-uri',
+ 'javelin-behavior-device',
+ 'phabricator-title',
+ ),
'834a1173' => array(
'javelin-behavior',
'javelin-scrollbar',
@@ -1609,15 +1619,6 @@
'javelin-stratcom',
'javelin-dom',
),
- 'a88a26cc' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-scrollbar',
- 'javelin-quicksand',
- 'phabricator-keyboard-shortcut',
- 'javelin-behavior-conpherence-widget-pane',
- ),
'a8d8459d' => array(
'javelin-behavior',
'javelin-dom',
@@ -1743,16 +1744,6 @@
'javelin-stratcom',
'phabricator-phtize',
),
- 'cc2d9c80' => array(
- 'javelin-behavior',
- 'javelin-request',
- 'javelin-stratcom',
- 'javelin-vector',
- 'javelin-dom',
- 'javelin-uri',
- 'javelin-behavior-device',
- 'phabricator-title',
- ),
'd19198c8' => array(
'javelin-install',
'javelin-dom',
@@ -1763,6 +1754,14 @@
'd254d646' => array(
'javelin-util',
),
+ 'd32db212' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-scrollbar',
+ 'javelin-quicksand',
+ 'phabricator-keyboard-shortcut',
+ ),
'd4a14807' => array(
'javelin-install',
'javelin-dom',
diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php
--- a/src/applications/conpherence/controller/ConpherenceUpdateController.php
+++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php
@@ -209,14 +209,19 @@
->setDatasource(new PhabricatorPeopleDatasource()));
require_celerity_resource('conpherence-update-css');
- return id(new AphrontDialogView())
+ $view = id(new AphrontDialogView())
->setTitle(pht('Add Participants'))
->addHiddenInput('action', 'add_person')
->addHiddenInput(
'latest_transaction_id',
$request->getInt('latest_transaction_id'))
->appendChild($form);
+
+ if ($request->getExists('minimal_display')) {
+ $view->addHiddenInput('minimal_display', true);
}
+ return $view;
+ }
private function renderRemovePersonDialogue(
ConpherenceThread $conpherence) {
diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php
--- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php
+++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php
@@ -146,21 +146,17 @@
$dropdown_id = celerity_generate_unique_node_id();
$settings_list = new PHUIListView();
- $cw_registry =
- ConpherenceWidgetConfigConstants::getWidgetRegistry();
- $first = true;
- foreach ($cw_registry as $widget => $config) {
+ $header_actions = $this->getHeaderActionsConfig($conpherence);
+ foreach ($header_actions as $action) {
$settings_list->addMenuItem(
id(new PHUIListItemView())
- ->setHref('#')
- ->setDisabled($first)
- ->setName($config['name'])
- ->setIcon($config['icon'])
- ->addSigil('conpherence-durable-column-widget-selected')
+ ->setHref($action['href'])
+ ->setName($action['name'])
+ ->setIcon($action['icon'])
+ ->addSigil('conpherence-durable-column-header-action')
->setMetadata(array(
- 'widget' => $widget,
+ 'action' => $action['key'],
)));
- $first = false;
}
$settings_menu = phutil_tag(
@@ -220,6 +216,28 @@
}
+ private function getHeaderActionsConfig(ConpherenceThread $conpherence) {
+ return array(
+ array(
+ 'name' => pht('Add Participants'),
+ 'href' => '/conpherence/update/'.$conpherence->getID().'/',
+ 'icon' => 'fa-plus',
+ 'key' => ConpherenceUpdateActions::ADD_PERSON,
+ ),
+ array(
+ 'name' => pht('View in Conpherence'),
+ 'href' => '/conpherence/'.$conpherence->getID().'/',
+ 'icon' => 'fa-comments',
+ 'key' => 'go_conpherence',
+ ),
+ array(
+ 'name' => pht('Close Window'),
+ 'href' => '#',
+ 'icon' => 'fa-times',
+ 'key' => 'close_window',
+ ),);
+ }
+
private function buildTransactions() {
$conpherence = $this->getSelectedConpherence();
if (!$conpherence) {
diff --git a/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js b/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
--- a/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
+++ b/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
@@ -170,4 +170,8 @@
dirty = true;
refresh();
});
+
+ JX.Stratcom.listen('notification-panel-close', null, function() {
+ set_visible(null);
+ });
});
diff --git a/webroot/rsrc/js/application/conpherence/behavior-durable-column.js b/webroot/rsrc/js/application/conpherence/behavior-durable-column.js
--- a/webroot/rsrc/js/application/conpherence/behavior-durable-column.js
+++ b/webroot/rsrc/js/application/conpherence/behavior-durable-column.js
@@ -6,7 +6,6 @@
* javelin-scrollbar
* javelin-quicksand
* phabricator-keyboard-shortcut
- * javelin-behavior-conpherence-widget-pane
*/
JX.behavior('durable-column', function() {
@@ -102,20 +101,25 @@
// end copy / hack of stuff with big ole TODO on it
+ function _toggleColumn() {
+ if (window.location.pathname.indexOf('/conpherence/') === 0) {
+ return;
+ }
+ show = !show;
+ JX.DOM.alterClass(frame, 'with-durable-column', show);
+ var column = JX.$('conpherence-durable-column');
+ if (show) {
+ JX.DOM.show(column);
+ loadThreadContent(loadThreadID);
+ } else {
+ JX.DOM.hide(column);
+ }
+ JX.Stratcom.invoke('resize');
+ JX.Quicksand.setFrame(show ? quick : null);
+ }
+
new JX.KeyboardShortcut('\\', 'Toggle Conpherence Column')
- .setHandler(function() {
- show = !show;
- JX.DOM.alterClass(frame, 'with-durable-column', show);
- var column = JX.$('conpherence-durable-column');
- if (show) {
- JX.DOM.show(column);
- loadThreadContent(loadThreadID);
- } else {
- JX.DOM.hide(column);
- }
- JX.Stratcom.invoke('resize');
- JX.Quicksand.setFrame(show ? quick : null);
- })
+ .setHandler(_toggleColumn)
.register();
new JX.Scrollbar(JX.$('conpherence-durable-column-content'));
@@ -124,29 +128,49 @@
JX.Stratcom.listen(
'click',
- 'conpherence-durable-column-widget-selected',
+ 'conpherence-durable-column-header-action',
function (e) {
e.kill();
- var data = e.getNodeData('conpherence-durable-column-widget-selected');
- var widget = data.widget;
- if (widget == 'conpherence-message-pane') {
- return loadThreadContent(loadThreadID);
+ var data = e.getNodeData('conpherence-durable-column-header-action');
+ var action = data.action;
+ var link = e.getNode('tag:a');
+
+ switch (action) {
+ case 'add_person':
+ JX.Stratcom.invoke('notification-panel-close');
+ var params = {
+ action: action,
+ latest_transaction_id: latestTransactionID,
+ minimal_display: true
+ };
+ var workflow = new JX.Workflow.newFromLink(link)
+ .setData(params)
+ .setHandler(function(r) {
+ var messages = _getColumnMessagesNode();
+ JX.DOM.appendContent(messages, JX.$H(r.transactions));
+ messages.scrollTop = messages.scrollHeight;
+
+ latestTransactionID = r.latest_transaction_id;
+ // since this is a two step workflow, and the "finally" method
+ // gets called on the first form load, restore "updating" if
+ // necessary
+ if (updating === null) {
+ updating = {
+ threadPHID: loadedThreadPHID,
+ knownID: latestTransactionID
+ };
+ }
+ });
+ sync_workflow(workflow);
+ break;
+ case 'go_conpherence':
+ JX.$U(link.href).go();
+ break;
+ case 'close_window':
+ JX.Stratcom.invoke('notification-panel-close');
+ _toggleColumn();
+ break;
}
-
- _markLoading(true);
- var uri = '/conpherence/widget/' + loadThreadID + '/';
- loadedThreadID = null;
-
- var params = { widget : widget };
- new JX.Workflow(uri)
- .setData(params)
- .setHandler(function(r) {
- var body = _getColumnBodyNode();
- JX.DOM.setContent(body, JX.$H(r));
- new JX.Scrollbar(JX.$('conpherence-durable-column-content'));
- _markLoading(false);
- })
- .start();
});
function _getColumnNode() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 5, 8:46 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6733289
Default Alt Text
D11991.diff (11 KB)
Attached To
Mode
D11991: Conpherence - get the durable column header actions working correctly
Attached
Detach File
Event Timeline
Log In to Comment