Browse Source

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.
Felix Niklas 9 years ago
parent
commit
10ab45e4fd

+ 3 - 0
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

+ 3 - 0
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;
 }