فهرست منبع

#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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3121 a333f486-631f-4898-b8df-5754b55c2be0

dflaven 11 سال پیش
والد
کامیت
8a5cd7c98f
3فایلهای تغییر یافته به همراه8 افزوده شده و 3 حذف شده
  1. 1 1
      application/ui.extkeywidget.class.inc.php
  2. 1 0
      js/linksdirectwidget.js
  3. 6 2
      pages/ajax.render.php

+ 1 - 1
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('</div></div></div>');
 //		$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);");
 	}

+ 1 - 0
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(); }
 				});

+ 6 - 2
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')