From 5b4825cf1eea2eddc9468da62a05adeabbf89ec1 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 23 Nov 2015 09:17:36 -0800 Subject: [PATCH] Use new DocumentView for Legalpad previews Summary: Moves to showing Legalpad previews using PHUIDocumentViewPro Test Plan: Create a new document, edit an existing document Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14550 --- resources/celerity/map.php | 4 ++-- .../legalpad/controller/LegalpadDocumentEditController.php | 4 ++-- webroot/rsrc/css/phui/phui-remarkup-preview.css | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 9b56790de3..713883e97a 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -143,7 +143,7 @@ return array( 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 'rsrc/css/phui/phui-property-list-view.css' => '27b2849e', - 'rsrc/css/phui/phui-remarkup-preview.css' => '867f85b3', + 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', 'rsrc/css/phui/phui-spacing.css' => '042804d6', 'rsrc/css/phui/phui-status.css' => '888cedb8', 'rsrc/css/phui/phui-tag-view.css' => 'e60e227b', @@ -808,7 +808,7 @@ return array( 'phui-pager-css' => 'bea33d23', 'phui-pinboard-view-css' => '2495140e', 'phui-property-list-view-css' => '27b2849e', - 'phui-remarkup-preview-css' => '867f85b3', + 'phui-remarkup-preview-css' => '1a8f2591', 'phui-spacing-css' => '042804d6', 'phui-status-list-view-css' => '888cedb8', 'phui-tag-view-css' => 'e60e227b', diff --git a/src/applications/legalpad/controller/LegalpadDocumentEditController.php b/src/applications/legalpad/controller/LegalpadDocumentEditController.php index edbaaf99e2..84a879a7a2 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentEditController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentEditController.php @@ -243,10 +243,10 @@ final class LegalpadDocumentEditController extends LegalpadController { $crumbs->addTextCrumb($short); $preview = id(new PHUIRemarkupPreviewPanel()) - ->setHeader(pht('Document Preview')) + ->setHeader($document->getTitle()) ->setPreviewURI($this->getApplicationURI('document/preview/')) ->setControlID('document-text') - ->addClass('phui-document-view'); + ->setPreviewType(PHUIRemarkupPreviewPanel::DOCUMENT); return $this->buildApplicationPage( array( diff --git a/webroot/rsrc/css/phui/phui-remarkup-preview.css b/webroot/rsrc/css/phui/phui-remarkup-preview.css index 658e5010ee..c045cae703 100644 --- a/webroot/rsrc/css/phui/phui-remarkup-preview.css +++ b/webroot/rsrc/css/phui/phui-remarkup-preview.css @@ -41,7 +41,7 @@ *
or not. It should probably move to the Engine in all cases, but * until we do that get rid of the extra spacing generated by the inner div. */ -.phui-remarkup-preview .phabricator-remarkup .phabricator-remarkup { +body .phui-remarkup-preview .phabricator-remarkup .phabricator-remarkup { padding: 0; margin: 0; }