Elastic: Fix dialog resizing (Bifrost#T106185)
This commit is contained in:
parent
de27933930
commit
ab3c7e1996
2 changed files with 13 additions and 6 deletions
|
@ -4131,10 +4131,14 @@ function rcube_calendar_ui(settings)
|
|||
|
||||
$('#eventshow .changersvp').click(function(e) {
|
||||
var d = $('#eventshow'),
|
||||
h = -$(this).closest('.event-line').toggle().height();
|
||||
record = $(this).closest('.event-line,.form-group'),
|
||||
h = d.height() - record.height();
|
||||
|
||||
record.toggle();
|
||||
$('#event-rsvp').slideDown(300, function() {
|
||||
h += $(this).height();
|
||||
me.dialog_resize(d.get(0), d.height() + h, d.outerWidth() - 50);
|
||||
me.dialog_resize(d.get(0), h + $(this).outerHeight());
|
||||
if (this.scrollIntoView)
|
||||
this.scrollIntoView(false);
|
||||
});
|
||||
return false;
|
||||
})
|
||||
|
|
|
@ -1078,11 +1078,14 @@ function rcube_libcalendaring(settings)
|
|||
// resize and reposition (center) the dialog window
|
||||
this.dialog_resize = function(id, height, width)
|
||||
{
|
||||
var win = $(window), w = win.width(), h = win.height();
|
||||
var win = $(window), w = win.width(), h = win.height(),
|
||||
dialog = $('.ui-dialog:visible'),
|
||||
h_delta = dialog.find('.ui-dialog-titlebar').outerHeight() + dialog.find('.ui-dialog-buttonpane').outerHeight() + 30,
|
||||
w_delta = 50;
|
||||
|
||||
$(id).dialog('option', {
|
||||
height: Math.min(h-20, height+130),
|
||||
width: Math.min(w-20, width+50)
|
||||
height: Math.min(h-20, height + h_delta),
|
||||
width: Math.min(w-20, width + w_delta)
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue