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)
|
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();
|
||||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) })
|
$(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 (!?)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// adjust calendar view size
|
// adjust calendar view size
|
||||||
|
|
|
@ -1296,7 +1296,6 @@ function manticore_close()
|
||||||
dialogClass: 'popupmessage error',
|
dialogClass: 'popupmessage error',
|
||||||
title: rcmail.gettext('kolab_files.sessionterminatedtitle'),
|
title: rcmail.gettext('kolab_files.sessionterminatedtitle'),
|
||||||
close: function() { window.close(); },
|
close: function() { window.close(); },
|
||||||
position: ['center', 'center'],
|
|
||||||
width: 420,
|
width: 420,
|
||||||
minHeight: 90
|
minHeight: 90
|
||||||
}).show();
|
}).show();
|
||||||
|
|
|
@ -521,8 +521,7 @@ function rcube_kolab_notes_ui(settings)
|
||||||
// resize and reposition dialog window
|
// resize and reposition dialog window
|
||||||
form = $('#noteslistpropform');
|
form = $('#noteslistpropform');
|
||||||
var win = $(window), w = win.width(), h = win.height();
|
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.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 (!?)
|
|
||||||
|
|
||||||
name = $('#noteslist-name').prop('disabled', !has_permission(list, 'a')).val(list.editname || list.name);
|
name = $('#noteslist-name').prop('disabled', !has_permission(list, 'a')).val(list.editname || list.name);
|
||||||
name.select();
|
name.select();
|
||||||
|
|
|
@ -218,8 +218,7 @@ libkolab_audittrail.render_changelog = function(data, object, folder)
|
||||||
libkolab_audittrail.dialog_resize = function(id, height, width)
|
libkolab_audittrail.dialog_resize = function(id, height, width)
|
||||||
{
|
{
|
||||||
var win = $(window), w = win.width(), h = win.height();
|
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) })
|
$(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 (!?)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3334,8 +3334,7 @@ function rcube_tasklist_ui(settings)
|
||||||
this.dialog_resize = function(id, height, width)
|
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();
|
||||||
$(id).dialog('option', { height: Math.min(h-20, height+130), width: Math.min(w-20, width+50) })
|
$(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 (!?)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue