Files
iTop/setup/setup.js
Denis Flaven 156993a517 - Show only the "vsisible" parameters in the config file, or the ones already present in case of upgrade. Hide others for readability.
- Properly check DB connection in case of upgrade (setup wizard)
- Cleanup old remains of the V1.x setup program.

SVN:trunk[2537]
2012-12-06 10:53:42 +00:00

50 lines
1.1 KiB
JavaScript

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();
} );
}