Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15367452
D12002.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
D12002.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
@@ -44,7 +44,7 @@
'rsrc/css/application/config/config-welcome.css' => '6abd79be',
'rsrc/css/application/config/setup-issue.css' => '22270af2',
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2',
- 'rsrc/css/application/conpherence/durable-column.css' => '1ef6ae75',
+ 'rsrc/css/application/conpherence/durable-column.css' => '9207426d',
'rsrc/css/application/conpherence/menu.css' => 'c6ac5299',
'rsrc/css/application/conpherence/message-pane.css' => '5930260a',
'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
@@ -351,7 +351,7 @@
'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' => 'd32db212',
+ 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'e4affa94',
'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',
@@ -512,7 +512,7 @@
'changeset-view-manager' => 'a9af1212',
'config-options-css' => '7fedf08b',
'config-welcome-css' => '6abd79be',
- 'conpherence-durable-column-view' => '1ef6ae75',
+ 'conpherence-durable-column-view' => '9207426d',
'conpherence-menu-css' => 'c6ac5299',
'conpherence-message-pane-css' => '5930260a',
'conpherence-notification-css' => '04a6e10a',
@@ -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' => 'd32db212',
+ 'javelin-behavior-durable-column' => 'e4affa94',
'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-fancy-datepicker' => 'c51ae228',
'javelin-behavior-global-drag-and-drop' => '07f199d8',
@@ -1756,14 +1756,6 @@
'd254d646' => array(
'javelin-util',
),
- 'd32db212' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-scrollbar',
- 'javelin-quicksand',
- 'phabricator-keyboard-shortcut',
- ),
'd3aa4b40' => array(
'javelin-dom',
'javelin-util',
@@ -1844,6 +1836,14 @@
'javelin-dom',
'javelin-uri',
),
+ 'e4affa94' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-scrollbar',
+ 'javelin-quicksand',
+ 'phabricator-keyboard-shortcut',
+ ),
'e4cc26b3' => array(
'javelin-behavior',
'javelin-dom',
diff --git a/src/applications/conpherence/controller/ConpherenceController.php b/src/applications/conpherence/controller/ConpherenceController.php
--- a/src/applications/conpherence/controller/ConpherenceController.php
+++ b/src/applications/conpherence/controller/ConpherenceController.php
@@ -62,11 +62,7 @@
protected function buildHeaderPaneContent(ConpherenceThread $conpherence) {
$crumbs = $this->buildApplicationCrumbs();
- if ($conpherence->getTitle()) {
- $title = $conpherence->getTitle();
- } else {
- $title = pht('[No Title]');
- }
+ $title = $this->getConpherenceTitle($conpherence);
$crumbs->addCrumb(
id(new PHUICrumbView())
->setName($title)
@@ -85,4 +81,14 @@
$crumbs,
));
}
+
+ protected function getConpherenceTitle(ConpherenceThread $conpherence) {
+ if ($conpherence->getTitle()) {
+ $title = $conpherence->getTitle();
+ } else {
+ $title = pht('[No Title]');
+ }
+ return $title;
+ }
+
}
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
@@ -108,7 +108,9 @@
->setTransactionType(ConpherenceTransactionType::TYPE_TITLE)
->setNewValue($title);
$updated = true;
- $response_mode = 'redirect';
+ if (!$request->getExists('force_ajax')) {
+ $response_mode = 'redirect';
+ }
}
if (!$updated) {
$errors[] = pht(
@@ -271,7 +273,7 @@
->setValue($conpherence->getTitle()));
require_celerity_resource('conpherence-update-css');
- return id(new AphrontDialogView())
+ $view = id(new AphrontDialogView())
->setTitle(pht('Update Conpherence'))
->addHiddenInput('action', 'metadata')
->addHiddenInput(
@@ -279,6 +281,15 @@
$request->getInt('latest_transaction_id'))
->addHiddenInput('__continue__', true)
->appendChild($form);
+
+ if ($request->getExists('minimal_display')) {
+ $view->addHiddenInput('minimal_display', true);
+ }
+ if ($request->getExists('force_ajax')) {
+ $view->addHiddenInput('force_ajax', true);
+ }
+
+ return $view;
}
private function loadAndRenderUpdates(
@@ -361,8 +372,10 @@
if ($people_widget) {
$people_html = hsprintf('%s', $people_widget->render());
}
+ $title = $this->getConpherenceTitle($conpherence);
$content = array(
'transactions' => hsprintf('%s', $rendered_transactions),
+ 'conpherence_title' => (string) $title,
'latest_transaction_id' => $new_latest_transaction_id,
'nav_item' => hsprintf('%s', $nav_item),
'conpherence_phid' => $conpherence->getPHID(),
diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php
--- a/src/applications/conpherence/controller/ConpherenceViewController.php
+++ b/src/applications/conpherence/controller/ConpherenceViewController.php
@@ -54,10 +54,7 @@
);
}
- $title = $conpherence->getTitle();
- if (!$title) {
- $title = pht('[No Title]');
- }
+ $title = $this->getConpherenceTitle($conpherence);
$content['title'] = $title;
if ($request->isAjax()) {
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
@@ -205,9 +205,10 @@
'class' => 'conpherence-durable-column-header',
),
array(
- phutil_tag(
+ javelin_tag(
'div',
array(
+ 'sigil' => 'conpherence-durable-column-header-text',
'class' => 'conpherence-durable-column-header-text',
),
$title),
@@ -225,6 +226,12 @@
'key' => ConpherenceUpdateActions::ADD_PERSON,
),
array(
+ 'name' => pht('Rename Thread'),
+ 'href' => '/conpherence/update/'.$conpherence->getID().'/',
+ 'icon' => 'fa-pencil',
+ 'key' => ConpherenceUpdateActions::METADATA,
+ ),
+ array(
'name' => pht('View in Conpherence'),
'href' => '/conpherence/'.$conpherence->getID().'/',
'icon' => 'fa-comments',
diff --git a/webroot/rsrc/css/application/conpherence/durable-column.css b/webroot/rsrc/css/application/conpherence/durable-column.css
--- a/webroot/rsrc/css/application/conpherence/durable-column.css
+++ b/webroot/rsrc/css/application/conpherence/durable-column.css
@@ -50,6 +50,7 @@
.conpherence-durable-column-header-text:hover {
color: #fff;
+ text-decoration: none;
}
.conpherence-durable-column-icon-bar {
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
@@ -90,7 +90,7 @@
knownID: latestTransactionID
};
workflow.listen('finally', function() {
- var need_sync = (updating.knownID > latestTransactionID);
+ var need_sync = (updating && updating.knownID > latestTransactionID);
updating = null;
if (need_sync) {
update_thread();
@@ -134,11 +134,43 @@
var data = e.getNodeData('conpherence-durable-column-header-action');
var action = data.action;
var link = e.getNode('tag:a');
+ var params = null;
switch (action) {
+ case 'metadata':
+ JX.Stratcom.invoke('notification-panel-close');
+ params = {
+ action: action,
+ latest_transaction_id: latestTransactionID,
+ minimal_display: true,
+ force_ajax: 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;
+
+ var title = _getColumnTitleNode();
+ JX.DOM.setContent(title, r.conpherence_title);
+
+ 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 'add_person':
JX.Stratcom.invoke('notification-panel-close');
- var params = {
+ params = {
action: action,
latest_transaction_id: latestTransactionID,
minimal_display: true
@@ -193,6 +225,14 @@
'conpherence-durable-column-transactions');
}
+ function _getColumnTitleNode() {
+ var column = JX.$('conpherence-durable-column');
+ return JX.DOM.find(
+ column,
+ 'div',
+ 'conpherence-durable-column-header-text');
+ }
+
function _getColumnFormNode() {
var column = JX.$('conpherence-durable-column');
return JX.DOM.find(
@@ -231,7 +271,6 @@
// We can pick a thread from the server the first time
if (shouldInit) {
shouldInit = false;
- params = { shouldInit : true };
} else {
params = { id : thread_id };
}
@@ -282,9 +321,9 @@
}
JX.Stratcom.listen(
- 'click',
- 'conpherence-send-message',
- _sendMessage);
+ 'click',
+ 'conpherence-send-message',
+ _sendMessage);
JX.Stratcom.listen(
['submit', 'didSyntheticSubmit'],
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 12, 6:51 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7512844
Default Alt Text
D12002.diff (10 KB)
Attached To
Mode
D12002: Conpherence - add ability to change title in the durable column
Attached
Detach File
Event Timeline
Log In to Comment