1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-12 08:36:13 +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:
Bob Trahan 2013-03-26 14:06:19 -07:00
parent ebdf5d12de
commit 8fc94b02a9
5 changed files with 7 additions and 27 deletions

View file

@ -1190,7 +1190,7 @@ celerity_register_resource_map(array(
), ),
'javelin-behavior-conpherence-menu' => 'javelin-behavior-conpherence-menu' =>
array( array(
'uri' => '/res/bcd715e1/rsrc/js/application/conpherence/behavior-menu.js', 'uri' => '/res/e04bb055/rsrc/js/application/conpherence/behavior-menu.js',
'type' => 'js', 'type' => 'js',
'requires' => 'requires' =>
array( array(
@ -1206,7 +1206,7 @@ celerity_register_resource_map(array(
), ),
'javelin-behavior-conpherence-pontificate' => 'javelin-behavior-conpherence-pontificate' =>
array( array(
'uri' => '/res/fe634761/rsrc/js/application/conpherence/behavior-pontificate.js', 'uri' => '/res/abc4d947/rsrc/js/application/conpherence/behavior-pontificate.js',
'type' => 'js', 'type' => 'js',
'requires' => 'requires' =>
array( array(
@ -1219,7 +1219,7 @@ celerity_register_resource_map(array(
), ),
'javelin-behavior-conpherence-widget-pane' => 'javelin-behavior-conpherence-widget-pane' =>
array( 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', 'type' => 'js',
'requires' => 'requires' =>
array( array(

View file

@ -113,14 +113,12 @@ abstract class ConpherenceController extends PhabricatorController {
$nav = $this->addConpherencesToNav( $nav = $this->addConpherencesToNav(
$unread_conpherences, $unread_conpherences,
$nav, $nav,
false, false);
$for_application);
$nav->addLabel(pht('Read')); $nav->addLabel(pht('Read'));
$nav = $this->addConpherencesToNav( $nav = $this->addConpherencesToNav(
$read_conpherences, $read_conpherences,
$nav, $nav,
true, true);
$for_application);
$nav->selectFilter($filter); $nav->selectFilter($filter);
} else { } else {
$nav->addFilter( $nav->addFilter(
@ -135,11 +133,9 @@ abstract class ConpherenceController extends PhabricatorController {
private function addConpherencesToNav( private function addConpherencesToNav(
array $conpherences, array $conpherences,
AphrontSideNavFilterView $nav, AphrontSideNavFilterView $nav,
$read = false, $read = false) {
$for_application = false) {
$user = $this->getRequest()->getUser(); $user = $this->getRequest()->getUser();
$id_suffix = $for_application ? '-menu-item' : '-nav-item';
foreach ($conpherences as $conpherence) { foreach ($conpherences as $conpherence) {
$selected = false; $selected = false;
if ($this->getSelectedConpherencePHID() == $conpherence->getPHID()) { if ($this->getSelectedConpherencePHID() == $conpherence->getPHID()) {
@ -147,7 +143,6 @@ abstract class ConpherenceController extends PhabricatorController {
} }
$item = $this->buildConpherenceMenuItem( $item = $this->buildConpherenceMenuItem(
$conpherence, $conpherence,
$id_suffix,
$selected); $selected);
$nav->addCustomBlock($item->render()); $nav->addCustomBlock($item->render());
@ -192,7 +187,6 @@ abstract class ConpherenceController extends PhabricatorController {
protected function buildConpherenceMenuItem( protected function buildConpherenceMenuItem(
$conpherence, $conpherence,
$id_suffix,
$selected) { $selected) {
$user = $this->getRequest()->getUser(); $user = $this->getRequest()->getUser();
@ -216,7 +210,7 @@ abstract class ConpherenceController extends PhabricatorController {
->setImageURI($image) ->setImageURI($image)
->setMessageText($snippet) ->setMessageText($snippet)
->setUnreadCount($unread_count) ->setUnreadCount($unread_count)
->setID($conpherence->getPHID().$id_suffix) ->setID($conpherence->getPHID().'-nav-item')
->addSigil('conpherence-menu-click') ->addSigil('conpherence-menu-click')
->setMetadata(array('id' => $conpherence->getID())); ->setMetadata(array('id' => $conpherence->getID()));

View file

@ -268,11 +268,6 @@ final class ConpherenceUpdateController extends
$selected = true; $selected = true;
$nav_item = $this->buildConpherenceMenuItem( $nav_item = $this->buildConpherenceMenuItem(
$conpherence, $conpherence,
'-nav-item',
$selected);
$menu_item = $this->buildConpherenceMenuItem(
$conpherence,
'-menu-item',
$selected); $selected);
$header = $this->buildHeaderPaneContent($conpherence); $header = $this->buildHeaderPaneContent($conpherence);
@ -286,7 +281,6 @@ final class ConpherenceUpdateController extends
$content = array( $content = array(
'transactions' => $rendered_transactions, 'transactions' => $rendered_transactions,
'latest_transaction_id' => $new_latest_transaction_id, 'latest_transaction_id' => $new_latest_transaction_id,
'menu_item' => $menu_item->render(),
'nav_item' => $nav_item->render(), 'nav_item' => $nav_item->render(),
'conpherence_phid' => $conpherence->getPHID(), 'conpherence_phid' => $conpherence->getPHID(),
'header' => $header, 'header' => $header,

View file

@ -126,10 +126,6 @@ JX.behavior('conpherence-menu', function(config) {
JX.$(r.conpherence_phid + '-nav-item'), JX.$(r.conpherence_phid + '-nav-item'),
JX.$H(r.nav_item) JX.$H(r.nav_item)
); );
JX.DOM.replace(
JX.$(r.conpherence_phid + '-menu-item'),
JX.$H(r.menu_item)
);
}) })
.start(); .start();
}); });

View file

@ -25,10 +25,6 @@ JX.behavior('conpherence-pontificate', function(config) {
JX.$(r.conpherence_phid + '-nav-item'), JX.$(r.conpherence_phid + '-nav-item'),
JX.$H(r.nav_item) JX.$H(r.nav_item)
); );
JX.DOM.replace(
JX.$(r.conpherence_phid + '-menu-item'),
JX.$H(r.menu_item)
);
// update the header // update the header
JX.DOM.setContent( JX.DOM.setContent(