Drop redundant dialog positioning code.
Dialogs are centered by default, no need to configure that. Also, this code causes invalid positioning on more recent jQuery-UI version.
This commit is contained in:
parent
baf491e2bb
commit
d45b008528
5 changed files with 4 additions and 9 deletions
|
@ -3490,8 +3490,7 @@ function rcube_calendar_ui(settings)
|
|||
this.dialog_resize = function(id, height, width)
|
||||
{
|
||||
var win = $(window), w = win.width(), h = win.height();
|
||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) })
|
||||
.dialog('option', 'position', ['center', 'center']); // only works in a separate call (!?)
|
||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) });
|
||||
};
|
||||
|
||||
// adjust calendar view size
|
||||
|
|
|
@ -1296,7 +1296,6 @@ function manticore_close()
|
|||
dialogClass: 'popupmessage error',
|
||||
title: rcmail.gettext('kolab_files.sessionterminatedtitle'),
|
||||
close: function() { window.close(); },
|
||||
position: ['center', 'center'],
|
||||
width: 420,
|
||||
minHeight: 90
|
||||
}).show();
|
||||
|
|
|
@ -521,8 +521,7 @@ function rcube_kolab_notes_ui(settings)
|
|||
// resize and reposition dialog window
|
||||
form = $('#noteslistpropform');
|
||||
var win = $(window), w = win.width(), h = win.height();
|
||||
$dialog.dialog('option', { height: Math.min(h-20, form.height()+130), width: Math.min(w-20, form.width()+50) })
|
||||
.dialog('option', 'position', ['center', 'center']); // only works in a separate call (!?)
|
||||
$dialog.dialog('option', { height: Math.min(h-20, form.height()+130), width: Math.min(w-20, form.width()+50) });
|
||||
|
||||
name = $('#noteslist-name').prop('disabled', !has_permission(list, 'a')).val(list.editname || list.name);
|
||||
name.select();
|
||||
|
|
|
@ -218,8 +218,7 @@ libkolab_audittrail.render_changelog = function(data, object, folder)
|
|||
libkolab_audittrail.dialog_resize = function(id, height, width)
|
||||
{
|
||||
var win = $(window), w = win.width(), h = win.height();
|
||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) })
|
||||
.dialog('option', 'position', ['center', 'center']); // only works in a separate call (!?)
|
||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) });
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3334,8 +3334,7 @@ function rcube_tasklist_ui(settings)
|
|||
this.dialog_resize = function(id, height, width)
|
||||
{
|
||||
var win = $(window), w = win.width(), h = win.height();
|
||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) })
|
||||
.dialog('option', 'position', ['center', 'center']); // only works in a separate call (!?)
|
||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue