Page MenuHomePhabricator

D13449.id32552.diff
No OneTemporary

D13449.id32552.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -342,7 +342,7 @@
'rsrc/js/application/conpherence/behavior-menu.js' => 'd3782c93',
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
- 'rsrc/js/application/conpherence/behavior-widget-pane.js' => 'cafc59ab',
+ 'rsrc/js/application/conpherence/behavior-widget-pane.js' => 'a8458711',
'rsrc/js/application/countdown/timer.js' => 'e4cc26b3',
'rsrc/js/application/daemon/behavior-bulk-job-reload.js' => 'edf8a145',
'rsrc/js/application/dashboard/behavior-dashboard-async-panel.js' => '469c0d9e',
@@ -550,7 +550,7 @@
'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a',
'javelin-behavior-conpherence-menu' => 'd3782c93',
'javelin-behavior-conpherence-pontificate' => '21ba5861',
- 'javelin-behavior-conpherence-widget-pane' => 'cafc59ab',
+ 'javelin-behavior-conpherence-widget-pane' => 'a8458711',
'javelin-behavior-countdown-timer' => 'e4cc26b3',
'javelin-behavior-dark-console' => 'f411b6ae',
'javelin-behavior-dashboard-async-panel' => '469c0d9e',
@@ -1586,6 +1586,19 @@
'javelin-stratcom',
'javelin-dom',
),
+ 'a8458711' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-workflow',
+ 'javelin-util',
+ 'phabricator-notification',
+ 'javelin-behavior-device',
+ 'phuix-dropdown-menu',
+ 'phuix-action-list-view',
+ 'phuix-action-view',
+ 'conpherence-thread-manager',
+ ),
'a8d8459d' => array(
'javelin-behavior',
'javelin-dom',
@@ -1755,19 +1768,6 @@
'javelin-stratcom',
'phabricator-phtize',
),
- 'cafc59ab' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-workflow',
- 'javelin-util',
- 'phabricator-notification',
- 'javelin-behavior-device',
- 'phuix-dropdown-menu',
- 'phuix-action-list-view',
- 'phuix-action-view',
- 'conpherence-thread-manager',
- ),
'ccf1cbf8' => array(
'javelin-install',
'javelin-dom',
diff --git a/src/applications/conpherence/constants/ConpherenceWidgetConfigConstants.php b/src/applications/conpherence/constants/ConpherenceWidgetConfigConstants.php
--- a/src/applications/conpherence/constants/ConpherenceWidgetConfigConstants.php
+++ b/src/applications/conpherence/constants/ConpherenceWidgetConfigConstants.php
@@ -48,11 +48,17 @@
),
),
'widgets-settings' => array(
- 'name' => pht('Settings'),
+ 'name' => pht('Notifications'),
'icon' => 'fa-wrench',
'deviceOnly' => false,
'hasCreate' => false,
),
+ 'widgets-edit' => array(
+ 'name' => pht('Edit Room'),
+ 'icon' => 'fa-pencil',
+ 'deviceOnly' => false,
+ 'hasCreate' => false,
+ ),
);
}
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
@@ -84,8 +84,7 @@
$crumbs->addCrumb(
id(new PHUICrumbView())
->setName($data['title'])
- ->setHref($this->getApplicationURI('update/'.$conpherence->getID().'/'))
- ->setWorkflow(true));
+ ->setHref('/'.$conpherence->getMonogram()));
return hsprintf(
'%s',
diff --git a/src/applications/conpherence/controller/ConpherenceWidgetController.php b/src/applications/conpherence/controller/ConpherenceWidgetController.php
--- a/src/applications/conpherence/controller/ConpherenceWidgetController.php
+++ b/src/applications/conpherence/controller/ConpherenceWidgetController.php
@@ -114,6 +114,13 @@
'style' => 'display: none',
),
$this->renderSettingsWidgetPaneContent());
+ $widgets[] = phutil_tag(
+ 'div',
+ array(
+ 'class' => 'widgets-body',
+ 'id' => 'widgets-edit',
+ 'style' => 'display: none',
+ ));
// without this implosion we get "," between each element in our widgets
// array
@@ -144,12 +151,15 @@
$conpherence,
PhabricatorPolicyCapability::CAN_JOIN);
if ($can_join) {
- $text = pht('Settings are available after joining the room.');
+ $text = pht(
+ 'Notification settings are available after joining the room.');
} else if ($viewer->isLoggedIn()) {
- $text = pht('Settings not applicable to rooms you can not join.');
+ $text = pht(
+ 'Notification settings not applicable to rooms you can not join.');
} else {
$text = pht(
- 'Settings are available after logging in and joining the room.');
+ 'Notification settings are available after logging in and joining '.
+ 'the room.');
}
return phutil_tag(
'div',
diff --git a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
--- a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
+++ b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
@@ -11,56 +11,46 @@
return 'PhabricatorConpherenceApplication';
}
- public function buildSavedQueryFromRequest(AphrontRequest $request) {
- $saved = new PhabricatorSavedQuery();
-
- $saved->setParameter(
- 'participantPHIDs',
- $this->readUsersFromRequest($request, 'participants'));
+ public function newQuery() {
+ return id(new ConpherenceThreadQuery())
+ ->needParticipantCache(true);
+ }
- $saved->setParameter('fulltext', $request->getStr('fulltext'));
+ protected function buildCustomSearchFields() {
+ return array(
+ id(new PhabricatorSearchUsersField())
+ ->setLabel(pht('Participants'))
+ ->setKey('participants')
+ ->setAliases(array('participant')),
+ id(new PhabricatorSearchTextField())
+ ->setLabel(pht('Contains Words'))
+ ->setKey('fulltext'),
+ );
+ }
- return $saved;
+ protected function getDefaultFieldOrder() {
+ return array(
+ 'participants',
+ '...',
+ );
}
- public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
- $query = id(new ConpherenceThreadQuery())
- ->needParticipantCache(true);
+ protected function shouldShowOrderField() {
+ return false;
+ }
- $participant_phids = $saved->getParameter('participantPHIDs', array());
- if ($participant_phids && is_array($participant_phids)) {
- $query->withParticipantPHIDs($participant_phids);
+ protected function buildQueryFromParameters(array $map) {
+ $query = $this->newQuery();
+ if ($map['participants']) {
+ $query->withParticipantPHIDs($map['participants']);
}
-
- $fulltext = $saved->getParameter('fulltext');
- if (strlen($fulltext)) {
- $query->withFulltext($fulltext);
+ if ($map['fulltext']) {
+ $query->withFulltext($map['fulltext']);
}
return $query;
}
- public function buildSearchForm(
- AphrontFormView $form,
- PhabricatorSavedQuery $saved) {
-
- $participant_phids = $saved->getParameter('participantPHIDs', array());
- $fulltext = $saved->getParameter('fulltext');
-
- $form
- ->appendControl(
- id(new AphrontFormTokenizerControl())
- ->setDatasource(new PhabricatorPeopleDatasource())
- ->setName('participants')
- ->setLabel(pht('Participants'))
- ->setValue($participant_phids))
- ->appendControl(
- id(new AphrontFormTextControl())
- ->setName('fulltext')
- ->setLabel(pht('Contains Words'))
- ->setValue($fulltext));
- }
-
protected function getURI($path) {
return '/conpherence/search/'.$path;
}
@@ -68,14 +58,12 @@
protected function getBuiltinQueryNames() {
$names = array();
- $names = array(
- 'all' => pht('All Rooms'),
- );
-
if ($this->requireViewer()->isLoggedIn()) {
$names['participant'] = pht('Joined Rooms');
}
+ $names['all'] = pht('All Rooms');
+
return $names;
}
@@ -89,7 +77,7 @@
return $query;
case 'participant':
return $query->setParameter(
- 'participantPHIDs',
+ 'participants',
array($this->requireViewer()->getPHID()));
}
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
@@ -333,13 +333,13 @@
));
$item = id(new PHUIListItemView())
- ->setName(pht('Settings'))
+ ->setName(pht('Room Actions'))
->setIcon('fa-bars')
->addClass('core-menu-item')
->addSigil('conpherence-settings-menu')
->setID($bubble_id)
->setHref('#')
- ->setAural(pht('Settings'))
+ ->setAural(pht('Room Actions'))
->setOrder(300);
$settings_button = id(new PHUIListView())
->addMenuItem($item)
diff --git a/webroot/rsrc/js/application/conpherence/behavior-widget-pane.js b/webroot/rsrc/js/application/conpherence/behavior-widget-pane.js
--- a/webroot/rsrc/js/application/conpherence/behavior-widget-pane.js
+++ b/webroot/rsrc/js/application/conpherence/behavior-widget-pane.js
@@ -81,16 +81,34 @@
continue;
}
+ var handler;
+ var href;
+ if (widget == 'widgets-edit') {
+ var threadManager = JX.ConpherenceThreadManager.getInstance();
+ handler = function(e) {
+ e.prevent();
+ menu.close();
+ threadManager.runUpdateWorkflowFromLink(
+ e.getTarget(),
+ {
+ action : 'metadata',
+ force_ajax : true,
+ stage : 'submit'
+ });
+ };
+ href = threadManager._getUpdateURI();
+ } else {
+ handler = JX.bind(null, function(widget, e) {
+ toggleWidget({widget: widget});
+ e.prevent();
+ menu.close();
+ }, widget);
+ }
var item = new JX.PHUIXActionView()
.setIcon(widget_data.icon || 'none')
.setName(widget_data.name)
- .setHandler(
- JX.bind(null, function(widget, e) {
- toggleWidget({widget: widget});
- e.prevent();
- menu.close();
- }, widget));
-
+ .setHref(href)
+ .setHandler(handler);
map[widget_data.name] = item;
list.addItem(item);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 12, 11:29 AM (6 d, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6741471
Default Alt Text
D13449.id32552.diff (10 KB)

Event Timeline