From 8f25fb8e64cf02def3a1a9b6e8d35f778efe34f2 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 1 Apr 2014 13:09:02 +0000 Subject: [PATCH] #878: Missing sscrollbar in "linkset-direct" edition popup dialog #881: Paginated list in popup dialog is broken - Missing scrollbar in the popup when using the [+] button SVN:trunk[3121] --- application/ui.extkeywidget.class.inc.php | 2 +- js/linksdirectwidget.js | 1 + pages/ajax.render.php | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index ee9166de79..06c23d023f 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 5884a84ffe..936549f63a 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 a2b32ea511..1e05db3521 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')