diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php index 4aa0a7d6ee..749a66098b 100644 --- a/src/infrastructure/diff/PhabricatorInlineCommentController.php +++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php @@ -130,8 +130,10 @@ abstract class PhabricatorInlineCommentController $this->renderTextArea( nonempty($text, $inline->getContent()))); + $view = $this->buildScaffoldForView($edit_dialog); + return id(new AphrontAjaxResponse()) - ->setContent($edit_dialog->render()); + ->setContent($view->render()); case 'create': $text = $this->getCommentText(); @@ -184,8 +186,10 @@ abstract class PhabricatorInlineCommentController $text_area = $this->renderTextArea($this->getCommentText()); $edit_dialog->appendChild($text_area); + $view = $this->buildScaffoldForView($edit_dialog); + return id(new AphrontAjaxResponse()) - ->setContent($edit_dialog->render()); + ->setContent($view->render()); } } @@ -276,12 +280,7 @@ abstract class PhabricatorInlineCommentController ->setHandles($handles) ->setEditable(true); - $renderer = DifferentialChangesetHTMLRenderer::getHTMLRendererByKey( - $this->getRenderer()); - - $view = $renderer->getRowScaffoldForInline($view); - $view = id(new PHUIDiffInlineCommentTableScaffold()) - ->addRowScaffold($view); + $view = $this->buildScaffoldForView($view); return id(new AphrontAjaxResponse()) ->setContent( @@ -300,4 +299,14 @@ abstract class PhabricatorInlineCommentController ->setDisableFullScreen(true); } + private function buildScaffoldForView(PHUIDiffInlineCommentView $view) { + $renderer = DifferentialChangesetHTMLRenderer::getHTMLRendererByKey( + $this->getRenderer()); + + $view = $renderer->getRowScaffoldForInline($view); + + return id(new PHUIDiffInlineCommentTableScaffold()) + ->addRowScaffold($view); + } + } diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php index 47710a85e0..da89f79079 100644 --- a/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php +++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php @@ -104,32 +104,7 @@ final class PHUIDiffInlineCommentEditView $this->renderBody(), )); - if ($this->renderer == '1up') { - $cells = array( - phutil_tag('th', array()), - phutil_tag('th', array()), - phutil_tag( - 'td', - array('colspan' => 3, 'class' => 'right3'), - $content), - ); - } else { - $cells = array( - phutil_tag('th', array()), - phutil_tag( - 'td', - array('class' => 'left'), - $this->onRight ? null : $content), - phutil_tag('th', array()), - phutil_tag( - 'td', - array('colspan' => 3, 'class' => 'right3'), - $this->onRight ? $content : null), - ); - } - - $row = phutil_tag('tr', array('class' => 'inline-comment-splint'), $cells); - return phutil_tag('table', array(), $row); + return $content; } private function renderInputs() { diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css index 5c3c33e5c0..b302f8b23b 100644 --- a/webroot/rsrc/css/application/differential/changeset-view.css +++ b/webroot/rsrc/css/application/differential/changeset-view.css @@ -423,13 +423,6 @@ td.cov-I { text-decoration: none; } -/* Create a wide band of color behind the inline edit interface so it is easy - to find by skimming the page while scrolling. -*/ -tr.inline-comment-splint { - background: #f9f1d5; -} - tr.differential-inline-hidden { display: none; }