diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index ee9166de7..06c23d023 100644 --- a/application/ui.extkeywidget.class.inc.php +++ b/application/ui.extkeywidget.class.inc.php @@ -453,7 +453,7 @@ EOF cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), array('formPrefix' => $this->iId, 'noRelations' => true)); $oPage->add(''); // $oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: $(window).width()*0.8, height: 'auto', autoOpen: false, modal: true, title: '$sDialogTitle'});\n"); - $oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: 'auto', height: 'auto', autoOpen: false, modal: true, title: '$sDialogTitle'});\n"); + $oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: 'auto', height: 'auto', maxHeight: $(window).height() - 50, autoOpen: false, modal: true, title: '$sDialogTitle'});\n"); $oPage->add_ready_script("$('#dcr_{$this->iId} form').removeAttr('onsubmit');"); $oPage->add_ready_script("$('#dcr_{$this->iId} form').bind('submit.uilinksWizard', oACWidget_{$this->iId}.DoCreateObject);"); } diff --git a/js/linksdirectwidget.js b/js/linksdirectwidget.js index 5884a84ff..936549f63 100644 --- a/js/linksdirectwidget.js +++ b/js/linksdirectwidget.js @@ -203,6 +203,7 @@ $(function() modal: true, width: 'auto', height: 'auto', + maxHeight: $(window).height() - 50, position: { my: "center", at: "center", of: window }, close: function() { me._onDlgClose(); } }); diff --git a/pages/ajax.render.php b/pages/ajax.render.php index a2b32ea51..1e05db352 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -57,6 +57,7 @@ try case 'pagination': $oPage->SetContentType('text/html'); $extraParams = utils::ReadParam('extra_param', '', false, 'raw_data'); + $aExtraParams = array(); if (is_array($extraParams)) { $aExtraParams = $extraParams; @@ -64,10 +65,13 @@ try else { $sExtraParams = stripslashes($extraParams); - $aExtraParams = array(); if (!empty($sExtraParams)) { - $aExtraParams = json_decode(str_replace("'", '"', $sExtraParams), true /* associative array */); + $val = json_decode(str_replace("'", '"', $sExtraParams), true /* associative array */); + if ($val !== null) + { + $aExtraParams = $val; + } } } if ($sEncoding == 'oql')