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:
@@ -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
|
||||
@@ -1532,4 +1555,5 @@ td.x-cnotes-label {
|
||||
padding-bottom: 15px;
|
||||
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,17 +31,16 @@
|
||||
<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">
|
||||
<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"/>
|
||||
</div>
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -37,515 +37,512 @@ Ext.namespace('Ext.ux');
|
||||
*/
|
||||
Ext.ux.Wiz = Ext.extend(Ext.Window, {
|
||||
|
||||
/**
|
||||
* @cfg {Object} An object containing the messages for the {@link Ext.LoadMask}
|
||||
* 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 = {
|
||||
default : 'Saving...',
|
||||
validating : 'Please wait, validating input...',
|
||||
};
|
||||
// loadMask will be shown, displaying the message 'Please wait, validating input...'
|
||||
this.showLoadMask(true, 'validating');
|
||||
</code></pre>
|
||||
*/
|
||||
loadMaskConfig : {
|
||||
'default' : 'Saving...'
|
||||
},
|
||||
/**
|
||||
* @cfg {Object} An object containing the messages for the {@link Ext.LoadMask}
|
||||
* 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 = {
|
||||
default : 'Saving...',
|
||||
validating : 'Please wait, validating input...',
|
||||
};
|
||||
// loadMask will be shown, displaying the message 'Please wait, validating input...'
|
||||
this.showLoadMask(true, 'validating');
|
||||
</code></pre>
|
||||
*/
|
||||
loadMaskConfig : {
|
||||
'default' : 'Saving...'
|
||||
},
|
||||
|
||||
/**
|
||||
* @cfg {Number} height The height of the dialog. Defaults to "400".
|
||||
*/
|
||||
height : 400,
|
||||
/**
|
||||
* @cfg {Number} height The height of the dialog. Defaults to "400".
|
||||
*/
|
||||
height : 400,
|
||||
|
||||
/**
|
||||
* @cfg {Number} width The width of the dialog. Defaults to "540".
|
||||
*/
|
||||
width : 540,
|
||||
/**
|
||||
* @cfg {Number} width The width of the dialog. Defaults to "540".
|
||||
*/
|
||||
width : 540,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} closable Wether the dialog is closable. Defaults to "true".
|
||||
* This property will be changed by the "switchDialogState"-method, which will
|
||||
* enable/disable controls based on the passed argument. Thus, this config property
|
||||
* serves two purposes: Tell the init config to render a "close"-tool, and create a
|
||||
* "beforeclose"-listener which will either return true or false, indicating if the
|
||||
* dialog may be closed.
|
||||
*/
|
||||
closable : true,
|
||||
/**
|
||||
* @cfg {Boolean} closable Wether the dialog is closable. Defaults to "true".
|
||||
* This property will be changed by the "switchDialogState"-method, which will
|
||||
* enable/disable controls based on the passed argument. Thus, this config property
|
||||
* serves two purposes: Tell the init config to render a "close"-tool, and create a
|
||||
* "beforeclose"-listener which will either return true or false, indicating if the
|
||||
* dialog may be closed.
|
||||
*/
|
||||
closable : true,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} resizable Wether the dialog is resizable. Defaults to "false".
|
||||
*/
|
||||
resizable : false,
|
||||
/**
|
||||
* @cfg {Boolean} resizable Wether the dialog is resizable. Defaults to "false".
|
||||
*/
|
||||
resizable : false,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} resizable Wether the dialog is modal. Defaults to "true".
|
||||
*/
|
||||
modal : true,
|
||||
/**
|
||||
* @cfg {Boolean} resizable Wether the dialog is modal. Defaults to "true".
|
||||
*/
|
||||
modal : true,
|
||||
|
||||
/**
|
||||
* @cfg {Array} cards A numeric array with the configured {@link Ext.ux.Wiz.Card}s.
|
||||
* The index of the cards in the array represent the order in which they get displayed
|
||||
* in the wizard (i.e. card at index 0 gets displayed in the first step, card at index 1 gets
|
||||
* displayed in the second step and so on).
|
||||
*/
|
||||
cards : null,
|
||||
/**
|
||||
* @cfg {Array} cards A numeric array with the configured {@link Ext.ux.Wiz.Card}s.
|
||||
* The index of the cards in the array represent the order in which they get displayed
|
||||
* in the wizard (i.e. card at index 0 gets displayed in the first step, card at index 1 gets
|
||||
* displayed in the second step and so on).
|
||||
*/
|
||||
cards : null,
|
||||
|
||||
/**
|
||||
* @cfg {String} previousButtonText The text to render the previous-button with.
|
||||
* Defaults to "< Back" (< Back)
|
||||
*/
|
||||
previousButtonText : '< Previous',
|
||||
/**
|
||||
* @cfg {String} previousButtonText The text to render the previous-button with.
|
||||
* Defaults to "< Back" (< Back)
|
||||
*/
|
||||
previousButtonText : '< Previous',
|
||||
|
||||
/**
|
||||
* @cfg {String} nextButtonText The text to render the next-button with.
|
||||
* Defaults to "Next >" (Next >)
|
||||
*/
|
||||
nextButtonText : 'Next >',
|
||||
/**
|
||||
* @cfg {String} nextButtonText The text to render the next-button with.
|
||||
* Defaults to "Next >" (Next >)
|
||||
*/
|
||||
nextButtonText : 'Next >',
|
||||
|
||||
/**
|
||||
* @cfg {String} cancelButtonText The text to render the cancel-button with.
|
||||
* Defaults to "Cancel"
|
||||
*/
|
||||
cancelButtonText : 'Cancel',
|
||||
/**
|
||||
* @cfg {String} cancelButtonText The text to render the cancel-button with.
|
||||
* Defaults to "Cancel"
|
||||
*/
|
||||
cancelButtonText : 'Cancel',
|
||||
|
||||
/**
|
||||
* @cfg {String} finishButtonText The text to render the next-button with when the last
|
||||
* step of the wizard is reached. Defaults to "Finish"
|
||||
*/
|
||||
finishButtonText : 'Finish',
|
||||
/**
|
||||
* @cfg {String} finishButtonText The text to render the next-button with when the last
|
||||
* step of the wizard is reached. Defaults to "Finish"
|
||||
*/
|
||||
finishButtonText : 'Finish',
|
||||
|
||||
/**
|
||||
* @cfg {Object} headerConfig A config-object to use with {@link Ext.ux.Wiz.Header}.
|
||||
* If not present, it defaults to an empty object.
|
||||
*/
|
||||
headerConfig : {},
|
||||
/**
|
||||
* @cfg {Object} headerConfig A config-object to use with {@link Ext.ux.Wiz.Header}.
|
||||
* If not present, it defaults to an empty object.
|
||||
*/
|
||||
headerConfig : {},
|
||||
|
||||
/**
|
||||
* @cfg {Object} cardPanelConfig A config-object to use with {@link Ext.Panel}, which
|
||||
* represents the card-panel in this dialog.
|
||||
* If not present, it defaults to an empty object
|
||||
*/
|
||||
cardPanelConfig : {},
|
||||
/**
|
||||
* @cfg {Object} cardPanelConfig A config-object to use with {@link Ext.Panel}, which
|
||||
* represents the card-panel in this dialog.
|
||||
* If not present, it defaults to an empty object
|
||||
*/
|
||||
cardPanelConfig : {},
|
||||
|
||||
/**
|
||||
* @param {Ext.Button} The window-button for paging to the previous card.
|
||||
* @private
|
||||
*/
|
||||
previousButton : null,
|
||||
/**
|
||||
* @param {Ext.Button} The window-button for paging to the previous card.
|
||||
* @private
|
||||
*/
|
||||
previousButton : null,
|
||||
|
||||
/**
|
||||
* @param {Ext.Button} The window-button for paging to the next card. When the
|
||||
* last card is reached, the event fired by and the text rendered to this button
|
||||
* will change.
|
||||
* @private
|
||||
*/
|
||||
nextButton : null,
|
||||
/**
|
||||
* @param {Ext.Button} The window-button for paging to the next card. When the
|
||||
* last card is reached, the event fired by and the text rendered to this button
|
||||
* will change.
|
||||
* @private
|
||||
*/
|
||||
nextButton : null,
|
||||
|
||||
/**
|
||||
* @param {Ext.Button} The window-button for canceling the wizard. The event
|
||||
* fired by this button will usually close the dialog.
|
||||
* @private
|
||||
*/
|
||||
cancelButton : null,
|
||||
/**
|
||||
* @param {Ext.Button} The window-button for canceling the wizard. The event
|
||||
* fired by this button will usually close the dialog.
|
||||
* @private
|
||||
*/
|
||||
cancelButton : null,
|
||||
|
||||
/**
|
||||
* @param {Ex.Panel} The card-panel that holds the various wizard cards
|
||||
* ({@link Ext.ux.Wiz.Card}). The card-panel itself uses the custom
|
||||
* {@link Ext.ux.layout.CardLayout}, which needs to be accessible by this class.
|
||||
* You can get it at {@link http://www.siteartwork.de/cardlayout}.
|
||||
* @private
|
||||
*/
|
||||
cardPanel : null,
|
||||
/**
|
||||
* @param {Ex.Panel} The card-panel that holds the various wizard cards
|
||||
* ({@link Ext.ux.Wiz.Card}). The card-panel itself uses the custom
|
||||
* {@link Ext.ux.layout.CardLayout}, which needs to be accessible by this class.
|
||||
* You can get it at {@link http://www.siteartwork.de/cardlayout}.
|
||||
* @private
|
||||
*/
|
||||
cardPanel : null,
|
||||
|
||||
/**
|
||||
* @param {Number} currentCard The current {@link Ext.ux.Wiz.Card} displayed.
|
||||
* Defaults to -1.
|
||||
* @private
|
||||
*/
|
||||
currentCard : -1,
|
||||
/**
|
||||
* @param {Number} currentCard The current {@link Ext.ux.Wiz.Card} displayed.
|
||||
* Defaults to -1.
|
||||
* @private
|
||||
*/
|
||||
currentCard : -1,
|
||||
|
||||
/**
|
||||
* @param {Ext.ux.Wiz.Header} The header-panel of the wizard.
|
||||
* @private
|
||||
*/
|
||||
headPanel : null,
|
||||
/**
|
||||
* @param {Ext.ux.Wiz.Header} The header-panel of the wizard.
|
||||
* @private
|
||||
*/
|
||||
headPanel : null,
|
||||
|
||||
/**
|
||||
* @param {Number} cardCount Helper for storing the number of cards used
|
||||
* by this wizard. Defaults to 0 (inherits "cards.length" later on).
|
||||
* @private
|
||||
*/
|
||||
cardCount : 0,
|
||||
/**
|
||||
* @param {Number} cardCount Helper for storing the number of cards used
|
||||
* by this wizard. Defaults to 0 (inherits "cards.length" later on).
|
||||
* @private
|
||||
*/
|
||||
cardCount : 0,
|
||||
|
||||
/**
|
||||
* Inits this component with the specified config-properties and automatically
|
||||
* creates its components.
|
||||
*/
|
||||
initComponent : function()
|
||||
{
|
||||
this.initButtons();
|
||||
this.initPanels();
|
||||
/**
|
||||
* Inits this component with the specified config-properties and automatically
|
||||
* creates its components.
|
||||
*/
|
||||
initComponent : function()
|
||||
{
|
||||
this.initButtons();
|
||||
this.initPanels();
|
||||
|
||||
var title = this.title || this.headerConfig.title;
|
||||
title = title || "";
|
||||
var title = this.title || this.headerConfig.title;
|
||||
title = title || "";
|
||||
|
||||
Ext.apply(this, {
|
||||
title : title,
|
||||
layout : 'border',
|
||||
cardCount : this.cards.length,
|
||||
buttons : [
|
||||
this.previousButton,
|
||||
this.nextButton,
|
||||
this.cancelButton
|
||||
],
|
||||
items : [
|
||||
this.headPanel,
|
||||
this.cardPanel
|
||||
]
|
||||
});
|
||||
Ext.apply(this, {
|
||||
title : title,
|
||||
layout : 'border',
|
||||
cardCount : this.cards.length,
|
||||
buttons : [
|
||||
this.previousButton,
|
||||
this.nextButton,
|
||||
this.cancelButton
|
||||
],
|
||||
items : [
|
||||
this.headPanel,
|
||||
this.cardPanel
|
||||
]
|
||||
});
|
||||
|
||||
this.addEvents(
|
||||
/**
|
||||
* @event cancel
|
||||
* Fires after the cancel-button has been clicked.
|
||||
* @param {Ext.ux.Wiz} this
|
||||
*/
|
||||
'cancel',
|
||||
/**
|
||||
* @event finish
|
||||
* Fires after the last card was reached in the wizard and the
|
||||
* next/finish-button has been clicked.
|
||||
* @param {Ext.ux.Wiz} this
|
||||
* @param {Object} data The collected data of the cards, whereas
|
||||
* the index is the id of the card and the specific values
|
||||
* are objects with key/value pairs in the form formElementName : value
|
||||
*/
|
||||
'finish'
|
||||
);
|
||||
this.addEvents(
|
||||
/**
|
||||
* @event cancel
|
||||
* Fires after the cancel-button has been clicked.
|
||||
* @param {Ext.ux.Wiz} this
|
||||
*/
|
||||
'cancel',
|
||||
/**
|
||||
* @event finish
|
||||
* Fires after the last card was reached in the wizard and the
|
||||
* next/finish-button has been clicked.
|
||||
* @param {Ext.ux.Wiz} this
|
||||
* @param {Object} data The collected data of the cards, whereas
|
||||
* the index is the id of the card and the specific values
|
||||
* are objects with key/value pairs in the form formElementName : value
|
||||
*/
|
||||
'finish'
|
||||
);
|
||||
|
||||
Ext.ux.Wiz.superclass.initComponent.call(this);
|
||||
},
|
||||
Ext.ux.Wiz.superclass.initComponent.call(this);
|
||||
},
|
||||
|
||||
// -------- helper
|
||||
/**
|
||||
* Returns the form-data of all cards in this wizard. The first index is the
|
||||
* id of the card in this wizard,
|
||||
* and the values are objects containing key/value pairs in the form of
|
||||
* fieldName : fieldValue.
|
||||
*
|
||||
* @return {Array}
|
||||
*/
|
||||
getWizardData : function()
|
||||
{
|
||||
var formValues = {};
|
||||
var cards = this.cards;
|
||||
for (var i = 0, len = cards.length; i < len; i++) {
|
||||
if (cards[i].form) {
|
||||
formValues[cards[i].id] = cards[i].form.getValues(false);
|
||||
} else {
|
||||
formValues[cards[i].id] = {};
|
||||
}
|
||||
}
|
||||
// -------- helper
|
||||
/**
|
||||
* Returns the form-data of all cards in this wizard. The first index is the
|
||||
* id of the card in this wizard,
|
||||
* and the values are objects containing key/value pairs in the form of
|
||||
* fieldName : fieldValue.
|
||||
*
|
||||
* @return {Array}
|
||||
*/
|
||||
getWizardData : function()
|
||||
{
|
||||
var formValues = {};
|
||||
var cards = this.cards;
|
||||
for (var i = 0, len = cards.length; i < len; i++) {
|
||||
if (cards[i].form) {
|
||||
formValues[cards[i].id] = cards[i].form.getValues(false);
|
||||
} else {
|
||||
formValues[cards[i].id] = {};
|
||||
}
|
||||
}
|
||||
|
||||
return formValues;
|
||||
},
|
||||
return formValues;
|
||||
},
|
||||
|
||||
/**
|
||||
* Switches the state of this wizard between disabled/enabled.
|
||||
* A disabled dialog will have a {@link Ext.LoadMask} covering the card-panel
|
||||
* to prevent user input, and the buttons will be rendered disabled/enabled.
|
||||
* If the dialog is closable, the close-tool will be masked, too, and the dialog will not
|
||||
* be closable by clicking the "close" tool.
|
||||
*
|
||||
* @param {Boolean} enabled "false" to prevent user input and mask the elements,
|
||||
* otherwise true.
|
||||
* @param {String} type The type of msg for the {@Ext.LoadMask} covering
|
||||
* the cardPanel, as defined in the cfg property "loadMaskConfig"
|
||||
*/
|
||||
switchDialogState : function(enabled, type)
|
||||
{
|
||||
this.showLoadMask(!enabled, type);
|
||||
/**
|
||||
* Switches the state of this wizard between disabled/enabled.
|
||||
* A disabled dialog will have a {@link Ext.LoadMask} covering the card-panel
|
||||
* to prevent user input, and the buttons will be rendered disabled/enabled.
|
||||
* If the dialog is closable, the close-tool will be masked, too, and the dialog will not
|
||||
* be closable by clicking the "close" tool.
|
||||
*
|
||||
* @param {Boolean} enabled "false" to prevent user input and mask the elements,
|
||||
* otherwise true.
|
||||
* @param {String} type The type of msg for the {@Ext.LoadMask} covering
|
||||
* the cardPanel, as defined in the cfg property "loadMaskConfig"
|
||||
*/
|
||||
switchDialogState : function(enabled, type)
|
||||
{
|
||||
this.showLoadMask(!enabled, type);
|
||||
|
||||
this.previousButton.setDisabled(!enabled);
|
||||
this.nextButton.setDisabled(!enabled);
|
||||
this.cancelButton.setDisabled(!enabled);
|
||||
this.previousButton.setDisabled(!enabled);
|
||||
this.nextButton.setDisabled(!enabled);
|
||||
this.cancelButton.setDisabled(!enabled);
|
||||
|
||||
var ct = this.tools['close'];
|
||||
var ct = this.tools['close'];
|
||||
|
||||
if (ct) {
|
||||
switch (enabled) {
|
||||
case true:
|
||||
this.tools['close'].unmask();
|
||||
break;
|
||||
if (ct) {
|
||||
switch (enabled) {
|
||||
case true:
|
||||
this.tools['close'].unmask();
|
||||
break;
|
||||
|
||||
default:
|
||||
this.tools['close'].mask();
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
this.tools['close'].mask();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.closable = enabled;
|
||||
},
|
||||
this.closable = enabled;
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the load mask for this wizard. By default, the cardPanel's body
|
||||
* will be masked.
|
||||
*
|
||||
* @param {Boolean} show true to show the load mask, otherwise false.
|
||||
* @param {String} type The type of message for the {@Ext.LoadMask} covering
|
||||
* the cardPanel, as defined in the cfg property "loadMaskConfig"
|
||||
*/
|
||||
showLoadMask : function(show, type)
|
||||
{
|
||||
if (!type) {
|
||||
type = 'default';
|
||||
}
|
||||
/**
|
||||
* Shows the load mask for this wizard. By default, the cardPanel's body
|
||||
* will be masked.
|
||||
*
|
||||
* @param {Boolean} show true to show the load mask, otherwise false.
|
||||
* @param {String} type The type of message for the {@Ext.LoadMask} covering
|
||||
* the cardPanel, as defined in the cfg property "loadMaskConfig"
|
||||
*/
|
||||
showLoadMask : function(show, type)
|
||||
{
|
||||
if (!type) {
|
||||
type = 'default';
|
||||
}
|
||||
|
||||
if (show) {
|
||||
if (this.loadMask == null) {
|
||||
this.loadMask = new Ext.LoadMask(this.body);
|
||||
}
|
||||
this.loadMask.msg = this.loadMaskConfig[type];
|
||||
this.loadMask.show();
|
||||
} else {
|
||||
if (this.loadMask) {
|
||||
this.loadMask.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
if (show) {
|
||||
if (this.loadMask == null) {
|
||||
this.loadMask = new Ext.LoadMask(this.body);
|
||||
}
|
||||
this.loadMask.msg = this.loadMaskConfig[type];
|
||||
this.loadMask.show();
|
||||
} else {
|
||||
if (this.loadMask) {
|
||||
this.loadMask.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Inits the listener for the various {@link Ext.ux.Wiz.Card}s used
|
||||
* by this component.
|
||||
*/
|
||||
initEvents : function()
|
||||
{
|
||||
Ext.ux.Wiz.superclass.initEvents.call(this);
|
||||
/**
|
||||
* Inits the listener for the various {@link Ext.ux.Wiz.Card}s used
|
||||
* by this component.
|
||||
*/
|
||||
initEvents : function()
|
||||
{
|
||||
Ext.ux.Wiz.superclass.initEvents.call(this);
|
||||
|
||||
this.on('beforeclose', this.onBeforeClose, this);
|
||||
},
|
||||
this.on('beforeclose', this.onBeforeClose, this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates the head- and the card-panel.
|
||||
* Be sure to have the custom {@link Ext.ux.layout.CardLayout} available
|
||||
* in order to make the card-panel work as expected by this component
|
||||
* ({@link http://www.siteartwork.de/cardlayout}).
|
||||
*/
|
||||
initPanels : function()
|
||||
{
|
||||
var cards = this.cards;
|
||||
var cardPanelConfig = this.cardPanelConfig;
|
||||
/**
|
||||
* Creates the head- and the card-panel.
|
||||
* Be sure to have the custom {@link Ext.ux.layout.CardLayout} available
|
||||
* in order to make the card-panel work as expected by this component
|
||||
* ({@link http://www.siteartwork.de/cardlayout}).
|
||||
*/
|
||||
initPanels : function()
|
||||
{
|
||||
var cards = this.cards;
|
||||
var cardPanelConfig = this.cardPanelConfig;
|
||||
|
||||
Ext.apply(this.headerConfig, {
|
||||
steps : cards.length
|
||||
});
|
||||
Ext.apply(this.headerConfig, {
|
||||
steps : cards.length
|
||||
});
|
||||
|
||||
this.headPanel = new Ext.ux.Wiz.Header(this.headerConfig);
|
||||
this.headPanel = new Ext.ux.Wiz.Header(this.headerConfig);
|
||||
|
||||
Ext.apply(cardPanelConfig, {
|
||||
layout : new Ext.ux.layout.CardLayout(),
|
||||
items : cards
|
||||
});
|
||||
Ext.apply(cardPanelConfig, {
|
||||
layout : new Ext.ux.layout.CardLayout(),
|
||||
items : cards
|
||||
});
|
||||
|
||||
Ext.applyIf(cardPanelConfig, {
|
||||
region : 'center',
|
||||
border : false,
|
||||
activeItem : 0
|
||||
});
|
||||
Ext.applyIf(cardPanelConfig, {
|
||||
region : 'center',
|
||||
border : false,
|
||||
activeItem : 0
|
||||
});
|
||||
|
||||
var cards = this.cards;
|
||||
var cards = this.cards;
|
||||
|
||||
for (var i = 0, len = cards.length; i < len; i++) {
|
||||
cards[i].on('show', this.onCardShow, this);
|
||||
cards[i].on('hide', this.onCardHide, this);
|
||||
cards[i].on('clientvalidation', this.onClientValidation, this);
|
||||
}
|
||||
for (var i = 0, len = cards.length; i < len; i++) {
|
||||
cards[i].on('show', this.onCardShow, this);
|
||||
cards[i].on('hide', this.onCardHide, this);
|
||||
cards[i].on('clientvalidation', this.onClientValidation, this);
|
||||
}
|
||||
|
||||
this.cardPanel = new Ext.Panel(cardPanelConfig);
|
||||
},
|
||||
this.cardPanel = new Ext.Panel(cardPanelConfig);
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates the instances for the the window buttons.
|
||||
*/
|
||||
initButtons : function()
|
||||
{
|
||||
this.previousButton = new Ext.Button({
|
||||
text : this.previousButtonText,
|
||||
disabled : true,
|
||||
minWidth : 75,
|
||||
handler : this.onPreviousClick,
|
||||
scope : this
|
||||
});
|
||||
/**
|
||||
* Creates the instances for the the window buttons.
|
||||
*/
|
||||
initButtons : function()
|
||||
{
|
||||
this.previousButton = new Ext.Button({
|
||||
text : this.previousButtonText,
|
||||
disabled : true,
|
||||
minWidth : 75,
|
||||
handler : this.onPreviousClick,
|
||||
scope : this
|
||||
});
|
||||
|
||||
this.nextButton = new Ext.Button({
|
||||
text : this.nextButtonText,
|
||||
minWidth : 75,
|
||||
handler : this.onNextClick,
|
||||
scope : this
|
||||
});
|
||||
this.nextButton = new Ext.Button({
|
||||
text : this.nextButtonText,
|
||||
minWidth : 75,
|
||||
handler : this.onNextClick,
|
||||
scope : this
|
||||
});
|
||||
|
||||
this.cancelButton = new Ext.Button({
|
||||
text : this.cancelButtonText,
|
||||
handler : this.onCancelClick,
|
||||
scope : this,
|
||||
minWidth : 75
|
||||
});
|
||||
},
|
||||
this.cancelButton = new Ext.Button({
|
||||
text : this.cancelButtonText,
|
||||
handler : this.onCancelClick,
|
||||
scope : this,
|
||||
minWidth : 75
|
||||
});
|
||||
},
|
||||
|
||||
// -------- listeners
|
||||
|
||||
/**
|
||||
* Listener for the beforeclose event.
|
||||
* This listener will return true or false based on the "closable"
|
||||
* property by this component. This property will be changed by the "switchDialogState"
|
||||
* method, indicating if there is currently any process running that should prevent
|
||||
* this dialog from being closed.
|
||||
*
|
||||
* @param {Ext.Panel} panel The panel being closed
|
||||
*
|
||||
* @return {Boolean}
|
||||
*/
|
||||
onBeforeClose : function(panel)
|
||||
{
|
||||
return this.closable;
|
||||
},
|
||||
/**
|
||||
* Listener for the beforeclose event.
|
||||
* This listener will return true or false based on the "closable"
|
||||
* property by this component. This property will be changed by the "switchDialogState"
|
||||
* method, indicating if there is currently any process running that should prevent
|
||||
* this dialog from being closed.
|
||||
*
|
||||
* @param {Ext.Panel} panel The panel being closed
|
||||
*
|
||||
* @return {Boolean}
|
||||
*/
|
||||
onBeforeClose : function(panel)
|
||||
{
|
||||
return this.closable;
|
||||
},
|
||||
|
||||
/**
|
||||
* By default, the card firing this event monitors user input in a frequent
|
||||
* interval and fires the 'clientvalidation'-event along with it. This listener
|
||||
* will enable/disable the next/finish-button in accordance with it, based upon
|
||||
* the parameter isValid. isValid" will be set by the form validation and depends
|
||||
* on the validators you are using for the different input-elemnts in your form.
|
||||
* If the card does not contain any forms, this listener will never be called by the
|
||||
* card itself.
|
||||
*
|
||||
* @param {Ext.ux.Wiz.Card} The card that triggered the event.
|
||||
* @param {Boolean} isValid "true", if the user input was valid, otherwise
|
||||
* "false"
|
||||
*/
|
||||
onClientValidation : function(card, isValid)
|
||||
{
|
||||
if (!isValid) {
|
||||
this.nextButton.setDisabled(true);
|
||||
} else {
|
||||
this.nextButton.setDisabled(false);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* By default, the card firing this event monitors user input in a frequent
|
||||
* interval and fires the 'clientvalidation'-event along with it. This listener
|
||||
* will enable/disable the next/finish-button in accordance with it, based upon
|
||||
* the parameter isValid. isValid" will be set by the form validation and depends
|
||||
* on the validators you are using for the different input-elemnts in your form.
|
||||
* If the card does not contain any forms, this listener will never be called by the
|
||||
* card itself.
|
||||
*
|
||||
* @param {Ext.ux.Wiz.Card} The card that triggered the event.
|
||||
* @param {Boolean} isValid "true", if the user input was valid, otherwise
|
||||
* "false"
|
||||
*/
|
||||
onClientValidation : function(card, isValid)
|
||||
{
|
||||
if (!isValid) {
|
||||
this.nextButton.setDisabled(true);
|
||||
} else {
|
||||
this.nextButton.setDisabled(false);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* This will render the "next" button as disabled since the bindHandler's delay
|
||||
* of the next card to show might be lagging on slower systems
|
||||
*
|
||||
*/
|
||||
onCardHide : function(card)
|
||||
{
|
||||
if (this.cardPanel.layout.activeItem.id === card.id) {
|
||||
this.nextButton.setDisabled(true);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* This will render the "next" button as disabled since the bindHandler's delay
|
||||
* of the next card to show might be lagging on slower systems
|
||||
*
|
||||
*/
|
||||
onCardHide : function(card)
|
||||
{
|
||||
if (this.cardPanel.layout.activeItem.id === card.id) {
|
||||
this.nextButton.setDisabled(true);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Listener for the "show" event of the card that gets shown in the card-panel.
|
||||
* Renders the next/previous buttons based on the position of the card in the wizard
|
||||
* and updates the head-panel accordingly.
|
||||
*
|
||||
* @param {Ext.ux.Wiz.Card} The card being shown.
|
||||
*/
|
||||
onCardShow : function(card)
|
||||
{
|
||||
var parent = card.ownerCt;
|
||||
/**
|
||||
* Listener for the "show" event of the card that gets shown in the card-panel.
|
||||
* Renders the next/previous buttons based on the position of the card in the wizard
|
||||
* and updates the head-panel accordingly.
|
||||
*
|
||||
* @param {Ext.ux.Wiz.Card} The card being shown.
|
||||
*/
|
||||
onCardShow : function(card)
|
||||
{
|
||||
var parent = card.ownerCt;
|
||||
|
||||
var items = parent.items;
|
||||
var items = parent.items;
|
||||
|
||||
for (var i = 0, len = items.length; i < len; i++) {
|
||||
if (items.get(i).id == card.id) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (var i = 0, len = items.length; i < len; i++) {
|
||||
if (items.get(i).id == card.id) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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.currentCard = i;
|
||||
this.headPanel.updateStep(i, card.title);
|
||||
|
||||
if (i == len-1) {
|
||||
this.nextButton.setText(this.finishButtonText);
|
||||
} else {
|
||||
this.nextButton.setText(this.nextButtonText);
|
||||
}
|
||||
if (i == len-1) {
|
||||
this.nextButton.setText(this.finishButtonText);
|
||||
} else {
|
||||
this.nextButton.setText(this.nextButtonText);
|
||||
}
|
||||
|
||||
/*if (card.isValid()) {
|
||||
this.nextButton.setDisabled(false);
|
||||
}*/
|
||||
//this.nextButton.setDisabled(card.isValid());
|
||||
if (card.isValid()) {
|
||||
this.nextButton.setDisabled(false);
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
this.previousButton.setDisabled(true);
|
||||
} else {
|
||||
this.previousButton.setDisabled(false);
|
||||
}
|
||||
if (i == 0) {
|
||||
this.previousButton.setDisabled(true);
|
||||
} else {
|
||||
this.previousButton.setDisabled(false);
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Fires the 'cancel'-event. Closes this dialog if the return value of the
|
||||
* listeners does not equal to "false".
|
||||
*/
|
||||
onCancelClick : function()
|
||||
{
|
||||
if (this.fireEvent('cancel', this) !== false) {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Fires the 'cancel'-event. Closes this dialog if the return value of the
|
||||
* listeners does not equal to "false".
|
||||
*/
|
||||
onCancelClick : function()
|
||||
{
|
||||
if (this.fireEvent('cancel', this) !== false) {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Fires the 'finish'-event. Closes this dialog if the return value of the
|
||||
* listeners does not equal to "false".
|
||||
*/
|
||||
onFinish : function()
|
||||
{
|
||||
if (this.fireEvent('finish', this, this.getWizardData()) !== false) {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Fires the 'finish'-event. Closes this dialog if the return value of the
|
||||
* listeners does not equal to "false".
|
||||
*/
|
||||
onFinish : function()
|
||||
{
|
||||
if (this.fireEvent('finish', this, this.getWizardData()) !== false) {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Listener for the previous-button.
|
||||
* Switches to the previous displayed {@link Ext.ux.Wiz.Card}.
|
||||
*/
|
||||
onPreviousClick : function()
|
||||
{
|
||||
if (this.currentCard > 0) {
|
||||
this.cardPanel.getLayout().setActiveItem(this.currentCard - 1);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Listener for the previous-button.
|
||||
* Switches to the previous displayed {@link Ext.ux.Wiz.Card}.
|
||||
*/
|
||||
onPreviousClick : function()
|
||||
{
|
||||
if (this.currentCard > 0) {
|
||||
this.cardPanel.getLayout().setActiveItem(this.currentCard - 1);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Listener for the next-button. Switches to the next {@link Ext.ux.Wiz.Card}
|
||||
* if the 'beforehide'-method of it did not return false. The functionality
|
||||
* for this is implemented in {@link Ext.ux.layout.CardLayout}, which is needed
|
||||
* as the layout for the card-panel of this component.
|
||||
*/
|
||||
onNextClick : function()
|
||||
{
|
||||
if (this.currentCard == this.cardCount-1) {
|
||||
this.onFinish();
|
||||
} else {
|
||||
this.cardPanel.getLayout().setActiveItem(this.currentCard+1);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Listener for the next-button. Switches to the next {@link Ext.ux.Wiz.Card}
|
||||
* if the 'beforehide'-method of it did not return false. The functionality
|
||||
* for this is implemented in {@link Ext.ux.layout.CardLayout}, which is needed
|
||||
* as the layout for the card-panel of this component.
|
||||
*/
|
||||
onNextClick : function()
|
||||
{
|
||||
if (this.currentCard == this.cardCount-1) {
|
||||
this.onFinish();
|
||||
} else {
|
||||
this.cardPanel.getLayout().setActiveItem(this.currentCard+1);
|
||||
}
|
||||
}
|
||||
});
|
||||
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,965 +1,41 @@
|
||||
//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);
|
||||
|
||||
Ext.QuickTips.init();
|
||||
|
||||
wizard = new Ext.ux.Wiz({
|
||||
height: 520,
|
||||
width : 780,
|
||||
id : 'wizard',
|
||||
closable: false,
|
||||
headerConfig : {
|
||||
title : ' '
|
||||
},
|
||||
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);
|
||||
cardPanelConfig : {
|
||||
defaults : {
|
||||
bodyStyle : 'padding:20px 10px 10px 20px;background-color:#F6F6F6;',
|
||||
border : false
|
||||
}
|
||||
},
|
||||
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()
|
||||
cards : steps,
|
||||
loadMaskConfig: {
|
||||
'default': 'Checking...',
|
||||
'finishing': 'Finishing...'
|
||||
},
|
||||
listeners: {
|
||||
finish: finishInstallation
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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,
|
||||
width : 780,
|
||||
id : 'wizard',
|
||||
closable: false,
|
||||
headerConfig : {
|
||||
title : ' '
|
||||
},
|
||||
cardPanelConfig : {
|
||||
defaults : {
|
||||
bodyStyle : 'padding:20px 10px 10px 20px;background-color:#F6F6F6;',
|
||||
border : false
|
||||
}
|
||||
},
|
||||
cards : steps,
|
||||
loadMaskConfig: {
|
||||
default: 'Checking...',
|
||||
finishing: 'Finishing...'
|
||||
},
|
||||
listeners: {
|
||||
finish: finishInstallation
|
||||
}
|
||||
});
|
||||
|
||||
// show the wizard
|
||||
wizard.show();
|
||||
});
|
||||
|
||||
|
||||
// show the wizard
|
||||
wizard.show();
|
||||
});
|
||||
|
||||
function finishInstallation()
|
||||
{
|
||||
|
||||
@@ -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