From f6e9d36c329c78632fd7edd5abce509f2381b671 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Fri, 24 Jan 2014 12:50:33 -0800 Subject: [PATCH] Legalpad - style NOTE IMPORTANT WARNING remarkup slightly differently Summary: round them there corners, to create more of a "bubble" effect in legalpad. Ref T3116. Test Plan: see screenshot, which demonstrates new style works Reviewers: epriestley Reviewed By: epriestley CC: chad, Korvin, epriestley, aran Maniphest Tasks: T3116 Differential Revision: https://secure.phabricator.com/D8060 --- resources/celerity/map.php | 8 +++++--- .../LegalpadDocumentSignController.php | 20 +++++++++++++------ .../LegalpadDocumentViewController.php | 2 ++ .../legalpad/legalpad-document.css | 18 +++++++++++++++++ 4 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 webroot/rsrc/css/application/legalpad/legalpad-document.css diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 377127ba75..96378e33da 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ return array( 'names' => array( - 'core.pkg.css' => '5ad20a3f', + 'core.pkg.css' => '63255578', 'core.pkg.js' => 'c907bd96', 'darkconsole.pkg.js' => 'ca8671ce', 'differential.pkg.css' => '5a65a762', @@ -74,6 +74,7 @@ return array( 'rsrc/css/application/flag/flag.css' => '5337623f', 'rsrc/css/application/herald/herald-test.css' => '2b7d0f54', 'rsrc/css/application/herald/herald.css' => '59d48f01', + 'rsrc/css/application/legalpad/legalpad-document.css' => 'c60a9d1e', 'rsrc/css/application/maniphest/batch-editor.css' => '78444bc1', 'rsrc/css/application/maniphest/report.css' => '6fc16517', 'rsrc/css/application/maniphest/task-edit.css' => '8e23031b', @@ -113,7 +114,7 @@ return array( 'rsrc/css/application/tokens/tokens.css' => 'fb286311', 'rsrc/css/application/uiexample/example.css' => '4741b891', 'rsrc/css/core/core.css' => 'da26ddb2', - 'rsrc/css/core/remarkup.css' => 'bec51bf1', + 'rsrc/css/core/remarkup.css' => 'ca7f2265', 'rsrc/css/core/syntax.css' => '3c18c1cb', 'rsrc/css/core/z-index.css' => '1bbbd4f1', 'rsrc/css/diviner/diviner-shared.css' => 'be90f718', @@ -655,6 +656,7 @@ return array( 'javelin-view-renderer' => '77461fd6', 'javelin-view-visitor' => 'ca704f2b', 'javelin-workflow' => 'd16edeae', + 'legalpad-document-css' => 'c60a9d1e', 'lightbox-attachment-css' => '686f8885', 'maniphest-batch-editor' => '78444bc1', 'maniphest-report-css' => '6fc16517', @@ -700,7 +702,7 @@ return array( 'phabricator-prefab' => '9eaf0bfa', 'phabricator-profile-css' => '3a7e04ca', 'phabricator-project-tag-css' => '095c9404', - 'phabricator-remarkup-css' => 'bec51bf1', + 'phabricator-remarkup-css' => 'ca7f2265', 'phabricator-search-results-css' => 'f240504c', 'phabricator-settings-css' => 'ea8f5915', 'phabricator-shaped-request' => 'dfa181a4', diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php index 42acab41b0..16361a84f7 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php @@ -177,9 +177,10 @@ final class LegalpadDocumentSignController extends LegalpadController { ->setHeader($title); $content = array( - id(new PHUIDocumentView()) - ->setHeader($header) - ->appendChild($this->buildDocument($engine, $document_body)), + $this->buildDocument( + $header, + $engine, + $document_body), $this->buildSignatureForm( $document_body, $signature, @@ -199,10 +200,17 @@ final class LegalpadDocumentSignController extends LegalpadController { } private function buildDocument( - PhabricatorMarkupEngine - $engine, LegalpadDocumentBody $body) { + PHUIHeaderView $header, + PhabricatorMarkupEngine $engine, + LegalpadDocumentBody $body) { - return $engine->getOutput($body, LegalpadDocumentBody::MARKUP_FIELD_TEXT); + $this->requireResource('legalpad-document-css'); + return id(new PHUIDocumentView()) + ->addClass('legalpad') + ->setHeader($header) + ->appendChild($engine->getOutput( + $body, + LegalpadDocumentBody::MARKUP_FIELD_TEXT)); } private function buildSignatureForm( diff --git a/src/applications/legalpad/controller/LegalpadDocumentViewController.php b/src/applications/legalpad/controller/LegalpadDocumentViewController.php index 53a8792c4a..9a6ce73ab3 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentViewController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentViewController.php @@ -110,7 +110,9 @@ final class LegalpadDocumentViewController extends LegalpadController { PhabricatorMarkupEngine $engine, LegalpadDocumentBody $body) { + $this->requireResource('legalpad-document-css'); $view = new PHUIPropertyListView(); + $view->addClass('legalpad'); $view->addSectionHeader(pht('Document')); $view->addTextContent( $engine->getOutput($body, LegalpadDocumentBody::MARKUP_FIELD_TEXT)); diff --git a/webroot/rsrc/css/application/legalpad/legalpad-document.css b/webroot/rsrc/css/application/legalpad/legalpad-document.css new file mode 100644 index 0000000000..30db96dcac --- /dev/null +++ b/webroot/rsrc/css/application/legalpad/legalpad-document.css @@ -0,0 +1,18 @@ +/** + * @provides legalpad-document-css + */ + +.legalpad .phabricator-remarkup .remarkup-note { + border-radius: 14px; + -moz-border-radius: 14px; +} + +.legalpad .phabricator-remarkup .remarkup-warning { + border-radius: 14px; + -moz-border-radius: 14px; +} + +.legalpad .phabricator-remarkup .remarkup-important { + border-radius: 14px; + -moz-border-radius: 14px; +}