From cf5009d5fbb5867d10b2be3f0b928c460d16c588 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Thu, 30 May 2013 12:42:55 -0700 Subject: [PATCH] Conpherence - fix a few bugs Summary: Fixes T3280 - when a pontificate brought back multiple transactions, we were rendering a comma. Yay hsprintf. Also fixes the noconpherences view, which broke at some point recently. Test Plan: sent comment, then replied from different browser. when both comments loaded noted no comma. loaded a conpherence view with no conpherences and verified it looked good. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin, chad Maniphest Tasks: T3280 Differential Revision: https://secure.phabricator.com/D6079 --- src/__celerity_resource_map__.php | 6 +++--- .../controller/ConpherenceUpdateController.php | 2 +- .../conpherence/view/ConpherenceLayoutView.php | 16 ++++++++-------- .../rsrc/css/application/conpherence/menu.css | 16 +++++++++++++--- .../css/application/conpherence/message-pane.css | 14 ++++++++++++-- .../js/application/conpherence/behavior-menu.js | 2 ++ 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 24d9470928..080c6578b7 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -918,7 +918,7 @@ celerity_register_resource_map(array( ), 'conpherence-menu-css' => array( - 'uri' => '/res/60f38fbd/rsrc/css/application/conpherence/menu.css', + 'uri' => '/res/61b6e414/rsrc/css/application/conpherence/menu.css', 'type' => 'css', 'requires' => array( @@ -927,7 +927,7 @@ celerity_register_resource_map(array( ), 'conpherence-message-pane-css' => array( - 'uri' => '/res/d9e90066/rsrc/css/application/conpherence/message-pane.css', + 'uri' => '/res/cbd704df/rsrc/css/application/conpherence/message-pane.css', 'type' => 'css', 'requires' => array( @@ -1294,7 +1294,7 @@ celerity_register_resource_map(array( ), 'javelin-behavior-conpherence-menu' => array( - 'uri' => '/res/87e901c2/rsrc/js/application/conpherence/behavior-menu.js', + 'uri' => '/res/567585ab/rsrc/js/application/conpherence/behavior-menu.js', 'type' => 'js', 'requires' => array( diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php index 9e67975ce6..aaae6d4005 100644 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -320,7 +320,7 @@ final class ConpherenceUpdateController } $content = array( - 'transactions' => $rendered_transactions, + 'transactions' => hsprintf('%s', $rendered_transactions), 'latest_transaction_id' => $new_latest_transaction_id, 'nav_item' => hsprintf('%s', $nav_item), 'conpherence_phid' => $conpherence->getPHID(), diff --git a/src/applications/conpherence/view/ConpherenceLayoutView.php b/src/applications/conpherence/view/ConpherenceLayoutView.php index 97d34cc28f..8b088e8966 100644 --- a/src/applications/conpherence/view/ConpherenceLayoutView.php +++ b/src/applications/conpherence/view/ConpherenceLayoutView.php @@ -155,6 +155,14 @@ final class ConpherenceLayoutView extends AphrontView { 'class' => 'conpherence-content-pane', ), array( + javelin_tag( + 'div', + array( + 'class' => 'conpherence-header-pane', + 'id' => 'conpherence-header-pane', + 'sigil' => 'conpherence-header-pane', + ), + nonempty($this->header, '')), javelin_tag( 'div', array( @@ -178,14 +186,6 @@ final class ConpherenceLayoutView extends AphrontView { ), pht('Send a Message')) )), - javelin_tag( - 'div', - array( - 'class' => 'conpherence-header-pane', - 'id' => 'conpherence-header-pane', - 'sigil' => 'conpherence-header-pane', - ), - nonempty($this->header, '')), javelin_tag( 'div', array( diff --git a/webroot/rsrc/css/application/conpherence/menu.css b/webroot/rsrc/css/application/conpherence/menu.css index 96841a14bb..5d9d9ebd58 100644 --- a/webroot/rsrc/css/application/conpherence/menu.css +++ b/webroot/rsrc/css/application/conpherence/menu.css @@ -11,10 +11,20 @@ } .conpherence-layout .conpherence-no-threads { - height 80%; - width: 80%; - padding: 10%; text-align: center; + position: fixed; + left: 280px; + right: 241px; + top: 76px; + bottom: 0px; + min-width: 300px; + width: auto; +} + +.device .conpherence-layout .conpherence-no-threads { + left: 0; + right: 0; + width: 100%; } .conpherence-layout .conpherence-no-threads .text { diff --git a/webroot/rsrc/css/application/conpherence/message-pane.css b/webroot/rsrc/css/application/conpherence/message-pane.css index ff39a8cb08..74affd7510 100644 --- a/webroot/rsrc/css/application/conpherence/message-pane.css +++ b/webroot/rsrc/css/application/conpherence/message-pane.css @@ -4,7 +4,8 @@ .conpherence-message-pane, .loading .messages-loading-mask, -.loading .messages-loading-icon { +.loading .messages-loading-icon, +.conpherence-layout .conpherence-no-threads { position: fixed; left: 280px; right: 241px; @@ -16,12 +17,21 @@ .device .conpherence-message-pane, .device .loading .messages-loading-mask, -.device .loading .messages-loading-icon { +.device .loading .messages-loading-icon, +.device .conpherence-layout .conpherence-no-threads { left: 0; right: 0; width: 100%; } +.conpherence-layout .conpherence-no-threads { + text-align: center; +} + +.conpherence-layout .conpherence-no-threads .text { + margin: 16px 0px 16px 0px; +} + .conpherence-show-older-messages { display: block; background: #e0e3ec; diff --git a/webroot/rsrc/js/application/conpherence/behavior-menu.js b/webroot/rsrc/js/application/conpherence/behavior-menu.js index e049781181..1dd8d8e75c 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-menu.js +++ b/webroot/rsrc/js/application/conpherence/behavior-menu.js @@ -451,6 +451,8 @@ JX.behavior('conpherence-menu', function(config) { } else { var nothreads = JX.DOM.find(layout, 'div', 'conpherence-no-threads'); nothreads.style.display = 'block'; + markThreadLoading(false); + markWidgetLoading(false); } } } -- 2.51.2