From 9be9e7434822040211ed9517444c1da46e401f33 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Wed, 9 Aug 2017 11:41:23 -0400 Subject: [PATCH] Shrink survey modal in view-only mode --- .../templates/survey-maker/survey-maker.block.less | 13 ++++++------- .../templates/survey-maker/surveys/show.factory.js | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/awx/ui/client/src/templates/survey-maker/survey-maker.block.less b/awx/ui/client/src/templates/survey-maker/survey-maker.block.less index 92d882f22f..a10f40d39f 100644 --- a/awx/ui/client/src/templates/survey-maker/survey-maker.block.less +++ b/awx/ui/client/src/templates/survey-maker/survey-maker.block.less @@ -5,7 +5,6 @@ max-width: 1200px; padding: 0px; transform: translate(-50%, 0%); - width: ~"calc(100vw - 50px)" !important; .ui-dialog-buttonpane, .ui-dialog-titlebar { display:none; @@ -74,12 +73,6 @@ flex: 0 0 90%; max-width: 500px; } - -.SurveyMaker-previewPanel--viewOnly { - flex: 0 0 1155px; - max-width: 1155px; -} - .SurveyMaker-separatorPanel { display: flex; flex: 0 0 51px; @@ -246,4 +239,10 @@ height: 1px; } } +} + +@media screen and (max-width: 600px) { + .SurveyMaker-dialog { + max-width: 100vw; + } } \ No newline at end of file diff --git a/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js b/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js index 59f4a8511e..12faa2f401 100644 --- a/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js +++ b/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js @@ -9,7 +9,7 @@ export default title = params.title, element, target = (mode==='survey-taker') ? 'password-modal' : "survey-modal-dialog", - width = params.scope.can_edit ? 1200 : 600; + width = params.scope.can_edit ? 'calc(100vw - 50px)' : 600; CreateDialog({