mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
- Automatic adjustment of the width and height of the ModalDlg to fit the document's size
SVN:code[149]
This commit is contained in:
@@ -115,6 +115,8 @@ class UILinksWizard
|
|||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#ModalDlg').html(data);
|
$('#ModalDlg').html(data);
|
||||||
|
dlgWidth = $(document).width() - 100;
|
||||||
|
$('#ModalDlg').css('width', dlgWidth);
|
||||||
$('#ModalDlg').jqmShow();
|
$('#ModalDlg').jqmShow();
|
||||||
},
|
},
|
||||||
'html'
|
'html'
|
||||||
@@ -149,9 +151,14 @@ class UILinksWizard
|
|||||||
nb_rows = $('#SearchResultsToAdd table.listResults tr').length;
|
nb_rows = $('#SearchResultsToAdd table.listResults tr').length;
|
||||||
if(nb_rows > 10)
|
if(nb_rows > 10)
|
||||||
{
|
{
|
||||||
$('#SearchResultsToAdd table.listResults tbody').attr('height', '300px');
|
yOffset = $('#ModalDlg').height() - $('#SearchResultsToAdd table.listResults tbody').height();
|
||||||
|
tbodyHeight = $(document).height() - 100 - yOffset;
|
||||||
|
if ($('#ModalDlg').height() > ($(document).height() - 100))
|
||||||
|
{
|
||||||
|
$('#SearchResultsToAdd table.listResults tbody').attr('height', tbodyHeight);
|
||||||
$('#SearchResultsToAdd .listResults tbody').css('overflow', 'auto');
|
$('#SearchResultsToAdd .listResults tbody').css('overflow', 'auto');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
'html'
|
'html'
|
||||||
|
|||||||
Reference in New Issue
Block a user