From 3f7021e0d88b0c8de0357f346899bd7c66eba164 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 29 Aug 2016 20:09:43 -0700 Subject: [PATCH] (stable) Fix search results with tables, fatals in Phortune Summary: Previously we collapsed all table search results, but the new UI doesn't need it. Remove unused methods and fix CSS. Test Plan: Legalpad Signatures, Phortune Accounts. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D16469 --- .../controller/PhortuneAccountListController.php | 4 ++-- .../controller/PhortuneProductListController.php | 2 +- .../phortune/query/PhortuneMerchantSearchEngine.php | 2 +- .../PhabricatorApplicationSearchController.php | 3 --- .../view/PhabricatorApplicationSearchResultView.php | 10 ---------- .../css/application/search/application-search-view.css | 5 +++++ 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/applications/phortune/controller/PhortuneAccountListController.php b/src/applications/phortune/controller/PhortuneAccountListController.php index 4b7521ceaa..d95fd709d5 100644 --- a/src/applications/phortune/controller/PhortuneAccountListController.php +++ b/src/applications/phortune/controller/PhortuneAccountListController.php @@ -39,7 +39,7 @@ final class PhortuneAccountListController extends PhortuneController { ->setHeader($account->getName()) ->setHref($this->getApplicationURI($account->getID().'/')) ->setObject($account) - ->setIcon('fa-credit-card'); + ->setImageIcon('fa-credit-card'); $payment_list->addItem($item); } @@ -71,7 +71,7 @@ final class PhortuneAccountListController extends PhortuneController { ->setHeader($merchant->getName()) ->setHref($this->getApplicationURI('/merchant/'.$merchant->getID().'/')) ->setObject($merchant) - ->setIcon('fa-bank'); + ->setImageIcon('fa-bank'); $merchant_list->addItem($item); } diff --git a/src/applications/phortune/controller/PhortuneProductListController.php b/src/applications/phortune/controller/PhortuneProductListController.php index eeb594d650..ee84581ae1 100644 --- a/src/applications/phortune/controller/PhortuneProductListController.php +++ b/src/applications/phortune/controller/PhortuneProductListController.php @@ -41,7 +41,7 @@ final class PhortuneProductListController extends PhabricatorController { ->setHeader($product->getProductName()) ->setHref($view_uri) ->addAttribute($price->formatForDisplay()) - ->setIcon('fa-gift'); + ->setImageIcon('fa-gift'); $product_list->addItem($item); } diff --git a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php index 1806af371e..d37c1455b3 100644 --- a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php +++ b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php @@ -74,7 +74,7 @@ final class PhortuneMerchantSearchEngine ->setHeader($merchant->getName()) ->setHref('/phortune/merchant/'.$merchant->getID().'/') ->setObject($merchant) - ->setIcon('fa-bank'); + ->setImageIcon('fa-bank'); $list->addItem($item); } diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php index 164e9aabbc..a463e50471 100644 --- a/src/applications/search/controller/PhabricatorApplicationSearchController.php +++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php @@ -270,9 +270,6 @@ final class PhabricatorApplicationSearchController if ($list->getContent()) { $box->appendChild($list->getContent()); } - if ($list->getCollapsed()) { - $box->setCollapsed(true); - } $result_header = $list->getHeader(); if ($result_header) { diff --git a/src/applications/search/view/PhabricatorApplicationSearchResultView.php b/src/applications/search/view/PhabricatorApplicationSearchResultView.php index 5bcfdcf675..1c3f4aad65 100644 --- a/src/applications/search/view/PhabricatorApplicationSearchResultView.php +++ b/src/applications/search/view/PhabricatorApplicationSearchResultView.php @@ -12,7 +12,6 @@ final class PhabricatorApplicationSearchResultView extends Phobject { private $content = null; private $infoView = null; private $actions = array(); - private $collapsed = null; private $noDataString; private $crumbs = array(); private $header; @@ -70,15 +69,6 @@ final class PhabricatorApplicationSearchResultView extends Phobject { return $this->actions; } - public function setCollapsed($collapsed) { - $this->collapsed = $collapsed; - return $this; - } - - public function getCollapsed() { - return $this->collapsed; - } - public function setNoDataString($nodata) { $this->noDataString = $nodata; return $this; diff --git a/webroot/rsrc/css/application/search/application-search-view.css b/webroot/rsrc/css/application/search/application-search-view.css index 24ee18c847..4a573f5111 100644 --- a/webroot/rsrc/css/application/search/application-search-view.css +++ b/webroot/rsrc/css/application/search/application-search-view.css @@ -16,6 +16,11 @@ border-bottom: 1px solid {$thinblueborder}; } +.application-search-view .phui-object-box.phui-object-box-collapsed + .phui-header-shell { + padding: 20px 8px; +} + .application-search-results .phui-profile-header.phui-header-shell .phui-header-header { font-size: 20px;