|
@@ -13,12 +13,12 @@
|
|
// along with this program; if not, write to the Free Software
|
|
// along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
-function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|
|
|
|
|
+function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper)
|
|
{
|
|
{
|
|
this.id = id;
|
|
this.id = id;
|
|
- this.sClass = sClass;
|
|
|
|
- this.sAttCode = sAttCode;
|
|
|
|
- this.sSuffix = sSuffix;
|
|
|
|
|
|
+ this.sTargetClass = sTargetClass;
|
|
|
|
+ this.sFilter = sFilter;
|
|
|
|
+ this.sTitle = sTitle;
|
|
this.emptyHtml = ''; // content to be displayed when the search results are empty (when opening the dialog)
|
|
this.emptyHtml = ''; // content to be displayed when the search results are empty (when opening the dialog)
|
|
this.emptyOnClose = true; // Workaround for the JQuery dialog being very slow when opening and closing if the content contains many INPUT tags
|
|
this.emptyOnClose = true; // Workaround for the JQuery dialog being very slow when opening and closing if the content contains many INPUT tags
|
|
this.oWizardHelper = oWizHelper;
|
|
this.oWizardHelper = oWizHelper;
|
|
@@ -60,9 +60,8 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|
}
|
|
}
|
|
var theMap = { sAttCode: me.sAttCode,
|
|
var theMap = { sAttCode: me.sAttCode,
|
|
iInputId: me.id,
|
|
iInputId: me.id,
|
|
- sSuffix: me.sSuffix,
|
|
|
|
- 'class': me.sClass,
|
|
|
|
- sValue: value,
|
|
|
|
|
|
+ sTitle: me.sTitle,
|
|
|
|
+ sTargetClass: me.sTargetClass,
|
|
operation: 'objectSearchForm'
|
|
operation: 'objectSearchForm'
|
|
}
|
|
}
|
|
|
|
|
|
@@ -123,9 +122,9 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|
|
|
|
|
this.DoSearchObjects = function(id)
|
|
this.DoSearchObjects = function(id)
|
|
{
|
|
{
|
|
- var theMap = { sAttCode: me.sAttCode,
|
|
|
|
|
|
+ var theMap = { sTargetClass: me.sTargetClass,
|
|
iInputId: me.id,
|
|
iInputId: me.id,
|
|
- sSuffix: me.sSuffix
|
|
|
|
|
|
+ sFilter: me.sFilter
|
|
}
|
|
}
|
|
|
|
|
|
// Gather the parameters from the search form
|
|
// Gather the parameters from the search form
|
|
@@ -151,7 +150,6 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|
}
|
|
}
|
|
|
|
|
|
theMap['sRemoteClass'] = theMap['class']; // swap 'class' (defined in the form) and 'remoteClass'
|
|
theMap['sRemoteClass'] = theMap['class']; // swap 'class' (defined in the form) and 'remoteClass'
|
|
- theMap['class'] = me.sClass;
|
|
|
|
theMap.operation = 'searchObjectsToSelect'; // Override what is defined in the form itself
|
|
theMap.operation = 'searchObjectsToSelect'; // Override what is defined in the form itself
|
|
|
|
|
|
sSearchAreaId = '#dr_'+me.id;
|
|
sSearchAreaId = '#dr_'+me.id;
|
|
@@ -187,11 +185,9 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|
$('#label_'+this.id).addClass('ac_dlg_loading');
|
|
$('#label_'+this.id).addClass('ac_dlg_loading');
|
|
|
|
|
|
// Query the server again to get the display name of the selected object
|
|
// Query the server again to get the display name of the selected object
|
|
- var theMap = { sAttCode: me.sAttCode,
|
|
|
|
|
|
+ var theMap = { sTargetClass: me.sTargetClass,
|
|
iInputId: me.id,
|
|
iInputId: me.id,
|
|
iObjectId: iObjectId,
|
|
iObjectId: iObjectId,
|
|
- sSuffix: me.sSuffix,
|
|
|
|
- 'class': me.sClass,
|
|
|
|
operation: 'getObjectName'
|
|
operation: 'getObjectName'
|
|
}
|
|
}
|
|
|
|
|
|
@@ -246,10 +242,8 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|
$('#label_'+me.id).addClass('ac_dlg_loading');
|
|
$('#label_'+me.id).addClass('ac_dlg_loading');
|
|
}
|
|
}
|
|
me.oWizardHelper.UpdateWizard();
|
|
me.oWizardHelper.UpdateWizard();
|
|
- var theMap = { sAttCode: me.sAttCode,
|
|
|
|
|
|
+ var theMap = { sTargetClass: me.sTargetClass,
|
|
iInputId: me.id,
|
|
iInputId: me.id,
|
|
- sSuffix: me.sSuffix,
|
|
|
|
- 'class': me.sClass,
|
|
|
|
'json': me.oWizardHelper.ToJSON(),
|
|
'json': me.oWizardHelper.ToJSON(),
|
|
operation: 'objectCreationForm'
|
|
operation: 'objectCreationForm'
|
|
}
|
|
}
|
|
@@ -309,10 +303,8 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|
if (CheckFields(sFormId, true))
|
|
if (CheckFields(sFormId, true))
|
|
{
|
|
{
|
|
$('#'+sFormId).block();
|
|
$('#'+sFormId).block();
|
|
- var theMap = { sAttCode: me.sAttCode,
|
|
|
|
|
|
+ var theMap = { sTargetClass: me.sTargetClass,
|
|
iInputId: me.id,
|
|
iInputId: me.id,
|
|
- sSuffix: me.sSuffix,
|
|
|
|
- 'class': me.sClass,
|
|
|
|
'json': me.oWizardHelper.ToJSON()
|
|
'json': me.oWizardHelper.ToJSON()
|
|
}
|
|
}
|
|
|
|
|