mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Preparing for the integration of the version 2.0 of the setup.
Some changes to the application layout: logs now go to the ./log folder ./data should be used to store application's data. SVN:trunk[2189]
This commit is contained in:
@@ -337,14 +337,53 @@ function GetSelectedModules()
|
||||
return aModules.join(',');
|
||||
}
|
||||
|
||||
function WizardAsyncAction(sActionCode, oParams)
|
||||
function WizardAsyncAction(sActionCode, oParams, OnErrorFunction)
|
||||
{
|
||||
var sStepClass = $('#_class').val();
|
||||
var sStepState = $('#_state').val();
|
||||
|
||||
var oMap = { operation: 'async_action', step_class: sStepClass, step_state: sStepState, code: sActionCode, params: oParams };
|
||||
|
||||
var ErrorFn = OnErrorFunction;
|
||||
$(document).ajaxError(function(event, request, settings) {
|
||||
$('#async_action').html('<pre>'+request.responseText+'</pre>').show();
|
||||
if (ErrorFn)
|
||||
{
|
||||
ErrorFn();
|
||||
}
|
||||
});
|
||||
|
||||
$.post(GetAbsoluteUrlAppRoot()+'setup/ajax.dataloader.php', oMap, function(data) {
|
||||
$('#async_action').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
function WizardUpdateButtons()
|
||||
{
|
||||
if (CanMoveForward())
|
||||
{
|
||||
$("#btn_next").removeAttr("disabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#btn_next").attr("disabled", "disabled");
|
||||
}
|
||||
|
||||
if (CanMoveBackward())
|
||||
{
|
||||
$("#btn_back").removeAttr("disabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#btn_back").attr("disabled", "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
function ExecuteStep(sStep)
|
||||
{
|
||||
var oParams = { installer_step: sStep, installer_config: $('#installer_parameters').val() };
|
||||
WizardAsyncAction('execute_step', oParams, function() {
|
||||
$('#wiz_form').data('installation_status', 'error');
|
||||
WizardUpdateButtons();
|
||||
} );
|
||||
}
|
||||
Reference in New Issue
Block a user