mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
- Search forms now display the subclasses of the specified class...
SVN:trunk[393]
This commit is contained in:
28
js/utils.js
28
js/utils.js
@@ -49,3 +49,31 @@ function UpdateFileName(id, sNewFileName)
|
||||
$('#'+id).val(sNewFileName);
|
||||
$('#name_'+id).text(sNewFileName);
|
||||
}
|
||||
/**
|
||||
* Reload a search form for the specified class
|
||||
*/
|
||||
function ReloadSearchForm(divId, sClassName, sBaseClass)
|
||||
{
|
||||
$('#'+divId).block();
|
||||
var formEvents = $('#'+divId+' form').data('events');
|
||||
var bSubmitHookIsUsed = false;
|
||||
if ( (formEvents != undefined) && (SubmitHook != undefined))
|
||||
{
|
||||
// Assume that we're using the function submit hook...
|
||||
bSubmitHookIsUsed = true;
|
||||
}
|
||||
$('#'+divId+' form').unbind('submit');
|
||||
$.get('ajax.render.php',
|
||||
{ operation: 'search_form', className: sClassName, baseClass: sBaseClass, currentId: divId },
|
||||
function(data){
|
||||
$('#'+divId).empty();
|
||||
$('#'+divId).append(data);
|
||||
if (bSubmitHookIsUsed)
|
||||
{
|
||||
$('#'+divId+' form').bind('submit', SubmitHook);
|
||||
}
|
||||
$('#'+divId).unblock();
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user