First integration pass of the new "2.0" setup, but still work in progress...

SVN:trunk[2191]
This commit is contained in:
Denis Flaven
2012-09-19 12:36:44 +00:00
parent d18ff8339a
commit 54a3a1a89a
3 changed files with 22 additions and 15 deletions

View File

@@ -379,12 +379,19 @@ class ApplicationInstaller
{
throw new Exception("Failed to find the source directory '$sSourcePath', please check the rights of the web server");
}
if (!is_dir($sTargetPath) && !mkdir($sTargetPath))
if (!is_dir($sTargetPath))
{
throw new Exception("Failed to create directory '$sTargetPath', please check the rights of the web server");
}
// owner:rwx user/group:rx
chmod($sTargetPath, 0755);
if (!mkdir($sTargetPath))
{
throw new Exception("Failed to create directory '$sTargetPath', please check the rights of the web server");
}
else
{
// adjust the rights if and only if the directory was just created
// owner:rwx user/group:rx
chmod($sTargetPath, 0755);
}
}
$oFactory = new ModelFactory($sSourcePath);
$aModules = $oFactory->FindModules();

View File

@@ -697,11 +697,9 @@ DoCheckDBConnection(); // Validate the initial values immediately
$("#db_server").bind("keyup change", function() { CheckDBConnection(); });
$("#db_user").bind("keyup change", function() { CheckDBConnection(); });
$("#db_pwd").bind("keyup change", function() { CheckDBConnection(); });
$("#db_new_name").bind("click", function() { $("#create_db").attr("checked", "checked"); });
$("#db_new_name").bind("keyup change", function() { WizardUpdateButtons(); });
$("#db_name").bind("keyup change", function() { WizardUpdateButtons(); });
$("#db_new_name").bind("click keyup change", function() { $("#create_db").attr("checked", "checked"); WizardUpdateButtons(); });
$("#db_name").bind("click keyup change", function() { $("#existing_db").attr("checked", "checked"); WizardUpdateButtons(); });
$("#db_prefix").bind("keyup change", function() { WizardUpdateButtons(); });
$("#db_name").bind("click", function() { $("#existing_db").attr("checked", "checked"); WizardUpdateButtons(); });
$("#existing_db").bind("click change", function() { WizardUpdateButtons(); });
$("#create_db").bind("click change", function() { WizardUpdateButtons(); });
EOF
@@ -836,8 +834,7 @@ EOF
$sDBNameInput .= '</select>';
}
$oPage->add_ready_script('$("#db_name_container").html("'.addslashes($sDBNameInput).'");');
$oPage->add_ready_script('$("#db_name").bind("click", function() { $("#existing_db").attr("checked", "checked"); WizardUpdateButtons(); });');
$oPage->add_ready_script('$("#db_name").bind("keyup change", function() { WizardUpdateButtons(); });');
$oPage->add_ready_script('$("#db_name").bind("click keyup change", function() { $("#existing_db").attr("checked", "checked"); WizardUpdateButtons(); });');
}
$oPage->add_ready_script('WizardUpdateButtons();');

View File

@@ -607,7 +607,7 @@ class WizStepAdminAccount extends WizardStep
public function Display(WebPage $oPage)
{
$sAdminUser = $this->oWizard->GetParameter('admin_user', '');
$sAdminUser = $this->oWizard->GetParameter('admin_user', 'admin');
$sAdminPwd = $this->oWizard->GetParameter('admin_pwd', '');
$sConfirmPwd = $this->oWizard->GetParameter('confirm_pwd', '');
$sAdminLanguage = $this->oWizard->GetParameter('admin_language', 'EN US');
@@ -711,7 +711,7 @@ class WizStepModulesChoice extends WizardStep
$aSelectedChoices = json_decode($this->oWizard->GetParameter('selected_components', '{}'), true);
$aSelected = utils::ReadParam('choice', array());
$aSelectedChoices[$index] = $aSelected;
$this->oWizard->SetParameter('selected_components', json_encode($aSelectedChoices, JSON_FORCE_OBJECT));
$this->oWizard->SetParameter('selected_components', json_encode($aSelectedChoices));
if ($this->GetStepInfo($index) == null)
{
@@ -763,7 +763,7 @@ class WizStepModulesChoice extends WizardStep
// relative path: i.e. relative to the directory containing the XML file
$sFullPath = dirname($this->GetSourceFilePath()).'/'.$sBannerPath;
$sRealPath = realpath($sFullPath);
$sBannerUrl = utils::GetDefaultUrlAppRoot().str_replace(APPROOT, '', $sRealPath);
$sBannerUrl = utils::GetDefaultUrlAppRoot().str_replace(realpath(APPROOT), '', $sRealPath);
}
$oPage->add('<td><img src="'.$sBannerUrl.'"/><td>');
}
@@ -1228,6 +1228,8 @@ EOF
<<<EOF
$("#wiz_form").data("installation_status", "completed");
WizardUpdateButtons();
$("#btn_next").unbind("click.install");
$("#btn_next").click();
EOF
);
}
@@ -1249,7 +1251,7 @@ EOF
*/
public function JSCanMoveForward()
{
return 'return ($("#wiz_form").data("installation_status") === "not started");';
return 'return (($("#wiz_form").data("installation_status") === "not started") || ($("#wiz_form").data("installation_status") === "completed"));';
}
/**
@@ -1286,6 +1288,7 @@ class WizStepDone extends WizardStep
public function Display(WebPage $oPage)
{
$oPage->p('Installation Completed.');
$oPage->add('<img style="border:0" src="http://www.combodo.com/stats/?p='.urlencode(ITOP_APPLICATION).'&v='.urlencode(ITOP_VERSION).'"/>');
}
public function CanMoveForward()