BUG 8875 "Feature: New ExtJS based for Install, Login & Main Proce..." UPDATED
- fixes for installer on IE9 - fixes for main uxmodern interface view on IE9 - ux-wizard extjs plugin updated - ux-card-layout extjs plugin updated - extjs library updated to 3.4.0 from 3.2.1 - draw2d library removed from load
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4784,6 +4784,9 @@ function getDirectorySize($path,$maxmtime=0)
|
||||
*/
|
||||
function getCheckSum($files)
|
||||
{
|
||||
G::LoadClass('system');
|
||||
$key = System::getVersion();
|
||||
|
||||
if (!is_array($files)) {
|
||||
$tmp = $files;
|
||||
$files = array();
|
||||
@@ -4795,7 +4798,7 @@ function getDirectorySize($path,$maxmtime=0)
|
||||
if (is_file($file))
|
||||
$checkSum .= md5_file($file);
|
||||
}
|
||||
return md5($checkSum);
|
||||
return md5($checkSum.$key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -287,7 +287,7 @@ class headPublisher {
|
||||
// enabled for particular use
|
||||
$head .= $this->getExtJsLibraries();
|
||||
|
||||
$head .= " <script type='text/javascript' src='/js/ext/draw2d.js'></script>\n";
|
||||
// $head .= " <script type='text/javascript' src='/js/ext/draw2d.js'></script>\n";
|
||||
$head .= " <script type='text/javascript' src='/js/ext/translation.".SYS_LANG.".js'></script>\n";
|
||||
|
||||
if (! isset ( $this->extJsSkin ) || $this->extJsSkin == '') {
|
||||
|
||||
@@ -15,6 +15,8 @@ class Installer extends Controller {
|
||||
|
||||
var $link; #resource for database connection
|
||||
|
||||
public $debug = 1;
|
||||
|
||||
public function __construct() {
|
||||
$this->path_config = PATH_CORE.'config/';
|
||||
$this->path_languages = PATH_CORE.'content/languages/';
|
||||
@@ -47,6 +49,8 @@ class Installer extends Controller {
|
||||
$this->includeExtJS('installer/Wizard', false);
|
||||
$this->includeExtJS('installer/Header', false);
|
||||
$this->includeExtJS('installer/Card', false);
|
||||
|
||||
$this->includeExtJS('installer/installer_cards');
|
||||
$this->includeExtJS('installer/main', false);
|
||||
|
||||
$this->setJSVar('licenseTxt', $licenseContent);
|
||||
|
||||
@@ -81,6 +81,32 @@
|
||||
-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
|
||||
a.options-tool{
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.options-tool:hover {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.options-tool:focus {
|
||||
outline: thin dotted #333333;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
a.options-tool:hover, a:active {
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
#x-panel-header{
|
||||
height: 500px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.x-panel-header-text{
|
||||
text-shadow:#fff 0px 1px 1px;
|
||||
color:#444;
|
||||
@@ -988,21 +1014,18 @@ antes funcionaba.
|
||||
background-image:url(/images/logout.gif);
|
||||
}
|
||||
|
||||
.x-pm-headerbar1 {
|
||||
.x-pm-headerbar {
|
||||
background-color: #32405a;
|
||||
background-image: url("/images/header_bg.jpg");
|
||||
color: #fff;
|
||||
padding: 0px;
|
||||
font: 8pt Tahoma,sans-serif,MiscFixed;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
.x-pm-headerbar2 {
|
||||
background-color: #000;
|
||||
background-image: url("/images/canvastile_bg1.jpg");
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
font: 8pt Tahoma,sans-serif,MiscFixed;
|
||||
font-size: 12px;
|
||||
|
||||
table.x-pm-headerbar td, table th {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.headerRightSection
|
||||
@@ -1533,3 +1556,4 @@ td.x-cnotes-label {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<html>
|
||||
<!-- turn on quirks mode for IE -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=8" />
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
{header}
|
||||
|
||||
@@ -3,12 +3,26 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
{$_header}
|
||||
{literal}
|
||||
<!--[if IE]>
|
||||
<style>
|
||||
table.x-pm-headerbar td, table th {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
{/literal}
|
||||
</head>
|
||||
<body>
|
||||
<div id="panel-header" >
|
||||
<table class="x-pm-headerbar1" width="100%" height="" cellpadding="0" cellspacing="0" border="0">
|
||||
|
||||
<div id="panel-header" />
|
||||
|
||||
<div id="header-content" style="display:none">
|
||||
<table class="x-pm-headerbar">
|
||||
<tr>
|
||||
<td width="33%" valign="middle" style="padding-left:10px">
|
||||
<td width="33%" valign="middle">
|
||||
<img src="{$logo_company}" width="180" height="24"/>
|
||||
</td>
|
||||
|
||||
@@ -17,18 +31,17 @@
|
||||
<td width="33%" align="right" valign="top">
|
||||
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerRightSection">
|
||||
<tr valign="middle">
|
||||
<td width="50%" rowspan="2" valign="top"></td>
|
||||
<td height="12" valign="middle" align="right" valign="top">
|
||||
<a href="#" id="options-tool">
|
||||
<div class="headerRightSideBar">
|
||||
{$userfullname} <br />
|
||||
<span style="font-size:9px">{$rolename}</span>
|
||||
</div>
|
||||
<div id="user-avatar">
|
||||
<img src="{$user_avatar}" width="25" height="25"/>
|
||||
</div>
|
||||
<a href="#" id="options-tool" class="options-tool">
|
||||
{$userfullname}<br />
|
||||
<span style="font-size:9px">{$rolename}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td width="40" align="right">
|
||||
<span id="user-avatar">
|
||||
<img src="{$user_avatar}" width="25" height="25"/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -42,21 +42,21 @@ Ext.ux.Wiz = Ext.extend(Ext.Window, {
|
||||
* covering the card-panel on request, whereas the property identifies the
|
||||
* msg-text to show, and the value is the message text itself. Defaults to
|
||||
<pre><code>
|
||||
{
|
||||
{
|
||||
default : 'Saving...'
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
*
|
||||
* Depending on the contexts the loadMask has to be shown in (using the method
|
||||
* showLoadMask of this class), the object can be configure to hold
|
||||
* various messages.
|
||||
<pre><code>
|
||||
this.loadMaskConfig = {
|
||||
<pre><code>
|
||||
this.loadMaskConfig = {
|
||||
default : 'Saving...',
|
||||
validating : 'Please wait, validating input...',
|
||||
};
|
||||
// loadMask will be shown, displaying the message 'Please wait, validating input...'
|
||||
this.showLoadMask(true, 'validating');
|
||||
};
|
||||
// loadMask will be shown, displaying the message 'Please wait, validating input...'
|
||||
this.showLoadMask(true, 'validating');
|
||||
</code></pre>
|
||||
*/
|
||||
loadMaskConfig : {
|
||||
@@ -237,7 +237,7 @@ Ext.ux.Wiz = Ext.extend(Ext.Window, {
|
||||
Ext.ux.Wiz.superclass.initComponent.call(this);
|
||||
},
|
||||
|
||||
// -------- helper
|
||||
// -------- helper
|
||||
/**
|
||||
* Returns the form-data of all cards in this wizard. The first index is the
|
||||
* id of the card in this wizard,
|
||||
@@ -477,9 +477,7 @@ Ext.ux.Wiz = Ext.extend(Ext.Window, {
|
||||
}
|
||||
|
||||
this.currentCard = i;
|
||||
this.headPanel.updateStep(i, '<b>'+card.title+'</b>');
|
||||
//erik: fix to set on main title the title of the current cardç
|
||||
//this.setTitle(card.title);
|
||||
this.headPanel.updateStep(i, card.title);
|
||||
|
||||
if (i == len-1) {
|
||||
this.nextButton.setText(this.finishButtonText);
|
||||
@@ -487,10 +485,9 @@ Ext.ux.Wiz = Ext.extend(Ext.Window, {
|
||||
this.nextButton.setText(this.nextButtonText);
|
||||
}
|
||||
|
||||
/*if (card.isValid()) {
|
||||
if (card.isValid()) {
|
||||
this.nextButton.setDisabled(false);
|
||||
}*/
|
||||
//this.nextButton.setDisabled(card.isValid());
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
this.previousButton.setDisabled(true);
|
||||
|
||||
839
workflow/engine/templates/installer/installer_cards.js
Normal file
839
workflow/engine/templates/installer/installer_cards.js
Normal file
@@ -0,0 +1,839 @@
|
||||
var steps = [];
|
||||
|
||||
Ext.onReady(function(){
|
||||
|
||||
var storeDatabase = new Ext.data.Store({
|
||||
proxy: new Ext.data.HttpProxy({url: 'getEngines', method:'POST'}),
|
||||
reader: new Ext.data.JsonReader({
|
||||
fields: [{name: 'id'},{name: 'label'}]
|
||||
}),
|
||||
listeners: {load: function() {
|
||||
Ext.getCmp('db_engine').setValue(Ext.getCmp('db_engine').store.getAt(0).id);
|
||||
if (Ext.getCmp('db_engine').store.getAt(0).id == 'mysql') {
|
||||
Ext.getCmp('db_port').setValue('3306');
|
||||
Ext.getCmp('db_username').setValue('root');
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('db_port').setValue('1433');
|
||||
Ext.getCmp('db_username').setValue('sa');
|
||||
}
|
||||
testConnection();
|
||||
}}
|
||||
});
|
||||
|
||||
var store = new Ext.data.ArrayStore({
|
||||
fields: ['id', 'label'],
|
||||
data : [['en', 'English'],['es', 'Spanish']]
|
||||
});
|
||||
|
||||
var cmbLanguages = new Ext.form.ComboBox({
|
||||
fieldLabel: 'Language',
|
||||
store: store,
|
||||
labelWidth: 200,
|
||||
displayField:'label',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
emptyText:'Select a language...',
|
||||
selectOnFocus:true
|
||||
});
|
||||
|
||||
// getting the system info
|
||||
function getSystemInfo() {
|
||||
wizard.showLoadMask(true);
|
||||
Ext.Ajax.request({
|
||||
url: 'getSystemInfo',
|
||||
success: function(response){
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.getCmp('php').setValue (getFieldOutput(response.php.version, response.php.result));
|
||||
Ext.getCmp('mysql').setValue (getFieldOutput(response.mysql.version, response.mysql.result));
|
||||
//Ext.getCmp('mssql').setValue (getFieldOutput(response.mssql.version, response.mssql.result));
|
||||
Ext.getCmp('curl').setValue (getFieldOutput(response.curl.version, response.curl.result));
|
||||
Ext.getCmp('openssl').setValue (getFieldOutput(response.openssl.version, response.openssl.result));
|
||||
Ext.getCmp('dom').setValue (getFieldOutput(response.dom.version, response.dom.result));
|
||||
Ext.getCmp('gd').setValue (getFieldOutput(response.gd.version, response.gd.result));
|
||||
Ext.getCmp('multibyte').setValue (getFieldOutput(response.multibyte.version,response.multibyte.result));
|
||||
Ext.getCmp('soap').setValue (getFieldOutput(response.soap.version, response.soap.result));
|
||||
Ext.getCmp('ldap').setValue (getFieldOutput(response.ldap.version, response.ldap.result));
|
||||
Ext.getCmp('memory').setValue (getFieldOutput(response.memory.version, response.memory.result));
|
||||
|
||||
dbReq = response.mysql.result || response.mssql.result;
|
||||
phpReq = response.php.result && response.curl.result && response.dom.result && response.gd.result && response.multibyte.result && response.soap.result && response.memory.result;
|
||||
wizard.onClientValidation(0, dbReq && phpReq);
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
failure: function(){},
|
||||
params: {'clientBrowser': PMExt.getBrowser().name}
|
||||
});
|
||||
}
|
||||
|
||||
// getting the system info
|
||||
function getPermissionInfo() {
|
||||
wizard.showLoadMask(true);
|
||||
Ext.Ajax.request({
|
||||
url: 'getPermissionInfo',
|
||||
success: function(response) {
|
||||
var okImage = '<img src="/images/dialog-ok-apply.png" width="12" height="12" />';
|
||||
var badImage = '<img src="/images/delete.png" width="15" height="15" />';
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.get('pathConfigSpan').dom.innerHTML = (response.pathConfig.result ? okImage : badImage);
|
||||
Ext.get('pathLanguagesSpan').dom.innerHTML = (response.pathLanguages.result ? okImage : badImage);
|
||||
Ext.get('pathPluginsSpan').dom.innerHTML = (response.pathPlugins.result ? okImage : badImage);
|
||||
Ext.get('pathXmlformsSpan').dom.innerHTML = (response.pathXmlforms.result ? okImage : badImage);
|
||||
Ext.get('pathPublicSpan').dom.innerHTML = (response.pathPublic.result ? okImage : badImage);
|
||||
Ext.get('pathSharedSpan').dom.innerHTML = (response.pathShared.result ? okImage : badImage);
|
||||
Ext.get('pathLogFileSpan').dom.innerHTML = (response.pathLogFile.result ? okImage : badImage);
|
||||
|
||||
wizard.onClientValidation(1,
|
||||
response.pathConfig.result &&
|
||||
response.pathLanguages.result &&
|
||||
response.pathPlugins.result &&
|
||||
response.pathXmlforms.result &&
|
||||
response.pathPublic.result &&
|
||||
response.pathShared.result &&
|
||||
response.pathLogFile.result
|
||||
);
|
||||
|
||||
wizard.showLoadMask(false);
|
||||
|
||||
if (response.notify != '') {
|
||||
Ext.msgBoxSlider.msgTopCenter('alert', '', response.notify, 30);
|
||||
}
|
||||
},
|
||||
failure: function(){},
|
||||
params: {
|
||||
'pathConfig': Ext.getCmp('pathConfig').getValue(),
|
||||
'pathLanguages': Ext.getCmp('pathLanguages').getValue(),
|
||||
'pathPlugins': Ext.getCmp('pathPlugins').getValue(),
|
||||
'pathXmlforms': Ext.getCmp('pathXmlforms').getValue(),
|
||||
'pathShared': Ext.getCmp('pathShared').getValue(),
|
||||
'pathLogFile': Ext.getCmp('pathLogFile').getValue(),
|
||||
'pathPublic': Ext.getCmp('pathPublic').getValue()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function checkLicenseAgree() {
|
||||
wizard.onClientValidation(2, Ext.getCmp('agreeCheckbox').getValue());
|
||||
}
|
||||
|
||||
|
||||
function ckeckDBEnginesValuesLoaded() {
|
||||
wizard.showLoadMask(true);
|
||||
if (Ext.getCmp('db_engine').store.getCount() == 0) {
|
||||
Ext.getCmp('db_engine').store.load();
|
||||
}
|
||||
else {
|
||||
testConnection();
|
||||
}
|
||||
}
|
||||
|
||||
// test database Connection
|
||||
function testConnection() {
|
||||
wizard.showLoadMask(true);
|
||||
if ((Ext.getCmp('db_engine').getValue() == '') || !Ext.getCmp('db_hostname').isValid() || !Ext.getCmp('db_username').isValid()) {
|
||||
wizard.onClientValidation(3, false);
|
||||
wizard.showLoadMask(false);
|
||||
return false;
|
||||
}
|
||||
Ext.Ajax.request({
|
||||
url: 'testConnection',
|
||||
success: function(response){
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.getCmp('db_message').setValue(getFieldOutput(response.message, response.result));
|
||||
wizard.onClientValidation(3, response.result);
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
failure: function(){},
|
||||
params: {
|
||||
'db_engine' : Ext.getCmp('db_engine').getValue(),
|
||||
'db_hostname': Ext.getCmp('db_hostname').getValue(),
|
||||
'db_username': Ext.getCmp('db_username').getValue(),
|
||||
'db_password': Ext.getCmp('db_password').getValue(),
|
||||
'db_port' : Ext.getCmp('db_port').getValue()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function checkWorkspaceConfiguration() {
|
||||
var canInstall = false;
|
||||
if (!Ext.getCmp('workspace').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Workspace Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('adminUsername').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Admin Username.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (Ext.getCmp('adminPassword').getValue() == '') {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Admin Password.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (Ext.getCmp('adminPassword').getValue() != Ext.getCmp('confirmPassword').getValue()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('The password confirmation is incorrect.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('wfDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Workflow Database Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('rbDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Rbac Database Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('rpDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Report Database Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
checkDatabases();
|
||||
}
|
||||
|
||||
function checkDatabases() {
|
||||
wizard.showLoadMask(true);
|
||||
Ext.Ajax.request({
|
||||
url: 'checkDatabases',
|
||||
success: function(response){
|
||||
var existMsg = '<span style="color: red;">(Exists)</span>';
|
||||
var noExistsMsg = '<span style="color: green;">(No exists)</span>';
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
|
||||
Ext.get('rbDatabaseSpan').dom.innerHTML = (response.rbDatabaseExists ? existMsg : noExistsMsg);
|
||||
Ext.get('rpDatabaseSpan').dom.innerHTML = (response.rpDatabaseExists ? existMsg : noExistsMsg);
|
||||
var dbFlag = ((!response.wfDatabaseExists && !response.rbDatabaseExists && !response.rpDatabaseExists) || Ext.getCmp('deleteDB').getValue());
|
||||
wizard.onClientValidation(4, dbFlag);
|
||||
if (dbFlag) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('The data is correct.', true));
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Rename the databases names or workspace name or check the "Delete Databases if exists" to overwrite the exiting databases.', false));
|
||||
}
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
failure: function(){},
|
||||
params: {
|
||||
'db_engine' : Ext.getCmp('db_engine').getValue(),
|
||||
'db_hostname': Ext.getCmp('db_hostname').getValue(),
|
||||
'db_username': Ext.getCmp('db_username').getValue(),
|
||||
'db_password': Ext.getCmp('db_password').getValue(),
|
||||
'db_port' : Ext.getCmp('db_port').getValue(),
|
||||
'wfDatabase' : Ext.getCmp('wfDatabase').getValue(),
|
||||
'rbDatabase' : Ext.getCmp('rbDatabase').getValue(),
|
||||
'rpDatabase' : Ext.getCmp('rpDatabase').getValue()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var setIndex = 0;
|
||||
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Pre-installation check',
|
||||
monitorValid : false,
|
||||
labelAlign: 'left',
|
||||
labelWidth: 200,
|
||||
defaults : {
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html : 'Pre-installation check',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 340,
|
||||
items:[
|
||||
{
|
||||
region: 'west',
|
||||
width: 250,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step1_txt
|
||||
},
|
||||
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
labelWidth: 200,
|
||||
items:[
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'PHP Version >= 5.1',
|
||||
id : 'php'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'MySQL Support',
|
||||
id : 'mysql'
|
||||
}/*,
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'MSSQL Support (*)',
|
||||
id : 'mssql'
|
||||
}*/,
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'cURL Version',
|
||||
id : 'curl'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'OpenSSL Version (**)',
|
||||
id : 'openssl'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'DOM/XML Support',
|
||||
id : 'dom'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'GD Support',
|
||||
id : 'gd'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'Multibyte Strings Support',
|
||||
id : 'multibyte'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'Soap Support',
|
||||
id : 'soap'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'LDAP Support (***)',
|
||||
id : 'ldap'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'Memory Limit >= 80M',
|
||||
id: 'memory',
|
||||
value: '5.0 or greater'
|
||||
},
|
||||
new Ext.Button({
|
||||
text : 'Check Again',
|
||||
handler : getSystemInfo,
|
||||
scope : this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: getSystemInfo
|
||||
}
|
||||
});
|
||||
|
||||
// third card with Directory File Permission
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title:'Directory File Permission',
|
||||
monitorValid : false,
|
||||
labelAlign: 'left',
|
||||
labelWidth: 200,
|
||||
defaults : {
|
||||
//labelStyle : 'font-size:11px'
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html:'Directory/File Permission',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 300,
|
||||
items:[
|
||||
{
|
||||
region: 'north',
|
||||
height: 55,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step3_txt
|
||||
},
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
alignField : 'left',
|
||||
bodyStyle : 'padding-left:40px;font-size:12;',
|
||||
labelWidth: 180,
|
||||
items:[
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathConfigSpan"></span> Config Directory',
|
||||
id: 'pathConfig',
|
||||
width: 430,
|
||||
value: path_config,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathLanguagesSpan"></span> Language Directory',
|
||||
id: 'pathLanguages',
|
||||
width: 430,
|
||||
value: path_languages,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathPluginsSpan"></span> Plugins Directory',
|
||||
id: 'pathPlugins',
|
||||
width: 430,
|
||||
value: path_plugins,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathXmlformsSpan"></span> Xmlform Directory Directory',
|
||||
id: 'pathXmlforms',
|
||||
width: 430,
|
||||
value: path_xmlforms,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathPublicSpan"></span> Public Index file',
|
||||
id: 'pathPublic',
|
||||
width: 430,
|
||||
value: path_public,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathSharedSpan"></span> Workflow Data Directory',
|
||||
id: 'pathShared',
|
||||
width: 430,
|
||||
value: path_shared,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(2, false);
|
||||
if (Ext.getCmp('pathShared').getValue().substr(-1, 1) != path_sep) {
|
||||
Ext.getCmp('pathLogFile').setValue(Ext.getCmp('pathShared').getValue() + path_sep + 'log' + path_sep + 'install.log');
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('pathLogFile').setValue(Ext.getCmp('pathShared').getValue() + 'log' + path_sep + 'install.log');
|
||||
}
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathLogFileSpan"></span> Installation log file',
|
||||
id: 'pathLogFile',
|
||||
width: 430,
|
||||
value: path_shared + 'log' + path_sep + 'install.log',
|
||||
disabled: true
|
||||
},
|
||||
new Ext.Button({
|
||||
text : 'Check Again',
|
||||
handler : getPermissionInfo,
|
||||
scope : this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: getPermissionInfo
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
|
||||
// third card with input field email-address
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title:'ProcessMaker Open Source License',
|
||||
//monitorValid : false,
|
||||
defaults : {
|
||||
labelStyle : 'font-size:12px'
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html:'ProcessMaker Open Source License',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 340,
|
||||
items:[
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
items:[
|
||||
new Ext.form.TextArea({
|
||||
name : 'license',
|
||||
readOnly : true,
|
||||
width : 510,
|
||||
height : 280,
|
||||
style : 'font-size:13px',
|
||||
value : licenseTxt
|
||||
}),
|
||||
new Ext.form.Checkbox({
|
||||
boxLabel : 'I agree',
|
||||
id : 'agreeCheckbox',
|
||||
handler: function() {
|
||||
wizard.onClientValidation(2, this.getValue());
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: checkLicenseAgree
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// fourth card Database Configuration
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Database Configuration',
|
||||
monitorValid : false,
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html : 'Database Configuration',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 360,
|
||||
items:[
|
||||
{
|
||||
region: 'west',
|
||||
width: 200,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step4_txt
|
||||
},
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'panel',
|
||||
bodyStyle : 'background:none;padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;font-size:1.2em;',
|
||||
items:[
|
||||
{
|
||||
xtype:'fieldset',
|
||||
labelAlign: 'left',
|
||||
labelWidth: 160,
|
||||
items:[
|
||||
new Ext.form.ComboBox({
|
||||
fieldLabel: 'Database Engine',
|
||||
width : 200,
|
||||
store : storeDatabase,
|
||||
displayField : 'label',
|
||||
valueField : 'id',
|
||||
mode : 'local',
|
||||
editable : false,
|
||||
forceSelection: true,
|
||||
allowBlank: false,
|
||||
triggerAction: 'all',
|
||||
id: 'db_engine',
|
||||
selectOnFocus : true,
|
||||
listeners: {select: function() {
|
||||
if (this.value == 'mysql') {
|
||||
Ext.getCmp('db_port').setValue('3306');
|
||||
Ext.getCmp('db_username').setValue('root');
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('db_port').setValue('1433');
|
||||
Ext.getCmp('db_username').setValue('sa');
|
||||
}
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
}),
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Host Name',
|
||||
width : 180,
|
||||
id: 'db_hostname',
|
||||
value :'localhost',
|
||||
allowBlank : false,
|
||||
validator : function(v){
|
||||
var t = /^[0-9\.a-zA-Z_\-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Port',
|
||||
width : 180,
|
||||
id: 'db_port',
|
||||
value :'',
|
||||
allowBlank : false,
|
||||
validator : function(v){
|
||||
var t = /^[0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Username',
|
||||
width : 180,
|
||||
id: 'db_username',
|
||||
value :'root',
|
||||
allowBlank : false,
|
||||
validator : function(v){
|
||||
var t = /^[.a-zA-Z_\-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Password',
|
||||
inputType : 'password',
|
||||
value : '',
|
||||
width : 180,
|
||||
id: 'db_password',
|
||||
allowBlank : true,
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
//fieldLabel: ',
|
||||
id : 'db_message'
|
||||
},
|
||||
new Ext.Button({
|
||||
text : ' Test Connection',
|
||||
handler : testConnection,
|
||||
scope : this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: ckeckDBEnginesValuesLoaded
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Workspace Configuration',
|
||||
monitorValid : false,
|
||||
defaults : {
|
||||
labelStyle : 'font-size:11px'
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html : 'Workspace Configuration',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 360,
|
||||
items:[
|
||||
{
|
||||
region: 'west',
|
||||
width: 200,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step5_txt
|
||||
},
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'panel',
|
||||
bodyStyle : 'background:none;padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;font-size:1.2em;',
|
||||
items:[
|
||||
{
|
||||
xtype:'fieldset',
|
||||
//labelAlign: 'right',
|
||||
labelWidth: 210,
|
||||
items:[
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Workspace Name',
|
||||
value :'workflow',
|
||||
maxLength: 29,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
id : 'workspace',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
if (!Ext.getCmp('changeDBNames').getValue()) {
|
||||
Ext.getCmp('wfDatabase').setValue('wf_' + this.getValue());
|
||||
Ext.getCmp('rbDatabase').setValue('rb_' + this.getValue());
|
||||
Ext.getCmp('rpDatabase').setValue('rp_' + this.getValue());
|
||||
}
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Admin Username',
|
||||
value :'admin',
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9.@-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
id : 'adminUsername',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Admin Password',
|
||||
inputType : 'password',
|
||||
id: 'adminPassword',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Confirm Admin Password',
|
||||
inputType : 'password',
|
||||
id : 'confirmPassword',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
xtype : 'fieldset',
|
||||
labelAlign: 'left',
|
||||
labelWidth: 210,
|
||||
//labelWidth: 200,
|
||||
//title: 'ProcessMaker Databases',
|
||||
items:[
|
||||
new Ext.form.Checkbox({
|
||||
boxLabel: 'Change Database names',
|
||||
id : 'changeDBNames',
|
||||
handler: function() {
|
||||
if (this.getValue()) {
|
||||
Ext.getCmp('wfDatabase').enable();
|
||||
Ext.getCmp('rbDatabase').enable();
|
||||
Ext.getCmp('rpDatabase').enable();
|
||||
Ext.getCmp('wfDatabase').validate();
|
||||
Ext.getCmp('rbDatabase').validate();
|
||||
Ext.getCmp('rpDatabase').validate();
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('wfDatabase').setValue('wf_' + Ext.getCmp('workspace').getValue());
|
||||
Ext.getCmp('rbDatabase').setValue('rb_' + Ext.getCmp('workspace').getValue());
|
||||
Ext.getCmp('rpDatabase').setValue('rp_' + Ext.getCmp('workspace').getValue());
|
||||
Ext.getCmp('wfDatabase').disable();
|
||||
Ext.getCmp('rbDatabase').disable();
|
||||
Ext.getCmp('rpDatabase').disable();
|
||||
}
|
||||
wizard.onClientValidation(4, false);
|
||||
}
|
||||
}),
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Workflow Database Name <span id="wfDatabaseSpan"></span>',
|
||||
id : 'wfDatabase',
|
||||
value :'wf_workflow',
|
||||
allowBlank : false,
|
||||
maxLength: 32,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
disabled: true,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Rbac Database Name <span id="rbDatabaseSpan"></span>',
|
||||
id : 'rbDatabase',
|
||||
value :'rb_workflow',
|
||||
allowBlank : false,
|
||||
maxLength: 32,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
disabled: true,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Report Database Name <span id="rpDatabaseSpan"></span>',
|
||||
id : 'rpDatabase',
|
||||
value :'rp_workflow',
|
||||
allowBlank : false,
|
||||
maxLength: 32,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
disabled: true,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
new Ext.form.Checkbox({
|
||||
boxLabel : "Delete Databases if exists",
|
||||
id : 'deleteDB',
|
||||
handler: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}
|
||||
}),
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
id : 'finish_message'
|
||||
},
|
||||
new Ext.Button({
|
||||
id: 'checkWSConfiguration',
|
||||
text: ' Check Workspace Configuration',
|
||||
handler: checkWorkspaceConfiguration,
|
||||
scope: this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: function() {
|
||||
checkWorkspaceConfiguration();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<style>
|
||||
|
||||
.ext-ux-wiz-Header {
|
||||
background-color:white;
|
||||
border-bottom:1px solid #99BBE8;
|
||||
|
||||
@@ -1,936 +1,13 @@
|
||||
//var licenseTxt;
|
||||
var wizard;
|
||||
var theme;
|
||||
|
||||
// Extend timeout for all Ext.Ajax.requests to 90 seconds.
|
||||
// Ext.Ajax is a singleton, this statement will extend the timeout
|
||||
// for all subsequent Ext.Ajax calls.
|
||||
Ext.Ajax.timeout = 90000;
|
||||
|
||||
Ext.onReady(function(){
|
||||
|
||||
Ext.QuickTips.init();
|
||||
var steps = new Array();
|
||||
|
||||
var storeDatabase = new Ext.data.Store({
|
||||
proxy: new Ext.data.HttpProxy({url: 'getEngines', method:'POST'}),
|
||||
reader: new Ext.data.JsonReader({
|
||||
fields: [{name: 'id'},{name: 'label'}]
|
||||
}),
|
||||
listeners: {load: function() {
|
||||
Ext.getCmp('db_engine').setValue(Ext.getCmp('db_engine').store.getAt(0).id);
|
||||
if (Ext.getCmp('db_engine').store.getAt(0).id == 'mysql') {
|
||||
Ext.getCmp('db_port').setValue('3306');
|
||||
Ext.getCmp('db_username').setValue('root');
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('db_port').setValue('1433');
|
||||
Ext.getCmp('db_username').setValue('sa');
|
||||
}
|
||||
testConnection();
|
||||
}}
|
||||
});
|
||||
|
||||
var store = new Ext.data.ArrayStore({
|
||||
fields: ['id', 'label'],
|
||||
data : [['en', 'English'],['es', 'Spanish']]
|
||||
});
|
||||
|
||||
var cmbLanguages = new Ext.form.ComboBox({
|
||||
fieldLabel: 'Language',
|
||||
store: store,
|
||||
labelWidth: 200,
|
||||
displayField:'label',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
emptyText:'Select a language...',
|
||||
selectOnFocus:true
|
||||
});
|
||||
|
||||
// getting the system info
|
||||
function getSystemInfo() {
|
||||
wizard.showLoadMask(true);
|
||||
Ext.Ajax.request({
|
||||
url: 'getSystemInfo',
|
||||
success: function(response){
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.getCmp('php').setValue (getFieldOutput(response.php.version, response.php.result));
|
||||
Ext.getCmp('mysql').setValue (getFieldOutput(response.mysql.version, response.mysql.result));
|
||||
//Ext.getCmp('mssql').setValue (getFieldOutput(response.mssql.version, response.mssql.result));
|
||||
Ext.getCmp('curl').setValue (getFieldOutput(response.curl.version, response.curl.result));
|
||||
Ext.getCmp('openssl').setValue (getFieldOutput(response.openssl.version, response.openssl.result));
|
||||
Ext.getCmp('dom').setValue (getFieldOutput(response.dom.version, response.dom.result));
|
||||
Ext.getCmp('gd').setValue (getFieldOutput(response.gd.version, response.gd.result));
|
||||
Ext.getCmp('multibyte').setValue (getFieldOutput(response.multibyte.version,response.multibyte.result));
|
||||
Ext.getCmp('soap').setValue (getFieldOutput(response.soap.version, response.soap.result));
|
||||
Ext.getCmp('ldap').setValue (getFieldOutput(response.ldap.version, response.ldap.result));
|
||||
Ext.getCmp('memory').setValue (getFieldOutput(response.memory.version, response.memory.result));
|
||||
|
||||
dbReq = response.mysql.result || response.mssql.result;
|
||||
phpReq = response.php.result && response.curl.result && response.dom.result && response.gd.result && response.multibyte.result && response.soap.result && response.memory.result;
|
||||
wizard.onClientValidation(0, dbReq && phpReq);
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
failure: function(){},
|
||||
params: {'clientBrowser': PMExt.getBrowser().name}
|
||||
});
|
||||
}
|
||||
|
||||
// getting the system info
|
||||
function getPermissionInfo() {
|
||||
wizard.showLoadMask(true);
|
||||
Ext.Ajax.request({
|
||||
url: 'getPermissionInfo',
|
||||
success: function(response) {
|
||||
var okImage = '<img src="/images/dialog-ok-apply.png" width="12" height="12" />';
|
||||
var badImage = '<img src="/images/delete.png" width="15" height="15" />';
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.get('pathConfigSpan').dom.innerHTML = (response.pathConfig.result ? okImage : badImage);
|
||||
Ext.get('pathLanguagesSpan').dom.innerHTML = (response.pathLanguages.result ? okImage : badImage);
|
||||
Ext.get('pathPluginsSpan').dom.innerHTML = (response.pathPlugins.result ? okImage : badImage);
|
||||
Ext.get('pathXmlformsSpan').dom.innerHTML = (response.pathXmlforms.result ? okImage : badImage);
|
||||
Ext.get('pathPublicSpan').dom.innerHTML = (response.pathPublic.result ? okImage : badImage);
|
||||
Ext.get('pathSharedSpan').dom.innerHTML = (response.pathShared.result ? okImage : badImage);
|
||||
Ext.get('pathLogFileSpan').dom.innerHTML = (response.pathLogFile.result ? okImage : badImage);
|
||||
|
||||
wizard.onClientValidation(1,
|
||||
response.pathConfig.result &&
|
||||
response.pathLanguages.result &&
|
||||
response.pathPlugins.result &&
|
||||
response.pathXmlforms.result &&
|
||||
response.pathPublic.result &&
|
||||
response.pathShared.result &&
|
||||
response.pathLogFile.result
|
||||
);
|
||||
|
||||
wizard.showLoadMask(false);
|
||||
|
||||
if (response.notify != '') {
|
||||
Ext.msgBoxSlider.msgTopCenter('alert', '', response.notify, 30);
|
||||
}
|
||||
},
|
||||
failure: function(){},
|
||||
params: {
|
||||
'pathConfig': Ext.getCmp('pathConfig').getValue(),
|
||||
'pathLanguages': Ext.getCmp('pathLanguages').getValue(),
|
||||
'pathPlugins': Ext.getCmp('pathPlugins').getValue(),
|
||||
'pathXmlforms': Ext.getCmp('pathXmlforms').getValue(),
|
||||
'pathShared': Ext.getCmp('pathShared').getValue(),
|
||||
'pathLogFile': Ext.getCmp('pathLogFile').getValue(),
|
||||
'pathPublic': Ext.getCmp('pathPublic').getValue()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function checkLicenseAgree() {
|
||||
wizard.onClientValidation(2, Ext.getCmp('agreeCheckbox').getValue());
|
||||
}
|
||||
|
||||
|
||||
function ckeckDBEnginesValuesLoaded() {
|
||||
wizard.showLoadMask(true);
|
||||
if (Ext.getCmp('db_engine').store.getCount() == 0) {
|
||||
Ext.getCmp('db_engine').store.load();
|
||||
}
|
||||
else {
|
||||
testConnection();
|
||||
}
|
||||
}
|
||||
|
||||
// test database Connection
|
||||
function testConnection() {
|
||||
wizard.showLoadMask(true);
|
||||
if ((Ext.getCmp('db_engine').getValue() == '') || !Ext.getCmp('db_hostname').isValid() || !Ext.getCmp('db_username').isValid()) {
|
||||
wizard.onClientValidation(3, false);
|
||||
wizard.showLoadMask(false);
|
||||
return false;
|
||||
}
|
||||
Ext.Ajax.request({
|
||||
url: 'testConnection',
|
||||
success: function(response){
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.getCmp('db_message').setValue(getFieldOutput(response.message, response.result));
|
||||
wizard.onClientValidation(3, response.result);
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
failure: function(){},
|
||||
params: {
|
||||
'db_engine' : Ext.getCmp('db_engine').getValue(),
|
||||
'db_hostname': Ext.getCmp('db_hostname').getValue(),
|
||||
'db_username': Ext.getCmp('db_username').getValue(),
|
||||
'db_password': Ext.getCmp('db_password').getValue(),
|
||||
'db_port' : Ext.getCmp('db_port').getValue()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function checkWorkspaceConfiguration() {
|
||||
var canInstall = false;
|
||||
if (!Ext.getCmp('workspace').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Workspace Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('adminUsername').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Admin Username.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (Ext.getCmp('adminPassword').getValue() == '') {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Admin Password.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (Ext.getCmp('adminPassword').getValue() != Ext.getCmp('confirmPassword').getValue()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('The password confirmation is incorrect.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('wfDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Workflow Database Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('rbDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Rbac Database Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('rpDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Report Database Name.', false));
|
||||
wizard.onClientValidation(4, false);
|
||||
return;
|
||||
}
|
||||
checkDatabases();
|
||||
}
|
||||
|
||||
function checkDatabases() {
|
||||
wizard.showLoadMask(true);
|
||||
Ext.Ajax.request({
|
||||
url: 'checkDatabases',
|
||||
success: function(response){
|
||||
var existMsg = '<span style="color: red;">(Exists)</span>';
|
||||
var noExistsMsg = '<span style="color: green;">(No exists)</span>';
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
|
||||
Ext.get('rbDatabaseSpan').dom.innerHTML = (response.rbDatabaseExists ? existMsg : noExistsMsg);
|
||||
Ext.get('rpDatabaseSpan').dom.innerHTML = (response.rpDatabaseExists ? existMsg : noExistsMsg);
|
||||
var dbFlag = ((!response.wfDatabaseExists && !response.rbDatabaseExists && !response.rpDatabaseExists) || Ext.getCmp('deleteDB').getValue());
|
||||
wizard.onClientValidation(4, dbFlag);
|
||||
if (dbFlag) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('The data is correct.', true));
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Rename the databases names or workspace name or check the "Delete Databases if exists" to overwrite the exiting databases.', false));
|
||||
}
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
failure: function(){},
|
||||
params: {
|
||||
'db_engine' : Ext.getCmp('db_engine').getValue(),
|
||||
'db_hostname': Ext.getCmp('db_hostname').getValue(),
|
||||
'db_username': Ext.getCmp('db_username').getValue(),
|
||||
'db_password': Ext.getCmp('db_password').getValue(),
|
||||
'db_port' : Ext.getCmp('db_port').getValue(),
|
||||
'wfDatabase' : Ext.getCmp('wfDatabase').getValue(),
|
||||
'rbDatabase' : Ext.getCmp('rbDatabase').getValue(),
|
||||
'rpDatabase' : Ext.getCmp('rpDatabase').getValue()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var setIndex = 0;
|
||||
// first card with welcome message
|
||||
/* steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Setting language',
|
||||
labelAlign: 'right',
|
||||
labelWidth: 200,
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
bodyStyle : 'background:none;',
|
||||
html : 'Welcome to the Setup ProcessMaker wizard<br/>'+
|
||||
'Select your language from the list.<br/><br/>'
|
||||
},
|
||||
{
|
||||
border : false,
|
||||
bodyStyle : 'background:none;padding-bottom:10px;',
|
||||
html : 'ProcessMaker! 2.0.x Stable 18-Apr-2011 23:00 GMT:'
|
||||
},
|
||||
cmbLanguages,
|
||||
{
|
||||
border : false,
|
||||
bodyStyle : 'background:none;padding-top:250px;padding-left:420px;',
|
||||
html : 'Please click the "next"-button and fill out all form values.'+
|
||||
'<br/>'
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: function(){
|
||||
//alert('s');
|
||||
//make akax call here
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
// first card with Pre-Installation Check
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Pre-installation check',
|
||||
monitorValid : false,
|
||||
labelAlign: 'left',
|
||||
labelWidth: 200,
|
||||
defaults : {
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html : 'Pre-installation check',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 340,
|
||||
items:[
|
||||
{
|
||||
region: 'west',
|
||||
width: 250,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step1_txt
|
||||
},
|
||||
/*{
|
||||
region: 'south',
|
||||
xtype : 'fieldset',
|
||||
bodyStyle : 'padding:-3px;font-size:1.2em;',
|
||||
height : 45,
|
||||
labelAlign: 'right',
|
||||
items:[
|
||||
new Ext.Button({
|
||||
text : 'Check Again',
|
||||
handler : getSystemInfo,
|
||||
scope : this
|
||||
})
|
||||
]
|
||||
},*/
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
labelWidth: 200,
|
||||
items:[
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'PHP Version >= 5.1',
|
||||
id : 'php'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'MySQL Support',
|
||||
id : 'mysql'
|
||||
}/*,
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'MSSQL Support (*)',
|
||||
id : 'mssql'
|
||||
}*/,
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'cURL Version',
|
||||
id : 'curl'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'OpenSSL Version (**)',
|
||||
id : 'openssl'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'DOM/XML Support',
|
||||
id : 'dom'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'GD Support',
|
||||
id : 'gd'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'Multibyte Strings Support',
|
||||
id : 'multibyte'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'Soap Support',
|
||||
id : 'soap'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'LDAP Support (***)',
|
||||
id : 'ldap'
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'Memory Limit >= 80M',
|
||||
id: 'memory',
|
||||
value: '5.0 or greater'
|
||||
},
|
||||
new Ext.Button({
|
||||
text : 'Check Again',
|
||||
handler : getSystemInfo,
|
||||
scope : this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: getSystemInfo
|
||||
}
|
||||
});
|
||||
|
||||
// second with Pre-Installation Check
|
||||
/*
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Recomended Settings',
|
||||
monitorValid : true,
|
||||
labelAlign: 'right',
|
||||
labelWidth: 200,
|
||||
defaults : {
|
||||
//labelStyle : 'font-size:11px'
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html:'Recomended Settings',
|
||||
bodyStyle : 'background:none;padding-top:10px;padding-bottom:5px;font-weight:bold;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 120,
|
||||
items:[
|
||||
{
|
||||
region: 'west',
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
width: 250,
|
||||
html: step2_txt
|
||||
},
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
defaultType: 'displayfield',
|
||||
items:[
|
||||
{
|
||||
fieldLabel: 'PHP Version',
|
||||
value: '5.1.0 or greater'
|
||||
},
|
||||
{
|
||||
fieldLabel: 'MySql Version',
|
||||
value: '5.0 or greater'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
*/
|
||||
|
||||
// third card with Directory File Permission
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title:'Directory File Permission',
|
||||
monitorValid : false,
|
||||
labelAlign: 'left',
|
||||
labelWidth: 200,
|
||||
defaults : {
|
||||
//labelStyle : 'font-size:11px'
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html:'Directory/File Permission',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 300,
|
||||
items:[
|
||||
{
|
||||
region: 'north',
|
||||
height: 55,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step3_txt
|
||||
},
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
alignField : 'left',
|
||||
bodyStyle : 'padding-left:40px;font-size:12;',
|
||||
labelWidth: 180,
|
||||
items:[
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathConfigSpan"></span> Config Directory',
|
||||
id: 'pathConfig',
|
||||
width: 430,
|
||||
value: path_config,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathLanguagesSpan"></span> Language Directory',
|
||||
id: 'pathLanguages',
|
||||
width: 430,
|
||||
value: path_languages,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathPluginsSpan"></span> Plugins Directory',
|
||||
id: 'pathPlugins',
|
||||
width: 430,
|
||||
value: path_plugins,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathXmlformsSpan"></span> Xmlform Directory Directory',
|
||||
id: 'pathXmlforms',
|
||||
width: 430,
|
||||
value: path_xmlforms,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathPublicSpan"></span> Public Index file',
|
||||
id: 'pathPublic',
|
||||
width: 430,
|
||||
value: path_public,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathSharedSpan"></span> Workflow Data Directory',
|
||||
id: 'pathShared',
|
||||
width: 430,
|
||||
value: path_shared,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(2, false);
|
||||
if (Ext.getCmp('pathShared').getValue().substr(-1, 1) != path_sep) {
|
||||
Ext.getCmp('pathLogFile').setValue(Ext.getCmp('pathShared').getValue() + path_sep + 'log' + path_sep + 'install.log');
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('pathLogFile').setValue(Ext.getCmp('pathShared').getValue() + 'log' + path_sep + 'install.log');
|
||||
}
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: '<span id="pathLogFileSpan"></span> Installation log file',
|
||||
id: 'pathLogFile',
|
||||
width: 430,
|
||||
value: path_shared + 'log' + path_sep + 'install.log',
|
||||
disabled: true
|
||||
},
|
||||
new Ext.Button({
|
||||
text : 'Check Again',
|
||||
handler : getPermissionInfo,
|
||||
scope : this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: getPermissionInfo
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
// third card with input field email-address
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title:'ProcessMaker Open Source License',
|
||||
//monitorValid : false,
|
||||
defaults : {
|
||||
labelStyle : 'font-size:12px'
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html:'ProcessMaker Open Source License',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 340,
|
||||
items:[
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
items:[
|
||||
new Ext.form.TextArea({
|
||||
name : 'license',
|
||||
readOnly : true,
|
||||
width : 510,
|
||||
height : 280,
|
||||
style : 'font-size:13px',
|
||||
value : licenseTxt
|
||||
}),
|
||||
new Ext.form.Checkbox({
|
||||
boxLabel : 'I agree',
|
||||
id : 'agreeCheckbox',
|
||||
handler: function() {
|
||||
wizard.onClientValidation(2, this.getValue());
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: checkLicenseAgree
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// fourth card Database Configuration
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Database Configuration',
|
||||
monitorValid : false,
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html : 'Database Configuration',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 360,
|
||||
items:[
|
||||
{
|
||||
region: 'west',
|
||||
width: 200,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step4_txt
|
||||
},
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'panel',
|
||||
bodyStyle : 'background:none;padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;font-size:1.2em;',
|
||||
items:[
|
||||
{
|
||||
xtype:'fieldset',
|
||||
labelAlign: 'left',
|
||||
labelWidth: 160,
|
||||
items:[
|
||||
new Ext.form.ComboBox({
|
||||
fieldLabel: 'Database Engine',
|
||||
width : 200,
|
||||
store : storeDatabase,
|
||||
displayField : 'label',
|
||||
valueField : 'id',
|
||||
mode : 'local',
|
||||
editable : false,
|
||||
forceSelection: true,
|
||||
allowBlank: false,
|
||||
triggerAction: 'all',
|
||||
id: 'db_engine',
|
||||
selectOnFocus : true,
|
||||
listeners: {select: function() {
|
||||
if (this.value == 'mysql') {
|
||||
Ext.getCmp('db_port').setValue('3306');
|
||||
Ext.getCmp('db_username').setValue('root');
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('db_port').setValue('1433');
|
||||
Ext.getCmp('db_username').setValue('sa');
|
||||
}
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
}),
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Host Name',
|
||||
width : 180,
|
||||
id: 'db_hostname',
|
||||
value :'localhost',
|
||||
allowBlank : false,
|
||||
validator : function(v){
|
||||
var t = /^[0-9\.a-zA-Z_\-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Port',
|
||||
width : 180,
|
||||
id: 'db_port',
|
||||
value :'',
|
||||
allowBlank : false,
|
||||
validator : function(v){
|
||||
var t = /^[0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Username',
|
||||
width : 180,
|
||||
id: 'db_username',
|
||||
value :'root',
|
||||
allowBlank : false,
|
||||
validator : function(v){
|
||||
var t = /^[.a-zA-Z_\-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Password',
|
||||
inputType : 'password',
|
||||
value : '',
|
||||
width : 180,
|
||||
id: 'db_password',
|
||||
allowBlank : true,
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(3, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
//fieldLabel: ',
|
||||
id : 'db_message'
|
||||
},
|
||||
new Ext.Button({
|
||||
text : ' Test Connection',
|
||||
handler : testConnection,
|
||||
scope : this
|
||||
})
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: ckeckDBEnginesValuesLoaded
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
title : 'Workspace Configuration',
|
||||
monitorValid : false,
|
||||
defaults : {
|
||||
labelStyle : 'font-size:11px'
|
||||
},
|
||||
items : [
|
||||
{
|
||||
border : false,
|
||||
html : 'Workspace Configuration',
|
||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||
},
|
||||
{
|
||||
xtype:'panel',
|
||||
layout:'border',
|
||||
height: 360,
|
||||
items:[
|
||||
{
|
||||
region: 'west',
|
||||
width: 200,
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step5_txt
|
||||
},
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'panel',
|
||||
bodyStyle : 'background:none;padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;font-size:1.2em;',
|
||||
items:[
|
||||
{
|
||||
xtype:'fieldset',
|
||||
//labelAlign: 'right',
|
||||
labelWidth: 210,
|
||||
items:[
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Workspace Name',
|
||||
value :'workflow',
|
||||
maxLength: 29,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
id : 'workspace',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
if (!Ext.getCmp('changeDBNames').getValue()) {
|
||||
Ext.getCmp('wfDatabase').setValue('wf_' + this.getValue());
|
||||
Ext.getCmp('rbDatabase').setValue('rb_' + this.getValue());
|
||||
Ext.getCmp('rpDatabase').setValue('rp_' + this.getValue());
|
||||
}
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Admin Username',
|
||||
value :'admin',
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9.@-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
id : 'adminUsername',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Admin Password',
|
||||
inputType : 'password',
|
||||
id: 'adminPassword',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Confirm Admin Password',
|
||||
inputType : 'password',
|
||||
id : 'confirmPassword',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
xtype : 'fieldset',
|
||||
labelAlign: 'left',
|
||||
labelWidth: 210,
|
||||
//labelWidth: 200,
|
||||
//title: 'ProcessMaker Databases',
|
||||
items:[
|
||||
new Ext.form.Checkbox({
|
||||
boxLabel: 'Change Database names',
|
||||
id : 'changeDBNames',
|
||||
handler: function() {
|
||||
if (this.getValue()) {
|
||||
Ext.getCmp('wfDatabase').enable();
|
||||
Ext.getCmp('rbDatabase').enable();
|
||||
Ext.getCmp('rpDatabase').enable();
|
||||
Ext.getCmp('wfDatabase').validate();
|
||||
Ext.getCmp('rbDatabase').validate();
|
||||
Ext.getCmp('rpDatabase').validate();
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('wfDatabase').setValue('wf_' + Ext.getCmp('workspace').getValue());
|
||||
Ext.getCmp('rbDatabase').setValue('rb_' + Ext.getCmp('workspace').getValue());
|
||||
Ext.getCmp('rpDatabase').setValue('rp_' + Ext.getCmp('workspace').getValue());
|
||||
Ext.getCmp('wfDatabase').disable();
|
||||
Ext.getCmp('rbDatabase').disable();
|
||||
Ext.getCmp('rpDatabase').disable();
|
||||
}
|
||||
wizard.onClientValidation(4, false);
|
||||
}
|
||||
}),
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Workflow Database Name <span id="wfDatabaseSpan"></span>',
|
||||
id : 'wfDatabase',
|
||||
value :'wf_workflow',
|
||||
allowBlank : false,
|
||||
maxLength: 32,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
disabled: true,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Rbac Database Name <span id="rbDatabaseSpan"></span>',
|
||||
id : 'rbDatabase',
|
||||
value :'rb_workflow',
|
||||
allowBlank : false,
|
||||
maxLength: 32,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
disabled: true,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype : 'textfield',
|
||||
fieldLabel: 'Report Database Name <span id="rpDatabaseSpan"></span>',
|
||||
id : 'rpDatabase',
|
||||
value :'rp_workflow',
|
||||
allowBlank : false,
|
||||
maxLength: 32,
|
||||
validator : function(v){
|
||||
var t = /^[a-zA-Z_0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
disabled: true,
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}}
|
||||
},
|
||||
new Ext.form.Checkbox({
|
||||
boxLabel : "Delete Databases if exists",
|
||||
id : 'deleteDB',
|
||||
handler: function() {
|
||||
wizard.onClientValidation(4, false);
|
||||
}
|
||||
}),
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
id : 'finish_message'
|
||||
},
|
||||
new Ext.Button({
|
||||
id: 'checkWSConfiguration',
|
||||
text: ' Check Workspace Configuration',
|
||||
handler: checkWorkspaceConfiguration,
|
||||
scope: this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: function() {
|
||||
checkWorkspaceConfiguration();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
wizard = new Ext.ux.Wiz({
|
||||
height: 520,
|
||||
@@ -948,8 +25,8 @@ Ext.onReady(function(){
|
||||
},
|
||||
cards : steps,
|
||||
loadMaskConfig: {
|
||||
default: 'Checking...',
|
||||
finishing: 'Finishing...'
|
||||
'default': 'Checking...',
|
||||
'finishing': 'Finishing...'
|
||||
},
|
||||
listeners: {
|
||||
finish: finishInstallation
|
||||
@@ -960,7 +37,6 @@ Ext.onReady(function(){
|
||||
wizard.show();
|
||||
});
|
||||
|
||||
|
||||
function finishInstallation()
|
||||
{
|
||||
wizard.showLoadMask(true, 'finishing');
|
||||
|
||||
@@ -30,8 +30,18 @@ var Main = function() {
|
||||
Ext.getCmp('westPanel').hide();
|
||||
Ext.getCmp('southPanel').hide();
|
||||
|
||||
Ext.getCmp('northPanel').update(Ext.fly('header-content').dom.innerHTML);
|
||||
Ext.getCmp('centerPanel').ownerCt.doLayout();
|
||||
|
||||
Ext.get('options-tool').on('click', function(eventObj, elRef) {
|
||||
var conn = new Ext.data.Connection();
|
||||
eventObj.stopEvent();
|
||||
if (!this.ctxMenu) {
|
||||
Main.buildUserMenu(this);
|
||||
}
|
||||
this.ctxMenu.show(elRef);
|
||||
});
|
||||
|
||||
if (typeof flyNotify != 'undefined') {
|
||||
Ext.msgBoxSlider.msgTopCenter(flyNotify.type, flyNotify.title, flyNotify.text, flyNotify.time);
|
||||
}
|
||||
@@ -82,8 +92,8 @@ Main.configureComponents = function()
|
||||
this.configuration.northPanel = {
|
||||
id:'northPanel',
|
||||
region: 'north',
|
||||
height: 40,
|
||||
applyTo: 'panel-header',
|
||||
height: 50,
|
||||
//applyTo: 'panel-header',
|
||||
margins: '0 0 0 0', // top right botom left
|
||||
items: []
|
||||
};
|
||||
@@ -183,15 +193,6 @@ Main.buildComponents = function()
|
||||
this.panels.push(new Ext.Panel(this.configuration.westPanel));
|
||||
this.panels.push(new Ext.Panel(this.configuration.southPanel));
|
||||
this.panels.push(new Ext.Panel(this.configuration.northPanel));
|
||||
|
||||
Ext.get('options-tool').on('click', function(eventObj, elRef) {
|
||||
var conn = new Ext.data.Connection();
|
||||
eventObj.stopEvent();
|
||||
if (!this.ctxMenu) {
|
||||
Main.buildUserMenu(this);
|
||||
}
|
||||
this.ctxMenu.show(elRef);
|
||||
});
|
||||
};
|
||||
|
||||
Main.buildUserMenu = function(obj)
|
||||
|
||||
Reference in New Issue
Block a user