From baa998faa41a0b646fb88ffef94e7b8ccf2cb259 Mon Sep 17 00:00:00 2001 From: Gareth Evans Date: Mon, 16 Jun 2014 13:05:08 -0700 Subject: [PATCH] Disable full screen mode for inline comments Summary: Full screen is a little foobar so disabling it for inline comments Fixes T5272 Test Plan: View inline comment after change, make sure full screen option has gone. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5272 Differential Revision: https://secure.phabricator.com/D9579 --- .../PhabricatorInlineCommentController.php | 3 ++- .../control/PhabricatorRemarkupControl.php | 25 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php index 7bb547a756..09f3528ff3 100644 --- a/src/infrastructure/diff/PhabricatorInlineCommentController.php +++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php @@ -243,7 +243,8 @@ abstract class PhabricatorInlineCommentController ->setUser($this->getRequest()->getUser()) ->setSigil('differential-inline-comment-edit-textarea') ->setName('text') - ->setValue($text); + ->setValue($text) + ->setDisableFullScreen(true); } } diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php index ff550299f0..3d37c7d671 100644 --- a/src/view/form/control/PhabricatorRemarkupControl.php +++ b/src/view/form/control/PhabricatorRemarkupControl.php @@ -3,11 +3,18 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { private $disableMacro = false; + private $disableFullScreen = false; + public function setDisableMacros($disable) { $this->disableMacro = $disable; return $this; } + public function setDisableFullScreen($disable) { + $this->disableFullScreen = $disable; + return $this; + } + protected function renderInput() { $id = $this->getID(); if (!$id) { @@ -90,15 +97,17 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { 'href' => PhabricatorEnv::getDoclink('Remarkup Reference'), ); - $actions[] = array( - 'spacer' => true, - 'align' => 'right', - ); + if (!$this->disableFullScreen) { + $actions[] = array( + 'spacer' => true, + 'align' => 'right', + ); - $actions['fa-arrows-alt'] = array( - 'tip' => pht('Fullscreen Mode'), - 'align' => 'right', - ); + $actions['fa-arrows-alt'] = array( + 'tip' => pht('Fullscreen Mode'), + 'align' => 'right', + ); + } $buttons = array(); foreach ($actions as $action => $spec) {