mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Keep the current value iin the search form when reloading the search form for a different (sub)class. For example Contact => Person.
SVN:trunk[1725]
This commit is contained in:
14
js/utils.js
14
js/utils.js
@@ -119,8 +119,18 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext)
|
||||
}
|
||||
sAction = $('#ds_'+divId+' form').attr('action');
|
||||
|
||||
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?'+sContext,
|
||||
{ operation: 'search_form', className: sClassName, baseClass: sBaseClass, currentId: divId, action: sAction },
|
||||
// Save the current values in the form
|
||||
var oMap = {};
|
||||
$('#ds_'+divId+" form :input[name!='']").each(function() {
|
||||
oMap[this.name] = this.value;
|
||||
});
|
||||
oMap.operation = 'search_form';
|
||||
oMap.className = sClassName;
|
||||
oMap.baseClass = sBaseClass;
|
||||
oMap.currentId = divId;
|
||||
oMap.action = sAction;
|
||||
|
||||
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?'+sContext, oMap,
|
||||
function(data) {
|
||||
oDiv.empty();
|
||||
oDiv.append(data);
|
||||
|
||||
Reference in New Issue
Block a user