mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +02:00
Fixed Trac #371: popup dialog's dimensions (welcome screen and create or lookup dialogs) are now adjusted to fit into the screen.
SVN:trunk[1183]
This commit is contained in:
@@ -54,6 +54,15 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
||||
this.UpdateSizes = function()
|
||||
{
|
||||
var dlg = $('#ac_dlg_'+me.id);
|
||||
// Adjust the dialog's size to fit into the screen
|
||||
if (dlg.width() > ($(window).width()-40))
|
||||
{
|
||||
dlg.width($(window).width()-40);
|
||||
}
|
||||
if (dlg.height() > ($(window).height()-70))
|
||||
{
|
||||
dlg.height($(window).height()-70);
|
||||
}
|
||||
var searchForm = dlg.find('div.display_block:first'); // Top search form, enclosing display_block
|
||||
var results = $('#dr_'+me.id);
|
||||
padding_right = parseInt(dlg.css('padding-right').replace('px', ''));
|
||||
@@ -224,6 +233,15 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
||||
// Modify the action of the cancel button
|
||||
$('#ac_create_'+me.id+' button.cancel').unbind('click').click( me.CloseCreateObject );
|
||||
me.ajax_request = null;
|
||||
// Adjust the dialog's size to fit into the screen
|
||||
if ($('#ac_create_'+me.id).width() > ($(window).width()-40))
|
||||
{
|
||||
$('#ac_create_'+me.id).width($(window).width()-40);
|
||||
}
|
||||
if ($('#ac_create_'+me.id).height() > ($(window).height()-70))
|
||||
{
|
||||
$('#ac_create_'+me.id).height($(window).height()-70);
|
||||
}
|
||||
},
|
||||
'html'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user