mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 12:12:43 +01:00
Fix Conpherence
Summary: D5426 removed mobile menu for messages but missed a few spots Test Plan: successfully submitted pontifications without JS errors and the form freezing Reviewers: chad, epriestley Reviewed By: chad CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5453
This commit is contained in:
parent
ebdf5d12de
commit
8fc94b02a9
5 changed files with 7 additions and 27 deletions
|
@ -1190,7 +1190,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'javelin-behavior-conpherence-menu' =>
|
||||
array(
|
||||
'uri' => '/res/bcd715e1/rsrc/js/application/conpherence/behavior-menu.js',
|
||||
'uri' => '/res/e04bb055/rsrc/js/application/conpherence/behavior-menu.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -1206,7 +1206,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'javelin-behavior-conpherence-pontificate' =>
|
||||
array(
|
||||
'uri' => '/res/fe634761/rsrc/js/application/conpherence/behavior-pontificate.js',
|
||||
'uri' => '/res/abc4d947/rsrc/js/application/conpherence/behavior-pontificate.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -1219,7 +1219,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'javelin-behavior-conpherence-widget-pane' =>
|
||||
array(
|
||||
'uri' => '/res/52b80633/rsrc/js/application/conpherence/behavior-widget-pane.js',
|
||||
'uri' => '/res/45d53f1f/rsrc/js/application/conpherence/behavior-widget-pane.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -113,14 +113,12 @@ abstract class ConpherenceController extends PhabricatorController {
|
|||
$nav = $this->addConpherencesToNav(
|
||||
$unread_conpherences,
|
||||
$nav,
|
||||
false,
|
||||
$for_application);
|
||||
false);
|
||||
$nav->addLabel(pht('Read'));
|
||||
$nav = $this->addConpherencesToNav(
|
||||
$read_conpherences,
|
||||
$nav,
|
||||
true,
|
||||
$for_application);
|
||||
true);
|
||||
$nav->selectFilter($filter);
|
||||
} else {
|
||||
$nav->addFilter(
|
||||
|
@ -135,11 +133,9 @@ abstract class ConpherenceController extends PhabricatorController {
|
|||
private function addConpherencesToNav(
|
||||
array $conpherences,
|
||||
AphrontSideNavFilterView $nav,
|
||||
$read = false,
|
||||
$for_application = false) {
|
||||
$read = false) {
|
||||
|
||||
$user = $this->getRequest()->getUser();
|
||||
$id_suffix = $for_application ? '-menu-item' : '-nav-item';
|
||||
foreach ($conpherences as $conpherence) {
|
||||
$selected = false;
|
||||
if ($this->getSelectedConpherencePHID() == $conpherence->getPHID()) {
|
||||
|
@ -147,7 +143,6 @@ abstract class ConpherenceController extends PhabricatorController {
|
|||
}
|
||||
$item = $this->buildConpherenceMenuItem(
|
||||
$conpherence,
|
||||
$id_suffix,
|
||||
$selected);
|
||||
|
||||
$nav->addCustomBlock($item->render());
|
||||
|
@ -192,7 +187,6 @@ abstract class ConpherenceController extends PhabricatorController {
|
|||
|
||||
protected function buildConpherenceMenuItem(
|
||||
$conpherence,
|
||||
$id_suffix,
|
||||
$selected) {
|
||||
|
||||
$user = $this->getRequest()->getUser();
|
||||
|
@ -216,7 +210,7 @@ abstract class ConpherenceController extends PhabricatorController {
|
|||
->setImageURI($image)
|
||||
->setMessageText($snippet)
|
||||
->setUnreadCount($unread_count)
|
||||
->setID($conpherence->getPHID().$id_suffix)
|
||||
->setID($conpherence->getPHID().'-nav-item')
|
||||
->addSigil('conpherence-menu-click')
|
||||
->setMetadata(array('id' => $conpherence->getID()));
|
||||
|
||||
|
|
|
@ -268,11 +268,6 @@ final class ConpherenceUpdateController extends
|
|||
$selected = true;
|
||||
$nav_item = $this->buildConpherenceMenuItem(
|
||||
$conpherence,
|
||||
'-nav-item',
|
||||
$selected);
|
||||
$menu_item = $this->buildConpherenceMenuItem(
|
||||
$conpherence,
|
||||
'-menu-item',
|
||||
$selected);
|
||||
|
||||
$header = $this->buildHeaderPaneContent($conpherence);
|
||||
|
@ -286,7 +281,6 @@ final class ConpherenceUpdateController extends
|
|||
$content = array(
|
||||
'transactions' => $rendered_transactions,
|
||||
'latest_transaction_id' => $new_latest_transaction_id,
|
||||
'menu_item' => $menu_item->render(),
|
||||
'nav_item' => $nav_item->render(),
|
||||
'conpherence_phid' => $conpherence->getPHID(),
|
||||
'header' => $header,
|
||||
|
|
|
@ -126,10 +126,6 @@ JX.behavior('conpherence-menu', function(config) {
|
|||
JX.$(r.conpherence_phid + '-nav-item'),
|
||||
JX.$H(r.nav_item)
|
||||
);
|
||||
JX.DOM.replace(
|
||||
JX.$(r.conpherence_phid + '-menu-item'),
|
||||
JX.$H(r.menu_item)
|
||||
);
|
||||
})
|
||||
.start();
|
||||
});
|
||||
|
|
|
@ -25,10 +25,6 @@ JX.behavior('conpherence-pontificate', function(config) {
|
|||
JX.$(r.conpherence_phid + '-nav-item'),
|
||||
JX.$H(r.nav_item)
|
||||
);
|
||||
JX.DOM.replace(
|
||||
JX.$(r.conpherence_phid + '-menu-item'),
|
||||
JX.$H(r.menu_item)
|
||||
);
|
||||
|
||||
// update the header
|
||||
JX.DOM.setContent(
|
||||
|
|
Loading…
Reference in a new issue