فهرست منبع

Support of derived classes in "add_remove" edition mode for AttributeLinkSet fields (the search form was not refreshing / loading properly when toggling the class to search for).

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3822 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 9 سال پیش
والد
کامیت
47c69e75c5
3فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 1 1
      application/ui.linksdirectwidget.class.inc.php
  2. 5 1
      js/linksdirectwidget.js
  3. 1 1
      js/utils.js

+ 1 - 1
application/ui.linksdirectwidget.class.inc.php

@@ -294,7 +294,7 @@ class UILinksWidgetDirect
 		$valuesDef = $oLinksetDef->GetValuesDef();				
 		if ($valuesDef === null)
 		{
-			$oFilter = new DBObjectSearch($this->sLinkedClass);
+			$oFilter = new DBObjectSearch($sRemoteClass);
 		}
 		else
 		{

+ 5 - 1
js/linksdirectwidget.js

@@ -238,8 +238,12 @@ $(function()
 				}
 			);
 			oParams.operation = 'searchObjectsToAdd2';
-			oParams['class'] = this.options.class_name;
 			oParams.real_class = '';
+			if ((oParams['class'] != undefined) && (oParams['class'] != ''))
+			{
+				oParams.real_class = oParams['class'];				
+			}
+			oParams['class'] = this.options.class_name;
 			oParams.att_code = this.options.att_code;
 			oParams.iInputId = this.id;
 			if (this.options.oWizardHelper)

+ 1 - 1
js/utils.js

@@ -228,7 +228,7 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext)
 				{
 					// Restore the previously bound submit handlers
 					var sEventName = 'submit';
-					if (aSubmit[index].namespace != undefined)
+					if ((aSubmit[index].namespace != undefined) && (aSubmit[index].namespace != ''))
 					{
 						sEventName += '.'+aSubmit[index].namespace;
 					}