Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Always show the save buttons in the modal windows (see #5985)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Sep 26, 2013
1 parent f8b8348 commit 354b8ce
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
6 changes: 3 additions & 3 deletions assets/contao/js/core-uncompressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ var Backend =
openModalWindow: function(width, title, content) {
new SimpleModal({
'width': width,
'btn_ok': Contao.lang.close,
'hideFooter': true,

This comment has been minimized.

Copy link
@Zeromax

Zeromax Sep 27, 2013

related to changes from #5985
@leofeyer Is it realy needed to remove the footer and Close Button here? Can we get this Button back?

try this code:

.simple-modal .simple-modal-footer {
    height: 0px;
    border: none;
    margin: 0px;
    padding: 0px;
}
.simple-modal .simple-modal-footer .btn.primary {
    position: relative;
    bottom: 35px;
    right: 20px;
}

The footer height from the modal Window reduces to 0px and I am moving the modal cloase button a little bit up to get it in the same line as the save Buttons.
So the only Thing I don't like is the scrollbar on the right. But at the moment I have no idea for this.

Then it lookes like the image from @fixounet in his first comment.

This comment has been minimized.

Copy link
@Zeromax

Zeromax Sep 27, 2013

So we have to specify the template in here otherwise our changes are global and affect all modal windows:

openModalImage: function(options) {
    var opt = options || {};
    var M = new SimpleModal({
        /* placeholder ;) */
        template:      "<div class=\"simple-modal-header\"><h1>{_TITLE_}</h1></div><div class=\"simple-modal-body\"><div class=\"contents\">{_CONTENTS_}</div></div><div class=\"simple-modal-footer simple-modal-closebutton\"></div>",
        /* placeholder ;) */
    });

so we can use the simple-modal-closebutton css class.

'draggable': false,
'overlayOpacity': .5,
'onShow': function() { document.body.setStyle('overflow', 'hidden'); },
Expand All @@ -737,7 +737,7 @@ var Backend =
var opt = options || {};
var M = new SimpleModal({
'width': opt.width,
'btn_ok': Contao.lang.close,
'hideFooter': true,
'draggable': false,
'overlayOpacity': .5,
'onShow': function() { document.body.setStyle('overflow', 'hidden'); },
Expand All @@ -759,7 +759,7 @@ var Backend =
if (!opt.height || opt.height > max) opt.height = max;
var M = new SimpleModal({
'width': opt.width,
'btn_ok': Contao.lang.close,
'hideFooter': true,
'draggable': false,
'overlayOpacity': .5,
'onShow': function() { document.body.setStyle('overflow', 'hidden'); },
Expand Down
2 changes: 1 addition & 1 deletion assets/contao/js/core.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions system/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Contao Open Source CMS Changelog
Version 3.2.beta1 (2013-XX-XX)
------------------------------

### Improved
Always show the save buttons in the modal windows (see #5985).

### New
Add the CSS classes "first" and "last" to articles/content elements (see #2583).

Expand Down
Loading

0 comments on commit 354b8ce

Please sign in to comment.