From 10ab45e4fde4f66acd81c234ec462e5646a8893d Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 14 Sep 2015 18:47:42 +0200 Subject: [PATCH] modal: add large mode set attribute large to true when creating a modal. It's 740px wide (default width is 660px). 740px because the minimum supported width is 1024px (1280px recommended). The sidebar is 260px wide, leaving 764px for a local modal. 740px results in a minimum padding of 12px around the modal window inside the content window. --- .../app/controllers/_application_controller.js.coffee | 3 +++ app/assets/stylesheets/zammad.css.scss | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 1483b5ab0..300c98377 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -554,6 +554,7 @@ class App.ControllerModal extends App.Controller backdrop: true keyboard: true close: true + large: false head: '?' buttonClass: 'btn--success' centerButtons: [] @@ -562,6 +563,8 @@ class App.ControllerModal extends App.Controller options = _.extend( defaults, options ) + @className += ' modal--large' if options.large + super(options) if @shown diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 30581eae4..ce6df973a 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -4514,6 +4514,9 @@ footer { margin-top: 35px; margin-bottom: 35px; } +.modal--large .modal-dialog { + max-width: 740px; +} .modal-dialog.wizard { max-width: 460px; }