BUG 8875 "ExtJS based Login & Main ProcessMaker interface" (1st commit)
@@ -3133,6 +3133,7 @@ class processMap {
|
||||
*/
|
||||
function listNoProcessesUser($sProcessUID) {
|
||||
G::LoadSystem('rbac');
|
||||
$memcache = & PMmemcached::getSingleton(SYS_SYS);
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);
|
||||
@@ -3156,7 +3157,11 @@ class processMap {
|
||||
$aUIDS = array();
|
||||
$oRBAC = RBAC::getSingleton ();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$oRBAC->loadUserRolePermission($oRBAC->sSystem, $aRow ['USR_UID']);
|
||||
$memKey = 'rbacSession' . session_id();
|
||||
if ( ($oRBAC->aUserInfo = $memcache->get($memKey)) === false ) {
|
||||
$oRBAC->loadUserRolePermission($oRBAC->sSystem, $aRow ['USR_UID']);
|
||||
$memcache->set( $memKey, $oRBAC->aUserInfo, PMmemcached::EIGHT_HOURS );
|
||||
}
|
||||
$aPermissions = $oRBAC->aUserInfo [$oRBAC->sSystem] ['PERMISSIONS'];
|
||||
$bInclude = false;
|
||||
foreach ($aPermissions as $aPermission) {
|
||||
@@ -5730,6 +5735,7 @@ class processMap {
|
||||
*/
|
||||
function listExtNoProcessesUser($sProcessUID) {
|
||||
G::LoadSystem('rbac');
|
||||
$memcache = & PMmemcached::getSingleton(SYS_SYS);
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);
|
||||
@@ -5753,7 +5759,11 @@ class processMap {
|
||||
$aUIDS = array();
|
||||
$oRBAC = RBAC::getSingleton ();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$oRBAC->loadUserRolePermission($oRBAC->sSystem, $aRow ['USR_UID']);
|
||||
$memKey = 'rbacSession' . session_id();
|
||||
if ( ($oRBAC->aUserInfo = $memcache->get($memKey)) === false ) {
|
||||
$oRBAC->loadUserRolePermission($oRBAC->sSystem, $aRow ['USR_UID']);
|
||||
$memcache->set( $memKey, $oRBAC->aUserInfo, PMmemcached::EIGHT_HOURS );
|
||||
}
|
||||
$aPermissions = $oRBAC->aUserInfo [$oRBAC->sSystem] ['PERMISSIONS'];
|
||||
$bInclude = false;
|
||||
foreach ($aPermissions as $aPermission) {
|
||||
|
||||
@@ -922,5 +922,134 @@ class System {
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
function getSkingList()
|
||||
{
|
||||
//Create Skins custom folder if it doesn't exists
|
||||
if(!is_dir(PATH_CUSTOM_SKINS)){
|
||||
G::verifyPath(PATH_CUSTOM_SKINS, true);
|
||||
}
|
||||
|
||||
//Get Skin Config files
|
||||
$skinListArray = array();
|
||||
$customSkins = glob(PATH_CUSTOM_SKINS . "*/config.xml");
|
||||
$configurationFile = G::ExpandPath("skinEngine") . 'base' . PATH_SEP . 'config.xml';
|
||||
array_unshift($customSkins, $configurationFile);
|
||||
|
||||
//Read and parse each Configuration File
|
||||
foreach ($customSkins as $key => $configInformation) {
|
||||
$folderId = str_replace(G::ExpandPath("skinEngine") . 'base', "", str_replace(PATH_CUSTOM_SKINS, "", str_replace("/config.xml", "", $configInformation)));
|
||||
|
||||
if ($folderId == "") {
|
||||
$folderId = "classic";
|
||||
}
|
||||
|
||||
$xmlConfiguration = file_get_contents($configInformation);
|
||||
$xmlConfigurationObj = G::xmlParser($xmlConfiguration);
|
||||
|
||||
if (isset($xmlConfigurationObj->result['skinConfiguration'])) {
|
||||
$skinInformationArray = $skinFilesArray = $xmlConfigurationObj->result['skinConfiguration']['__CONTENT__']['information']['__CONTENT__'];
|
||||
$res = array();
|
||||
$res['SKIN_FOLDER_ID'] = strtolower($folderId);
|
||||
|
||||
foreach ($skinInformationArray as $keyInfo => $infoValue) {
|
||||
$res['SKIN_' . strtoupper($keyInfo)] = $infoValue['__VALUE__'];
|
||||
}
|
||||
|
||||
$skinListArray['skins'][] = $res;
|
||||
}
|
||||
}
|
||||
|
||||
$skinListArray['currentSkin'] = SYS_SKIN;
|
||||
|
||||
return $skinListArray;
|
||||
}
|
||||
|
||||
function getAllTimeZones()
|
||||
{
|
||||
$timezones = DateTimeZone::listAbbreviations();
|
||||
|
||||
$cities = array();
|
||||
foreach( $timezones as $key => $zones )
|
||||
{
|
||||
foreach( $zones as $id => $zone )
|
||||
{
|
||||
/**
|
||||
* Only get timezones explicitely not part of "Others".
|
||||
* @see http://www.php.net/manual/en/timezones.others.php
|
||||
*/
|
||||
if ( preg_match( '/^(America|Antartica|Arctic|Asia|Atlantic|Africa|Europe|Indian|Pacific)\//', $zone['timezone_id'] )
|
||||
&& $zone['timezone_id']) {
|
||||
$cities[$zone['timezone_id']][] = $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For each city, have a comma separated list of all possible timezones for that city.
|
||||
foreach( $cities as $key => $value )
|
||||
$cities[$key] = join( ', ', $value);
|
||||
|
||||
// Only keep one city (the first and also most important) for each set of possibilities.
|
||||
$cities = array_unique( $cities );
|
||||
|
||||
// Sort by area/city name.
|
||||
ksort( $cities );
|
||||
|
||||
return $cities;
|
||||
}
|
||||
|
||||
public function getSystemConfiguration($iniFile='')
|
||||
{
|
||||
$config = array(
|
||||
'debug' => 0,
|
||||
'debug_sql' => 0,
|
||||
'debug_time' => 0,
|
||||
'debug_calendar' => 0,
|
||||
'wsdl_cache' => 1,
|
||||
'memory_limit' => '100M',
|
||||
'time_zone' => 'America/La_Paz',
|
||||
'memcached' => 0,
|
||||
'memcached_server' =>'',
|
||||
'default_skin' => 'classic',
|
||||
'default_lang' => 'en'
|
||||
);
|
||||
|
||||
if (empty($iniFile) || !file_exists($iniFile)) {
|
||||
return $config;
|
||||
}
|
||||
|
||||
/* Read the env.ini */
|
||||
$ini_contents = parse_ini_file($iniFile, false);
|
||||
|
||||
if ($ini_contents !== false) {
|
||||
$config = array_merge($config, $ini_contents);
|
||||
}
|
||||
//echo '<pre>'; print_r($config); die;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function updateIndexFile($conf)
|
||||
{
|
||||
if (!defined('PATH_TPL')) {
|
||||
throw new Exception('PATH_TPL constant is not defined.');
|
||||
}
|
||||
|
||||
if (!file_exists(PATH_HTML . 'index.html')) {
|
||||
if (!is_writable(PATH_HTML)) {
|
||||
throw new Exception('The public directory is not writable.');
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!is_writable(PATH_HTML . 'index.html')) {
|
||||
throw new Exception('The public index file is not writable.');
|
||||
}
|
||||
}
|
||||
|
||||
$content = file_get_contents(PATH_TPL . 'index.html.tpl');
|
||||
$content = str_replace('{lang}', $conf['lang'], $content);
|
||||
$content = str_replace('{skin}', $conf['skin'], $content);
|
||||
|
||||
return (@file_put_contents(PATH_HTML . 'index.html', $content) !== false);
|
||||
}
|
||||
|
||||
}// end System class
|
||||
|
||||
@@ -18,11 +18,14 @@ require_once 'classes/model/om/BaseUsersProperties.php';
|
||||
*/
|
||||
class UsersProperties extends BaseUsersProperties
|
||||
{
|
||||
function UserPropertyExists($sUserUID)
|
||||
{
|
||||
var $fields = null;
|
||||
|
||||
function UserPropertyExists($sUserUID) {
|
||||
try {
|
||||
$oUserProperty = UsersPropertiesPeer::retrieveByPk($sUserUID);
|
||||
if (is_object($oUserProperty) && get_class($oUserProperty) == 'UsersProperties') {
|
||||
if (!is_null($oUserProperty) && is_object($oUserProperty) && get_class($oUserProperty) == 'UsersProperties') {
|
||||
$this->fields = $oUserProperty->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray($this->fields, BasePeer::TYPE_FIELDNAME);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@@ -124,7 +127,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
$this->create($aUserProperty);
|
||||
}
|
||||
else {
|
||||
$aUserProperty = $this->load($sUserUID);
|
||||
$aUserProperty = $this->fields;
|
||||
}
|
||||
return $aUserProperty;
|
||||
}
|
||||
@@ -219,6 +222,11 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
//end plugin
|
||||
|
||||
if (substr(SYS_SKIN, 0, 2) === 'ux' && SYS_SKIN != 'uxs') {
|
||||
return '../main';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* New feature - User Experience Redirector
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
|
||||
@@ -23,56 +23,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Default configuration values (do not change these, use env.ini) */
|
||||
$default_config = array(
|
||||
'debug' => 0,
|
||||
'debug_sql' => 0,
|
||||
'debug_time' => 0,
|
||||
'debug_calendar' => 0,
|
||||
'wsdl_cache' => 1,
|
||||
'memory_limit' => '100M',
|
||||
'time_zone' => 'America/La_Paz',
|
||||
'memcached' => 0,
|
||||
'memcached_server' => ''
|
||||
);
|
||||
|
||||
/* Read the env.ini */
|
||||
$env_file = realpath(dirname(__FILE__) . "/env.ini");
|
||||
$config = $default_config;
|
||||
if ($env_file !== false && file_exists($env_file)) {
|
||||
$ini_contents = parse_ini_file($env_file, false);
|
||||
if ($ini_contents !== false)
|
||||
$config = array_merge($default_config, $ini_contents);
|
||||
}
|
||||
else {
|
||||
// if the env.ini file doesn't exist, and the current is a developemnt env, then force enable debug
|
||||
if (!file_exists ( PATH_TRUNK . 'workflow/engine/methods/login/version-pmos.php' )) {
|
||||
$config['debug'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//*** Do not change any of these settings directly, use env.ini instead
|
||||
ini_set('display_errors','On');
|
||||
|
||||
ini_set('short_open_tag', 'on');
|
||||
ini_set('asp_tags', 'on');
|
||||
// The register_globals feature has been DEPRECATED as of PHP 5.3.0. default value Off.
|
||||
// ini_set('register_globals', 'off');
|
||||
ini_set('default_charset', "UTF-8");
|
||||
$e_all = defined('E_DEPRECATED') ? E_ALL ^ E_DEPRECATED : E_ALL;
|
||||
ini_set('error_reporting', ($config['debug'] ? $e_all : $e_all ^ E_NOTICE) );
|
||||
ini_set('memory_limit', $config['memory_limit']);
|
||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||
|
||||
define ('DEBUG_SQL_LOG', $config['debug_sql'] );
|
||||
define ('DEBUG_TIME_LOG', $config['debug_time'] );
|
||||
define ('DEBUG_CALENDAR_LOG', $config['debug_calendar'] );
|
||||
define ('MEMCACHED_ENABLED', $config['memcached']);
|
||||
define ('MEMCACHED_SERVER', $config['memcached_server']);
|
||||
|
||||
define ('TIME_ZONE', $config['time_zone']);
|
||||
|
||||
//***************** System Directories & Paths **************************
|
||||
|
||||
//***************** RBAC Paths **************************
|
||||
@@ -96,6 +46,7 @@
|
||||
define( 'PATH_SKIN_ENGINE', PATH_CORE . 'skinEngine' . PATH_SEP );
|
||||
define( 'PATH_METHODS', PATH_CORE . 'methods' . PATH_SEP );
|
||||
define( 'PATH_XMLFORM', PATH_CORE . 'xmlform' . PATH_SEP );
|
||||
define( 'PATH_CONFIG', PATH_CORE . 'config' . PATH_SEP );
|
||||
define( 'PATH_PLUGINS', PATH_CORE . 'plugins' . PATH_SEP );
|
||||
define( 'PATH_HTMLMAIL', PATH_CORE . 'html_templates' . PATH_SEP );
|
||||
define( 'PATH_TPL', PATH_CORE . 'templates' . PATH_SEP );
|
||||
|
||||
@@ -11,6 +11,44 @@ class Admin extends Controller
|
||||
|
||||
public $debug = true;
|
||||
|
||||
public function system()
|
||||
{
|
||||
require_once PATH_CONTROLLERS . 'main.php';
|
||||
G::loadClass('system');
|
||||
$skinsList = System::getSkingList();
|
||||
$skins = array();
|
||||
$timeZonesList = System::getAllTimeZones();
|
||||
$timeZonesList = array_keys($timeZonesList);
|
||||
$mainController = new Main();
|
||||
$languagesList = $mainController->getLanguagesList();
|
||||
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
|
||||
|
||||
foreach ($skinsList['skins'] as $skin) {
|
||||
$skins[] = array($skin['SKIN_FOLDER_ID'], $skin['SKIN_NAME']);
|
||||
}
|
||||
$skins[] = array('uxmodern', 'uxmodern');
|
||||
|
||||
foreach ($timeZonesList as $tz) {
|
||||
$timeZones[] = array($tz, $tz);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->includeExtJS('admin/system');
|
||||
//G::LoadClass('configuration');
|
||||
|
||||
// $c = new Configurations();
|
||||
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$this->setJSVar('skinsList', $skins);
|
||||
$this->setJSVar('languagesList', $languagesList);
|
||||
$this->setJSVar('timeZonesList', $timeZones);
|
||||
$this->setJSVar('sysConf', $sysConf);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
public function uxList()
|
||||
{
|
||||
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
||||
|
||||
@@ -25,6 +25,80 @@
|
||||
|
||||
class adminProxy extends HttpProxyController
|
||||
{
|
||||
public function saveSystemConf($httpData)
|
||||
{
|
||||
G::loadClass('system');
|
||||
$envFile = PATH_CONFIG . 'env.ini';
|
||||
$updateRedirector = false;
|
||||
$restart = false;
|
||||
|
||||
if (!file_exists($envFile) ) { // if ini file doesn't exists
|
||||
if (!is_writable(PATH_CONFIG)) {
|
||||
throw new Exception('The enviroment config directory is not writable. <br/>Please give write permission to directory: /workflow/engine/config');
|
||||
}
|
||||
$content = ";\r\n";
|
||||
$content .= "; ProcessMaker System Bootstrap Configuration\r\n";
|
||||
$content .= ";\r\n";
|
||||
file_put_contents($envFile, $content);
|
||||
//@chmod($envFile, 0777);
|
||||
}
|
||||
else {
|
||||
if (!is_writable($envFile)) {
|
||||
throw new Exception('The enviroment ini file file is not writable. <br/>Please give write permission to file: /workflow/engine/config/env.ini');
|
||||
}
|
||||
}
|
||||
|
||||
$sysConf = System::getSystemConfiguration($envFile);
|
||||
|
||||
$updatedConf = array();
|
||||
|
||||
if ($sysConf['default_lang'] != $httpData->default_lang) {
|
||||
$updatedConf['default_lang'] = $sysConf['default_lang'] = $httpData->default_lang;
|
||||
$updateRedirector = true;
|
||||
}
|
||||
|
||||
if ($sysConf['default_skin'] != $httpData->default_skin) {
|
||||
$updatedConf['default_skin'] = $sysConf['default_skin'] = $httpData->default_skin;
|
||||
$updateRedirector = true;
|
||||
}
|
||||
|
||||
if ($sysConf['time_zone'] != $httpData->time_zone) {
|
||||
$updatedConf['time_zone'] = $httpData->time_zone;
|
||||
}
|
||||
|
||||
$httpData->memory_limit .= 'M';
|
||||
if ($sysConf['memory_limit'] != $httpData->memory_limit) {
|
||||
$updatedConf['memory_limit'] = $httpData->memory_limit;
|
||||
}
|
||||
|
||||
|
||||
if ($updateRedirector) {
|
||||
if (!file_exists(PATH_HTML . 'index.html')) {
|
||||
if (!is_writable(PATH_HTML)) {
|
||||
throw new Exception('The public directory is not writable. <br/>Please give write permission to file: /workflow/public_html');
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!is_writable(PATH_HTML . 'index.html')) {
|
||||
throw new Exception('The public index file is not writable. <br/>Please give write permission to file: /workflow/public_html/index.html');
|
||||
}
|
||||
}
|
||||
|
||||
System::updateIndexFile(array(
|
||||
'lang' => $sysConf['default_lang'],
|
||||
'skin' => $sysConf['default_skin']
|
||||
));
|
||||
|
||||
$restart = true;
|
||||
}
|
||||
|
||||
G::update_php_ini($envFile, $updatedConf);
|
||||
|
||||
$this->success = true;
|
||||
$this->restart = $restart;
|
||||
$this->message = 'Saved Successfully';
|
||||
}
|
||||
|
||||
function uxUserUpdate($httpData)
|
||||
{
|
||||
require_once 'classes/model/Users.php';
|
||||
|
||||
1057
workflow/engine/controllers/installer.php
Normal file
1050
workflow/engine/controllers/main.php
Normal file
@@ -24,40 +24,35 @@
|
||||
*/
|
||||
|
||||
|
||||
#
|
||||
# ---= Processmaker main menu=---
|
||||
#
|
||||
/*************************************
|
||||
* ---= Processmaker main menu=---
|
||||
*************************************/
|
||||
|
||||
global $G_TMP_MENU;
|
||||
global $RBAC;
|
||||
|
||||
if ($RBAC->userCanAccess('PM_DASHBOARD') == 1 ) {
|
||||
//$G_TMP_MENU->AddIdRawOption('DASHBOARD', 'dashboard/dashboard', G::LoadTranslation('ID_DASHBOARD'));
|
||||
}
|
||||
|
||||
#CASES MODULE
|
||||
// HOME MODULE
|
||||
if ($RBAC->userCanAccess('PM_CASES') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('CASES', 'cases/main', G::LoadTranslation('ID_HOME'));
|
||||
$G_TMP_MENU->AddIdRawOption('CASES', 'cases/main', G::LoadTranslation('ID_HOME'), '', '', '', 'x-pm-home');
|
||||
}
|
||||
|
||||
#PROCESSES MODULE
|
||||
// DESIGNER MODULE
|
||||
if ($RBAC->userCanAccess('PM_FACTORY') == 1 ) {
|
||||
$G_TMP_MENU->AddIdRawOption('PROCESSES', 'processes/main', G::LoadTranslation('ID_DESIGNER'));
|
||||
//$G_TMP_MENU->AddIdRawOption('BPMN', 'bpmn/main', 'BPMN DESIGNER','', '', '', 'x-pm-bpmn');
|
||||
$G_TMP_MENU->AddIdRawOption('PROCESSES', 'processes/main', G::LoadTranslation('ID_DESIGNER'), '', '', '', 'x-pm-designer');
|
||||
}
|
||||
|
||||
// DASHBOARD MODULE
|
||||
if ($RBAC->userCanAccess('PM_DASHBOARD') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('DASHBOARD', 'dashboard/main', G::LoadTranslation('ID_DASHBOARD'));
|
||||
$G_TMP_MENU->AddIdRawOption('DASHBOARD', 'dashboard/main', G::LoadTranslation('ID_DASHBOARD'), '', '', '', 'x-pm-dashboard');
|
||||
}
|
||||
|
||||
/*if ($RBAC->userCanAccess('PM_REPORTS') == 1 ) {
|
||||
$G_TMP_MENU->AddIdRawOption('REPORTS', 'reports/reportsList');
|
||||
}*/
|
||||
|
||||
// ADMIN MODULE
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1 || $RBAC->userCanAccess('PM_USERS') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('SETUP', 'setup/main', G::LoadTranslation('ID_SETUP'));
|
||||
$G_TMP_MENU->AddIdRawOption('SETUP', 'setup/main', G::LoadTranslation('ID_SETUP'), '', '', '', 'x-pm-setup');
|
||||
}
|
||||
|
||||
// PLUGINS MENUS
|
||||
if( file_exists(PATH_CORE . 'menus/plugin.php') ) {
|
||||
require_once(PATH_CORE . 'menus/plugin.php');
|
||||
}
|
||||
@@ -79,6 +79,7 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1 || $RBAC->userCanAccess('PM_USERS') ==
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('AUTHSOURCES', '../authSources/authSources_List', G::LoadTranslation('ID_AUTH_SOURCES'), '', '', 'users');
|
||||
$G_TMP_MENU->AddIdRawOption('UX', '../admin/uxList', G::LoadTranslation('ID_USER_EXPERIENCE'), '', '', 'users');
|
||||
$G_TMP_MENU->AddIdRawOption('SYSTEM', '../admin/system', G::LoadTranslation('ID_SYSTEM'), '', '', 'settings');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
G::LoadClass('configuration');
|
||||
$c = new Configurations();
|
||||
|
||||
$oHeadPublisher->usingExtJs('ux/GridRowActions');
|
||||
//$oHeadPublisher->addExtJsScript('cases/caseUtils', true);
|
||||
$oHeadPublisher->addExtJsScript('app/main', true);
|
||||
$oHeadPublisher->addExtJsScript('cases/casesList', false ); //adding a javascript file .js
|
||||
|
||||
@@ -12,8 +12,6 @@ $oHeadPublisher =& headPublisher::getSingleton();
|
||||
global $RBAC;
|
||||
switch($page){
|
||||
case "startCase":
|
||||
|
||||
$oHeadPublisher->usingExtJs('ux.treefilterx/Ext.ux.tree.TreeFilterX');
|
||||
$oHeadPublisher->addExtJsScript('cases/casesStartCase', true); //adding a javascript file .js
|
||||
|
||||
$oHeadPublisher->addContent( 'cases/casesStartCase'); //adding a html file .html.
|
||||
@@ -35,9 +33,6 @@ switch($page){
|
||||
$oHeadPublisher->assign('permitoaddfile' ,$RBAC->userCanAccess('PM_FOLDERS_ADD_FILE') );
|
||||
$oHeadPublisher->assign('permitoaddfolder',$RBAC->userCanAccess('PM_FOLDERS_ADD_FOLDER'));
|
||||
|
||||
$oHeadPublisher->usingExtJs('ux.locationbar/Ext.ux.LocationBar');
|
||||
$oHeadPublisher->usingExtJs('ux.statusbar/ext-statusbar');
|
||||
|
||||
$oHeadPublisher->addExtJsScript('cases/casesDocuments', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesDocuments'); //adding a html file .html.
|
||||
break;
|
||||
|
||||
@@ -33,7 +33,6 @@ $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] :
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
|
||||
//$oHeadPublisher->usingExtJs('ux/Ext.ux.fileUploadField');
|
||||
$oHeadPublisher->addExtJsScript('cases/casesSchedulerLog', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/casesSchedulerLog'); //adding a html file .html.
|
||||
|
||||
|
||||
@@ -27,12 +27,19 @@
|
||||
$oHeadPublisher->addExtJsScript('cases/main', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/main'); //adding a html file .html.
|
||||
|
||||
G::loadClass('configuration');
|
||||
$oConf = new Configurations;
|
||||
$oConf->loadConfig($x, 'USER_PREFERENCES','','',$_SESSION['USER_LOGGED'],'');
|
||||
$keyMem = 'USER_PREFERENCES'.$_SESSION['USER_LOGGED'];
|
||||
$memcache = & PMmemcached::getSingleton(SYS_SYS);
|
||||
if ( ($arrayConfig = $memcache->get($keyMem)) === false ) {
|
||||
G::loadClass('configuration');
|
||||
$oConf = new Configurations;
|
||||
$oConf->loadConfig($x, 'USER_PREFERENCES','','',$_SESSION['USER_LOGGED'],'');
|
||||
$arrayConfig = $oConf->aConfig;
|
||||
$memcache->set( $keyMem, $arrayConfig, PMmemcached::ONE_HOUR);
|
||||
}
|
||||
|
||||
$confDefaultOption='';
|
||||
if( sizeof($oConf->Fields) > 0 && isset($oConf->aConfig['DEFAULT_CASES_MENU']) ){ #this user has a configuration record
|
||||
$confDefaultOption = $oConf->aConfig['DEFAULT_CASES_MENU'];
|
||||
if( isset($arrayConfig['DEFAULT_CASES_MENU']) ){ #this user has a configuration record
|
||||
$confDefaultOption = $arrayConfig['DEFAULT_CASES_MENU'];
|
||||
global $G_TMP_MENU;
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load('cases');
|
||||
@@ -45,7 +52,8 @@
|
||||
}
|
||||
$defaultOption = $defaultOption != '' ? $defaultOption : 'casesListExtJs';
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$defaultOption = 'casesListExtJs';
|
||||
$confDefaultOption = 'CASES_INBOX';
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
$conf = new Configurations;
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->usingExtJs('ux/miframe');
|
||||
|
||||
$oHeadPublisher->addExtJsScript('app/main', true);
|
||||
$oHeadPublisher->addExtJsScript('cases/open', true);
|
||||
$oHeadPublisher->assign('FORMATS',$conf->getFormats());
|
||||
|
||||
@@ -57,7 +57,6 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
|
||||
//$oHeadPublisher->usingExtJs('ux/Ext.ux.fileUploadField');
|
||||
$oHeadPublisher->addExtJsScript('departments/departmentList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('departments/departmentList'); //adding a html file .html.
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ $G_PUBLISH = new Publisher;
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
|
||||
//$oHeadPublisher->usingExtJs('ux/Ext.ux.fileUploadField');
|
||||
$oHeadPublisher->addExtJsScript('groups/groupsMembers', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('groups/groupsMembers'); //adding a html file .html.
|
||||
|
||||
|
||||
@@ -124,7 +124,13 @@ try {
|
||||
}
|
||||
else {
|
||||
G::SendTemporalMessage($errLabel, "warning");
|
||||
$loginUrl = 'login';
|
||||
|
||||
if (substr(SYS_SKIN, 0, 2) !== 'ux') {
|
||||
$loginUrl = 'login';
|
||||
}
|
||||
else {
|
||||
$loginUrl = '../main/login';
|
||||
}
|
||||
}
|
||||
|
||||
G::header("location: $loginUrl");
|
||||
|
||||
@@ -55,7 +55,6 @@ $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] :
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
|
||||
//$oHeadPublisher->usingExtJs('ux/Ext.ux.fileUploadField');
|
||||
$oHeadPublisher->addExtJsScript('roles/rolesList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('roles/rolesList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('FORMATS',$c->getFormats());
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
//$oHeadPublisher->setExtSkin( 'xtheme-blue');
|
||||
//$oHeadPublisher->usingExtJs('ux/Ext.ux.codepress');
|
||||
|
||||
$oHeadPublisher->addExtJsScript('setup/appCacheViewConf', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('setup/appCacheViewConf'); //adding a html file .html.
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
$RBAC->requirePermissions('PM_SETUP_ADVANCE');
|
||||
|
||||
//$oHeadPublisher->usingExtJs('ux/Ext.ux.fileUploadField');
|
||||
$oHeadPublisher->addExtJsScript('setup/languages', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('setup/languages'); //adding a html file .html.
|
||||
|
||||
|
||||
@@ -33,12 +33,14 @@
|
||||
|
||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
||||
|
||||
$defaultOption = isset($oConf->aConfig['login_enableForgotPassword'])? $oConf->aConfig['login_enableForgotPassword']: false;
|
||||
$forgotPasswd = isset($oConf->aConfig['login_enableForgotPassword'])? $oConf->aConfig['login_enableForgotPassword']: false;
|
||||
$virtualKeyboad = isset($oConf->aConfig['login_enableVirtualKeyboard'])? $oConf->aConfig['login_enableVirtualKeyboard']: false;
|
||||
$defaultLanguaje = isset($oConf->aConfig['login_defaultLanguage'])? $oConf->aConfig['login_defaultLanguage']: 'en';
|
||||
|
||||
|
||||
$oHeadPublisher->assign( 'currentLang', $defaultLanguaje); //current language
|
||||
$oHeadPublisher->assign( 'currentOption', $defaultOption); //current option
|
||||
$oHeadPublisher->assign('currentLang', $defaultLanguaje);
|
||||
$oHeadPublisher->assign('forgotPasswd', $forgotPasswd);
|
||||
$oHeadPublisher->assign('virtualKeyboad',$virtualKeyboad);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$request = isset($_POST['request'])? $_POST['request']: (isset($_GET['request'])? $_GET['request']: null);
|
||||
$request = isset($_REQUEST['request'])? $_REQUEST['request'] : null ;
|
||||
|
||||
switch($request){
|
||||
case 'getLangList':
|
||||
@@ -15,23 +15,24 @@
|
||||
|
||||
print(G::json_encode($result));
|
||||
break;
|
||||
|
||||
case 'saveSettings':
|
||||
|
||||
$memcache = & PMmemcached::getSingleton(defined('SYS_SYS') ? SYS_SYS : '');
|
||||
G::LoadClass('configuration');
|
||||
$conf = new Configurations;
|
||||
$conf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
||||
|
||||
$conf->aConfig['login_enableForgotPassword'] = isset($_POST['acceptRP']) ? $_POST['acceptRP'] : 'off';
|
||||
$conf->aConfig['login_defaultLanguage'] = $_POST['lang'];
|
||||
|
||||
$conf->aConfig['login_enableForgotPassword'] = isset($_REQUEST['forgotPasswd']);
|
||||
$conf->aConfig['login_enableVirtualKeyboard'] = isset($_REQUEST['virtualKeyboad']);
|
||||
$conf->aConfig['login_defaultLanguage'] = isset($_REQUEST['lang'])? $_REQUEST['lang'] : 'en';
|
||||
|
||||
$conf->saveConfig('ENVIRONMENT_SETTINGS', '');
|
||||
|
||||
$response->success = true;
|
||||
if (isset($_POST['acceptRP']) && $_POST['acceptRP'])
|
||||
$response->enable = true;
|
||||
else
|
||||
$response->enable = false;
|
||||
|
||||
echo G::json_encode($response);
|
||||
//remove from memcache when this value is updated/created
|
||||
$memcache->delete('flagForgotPassword') ;
|
||||
|
||||
$response->success = true;
|
||||
echo G::json_encode($response);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -41,46 +41,10 @@ function updatePageSize() {
|
||||
}
|
||||
|
||||
function skinList() {
|
||||
//Create Skins custom folder if it doesn't exists
|
||||
if(!is_dir(PATH_CUSTOM_SKINS)){
|
||||
G::verifyPath(PATH_CUSTOM_SKINS, true);
|
||||
}
|
||||
G::loadClass('system');
|
||||
|
||||
//Get Skin Config files
|
||||
$skinListArray = array();
|
||||
$customSkins = glob(PATH_CUSTOM_SKINS . "*/config.xml");
|
||||
$configurationFile = G::ExpandPath("skinEngine") . 'base' . PATH_SEP . 'config.xml';
|
||||
array_unshift($customSkins, $configurationFile);
|
||||
|
||||
//Read and parse each Configuration File
|
||||
foreach ($customSkins as $key => $configInformation) {
|
||||
|
||||
$folderId = str_replace(G::ExpandPath("skinEngine") . 'base', "", str_replace(PATH_CUSTOM_SKINS, "", str_replace("/config.xml", "", $configInformation)));
|
||||
if ($folderId == "")
|
||||
$folderId = "classic";
|
||||
$xmlConfiguration = file_get_contents($configInformation);
|
||||
$xmlConfigurationObj = G::xmlParser($xmlConfiguration);
|
||||
if (isset($xmlConfigurationObj->result['skinConfiguration'])) {
|
||||
$skinInformationArray = $skinFilesArray = $xmlConfigurationObj->result['skinConfiguration']['__CONTENT__']['information']['__CONTENT__'];
|
||||
|
||||
|
||||
$menuOption = array();
|
||||
|
||||
$res = array();
|
||||
$res['SKIN_FOLDER_ID'] = strtolower($folderId);
|
||||
foreach ($skinInformationArray as $keyInfo => $infoValue) {
|
||||
$res['SKIN_' . strtoupper($keyInfo)] = $infoValue['__VALUE__'];
|
||||
}
|
||||
$skinListArray['skins'][] = $res;
|
||||
$skinMenuArray[] = $menuOption;
|
||||
}
|
||||
}
|
||||
$skinListArray['currentSkin'] = SYS_SKIN;
|
||||
if ((isset($_REQUEST['type'])) && ($_REQUEST['type'] == "menu")) {
|
||||
print_r(G::json_encode($skinMenuArray));
|
||||
} else {
|
||||
print_r(G::json_encode($skinListArray));
|
||||
}
|
||||
$skinListArray = System::getSkingList();
|
||||
echo G::json_encode($skinListArray);
|
||||
}
|
||||
|
||||
function newSkin($baseSkin='classic') {
|
||||
|
||||
@@ -834,6 +834,11 @@ antes funcionaba.
|
||||
background-image:url( /images/icons_silk/sprites.png) !important;
|
||||
background-position:0 -8929px !important;
|
||||
}
|
||||
|
||||
.x-headBlock{
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.x-grid-empty{
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
@@ -928,6 +933,175 @@ antes funcionaba.
|
||||
clear:none;
|
||||
}
|
||||
|
||||
|
||||
/* default-layout */
|
||||
|
||||
.x-user-bar {
|
||||
color:#fff;
|
||||
font-size:8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.x-pm-tabmenu {
|
||||
color: #000 !important;
|
||||
padding-left: 32px !important;
|
||||
padding-right: 15px !important;
|
||||
padding-top: 5px !important;
|
||||
padding-bottom: 8px !important;
|
||||
font: 13px "Lucida Grande",Lucida,Verdana,sans-serif !important;
|
||||
}
|
||||
|
||||
.x-pm-home {
|
||||
background-image:url(/images/homeIcon.png) !important;
|
||||
}
|
||||
|
||||
.x-pm-bpmn {
|
||||
background-image:url(/images/bpmnIcon.png) !important;
|
||||
}
|
||||
|
||||
.x-pm-designer {
|
||||
background-image:url(/images/designerIcon.png) !important;
|
||||
}
|
||||
|
||||
.x-pm-setup {
|
||||
background-image:url(/images/setupIcon.png) !important;
|
||||
}
|
||||
|
||||
.x-pm-profile {
|
||||
background-image:url(/images/profile-icontab.png) !important;
|
||||
}
|
||||
|
||||
.x-pm-dashboard {
|
||||
background-image:url(/images/dashboard.png) !important;
|
||||
}
|
||||
|
||||
.x-pm-toolbars {
|
||||
background-color: #F0F0F0;
|
||||
background-image: url("/images/ext/gray/toolbar/bg.gif");
|
||||
border-color: #D0D0D0;
|
||||
}
|
||||
|
||||
.x-pm-logout-icon {
|
||||
background-image:url(/images/logout.gif);
|
||||
}
|
||||
|
||||
.x-pm-headerbar1 {
|
||||
background-color: #32405a;
|
||||
background-image: url("/images/header_bg.jpg");
|
||||
color: #fff;
|
||||
padding: 0px;
|
||||
font: 8pt Tahoma,sans-serif,MiscFixed;
|
||||
font-size: 12px;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
|
||||
.headerRightSection
|
||||
{
|
||||
font: 8pt Tahoma,sans-serif,MiscFixed;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.headerLeftSection
|
||||
{
|
||||
font: 8pt Tahoma,sans-serif,MiscFixed;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.headerLeftSideBar a:hover {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.headerLeftSideBar a {
|
||||
font: bold 8pt Tahoma,sans-serif,MiscFixed;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.headerRightSideBar a:hover {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
a.login {
|
||||
font: 7pt Tahoma,sans-serif,MiscFixed;
|
||||
color: #00004e;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.login:hover {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.headerRightSideBar a {
|
||||
font: 15px Tahoma,sans-serif,MiscFixed;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.headerRightSideBar
|
||||
{
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 0px;
|
||||
padding-right: 5px;
|
||||
color: #fff;
|
||||
|
||||
display: table-cell;
|
||||
vertical-align: top !important;
|
||||
}
|
||||
#user-avatar
|
||||
{
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 0px;
|
||||
padding-right: 10px;
|
||||
color: #fff;
|
||||
display: table-cell;
|
||||
vertical-align: top !important;
|
||||
}
|
||||
|
||||
.headerRightSideBar label {
|
||||
font: 9pt Lucida,Verdana,sans-serif,MiscFixed;
|
||||
color: #fff;
|
||||
|
||||
display: inline-block;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
.headerLeftSideBar
|
||||
{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 17px;
|
||||
padding-left: 0px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.companyLogo
|
||||
{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.ux-auth-warning {
|
||||
background:url("../images/ext/default/warning.png") no-repeat center left;
|
||||
padding: 2px;
|
||||
padding-left:20px;
|
||||
font-weight:bold;
|
||||
}
|
||||
.ux-auth-header-icon {
|
||||
background: url("../images/ext/default/locked.png") 0 4px no-repeat !important;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Ext JS Library 3.3.3
|
||||
* Copyright(c) 2006-2011 Sencha Inc.
|
||||
@@ -1050,6 +1224,141 @@ antes funcionaba.
|
||||
color: #15428B;
|
||||
}
|
||||
|
||||
/** Virtual keyboard UX*/
|
||||
.ux-virtualkeyboard-icon {
|
||||
background-image:url(../images/ext/default/keyboard.png) ! important;
|
||||
}
|
||||
.ux-accented-icon {
|
||||
background-image:url(../images/ext/default/accented.png) ! important;
|
||||
}
|
||||
.x-keyboard .x-toolbar{
|
||||
border-width: 1px;
|
||||
}
|
||||
.x-keyboard .x-panel-body{
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.x-keyboard .x-panel-body tbody tr td {
|
||||
margin:0px;
|
||||
padding:0px 6px 3px 6px;
|
||||
}
|
||||
.x-keyboard .x-panel-body tbody tr td div {
|
||||
text-align:center;
|
||||
position:relative;
|
||||
height:0px;
|
||||
}
|
||||
table.keys {
|
||||
height:20px;
|
||||
white-space:nowrap;
|
||||
width:100%;
|
||||
border-spacing: 0 2px 2px 0;
|
||||
}
|
||||
table.keyboardInputCenter {
|
||||
width:auto;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
#spacebar{width:150px;}
|
||||
|
||||
table.keys tbody tr td {
|
||||
vertical-align:middle;
|
||||
text-align: center;
|
||||
padding:0px 5px;
|
||||
white-space:pre;
|
||||
/*font:normal 11px 'Lucida Console',monospace;*/
|
||||
font: .69em Arial, sans-serif;
|
||||
border-top:1px solid #99BBE8;
|
||||
border-right:1px solid #15428B;
|
||||
border-bottom:1px solid #15428B;
|
||||
border-left:1px solid #99BBE8;
|
||||
background-color:#D0DEF0;
|
||||
cursor:default;
|
||||
min-width:0.75em;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
table.keys tbody tr td.last {
|
||||
width:99%;
|
||||
margin:10px;
|
||||
}
|
||||
table.keys tbody tr td.alive {
|
||||
background-color:#ccccdd;
|
||||
}
|
||||
table.keys tbody tr td.target {
|
||||
background-color:#ddddcc;
|
||||
}
|
||||
table.keys tbody tr td.hover {
|
||||
border-top:1px solid #99BBE8;
|
||||
border-right:1px solid #15428B;
|
||||
border-bottom:1px solid #15428B;
|
||||
border-left:1px solid #99BBE8;
|
||||
background-color:#99BBE8;
|
||||
}
|
||||
table.keys tbody tr td.pressed,
|
||||
table.keys tbody tr td.dead {
|
||||
border-top:1px solid #15428B;
|
||||
border-right:1px solid #99BBE8;
|
||||
border-bottom:1px solid #99BBE8;
|
||||
border-left:1px solid #15428B;
|
||||
background-color:#99BBE8;
|
||||
}
|
||||
|
||||
.keyboardInputInitiator {
|
||||
margin-left:3px;
|
||||
vertical-align:middle;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
/* BPMN Text Rotation */
|
||||
.rotateText {
|
||||
font-family: Arial;
|
||||
font-size: 10pt;
|
||||
display: table;
|
||||
text-align: center;
|
||||
/* for firefox, safari, chrome, etc. */
|
||||
-webkit-transform: rotate(-90deg);
|
||||
-moz-transform: rotate(-90deg);
|
||||
-o-transform: rotate(-90deg);/* For Opera*/
|
||||
-khtml-transform: rotate(-90deg);/* For Lunix*/
|
||||
/* for ie */
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
}
|
||||
.rotateText p {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.rotateTextIE {
|
||||
font-family: Arial;
|
||||
font-size: 10pt;
|
||||
display: table;
|
||||
text-align: center;
|
||||
writing-mode: tb-rl;
|
||||
filter: flipv fliph;
|
||||
}
|
||||
|
||||
.normalText{
|
||||
font-family: Arial;
|
||||
font-size: 10pt;
|
||||
display: table;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.normalText p{
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.normalTopText{
|
||||
font-family: Arial;
|
||||
font-size: 10pt;
|
||||
display: table;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.x-padding-left{
|
||||
padding-left: 175px;
|
||||
}
|
||||
|
||||
.x-pm-startcase-btn {
|
||||
background-image:url(/images/start.png) !important;
|
||||
color: #000 !important;
|
||||
@@ -1082,6 +1391,61 @@ antes funcionaba.
|
||||
|
||||
.x-text-plain { font-weight: bold; }
|
||||
|
||||
#oAuth {
|
||||
background-color: #fff;
|
||||
text-shadow: #fff 0 1px 0;
|
||||
}
|
||||
|
||||
#oAuth ul {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: auto;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
#oAuth ul li img {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
#oAuth ul li {
|
||||
float: left;
|
||||
padding: 10px 10px;
|
||||
margin: 5px;
|
||||
/* margin: 10px 0 0 25px;*/
|
||||
text-align: center;
|
||||
line-height: 1.25em;
|
||||
color: #333;
|
||||
font-family: "Helvetica Neue",sans-serif;
|
||||
height: 35px;
|
||||
width: 35px;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#oAuth ul li.oAuth-hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#oAuth ul li.x-view-selected {
|
||||
background-color: rgba(100, 100, 100, .15);
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
border-top: 1px solid rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
#oAuth ul li img {
|
||||
/* display: block;*/
|
||||
}
|
||||
|
||||
#oAuth li strong {
|
||||
color: #000;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#oAuth li span {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* Case Notes styles */
|
||||
|
||||
@@ -1125,3 +1489,6 @@ td.x-cnotes-label {
|
||||
font: 11px arial,tahoma,helvetica,sans-serif;
|
||||
color: #465070;
|
||||
}
|
||||
.replace {
|
||||
display:none;
|
||||
}
|
||||
@@ -15,7 +15,20 @@
|
||||
<tr>
|
||||
<td >
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr><td width="100%" class="mainMenuBG">{include file= "$tpl_submenu"}</td></tr>
|
||||
<tr>
|
||||
<td width="100%" class="mainMenuBG">{include file= "$tpl_submenu"}</td>
|
||||
{if ($exit_editor==1) }
|
||||
<td class="mainMenuBG">
|
||||
<ul id="pm_submenu">
|
||||
<li id="EXIT_EDITOR" class="subMenu">
|
||||
<a title="{$exit_editor_label}" href="/sysworkflow/en/classic/" onclick="exitEditor(); return false;">
|
||||
<img src="/images/close.png"></a>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -53,7 +53,7 @@ if (strtolower($G_SKIN_MAIN) != "classic") {
|
||||
if (is_dir($skinsBasePath . $G_SKIN_MAIN)) { // check this skin on core skins path
|
||||
$skinObject = $skinsBasePath . $G_SKIN_MAIN;
|
||||
}
|
||||
else if (is_dir(PATH_CUSTOM_SKINS . $G_SKIN_MAIN)) { // check this skin on user skins path
|
||||
else if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $G_SKIN_MAIN)) { // check this skin on user skins path
|
||||
$skinObject = PATH_CUSTOM_SKINS . $G_SKIN_MAIN;
|
||||
}
|
||||
else { //Skin doesn't exist
|
||||
@@ -203,6 +203,11 @@ switch (strtolower($G_SKIN)) {
|
||||
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED, $G_ID_MENU_SELECTED);
|
||||
$smarty->assign('menus', $menus);
|
||||
|
||||
if (substr(SYS_SKIN, 0, 2) == 'ux') {
|
||||
$smarty->assign('exit_editor', 1);
|
||||
$smarty->assign('exit_editor_label', G::loadTranslation('ID_CLOSE_EDITOR'));
|
||||
}
|
||||
|
||||
$oSubMenu = new Menu();
|
||||
$subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu', $G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
|
||||
$smarty->assign('subMenus', $subMenus);
|
||||
@@ -273,6 +278,12 @@ switch (strtolower($G_SKIN)) {
|
||||
$smarty->display($layoutFileRaw['basename']);
|
||||
break;
|
||||
//end case 'raw'
|
||||
|
||||
case "plain":
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
echo $oHeadPublisher->renderExtJs();
|
||||
break;
|
||||
|
||||
|
||||
case 'extjs'://This is a special template but need main skin styles
|
||||
G::LoadClass('serverConfiguration');
|
||||
|
||||
185
workflow/engine/templates/admin/system.js
Normal file
@@ -0,0 +1,185 @@
|
||||
Ext.onReady(function(){
|
||||
|
||||
var cmbSkins = new Ext.form.ComboBox({
|
||||
fieldLabel : _('ID_DEFAULT_SKIN'),
|
||||
hiddenName : 'default_skin',
|
||||
store : new Ext.data.ArrayStore({
|
||||
fields: ['ID', 'NAME'],
|
||||
data : skinsList
|
||||
}),
|
||||
mode : 'local',
|
||||
emptyText : _('ID_SELECT'),
|
||||
valueField : 'ID',
|
||||
displayField : 'NAME',
|
||||
selectOnFocus : true,
|
||||
editable : true,
|
||||
triggerAction: 'all',
|
||||
allowBlank : false,
|
||||
forceSelection: true,
|
||||
listeners:{
|
||||
select: function(){
|
||||
changeSettings();
|
||||
},
|
||||
afterrender: function(){
|
||||
i = cmbSkins.store.findExact('ID', sysConf.default_skin, 0);
|
||||
if (i == -1) return;
|
||||
cmbSkins.setValue(cmbSkins.store.getAt(i).data.ID);
|
||||
cmbSkins.setRawValue(cmbSkins.store.getAt(i).data.NAME);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var cmbLang = new Ext.form.ComboBox({
|
||||
fieldLabel : _('ID_DEFAULT_LANG'),
|
||||
hiddenName : 'default_lang',
|
||||
store : new Ext.data.ArrayStore({
|
||||
fields: ['ID', 'NAME'],
|
||||
data : languagesList
|
||||
}),
|
||||
mode : 'local',
|
||||
emptyText : _('ID_SELECT'),
|
||||
valueField : 'ID',
|
||||
displayField : 'NAME',
|
||||
selectOnFocus : true,
|
||||
editable : true,
|
||||
triggerAction: 'all',
|
||||
forceSelection: true,
|
||||
allowBlank : false,
|
||||
listeners:{
|
||||
select: function(){
|
||||
changeSettings();
|
||||
},
|
||||
afterrender: function(){
|
||||
i = cmbLang.store.findExact('ID', sysConf.default_lang, 0);
|
||||
if (i == -1) return;
|
||||
cmbLang.setValue(cmbLang.store.getAt(i).data.ID);
|
||||
cmbLang.setRawValue(cmbLang.store.getAt(i).data.NAME);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var cmbTimeZone = new Ext.form.ComboBox({
|
||||
fieldLabel : _('ID_TIME_ZONE'),
|
||||
hiddenName : 'time_zone',
|
||||
store : new Ext.data.ArrayStore({
|
||||
fields: ['ID', 'NAME'],
|
||||
data : timeZonesList
|
||||
}),
|
||||
mode : 'local',
|
||||
emptyText : _('ID_SELECT'),
|
||||
valueField : 'ID',
|
||||
displayField : 'NAME',
|
||||
selectOnFocus : true,
|
||||
editable : true,
|
||||
triggerAction: 'all',
|
||||
forceSelection : true,
|
||||
allowBlank : false,
|
||||
listeners:{
|
||||
select: function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
cmbTimeZone.setValue(sysConf.time_zone);
|
||||
|
||||
saveButton = new Ext.Action({
|
||||
text : _('ID_SAVE_SETTINGS'),
|
||||
disabled : true,
|
||||
handler : saveSettings
|
||||
});
|
||||
|
||||
xfields = new Ext.form.FieldSet({
|
||||
title: _('ID_SYSTEM_SETTINGS'),
|
||||
items : [
|
||||
cmbSkins,
|
||||
cmbLang,
|
||||
cmbTimeZone,
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
id : 'memory_limit',
|
||||
name : 'memory_limit',
|
||||
fieldLabel: _('ID_MEMORY_LIMIT') + '(MB) ',
|
||||
allowBlank: false,
|
||||
value: sysConf.memory_limit,
|
||||
listeners:{
|
||||
change: function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
}/*,
|
||||
{
|
||||
name: 'forgotPasswd',
|
||||
xtype: 'checkbox',
|
||||
checked: false, //forgotPasswd,
|
||||
fieldLabel: _('ID_ENABLE_FOTGOT_PASSWORD'),
|
||||
listeners:{
|
||||
check:function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
],
|
||||
buttons : [saveButton]
|
||||
});
|
||||
|
||||
|
||||
var frm = new Ext.FormPanel({
|
||||
title: ' ',
|
||||
id:'frm',
|
||||
labelWidth: 170,
|
||||
width:460,
|
||||
labelAlign:'right',
|
||||
autoScroll: true,
|
||||
bodyStyle:'padding:2px',
|
||||
waitMsgTarget : true,
|
||||
frame: true,
|
||||
|
||||
defaults: {
|
||||
allowBlank: false,
|
||||
msgTarget: 'side',
|
||||
align:'center'
|
||||
},
|
||||
items:[ xfields ]
|
||||
|
||||
});
|
||||
//render to process-panel
|
||||
frm.render(document.body);
|
||||
|
||||
}); //end onready()
|
||||
|
||||
function saveSettings()
|
||||
{
|
||||
Ext.getCmp('frm').getForm().submit( {
|
||||
url : '../adminProxy/saveSystemConf',
|
||||
waitMsg : _('ID_SAVING_PROCESS'),
|
||||
timeout : 36000,
|
||||
success : function(obj, resp) {
|
||||
//nothing to do
|
||||
response = Ext.decode(resp.response.responseText);
|
||||
parent.PMExt.notify(_('ID_INFO'),_('ID_SAVED_SUCCESSFULLY'));
|
||||
|
||||
if(response.restart) {
|
||||
PMExt.confirm(_('ID_CONFIRM'), 'To take effect the changes you need re login.<br>Redirect now?', function(){
|
||||
|
||||
if (typeof window.parent.parent != 'undefined')
|
||||
window.parent.parent.location.href = '/';
|
||||
if (typeof window.parent != 'undefined')
|
||||
window.parent.location.href = '/';
|
||||
else
|
||||
window.location.href = '/';
|
||||
});
|
||||
}
|
||||
else
|
||||
saveButton.disable();
|
||||
},
|
||||
failure: function(obj, resp) {
|
||||
PMExt.error( _('ID_ERROR'), resp.result.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
changeSettings = function()
|
||||
{
|
||||
saveButton.enable();
|
||||
}
|
||||
@@ -21,24 +21,24 @@ var NOTIFIER_FLAG = false;
|
||||
var result;
|
||||
var _action = '';
|
||||
var _CASE_TITLE;
|
||||
|
||||
new Ext.KeyMap(document, {
|
||||
key: Ext.EventObject.F5,
|
||||
fn: function(keycode, e) {
|
||||
if (! e.ctrlKey) {
|
||||
if (Ext.isIE) {
|
||||
e.browserEvent.keyCode = 8;
|
||||
}
|
||||
e.stopEvent();
|
||||
updateCasesTree();
|
||||
}
|
||||
else
|
||||
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||
}
|
||||
});
|
||||
|
||||
Ext.onReady(function(){
|
||||
new Ext.KeyMap(document, {
|
||||
key: Ext.EventObject.F5,
|
||||
fn: function(keycode, e) {
|
||||
if (! e.ctrlKey) {
|
||||
if (Ext.isIE) {
|
||||
e.browserEvent.keyCode = 8;
|
||||
}
|
||||
e.stopEvent();
|
||||
updateCasesTree();
|
||||
}
|
||||
else
|
||||
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||
}
|
||||
});
|
||||
|
||||
Ext.QuickTips.init();
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
|
||||
var resetGrid = function() {
|
||||
@@ -158,14 +158,17 @@ Ext.onReady(function(){
|
||||
|
||||
});
|
||||
|
||||
//center iframe panel
|
||||
centerPanel = {
|
||||
region: 'center', // a center region is ALWAYS required for border layout
|
||||
xtype:'panel',
|
||||
deferredRender: false,
|
||||
contentEl:'casesSubFrame'
|
||||
region : 'center',
|
||||
xtype : 'iframepanel',
|
||||
frameConfig:{
|
||||
name : 'casesSubFrame',
|
||||
id : 'casesSubFrame'
|
||||
},
|
||||
deferredRender: false
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Menu Panel
|
||||
*/
|
||||
@@ -326,8 +329,6 @@ Ext.onReady(function(){
|
||||
/**
|
||||
* Triggers Panel
|
||||
*/
|
||||
Ext.QuickTips.init();
|
||||
|
||||
var xg = Ext.grid;
|
||||
|
||||
var reader = new Ext.data.JsonReader(
|
||||
|
||||
8
workflow/engine/templates/index.html.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Redirector</title>
|
||||
<meta http-equiv="PRAGMA" content="NO-CACHE" />
|
||||
<meta http-equiv="CACHE-CONTROL" content="NO-STORE" />
|
||||
<meta http-equiv="REFRESH" content="0;URL=/sys/{lang}/{skin}/login/login" />
|
||||
</head>
|
||||
</html>
|
||||
147
workflow/engine/templates/installer/Card.js
Normal file
@@ -0,0 +1,147 @@
|
||||
Ext.namespace('Ext.ux.Wiz');
|
||||
|
||||
/**
|
||||
* Licensed under GNU LESSER GENERAL PUBLIC LICENSE Version 3
|
||||
*
|
||||
* @author Thorsten Suckow-Homberg <ts@siteartwork.de>
|
||||
* @url http://www.siteartwork.de/wizardcomponent
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Ext.ux.Wiz.Card
|
||||
* @extends Ext.FormPanel
|
||||
*
|
||||
* A specific {@link Ext.FormPanel} that can be used as a card in a
|
||||
* {@link Ext.ux.Wiz}-component. An instance of this card does only work properly
|
||||
* if used in a panel that uses a {@see Ext.layout.CardLayout}-layout.
|
||||
*
|
||||
* @constructor
|
||||
* @param {Object} config The config object
|
||||
*/
|
||||
Ext.ux.Wiz.Card = Ext.extend(Ext.FormPanel, {
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} header "True" to create the header element. Defaults to
|
||||
* "false". See {@link Ext.form.FormPanel#header}
|
||||
*/
|
||||
header : false,
|
||||
|
||||
/**
|
||||
* @cfg {Strting} hideMode Hidemode of this component. Defaults to "offsets".
|
||||
* See {@link Ext.form.FormPanel#hideMode}
|
||||
*/
|
||||
hideMode : 'display',
|
||||
|
||||
initComponent : function()
|
||||
{
|
||||
this.addEvents(
|
||||
/**
|
||||
* @event beforecardhide
|
||||
* If you want to add additional checks to your card which cannot be easily done
|
||||
* using default validators of input-fields (or using the monitorValid-config option),
|
||||
* add your specific listeners to this event.
|
||||
* This event gets only fired if the activeItem of the ownerCt-component equals to
|
||||
* this instance of {@see Ext.ux.Wiz.Card}. This is needed since a card layout usually
|
||||
* hides it's items right after rendering them, involving the beforehide-event.
|
||||
* If those checks would be attached to the normal beforehide-event, the card-layout
|
||||
* would never be able to hide this component after rendering it, depending on the
|
||||
* listeners return value.
|
||||
*
|
||||
* @param {Ext.ux.Wiz.Card} card The card that triggered the event
|
||||
*/
|
||||
'beforecardhide'
|
||||
);
|
||||
|
||||
|
||||
Ext.ux.Wiz.Card.superclass.initComponent.call(this);
|
||||
|
||||
},
|
||||
|
||||
// -------- helper
|
||||
isValid : function()
|
||||
{
|
||||
if (this.monitorValid) {
|
||||
return this.bindHandler();
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
// -------- overrides
|
||||
|
||||
/**
|
||||
* Overrides parent implementation since we allow to add any element
|
||||
* in this component which must not be neccessarily be a form-element.
|
||||
* So before a call to "isValid()" is about to be made, this implementation
|
||||
* checks first if the specific item sitting in this component has a method "isValid" - if it
|
||||
* does not exists, it will be added on the fly.
|
||||
*/
|
||||
bindHandler : function()
|
||||
{
|
||||
this.form.items.each(function(f){
|
||||
if(!f.isValid){
|
||||
f.isValid = Ext.emptyFn;
|
||||
}
|
||||
});
|
||||
|
||||
Ext.ux.Wiz.Card.superclass.bindHandler.call(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Overrides parent implementation. This is needed because in case
|
||||
* this method uses "monitorValid=true", the method "startMonitoring" must
|
||||
* not be called, until the "show"-event of this card fires.
|
||||
*/
|
||||
initEvents : function()
|
||||
{
|
||||
var old = this.monitorValid;
|
||||
this.monitorValid = false;
|
||||
Ext.ux.Wiz.Card.superclass.initEvents.call(this);
|
||||
this.monitorValid = old;
|
||||
|
||||
this.on('beforehide', this.bubbleBeforeHideEvent, this);
|
||||
|
||||
this.on('beforecardhide', this.isValid, this);
|
||||
this.on('show', this.onCardShow, this);
|
||||
this.on('hide', this.onCardHide, this);
|
||||
},
|
||||
|
||||
// -------- listener
|
||||
/**
|
||||
* Checks wether the beforecardhide-event may be triggered.
|
||||
*/
|
||||
bubbleBeforeHideEvent : function()
|
||||
{
|
||||
var ly = this.ownerCt.layout;
|
||||
var activeItem = ly.activeItem;
|
||||
|
||||
if (activeItem && activeItem.id === this.id) {
|
||||
return this.fireEvent('beforecardhide', this);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Stops monitoring the form elements in this component when the
|
||||
* 'hide'-event gets fired.
|
||||
*/
|
||||
onCardHide : function()
|
||||
{
|
||||
if (this.monitorValid) {
|
||||
this.stopMonitoring();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Starts monitoring the form elements in this component when the
|
||||
* 'show'-event gets fired.
|
||||
*/
|
||||
onCardShow : function()
|
||||
{
|
||||
if (this.monitorValid) {
|
||||
this.startMonitoring();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
56
workflow/engine/templates/installer/CardLayout.js
Normal file
@@ -0,0 +1,56 @@
|
||||
Ext.namespace('Ext.ux.layout');
|
||||
|
||||
/**
|
||||
* Licensed under GNU LESSER GENERAL PUBLIC LICENSE Version 3
|
||||
*
|
||||
* @author Thorsten Suckow-Homberg <ts@siteartwork.de>
|
||||
* @url http://www.siteartwork.de/cardlayout
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Ext.ux.layout.CardLayout
|
||||
* @extends Ext.layout.CardLayout
|
||||
*
|
||||
* A specific {@link Ext.layout.CardLayout} that only sets the active item
|
||||
* if the 'beforehide'-method of the card to hide did not return false (in this case,
|
||||
* components usually won't be hidden).
|
||||
* The original implementation of {@link Ext.layout.CardLayout} does not take
|
||||
* the return value of the 'beforehide'-method into account.
|
||||
*
|
||||
* @constructor
|
||||
* @param {Object} config The config object
|
||||
*/
|
||||
Ext.ux.layout.CardLayout = Ext.extend(Ext.layout.CardLayout, {
|
||||
|
||||
/**
|
||||
* Sets the active (visible) item in the layout.
|
||||
*
|
||||
* If the currently visible item is still visible after calling the 'hide()
|
||||
* method on it, this implementation assumes that the 'beforehide'-event returned
|
||||
* false, thus not the item was not allowed to be hidden. The active item will then
|
||||
* equal to the item that was active, before this method was called.
|
||||
*
|
||||
* @param {String/Number} item The string component id or numeric index of the item to activate
|
||||
*/
|
||||
setActiveItem : function(item){
|
||||
item = this.container.getComponent(item);
|
||||
if(this.activeItem != item){
|
||||
if(this.activeItem){
|
||||
this.activeItem.hide();
|
||||
}
|
||||
// check if the beforehide method allowed to
|
||||
// hide the current item
|
||||
if (this.activeItem && !this.activeItem.hidden) {
|
||||
return;
|
||||
}
|
||||
var layout = item.doLayout && (this.layoutOnCardChange || !item.rendered);
|
||||
this.activeItem = item;
|
||||
item.show();
|
||||
this.layout();
|
||||
if(layout){
|
||||
item.doLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
175
workflow/engine/templates/installer/Header.js
Normal file
@@ -0,0 +1,175 @@
|
||||
Ext.namespace('Ext.ux.Wiz');
|
||||
|
||||
/**
|
||||
* Licensed under GNU LESSER GENERAL PUBLIC LICENSE Version 3
|
||||
*
|
||||
* @author Thorsten Suckow-Homberg <ts@siteartwork.de>
|
||||
* @url http://www.siteartwork.de/wizardcomponent
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Ext.ux.Wiz.Header
|
||||
* @extends Ext.BoxComponent
|
||||
*
|
||||
* A specific {@link Ext.BoxComponent} that can be used to show the current process in an
|
||||
* {@link Ext.ux.Wiz}.
|
||||
*
|
||||
* An instance of this class is usually being created by {@link Ext.ux.Wiz#initPanels} using the
|
||||
* {@link Ext.ux.Wiz#headerConfig}-object.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Object} config The config object
|
||||
*/
|
||||
Ext.ux.Wiz.Header = Ext.extend(Ext.BoxComponent, {
|
||||
|
||||
/**
|
||||
* @cfg {Number} height The height of this component. Defaults to "55".
|
||||
*/
|
||||
height : 55,
|
||||
|
||||
/**
|
||||
* @cfg {String} region The Region of this component. Since a {@link Ext.ux.Wiz}
|
||||
* usually uses a {@link Ext.layout.BorderLayout}, this property defaults to
|
||||
* "north". If you want to change this property, you should also change the appropriate
|
||||
* css-classes that are used for this component.
|
||||
*/
|
||||
region : 'north',
|
||||
|
||||
/**
|
||||
* @cfg {String} title The title that gets rendered in the head of the component. This
|
||||
* should be a text describing the purpose of the wizard.
|
||||
*/
|
||||
title : 'Wizard',
|
||||
|
||||
/**
|
||||
* @cfg {Number} steps The overall number of steps the user has to go through
|
||||
* to finish the wizard.
|
||||
*/
|
||||
steps : 0,
|
||||
|
||||
/**
|
||||
* @cfg {String} stepText The text in the header indicating the current process in the wizard.
|
||||
* (defaults to "Step {0} of {1}: {2}").
|
||||
* {0} is replaced with the index (+1) of the current card, {1} is replaced by the
|
||||
* total number of cards in the wizard and {2} is replaced with the title-property of the
|
||||
* {@link Ext.ux.Wiz.Card}
|
||||
* @type String
|
||||
*/
|
||||
stepText : "Step {0} of {1}: {2}",
|
||||
|
||||
/**
|
||||
* @cfg {Object} autoEl The element markup used to render this component.
|
||||
*/
|
||||
autoEl : {
|
||||
tag : 'div',
|
||||
cls : 'ext-ux-wiz-Header',
|
||||
children : [{
|
||||
tag : 'div',
|
||||
cls : 'ext-ux-wiz-Header-title'
|
||||
}, {
|
||||
tag : 'div',
|
||||
children : [{
|
||||
tag : 'div',
|
||||
cls : 'ext-ux-wiz-Header-step'
|
||||
}, {
|
||||
tag : 'div',
|
||||
cls : 'ext-ux-wiz-Header-stepIndicator-container'
|
||||
}]
|
||||
}]
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Ext.Element}
|
||||
*/
|
||||
titleEl : null,
|
||||
|
||||
/**
|
||||
* @param {Ext.Element}
|
||||
*/
|
||||
stepEl : null,
|
||||
|
||||
/**
|
||||
* @param {Ext.Element}
|
||||
*/
|
||||
imageContainer : null,
|
||||
|
||||
/**
|
||||
* @param {Array}
|
||||
*/
|
||||
indicators : null,
|
||||
|
||||
/**
|
||||
* @param {Ext.Template}
|
||||
*/
|
||||
stepTemplate : null,
|
||||
|
||||
/**
|
||||
* @param {Number} lastActiveStep Stores the index of the last active card that
|
||||
* was shown-
|
||||
*/
|
||||
lastActiveStep : -1,
|
||||
|
||||
// -------- helper
|
||||
/**
|
||||
* Gets called by {@link Ext.ux.Wiz#onCardShow()} and updates the header
|
||||
* with the approppriate information, such as the progress of the wizard
|
||||
* (i.e. which card is being shown etc.)
|
||||
*
|
||||
* @param {Number} currentStep The index of the card currently shown in
|
||||
* the wizard
|
||||
* @param {String} title The title-property of the {@link Ext.ux.Wiz.Card}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
updateStep : function(currentStep, title)
|
||||
{
|
||||
var html = this.stepTemplate.apply({
|
||||
0 : currentStep+1,
|
||||
1 : this.steps,
|
||||
2 : title
|
||||
});
|
||||
|
||||
this.stepEl.update(html);
|
||||
|
||||
if (this.lastActiveStep != -1) {
|
||||
this.indicators[this.lastActiveStep].removeClass('ext-ux-wiz-Header-stepIndicator-active');
|
||||
}
|
||||
|
||||
this.indicators[currentStep].addClass('ext-ux-wiz-Header-stepIndicator-active');
|
||||
|
||||
this.lastActiveStep = currentStep;
|
||||
},
|
||||
|
||||
|
||||
// -------- listener
|
||||
/**
|
||||
* Overrides parent implementation to render this component properly.
|
||||
*/
|
||||
onRender : function(ct, position)
|
||||
{
|
||||
Ext.ux.Wiz.Header.superclass.onRender.call(this, ct, position);
|
||||
|
||||
this.indicators = [];
|
||||
this.stepTemplate = new Ext.Template(this.stepText);
|
||||
this.stepTemplate.compile();
|
||||
|
||||
var el = this.el.dom.firstChild;
|
||||
var ns = el.nextSibling;
|
||||
|
||||
this.titleEl = new Ext.Element(el);
|
||||
this.stepEl = new Ext.Element(ns.firstChild);
|
||||
this.imageContainer = new Ext.Element(ns.lastChild);
|
||||
|
||||
this.titleEl.update(this.title);
|
||||
|
||||
var image = null;
|
||||
for (var i = 0, len = this.steps; i < len; i++) {
|
||||
image = document.createElement('div');
|
||||
image.innerHTML = " ";
|
||||
image.className = 'ext-ux-wiz-Header-stepIndicator';
|
||||
this.indicators[i] = new Ext.Element(image);
|
||||
this.imageContainer.appendChild(image);
|
||||
}
|
||||
}
|
||||
});
|
||||
551
workflow/engine/templates/installer/Wizard.js
Normal file
@@ -0,0 +1,551 @@
|
||||
Ext.namespace('Ext.ux');
|
||||
|
||||
/**
|
||||
* Licensed under GNU LESSER GENERAL PUBLIC LICENSE Version 3
|
||||
*
|
||||
* @author Thorsten Suckow-Homberg <ts@siteartwork.de>
|
||||
* @url http://www.siteartwork.de/wizardcomponent
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Ext.ux.Wiz
|
||||
* @extends Ext.Window
|
||||
*
|
||||
* A specific {@link Ext.Window} that models a wizard component.
|
||||
* A wizard is basically a dialog that guides a user through various steps
|
||||
* where he has to fill out form-data.
|
||||
* A {@link Ext.ux.Wiz}-component consists typically of a {@link Ext.ux.Wiz.Header}
|
||||
* and window-buttons ({@link Ext.Button}) which are linked to the {@link Ext.ux.Wiz.Card}s
|
||||
* which themself represent the forms the user has to fill out.
|
||||
*
|
||||
* In order to switch between the cards in the wizard, you need the {@link Ext.ux.layout.CardLayout},
|
||||
* which will check if an active-item can be hidden, before the requested new item will be set to
|
||||
* 'active', i.e. shown. This is needed since the wizard may not allow a card to be hidden, if
|
||||
* the input entered by the user was not valid. You can get this custom layout at
|
||||
* {@link http://www.siteartwork.de/cardlayout}.
|
||||
*
|
||||
* Note:
|
||||
* When data has been collected and teh "onFinish" listener triggers an AJAX-request,
|
||||
* you should call the "switchDialogState" method so that the the dialog shows a loadmask.
|
||||
* Once the requests finishes, call "switchDialogState" again, specially before any call
|
||||
* to the "close" method of this component, otherwise the "closable" property of this
|
||||
* instance might prevent a "close" operation for this dialog.
|
||||
*
|
||||
*
|
||||
* @constructor
|
||||
* @param {Object} config The config object
|
||||
*/
|
||||
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 {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 {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 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 {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} 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 {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 : {},
|
||||
|
||||
/**
|
||||
* @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 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 {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 {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();
|
||||
|
||||
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
|
||||
]
|
||||
});
|
||||
|
||||
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);
|
||||
},
|
||||
|
||||
// -------- 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;
|
||||
},
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
var ct = this.tools['close'];
|
||||
|
||||
if (ct) {
|
||||
switch (enabled) {
|
||||
case true:
|
||||
this.tools['close'].unmask();
|
||||
break;
|
||||
|
||||
default:
|
||||
this.tools['close'].mask();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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;
|
||||
|
||||
Ext.apply(this.headerConfig, {
|
||||
steps : cards.length
|
||||
});
|
||||
|
||||
this.headPanel = new Ext.ux.Wiz.Header(this.headerConfig);
|
||||
|
||||
Ext.apply(cardPanelConfig, {
|
||||
layout : new Ext.ux.layout.CardLayout(),
|
||||
items : cards
|
||||
});
|
||||
|
||||
Ext.applyIf(cardPanelConfig, {
|
||||
region : 'center',
|
||||
border : false,
|
||||
activeItem : 0
|
||||
});
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
});
|
||||
|
||||
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
|
||||
});
|
||||
},
|
||||
|
||||
// -------- 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;
|
||||
},
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
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);
|
||||
|
||||
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 (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 '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 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);
|
||||
}
|
||||
}
|
||||
});
|
||||
30
workflow/engine/templates/installer/databases.tpl
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
{dbData}
|
||||
|
||||
$dsn = sprintf("%s://%s:%s@%s/%s", $dbAdapter, $dbUser, $dbPass, $dbHost, $dbName);
|
||||
$dsnRbac = sprintf("%s://%s:%s@%s/%s", $dbAdapter, $dbRbacUser, $dbRbacPass, $dbRbacHost, $dbRbacName);
|
||||
$dsnReport = sprintf("%s://%s:%s@%s/%s", $dbAdapter, $dbReportUser, $dbReportPass, $dbReportHost, $dbReportName);
|
||||
|
||||
switch ($dbAdapter) {
|
||||
case 'mysql':
|
||||
$dsn .= '?encoding=utf8';
|
||||
$dsnRbac .= '?encoding=utf8';
|
||||
$dsnReport .= '?encoding=utf8';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$pro ['datasources']['workflow']['connection'] = $dsn;
|
||||
$pro ['datasources']['workflow']['adapter'] = $dbAdapter;
|
||||
|
||||
$pro ['datasources']['rbac']['connection'] = $dsnRbac;
|
||||
$pro ['datasources']['rbac']['adapter'] = $dbAdapter;
|
||||
|
||||
$pro ['datasources']['rp']['connection'] = $dsnReport;
|
||||
$pro ['datasources']['rp']['adapter'] = $dbAdapter;
|
||||
|
||||
$pro ['datasources']['dbarray']['connection'] = 'dbarray://user:pass@localhost/pm_os';
|
||||
$pro ['datasources']['dbarray']['adapter'] = 'dbarray';
|
||||
|
||||
return $pro;
|
||||
41
workflow/engine/templates/installer/main.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<style>
|
||||
.ext-ux-wiz-Header {
|
||||
background-color:white;
|
||||
border-bottom:1px solid #99BBE8;
|
||||
background-image:url(/images/processmaker.logo.jpg);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-title {
|
||||
font-weight: bold;
|
||||
padding: 4px 0px 0px 4px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-step {
|
||||
color:#767676;
|
||||
text-align:right;
|
||||
padding:2px 4px 0px 0px;
|
||||
font-size:13.5px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-stepIndicator-container {
|
||||
float:right;
|
||||
margin-right:6px;
|
||||
margin-top:8px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-stepIndicator {
|
||||
margin-left:28px;
|
||||
float:left;
|
||||
background-image:url(/images/ext-ux-wiz-stepIndicator.png);
|
||||
background-position:6px 0px;
|
||||
background-repeat:repeat-x;
|
||||
height:6px;
|
||||
width:6px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-stepIndicator-active {
|
||||
background-position:0px 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
1020
workflow/engine/templates/installer/main.js
Normal file
41
workflow/engine/templates/installer/newSite.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<style>
|
||||
.ext-ux-wiz-Header {
|
||||
background-color:white;
|
||||
border-bottom:1px solid #99BBE8;
|
||||
background-image:url(/images/processmaker.logo.jpg);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-title {
|
||||
font-weight: bold;
|
||||
padding: 4px 0px 0px 4px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-step {
|
||||
color:#767676;
|
||||
text-align:right;
|
||||
padding:2px 4px 0px 0px;
|
||||
font-size:13.5px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-stepIndicator-container {
|
||||
float:right;
|
||||
margin-right:6px;
|
||||
margin-top:8px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-stepIndicator {
|
||||
margin-left:28px;
|
||||
float:left;
|
||||
background-image:url(/images/ext-ux-wiz-stepIndicator.png);
|
||||
background-position:6px 0px;
|
||||
background-repeat:repeat-x;
|
||||
height:6px;
|
||||
width:6px;
|
||||
}
|
||||
|
||||
.ext-ux-wiz-Header-stepIndicator-active {
|
||||
background-position:0px 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
535
workflow/engine/templates/installer/newSite.js
Normal file
@@ -0,0 +1,535 @@
|
||||
Ext.onReady(function(){
|
||||
var getFieldOutput = function(txt, assert) {
|
||||
if(assert == true) {
|
||||
img = 'dialog-ok-apply.png';
|
||||
size = 'width=12 height=12';
|
||||
color = 'green';
|
||||
} else {
|
||||
img = 'delete.png';
|
||||
size = 'width=15 height=15';
|
||||
color = 'red';
|
||||
}
|
||||
return '<font color=' + color + '>' + txt + '</font> <img src="/images/' + img + '" ' + size + '/>';
|
||||
};
|
||||
|
||||
var testConnection = function() {
|
||||
wizard.showLoadMask(true);
|
||||
if ((Ext.getCmp('db_engine').getValue() == '') || !Ext.getCmp('db_hostname').isValid() || !Ext.getCmp('db_username').isValid()) {
|
||||
wizard.onClientValidation(1, false);
|
||||
wizard.showLoadMask(false);
|
||||
return false;
|
||||
}
|
||||
Ext.Ajax.request({
|
||||
url: 'newSite',
|
||||
success: function(response){
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.getCmp('db_message').setValue(getFieldOutput(response.message, response.result));
|
||||
wizard.onClientValidation(1, response.result);
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
failure: function(){},
|
||||
params: {
|
||||
'action': 'testConnection',
|
||||
'db_engine': Ext.getCmp('db_engine').getValue(),
|
||||
'db_hostname': Ext.getCmp('db_hostname').getValue(),
|
||||
'db_port': Ext.getCmp('db_port').getValue(),
|
||||
'db_username': Ext.getCmp('db_username').getValue(),
|
||||
'db_password': Ext.getCmp('db_password').getValue()
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var ckeckDBEnginesValuesLoaded = function() {
|
||||
wizard.showLoadMask(true);
|
||||
if (Ext.getCmp('db_engine').store.getCount() == 0) {
|
||||
Ext.getCmp('db_engine').store.load();
|
||||
}
|
||||
else {
|
||||
testConnection();
|
||||
}
|
||||
};
|
||||
|
||||
var checkWorkspaceConfiguration = function() {
|
||||
var canInstall = false;
|
||||
if (!Ext.getCmp('workspace').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Workspace Name.', false));
|
||||
wizard.onClientValidation(2, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('adminUsername').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Admin Username.', false));
|
||||
wizard.onClientValidation(2, false);
|
||||
return;
|
||||
}
|
||||
if (Ext.getCmp('adminPassword').getValue() == '') {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Admin Password.', false));
|
||||
wizard.onClientValidation(2, 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(2, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('wfDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Workflow Database Name.', false));
|
||||
wizard.onClientValidation(2, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('rbDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Rbac Database Name.', false));
|
||||
wizard.onClientValidation(2, false);
|
||||
return;
|
||||
}
|
||||
if (!Ext.getCmp('rpDatabase').isValid()) {
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Report Database Name.', false));
|
||||
wizard.onClientValidation(2, false);
|
||||
return;
|
||||
}
|
||||
checkDatabases();
|
||||
};
|
||||
|
||||
var checkDatabases = function() {
|
||||
wizard.showLoadMask(true);
|
||||
Ext.Ajax.request({
|
||||
url: 'newSite',
|
||||
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(2, 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: {
|
||||
'action': 'checkDatabases',
|
||||
'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 steps = [];
|
||||
var setIndex = 0;
|
||||
var storeDatabase = new Ext.data.Store({
|
||||
proxy: new Ext.data.HttpProxy({url: 'newSite?action=getEngines', method: 'POST'}),
|
||||
reader: new Ext.data.JsonReader({
|
||||
fields: [{name: 'id'},{name: 'label'}]
|
||||
}),
|
||||
listeners: {load: function() {
|
||||
Ext.getCmp('db_engine').setValue(DB_ADAPTER);
|
||||
testConnection();
|
||||
}}
|
||||
});
|
||||
|
||||
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: textStep1
|
||||
},
|
||||
{
|
||||
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(1, false);
|
||||
}}
|
||||
}),
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Host Name',
|
||||
width: 180,
|
||||
id: 'db_hostname',
|
||||
value: DB_HOST,
|
||||
allowBlank: false,
|
||||
validator: function(v){
|
||||
var t = /^[0-9\.a-zA-Z_\-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(1, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Port',
|
||||
width: 180,
|
||||
id: 'db_port',
|
||||
value: DB_PORT,
|
||||
allowBlank: false,
|
||||
validator: function(v){
|
||||
var t = /^[0-9]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(1, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Username',
|
||||
width: 180,
|
||||
id: 'db_username',
|
||||
value: DB_USER,
|
||||
allowBlank: false,
|
||||
validator: function(v){
|
||||
var t = /^[.a-zA-Z_\-]+$/;
|
||||
return t.test(v);
|
||||
},
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(1, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Password',
|
||||
inputType: 'password',
|
||||
width: 180,
|
||||
id: 'db_password',
|
||||
value: DB_PASS,
|
||||
allowBlank: true,
|
||||
listeners: {change: function() {
|
||||
wizard.onClientValidation(1, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'displayfield',
|
||||
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: textStep2
|
||||
},
|
||||
{
|
||||
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(2, 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(2, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Admin Password',
|
||||
inputType: 'password',
|
||||
id: 'adminPassword',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(2, false);
|
||||
}}
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Confirm Admin Password',
|
||||
inputType: 'password',
|
||||
id: 'confirmPassword',
|
||||
enableKeyEvents: true,
|
||||
listeners: {keyup: function() {
|
||||
wizard.onClientValidation(2, 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(2, 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(2, 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(2, 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(2, false);
|
||||
}}
|
||||
},
|
||||
new Ext.form.Checkbox({
|
||||
boxLabel: "Delete Databases if exists",
|
||||
id: 'deleteDB',
|
||||
handler: function() {
|
||||
wizard.onClientValidation(2, false);
|
||||
}
|
||||
}),
|
||||
{
|
||||
xtype: 'displayfield',
|
||||
id: 'finish_message'
|
||||
},
|
||||
new Ext.Button({
|
||||
id: 'checkWSConfiguration',
|
||||
text: ' Check Workspace Configuration',
|
||||
handler: checkWorkspaceConfiguration,
|
||||
scope: this
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
show: function() {
|
||||
checkWorkspaceConfiguration();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var 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: function(){
|
||||
wizard.showLoadMask(true, 'finishing');
|
||||
Ext.Ajax.request({
|
||||
url: 'newSite',
|
||||
success: function(response){
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.getCmp('finish_message').setValue(getFieldOutput(response.message, response.result));
|
||||
wizard.showLoadMask(false);
|
||||
if (response.result) {
|
||||
Ext.Msg.alert('ProcessMaker was successfully installed', 'Workspace "' + Ext.getCmp('workspace').getValue() + '" was installed correctly now you will be redirected to your new workspace.', function() {window.location = response.url;});
|
||||
}
|
||||
},
|
||||
failure: function(){wizard.showLoadMask(false);},
|
||||
params: {
|
||||
'action': 'createWorkspace',
|
||||
'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(),
|
||||
'pathConfig': pathConfig,
|
||||
'pathLanguages': pathLanguages,
|
||||
'pathPlugins': pathPlugins,
|
||||
'pathXmlforms': pathXmlforms,
|
||||
'pathShared': pathShared,
|
||||
'workspace': Ext.getCmp('workspace').getValue(),
|
||||
'adminUsername': Ext.getCmp('adminUsername').getValue(),
|
||||
'adminPassword': Ext.getCmp('adminPassword').getValue(),
|
||||
'wfDatabase': Ext.getCmp('wfDatabase').getValue(),
|
||||
'rbDatabase': Ext.getCmp('rbDatabase').getValue(),
|
||||
'rpDatabase': Ext.getCmp('rpDatabase').getValue(),
|
||||
'deleteDB': Ext.getCmp('deleteDB').getValue()
|
||||
},
|
||||
timeout: 180000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
wizard.show();
|
||||
});
|
||||
26
workflow/engine/templates/main/forgotPassword.tpl
Normal file
@@ -0,0 +1,26 @@
|
||||
<table style="background-color: white; font-family: Arial,Helvetica,sans-serif; color: black; font-size: 11px;
|
||||
text-align: left;" cellpadding='10' cellspacing='0' width='100%'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<img id='logo' src='http://{server}/images/processmaker.logo.jpg' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='font-size: 14px;'>
|
||||
<h2>{serviceMsg}</h2>
|
||||
{content} <b>{passwd}</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='vertical-align:middel;'>
|
||||
<br />
|
||||
<hr>
|
||||
<b><i>{poweredBy} {versionLabel}</i> {version}<b>
|
||||
<br />
|
||||
{visit} <a href='http://www.processmaker.com' style='color:#c40000;'>http://www.processmaker.com</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
30
workflow/engine/templates/main/index.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<div id="panel-header" >
|
||||
<table class="x-pm-headerbar1" width="100%" height="" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td width="33%" valign="middle" style="padding-left:10px">
|
||||
<img src="{logo_company}" width="180" height="24"/>
|
||||
</td>
|
||||
|
||||
<td align="center"></td>
|
||||
|
||||
<td width="33%" align="right" valign="top">
|
||||
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerRightSection">
|
||||
<tr valign="middle">
|
||||
<td width="50%" rowspan="2" valign="top"></td>
|
||||
<td height="12" valign="middle" align="right" valign="top">
|
||||
<a href="#" id="options-tool">
|
||||
<div class="headerRightSideBar">
|
||||
{userfullname} <br />
|
||||
<span style="font-size:9px">{rolename}</span>
|
||||
</div>
|
||||
<div id="user-avatar">
|
||||
<img src="{user_avatar}" width="25" height="25"/>
|
||||
</div>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
244
workflow/engine/templates/main/index.js
Normal file
@@ -0,0 +1,244 @@
|
||||
/**
|
||||
* Main Controller for processMaker v2.x
|
||||
* @date Jul 17, 2011
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
*/
|
||||
|
||||
var Main = function() {
|
||||
return {
|
||||
/** properties */
|
||||
panels : new Array(),
|
||||
configuration: {},
|
||||
viewport : null,
|
||||
systemInfoWindow : null,
|
||||
|
||||
/** init method */
|
||||
init : function() {
|
||||
|
||||
Ext.QuickTips.init();
|
||||
Ext.form.Field.prototype.msgTarget = 'side';
|
||||
|
||||
this.configureComponents();
|
||||
this.buildComponents();
|
||||
|
||||
this.viewport = new Ext.Viewport({
|
||||
layout: 'border',
|
||||
items: [this.panels]
|
||||
});
|
||||
|
||||
Ext.getCmp('eastPanel').hide();
|
||||
Ext.getCmp('westPanel').hide();
|
||||
Ext.getCmp('southPanel').hide();
|
||||
|
||||
Ext.getCmp('centerPanel').ownerCt.doLayout();
|
||||
|
||||
if (typeof flyNotify != 'undefined') {
|
||||
Ext.msgBoxSlider.msgTopCenter(flyNotify.type, flyNotify.title, flyNotify.text, flyNotify.time);
|
||||
}
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
Main.configureComponents = function()
|
||||
{
|
||||
this.configuration.eastPanel = {
|
||||
id:'eastPanel',
|
||||
region: 'east',
|
||||
width: 200,
|
||||
height: 500,
|
||||
minSize: 175,
|
||||
maxSize: 400,
|
||||
split: true,
|
||||
collapsible: true,
|
||||
items: []
|
||||
};
|
||||
|
||||
this.configuration.centerPanel = {
|
||||
id:'centerPanel',
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
width: 200,
|
||||
margins: '0 0 0 0' // top right botom left
|
||||
};
|
||||
|
||||
this.configuration.centerPanel.items = new Array();
|
||||
this.configuration.centerPanel.items.push({
|
||||
xtype:"tabpanel",
|
||||
id: 'mainTabPanel',
|
||||
defaultType:"iframepanel",
|
||||
activeTab: activeTab != '' ? activeTab : 0
|
||||
});
|
||||
|
||||
this.configuration.westPanel = {
|
||||
id:'westPanel',
|
||||
title: '',
|
||||
region: 'west',
|
||||
width: 200,
|
||||
split: true,
|
||||
collapsible: true,
|
||||
items: []
|
||||
};
|
||||
|
||||
this.configuration.northPanel = {
|
||||
id:'northPanel',
|
||||
region: 'north',
|
||||
height: 40,
|
||||
applyTo: 'panel-header',
|
||||
margins: '0 0 0 0', // top right botom left
|
||||
items: []
|
||||
};
|
||||
|
||||
this.configuration.southPanel = {
|
||||
id:'southPanel',
|
||||
region: 'south',
|
||||
height: 68,
|
||||
margins: '0 0 0 0', // top right botom left
|
||||
items: []
|
||||
};
|
||||
|
||||
this.configuration.userMenu = {}
|
||||
this.configuration.userMenu.items = new Array();
|
||||
this.configuration.userMenu.items.push({
|
||||
text : _("ID_VIEW_EDIT_PROFILE"),
|
||||
icon: '/images/profile-picture.png',
|
||||
handler: function() {
|
||||
Main._addTab('profile', 'Profile', 'users/usersInit');
|
||||
}
|
||||
});
|
||||
|
||||
/*this.configuration.userMenu.items.push({
|
||||
id:'skinMenu',
|
||||
text : _("ID_SKINS"),
|
||||
icon: '/images/icon-pmskins.png'
|
||||
});*/
|
||||
|
||||
if (showSystemInfo) {
|
||||
this.configuration.userMenu.items.push({
|
||||
text : _('ID_SYSTEM_INFO'),
|
||||
icon: '/images/sys-info-icon.png',
|
||||
handler: systemInfo
|
||||
});
|
||||
}
|
||||
|
||||
this.configuration.userMenu.items.push({
|
||||
text : _('ID_LOGOUT'),
|
||||
icon: '/images/logout.gif',
|
||||
handler: function() {
|
||||
location.href = 'main/login';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Main.buildComponents = function()
|
||||
{
|
||||
var centerTabPanelItems = new Array();
|
||||
for (var i=0; i<meta.menu.length; i++) {
|
||||
menuItem = meta.menu[i];
|
||||
target = menuItem.target;
|
||||
|
||||
if (activeTab != '') {
|
||||
if (i == activeTab) {
|
||||
target = menuItem.target + '?' + urlAddGetParams;
|
||||
}
|
||||
}
|
||||
else {
|
||||
target = menuItem.target + '?' + urlAddGetParams;
|
||||
}
|
||||
|
||||
centerTabPanelItems.push({
|
||||
id: 'pm-option-' + menuItem.idName.toLowerCase(),
|
||||
title: menuItem.label.toUpperCase(),
|
||||
iconCls: 'x-pm-tabmenu ' + menuItem.elementclass,
|
||||
defaultSrc: target,
|
||||
frameConfig:{
|
||||
name : 'pm-frame-' + menuItem.idName.toLowerCase(),
|
||||
id : 'pm-frame-' + menuItem.idName.toLowerCase()
|
||||
},
|
||||
loadMask:{msg: _('ID_LOADING_GRID')}
|
||||
});
|
||||
}
|
||||
|
||||
this.configuration.centerPanel.items[0].items = centerTabPanelItems;
|
||||
|
||||
this.panels.push(new Ext.Panel(this.configuration.eastPanel));
|
||||
this.panels.push(new Ext.Panel(this.configuration.centerPanel));
|
||||
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)
|
||||
{
|
||||
/*var skinMenu = new Ext.ux.menu.StoreMenu({
|
||||
url:'setup/skin_Ajax.php',
|
||||
baseParams: {
|
||||
action: 'skinList',
|
||||
type: 'menu'
|
||||
}
|
||||
});
|
||||
|
||||
this.configuration.userMenu.items[1].menu = skinMenu;*/
|
||||
obj.ctxMenu = new Ext.menu.Menu(this.configuration.userMenu);
|
||||
};
|
||||
|
||||
Main._addTab = function(id, title, src)
|
||||
{
|
||||
var TabPanel = Ext.getCmp('mainTabPanel');
|
||||
tabId = 'pm-maintab-' + id;
|
||||
var tab = TabPanel.getItem(tabId);
|
||||
|
||||
if (!tab) {
|
||||
TabPanel.add({
|
||||
id: tabId,
|
||||
title: title.toUpperCase(),
|
||||
iconCls: 'x-pm-tabmenu x-pm-' + id,
|
||||
defaultSrc: src,
|
||||
frameConfig:{
|
||||
name : 'pm-frame-' + tabId.toLowerCase(),
|
||||
id : 'pm-frame-' + tabId.toLowerCase()
|
||||
},
|
||||
loadMask:{msg: _('ID_LOADING_GRID')},
|
||||
closable:true
|
||||
}).show();
|
||||
|
||||
TabPanel.doLayout();
|
||||
tab = Ext.getCmp(tabId);
|
||||
}
|
||||
|
||||
TabPanel.setActiveTab(tabId);
|
||||
};
|
||||
|
||||
var systemInfo = function()
|
||||
{
|
||||
if(Main.systemInfoWindow == null){
|
||||
var sysInfPanel = PMExt.createInfoPanel('main/getSystemInfo');
|
||||
|
||||
Main.systemInfoWindow = new Ext.Window({
|
||||
layout:'fit',
|
||||
width:500,
|
||||
height:430,
|
||||
closeAction:'hide',
|
||||
items: [sysInfPanel]
|
||||
});
|
||||
}
|
||||
Main.systemInfoWindow.show(this);
|
||||
}
|
||||
|
||||
function changeSkin(newSkin, currentSkin)
|
||||
{
|
||||
currentLocation = top.location.href;
|
||||
newLocation = currentLocation.replace("/"+currentSkin+"/","/"+newSkin+"/");
|
||||
top.location.href = newLocation;
|
||||
}
|
||||
|
||||
Ext.onReady(Main.init, Main, true);
|
||||
|
||||
97
workflow/engine/templates/main/login.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<style>
|
||||
.x-pm-login-body
|
||||
{
|
||||
background: none repeat scroll 0 0 #32405a;
|
||||
background-image: url("/images/canvastile_bg2.jpg");
|
||||
}
|
||||
#loading-message
|
||||
{
|
||||
padding-left: 10px !important;
|
||||
color: #fff;
|
||||
font: bold 10px/1.9 "Lucida Grande",Lucida,Verdana,sans-serif !important;
|
||||
}
|
||||
.x-pm-footer
|
||||
{
|
||||
background-image: url("/images/canvastile_bg2.jpg");
|
||||
position: absolute;
|
||||
bottom : 0;
|
||||
}
|
||||
.x-pm-footer-text
|
||||
{
|
||||
color: #fff;
|
||||
font: 8pt Tahoma,sans-serif,MiscFixed;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 15px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
.x-pm-footer-advisetext
|
||||
{
|
||||
color: #fff;
|
||||
font: 6pt Tahoma,sans-serif,MiscFixed;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 15px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
</style>
|
||||
<link rel='stylesheet' type='text/css' href='/css/classic-extJs.css' />
|
||||
</head>
|
||||
|
||||
<body class="x-pm-login-body">
|
||||
|
||||
<br/> <br/>
|
||||
<table id="loginLogo" width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerLeftSection">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="companyLogo"><img src="{logo_company}"/></div>
|
||||
|
||||
<div id="loading-mask"> </div>
|
||||
|
||||
<div id="loading">
|
||||
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerLeftSection">
|
||||
<tr>
|
||||
<td width="30" align="right">
|
||||
<img src="/images/login-loader.gif" align="absmiddle">
|
||||
</td>
|
||||
<td>
|
||||
<span id='loading-message'>
|
||||
Loading…
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="x-pm-footer" width="100%" height="25" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<div class="x-pm-footer-text">
|
||||
ProcessMaker Ver. {pmos_version}<br/>
|
||||
{footer_text}
|
||||
</div>
|
||||
<div class="x-pm-footer-advisetext">
|
||||
{advise_text}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Loading Core API...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-base.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Loading Components...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Initializing...';</script>
|
||||
<script type='text/javascript' src='/js/ext/translation.en.js'></script>
|
||||
{login_script}
|
||||
{login_vars}
|
||||
</body>
|
||||
</html>
|
||||
480
workflow/engine/templates/main/login.js
Normal file
@@ -0,0 +1,480 @@
|
||||
/*
|
||||
* ProcessMaker Login
|
||||
* Created on date Jul 15, 2011
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
*/
|
||||
|
||||
var loadMask = function(){
|
||||
return {
|
||||
init: function() {
|
||||
var loading = Ext.get('loading');
|
||||
var mask = Ext.get('loading-mask');
|
||||
mask.setOpacity(0.8);
|
||||
mask.shift({
|
||||
xy: loading.getXY(),
|
||||
width: loading.getWidth(),
|
||||
height: loading.getHeight(),
|
||||
remove: true,
|
||||
duration: 1,
|
||||
opacity: 0.3,
|
||||
easing: 'bounceOut',
|
||||
callback: function(){
|
||||
loading.fadeOut({
|
||||
duration: 0.2,
|
||||
remove: true
|
||||
});
|
||||
document.getElementById('loginLogo').style.display = 'block';
|
||||
}
|
||||
});
|
||||
}};
|
||||
}();
|
||||
|
||||
Ext.onReady(loadMask.init, loadMask, true);
|
||||
|
||||
var Login = function() {
|
||||
return {
|
||||
/** Properties */
|
||||
form : null,
|
||||
window : null,
|
||||
enableVirtualKeyboard : false,
|
||||
enableForgotPassword : false,
|
||||
fieldsWidth : 200,
|
||||
|
||||
/** Init method */
|
||||
init : function() {
|
||||
new Ext.KeyMap(document, {
|
||||
key: [10, 13],
|
||||
fn: function(keycode, e) {
|
||||
Login.submit();
|
||||
}
|
||||
});
|
||||
|
||||
Ext.QuickTips.init();
|
||||
Ext.form.Field.prototype.msgTarget = 'side';
|
||||
|
||||
this.enableVirtualKeyboard = virtualKeyboad;
|
||||
this.enableForgotPassword = forgotPasswd;
|
||||
|
||||
this.initComponents();
|
||||
|
||||
this.window.show();
|
||||
Ext.getCmp('userTxt').focus(true, 1000);
|
||||
|
||||
if (typeof errMsg != 'undefined') {
|
||||
Ext.msgBoxSlider.msgTopCenter('alert', 'ERROR', errMsg, 10);
|
||||
}
|
||||
|
||||
if (typeof flyNotify != 'undefined') {
|
||||
Ext.msgBoxSlider.msgTopCenter(flyNotify.type, flyNotify.title, flyNotify.text, flyNotify.time);
|
||||
}
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
Login.initComponents = function()
|
||||
{
|
||||
var userTxt = {
|
||||
id : 'userTxt',
|
||||
name : 'form[USR_USERNAME]',
|
||||
fieldLabel: _('ID_USER'),
|
||||
allowBlank: false
|
||||
}
|
||||
|
||||
var usernameTxt = {
|
||||
id : 'usernameTxt',
|
||||
name : 'username',
|
||||
fieldLabel: _('ID_USER'),
|
||||
allowBlank: false
|
||||
}
|
||||
|
||||
var emailTxt = {
|
||||
id : 'emailTxt',
|
||||
name : 'email',
|
||||
fieldLabel: _('ID_EMAIL'),
|
||||
allowBlank: false
|
||||
}
|
||||
|
||||
var passwordTxt = {
|
||||
fieldLabel: _('ID_PASSWORD'),
|
||||
name : 'form[USR_PASSWORD]',
|
||||
inputType : 'password',
|
||||
allowBlank: false,
|
||||
|
||||
validationEvent : this.enableVirtualKeyboard == true ? 'blur' : 'keyup',
|
||||
enableKeyEvents : true,
|
||||
width: this.fieldsWidth, //this.enableVirtualKeyboard == true ? 183 : this.fieldsWidth,
|
||||
keyboardConfig: {
|
||||
showIcon: true,
|
||||
languageSelection: true
|
||||
},
|
||||
plugins: this.enableVirtualKeyboard == true ? new Ext.ux.plugins.VirtualKeyboard() : null,
|
||||
|
||||
listeners: {
|
||||
render: function() {
|
||||
this.capsWarningTooltip = new Ext.ToolTip({
|
||||
target: this.id,
|
||||
anchor: 'top',
|
||||
width: 305,
|
||||
html: '<div class="ux-auth-warning">'+_('ID_CAPS_LOCK_IS_ON')+'</div><br />' +
|
||||
'<div>'+_('ID_CAPS_LOCK_ALERT1')+'</div><br />' +
|
||||
'<div>'+_('ID_CAPS_LOCK_ALERT2')+'</div>'
|
||||
});
|
||||
this.capsWarningTooltip.disable();
|
||||
this.capsWarningTooltip.on('enable', function() {
|
||||
this.disable();
|
||||
});
|
||||
},
|
||||
|
||||
keypress: {
|
||||
fn: function(field, e) {
|
||||
if(this.forceVirtualKeyboard) {
|
||||
field.plugins.expand();
|
||||
e.stopEvent();
|
||||
}
|
||||
else {
|
||||
var charCode = e.getCharCode();
|
||||
if((e.shiftKey && charCode >= 97 && charCode <= 122) ||
|
||||
(!e.shiftKey && charCode >= 65 && charCode <= 90)) {
|
||||
|
||||
field.capsWarningTooltip.show();
|
||||
}
|
||||
else {
|
||||
if(field.capsWarningTooltip.hidden == false) {
|
||||
field.capsWarningTooltip.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
scope: this
|
||||
},
|
||||
blur: function(field) {
|
||||
if(this.capsWarningTooltip.hidden == false) {
|
||||
this.capsWarningTooltip.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*,
|
||||
listeners : {
|
||||
specialkey: function(f,e){
|
||||
if (e.getKey() == e.ENTER) {
|
||||
Login.submit();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
var forgotPasswordLink = {
|
||||
xtype: 'box',
|
||||
autoEl: {
|
||||
html: '<div style="text-align: right; width: 340; left:0; top: 0px; position:relative; padding-bottom:8px">' +
|
||||
'<a href="#" onclick="Login.forgotPassword()" class="login">'+
|
||||
_('ID_FORGOT_PASSWORD_Q') + '</a></div>'
|
||||
}
|
||||
};
|
||||
var forgotPasswordBox = {
|
||||
xtype: 'box',
|
||||
autoEl: 'div',
|
||||
height: 4
|
||||
}
|
||||
|
||||
var languagesCmb = new Ext.form.ComboBox({
|
||||
id : 'language',
|
||||
fieldLabel : _('ID_LAN_LANGUAGE'),
|
||||
name : 'form[USER_LANG]',
|
||||
displayField: 'name',
|
||||
typeAhead : true,
|
||||
mode : 'local',
|
||||
emptyText : _('ID_SELECT'),
|
||||
allowBlank : false,
|
||||
valueField : 'id',
|
||||
editable : true,
|
||||
selectOnFocus : true,
|
||||
forceSelection: true,
|
||||
triggerAction : 'all',
|
||||
store : new Ext.data.ArrayStore({
|
||||
fields: ['id', 'name'],
|
||||
data : languages
|
||||
}),
|
||||
listeners : {
|
||||
afterrender : function(){
|
||||
var store = languagesCmb.getStore();
|
||||
var i = store.findExact('id', defaultLang, 0);
|
||||
if (i > -1){
|
||||
Ext.getCmp('language').setValue(store.getAt(i).data.id);
|
||||
Ext.getCmp('language').setRawValue(store.getAt(i).data.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var formConfig = {
|
||||
id : 'login-form',
|
||||
labelWidth: 80,
|
||||
labelAlign: 'right',
|
||||
bodyStyle : "padding: 10px;",
|
||||
url : "authentication",
|
||||
closeAction: 'hide',
|
||||
frame : true,
|
||||
width : 230,
|
||||
padding : 10,
|
||||
defaultType : 'textfield',
|
||||
monitorValid: true,
|
||||
defaults : {
|
||||
width : this.fieldsWidth
|
||||
},
|
||||
buttons: [{
|
||||
id: 'submit-btn',
|
||||
text: _('LOGIN'),
|
||||
formBind: true,
|
||||
handler: Login.submit
|
||||
}]
|
||||
};
|
||||
|
||||
formConfig.items = new Array();
|
||||
|
||||
if (this.enableForgotPassword) {
|
||||
formConfig.items.push(forgotPasswordLink);
|
||||
}
|
||||
formConfig.items.push(userTxt);
|
||||
formConfig.items.push(passwordTxt);
|
||||
formConfig.items.push(languagesCmb);
|
||||
|
||||
|
||||
this.form = new Ext.FormPanel(formConfig);
|
||||
|
||||
this.forgotPasswordForm = new Ext.FormPanel({
|
||||
id : 'fp-form',
|
||||
labelWidth: 80,
|
||||
labelAlign: 'right',
|
||||
bodyStyle : "padding: 10px;",
|
||||
url : "forgotPassword",
|
||||
closeAction: 'hide',
|
||||
frame : true,
|
||||
width : 230,
|
||||
padding : 10,
|
||||
defaultType : 'textfield',
|
||||
monitorValid: true,
|
||||
defaults : {
|
||||
width : this.fieldsWidth
|
||||
},
|
||||
items: [
|
||||
usernameTxt,
|
||||
emailTxt
|
||||
],
|
||||
buttons: [{
|
||||
id: 'send-btn',
|
||||
text: _('ID_SEND'),
|
||||
formBind: true,
|
||||
handler: Login.sendFpRequest
|
||||
}, {
|
||||
id: 'cancel-btn',
|
||||
text: _('ID_CANCEL'),
|
||||
handler: Login.restore
|
||||
}]
|
||||
});
|
||||
|
||||
this.forgotPasswordForm = new Ext.FormPanel({
|
||||
id : 'fp-form',
|
||||
labelWidth: 80,
|
||||
labelAlign: 'right',
|
||||
bodyStyle : "padding: 10px;",
|
||||
url : "forgotPassword",
|
||||
closeAction: 'hide',
|
||||
frame : true,
|
||||
width : 230,
|
||||
padding : 10,
|
||||
defaultType : 'textfield',
|
||||
monitorValid: true,
|
||||
defaults : {
|
||||
width : this.fieldsWidth
|
||||
},
|
||||
items: [
|
||||
usernameTxt,
|
||||
emailTxt
|
||||
],
|
||||
buttons: [{
|
||||
id: 'send-btn',
|
||||
text: _('ID_SEND'),
|
||||
formBind: true,
|
||||
handler: Login.sendFpRequest
|
||||
}, {
|
||||
id: 'cancel-btn',
|
||||
text: _('ID_CANCEL'),
|
||||
handler: Login.restore
|
||||
}]
|
||||
});
|
||||
|
||||
this.window = new Ext.Window({
|
||||
layout: 'fit',
|
||||
title: _('LOGIN'),
|
||||
width: 380,
|
||||
height: 194, //180,
|
||||
iconCls: 'ux-auth-header-icon',
|
||||
closable: false,
|
||||
resizable: false,
|
||||
plain: true,
|
||||
draggable: false,
|
||||
items: [this.form],
|
||||
bbar: new Ext.ux.StatusBar({
|
||||
defaultText: '',
|
||||
id: 'login-statusbar',
|
||||
statusAlign: 'right', // the magic config
|
||||
items: []
|
||||
})
|
||||
});
|
||||
|
||||
this.fpWindow = new Ext.Window({
|
||||
layout: 'fit',
|
||||
title: _('ID_FORGOT_PASSWORD'),
|
||||
width: 380,
|
||||
height: 150, //180,
|
||||
//iconCls: 'ux-auth-header-icon',
|
||||
closable: false,
|
||||
resizable: false,
|
||||
plain: true,
|
||||
draggable: false,
|
||||
items: [this.forgotPasswordForm],
|
||||
bbar: new Ext.ux.StatusBar({
|
||||
defaultText: '',
|
||||
id: 'login-statusbar2',
|
||||
statusAlign: 'right'
|
||||
})
|
||||
});
|
||||
|
||||
//Ext.getCmp('login-form').hide();
|
||||
}
|
||||
|
||||
Login.forgotPassword = function()
|
||||
{
|
||||
this.window.hide();
|
||||
this.fpWindow.show();
|
||||
}
|
||||
Login.restore = function()
|
||||
{
|
||||
Login.window.show();
|
||||
Login.fpWindow.hide();
|
||||
}
|
||||
|
||||
|
||||
Login.sendFpRequest = function()
|
||||
{
|
||||
Ext.getCmp('login-statusbar2').showBusy();
|
||||
|
||||
if (!Login.forgotPasswordForm.getForm().isValid()) {
|
||||
Ext.getCmp('login-statusbar2').setStatus({
|
||||
text: _('ID_VALIDATION_ERRORS'),
|
||||
iconCls: 'x-status-error',
|
||||
clear: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Login.forgotPasswordForm.getForm().submit({
|
||||
method: 'POST',
|
||||
waitTitle: '',
|
||||
waitMsg: 'Sending Request...',
|
||||
success: function(form, action)
|
||||
{
|
||||
serverResponse = Ext.util.JSON.decode(action.response.responseText);
|
||||
Ext.getCmp('login-statusbar2').setStatus({
|
||||
text: _('ID_SUCCESS'),
|
||||
iconCls: 'x-status-valid',
|
||||
clear: true // auto-clear after a set interval
|
||||
});
|
||||
Ext.msgBoxSlider.msgTopCenter('info', _('ID_INFO'), serverResponse.message, 10);
|
||||
setTimeout('Login.restore()', 4000);
|
||||
},
|
||||
failure: function(form, action)
|
||||
{
|
||||
|
||||
if (action.failureType == 'server') {
|
||||
serverResponse = Ext.util.JSON.decode(action.response.responseText);
|
||||
Ext.getCmp('login-statusbar2').setStatus({
|
||||
text: serverResponse.message,
|
||||
iconCls: 'x-status-error',
|
||||
clear: true // auto-clear after a set interval
|
||||
});
|
||||
Login.submiting = false;
|
||||
//Ext.msgBoxSlider.msgTopCenter('alert', 'LOGIN ERROR', serverResponse.message, 10);
|
||||
}
|
||||
else {
|
||||
Ext.Msg.alert('ERROR', _('ID_SERVER_PROBLEM') + ' ' + action.response.responseText);
|
||||
}
|
||||
//Login.form.getForm().reset();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
Login.submiting = false;
|
||||
Login.submit = function()
|
||||
{
|
||||
if (Login.submiting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Login.submiting = true;
|
||||
|
||||
document.forms[0].action = '../login/authentication';
|
||||
document.forms[0].submit();
|
||||
return;
|
||||
|
||||
|
||||
Ext.getCmp('login-statusbar').showBusy();
|
||||
|
||||
if (!Login.form.getForm().isValid()) {
|
||||
Ext.getCmp('login-statusbar').setStatus({
|
||||
text: _('ID_VALIDATION_ERRORS'),
|
||||
iconCls: 'x-status-error',
|
||||
clear: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Login.form.getForm().submit({
|
||||
method: 'POST',
|
||||
//waitTitle: '',
|
||||
//waitMsg: 'Verifying User...',
|
||||
success: function(form, action)
|
||||
{
|
||||
serverResponse = Ext.util.JSON.decode(action.response.responseText);
|
||||
Ext.getCmp('login-statusbar').setStatus({
|
||||
text: serverResponse.message,
|
||||
iconCls: 'x-status-valid',
|
||||
clear: true // auto-clear after a set interval
|
||||
});
|
||||
|
||||
if (typeof urlRequested != 'undefined') {
|
||||
window.location = urlRequested;
|
||||
}
|
||||
else {
|
||||
window.location = serverResponse.url;
|
||||
}
|
||||
},
|
||||
failure: function(form, action)
|
||||
{
|
||||
|
||||
if (action.failureType == 'server') {
|
||||
serverResponse = Ext.util.JSON.decode(action.response.responseText);
|
||||
Ext.getCmp('login-statusbar').setStatus({
|
||||
text: serverResponse.message,
|
||||
iconCls: 'x-status-error',
|
||||
clear: true // auto-clear after a set interval
|
||||
});
|
||||
Login.submiting = false;
|
||||
//Ext.msgBoxSlider.msgTopCenter('alert', 'LOGIN ERROR', serverResponse.message, 10);
|
||||
}
|
||||
else {
|
||||
Ext.Msg.alert('ERROR', _('ID_SERVER_PROBLEM') + ' ' + action.response.responseText);
|
||||
}
|
||||
//Login.form.getForm().reset();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Ext.onReady(Login.init, Login, true);
|
||||
|
||||
97
workflow/engine/templates/main/sysLogin.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<style>
|
||||
.x-pm-login-body
|
||||
{
|
||||
background: none repeat scroll 0 0 #32405a;
|
||||
background-image: url("/images/canvastile_bg2.jpg");
|
||||
}
|
||||
#loading-message
|
||||
{
|
||||
padding-left: 10px !important;
|
||||
color: #fff;
|
||||
font: bold 10px/1.9 "Lucida Grande",Lucida,Verdana,sans-serif !important;
|
||||
}
|
||||
.x-pm-footer
|
||||
{
|
||||
background-image: url("/images/canvastile_bg2.jpg");
|
||||
position: absolute;
|
||||
bottom : 0;
|
||||
}
|
||||
.x-pm-footer-text
|
||||
{
|
||||
color: #fff;
|
||||
font: 8pt Tahoma,sans-serif,MiscFixed;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 15px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
.x-pm-footer-advisetext
|
||||
{
|
||||
color: #fff;
|
||||
font: 6pt Tahoma,sans-serif,MiscFixed;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 15px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
</style>
|
||||
<link rel='stylesheet' type='text/css' href='/css/classic-extJs.css' />
|
||||
</head>
|
||||
|
||||
<body class="x-pm-login-body">
|
||||
|
||||
<br/> <br/>
|
||||
<table id="loginLogo" width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerLeftSection">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="companyLogo"><img src="{logo_company}"/></div>
|
||||
|
||||
<div id="loading-mask"> </div>
|
||||
|
||||
<div id="loading">
|
||||
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerLeftSection">
|
||||
<tr>
|
||||
<td width="30" align="right">
|
||||
<img src="/images/login-loader.gif" align="absmiddle">
|
||||
</td>
|
||||
<td>
|
||||
<span id='loading-message'>
|
||||
Loading…
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="x-pm-footer" width="100%" height="25" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<div class="x-pm-footer-text">
|
||||
ProcessMaker Ver. {pmos_version}<br/>
|
||||
{footer_text}
|
||||
</div>
|
||||
<div class="x-pm-footer-advisetext">
|
||||
{advise_text}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Loading Core API...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-base.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Loading Components...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Initializing...';</script>
|
||||
<script type='text/javascript' src='/js/ext/translation.en.js'></script>
|
||||
{login_script}
|
||||
{login_vars}
|
||||
</body>
|
||||
</html>
|
||||
323
workflow/engine/templates/main/sysLogin.js
Normal file
@@ -0,0 +1,323 @@
|
||||
/*
|
||||
* ProcessMaker Login
|
||||
* Created on date Jul 15, 2011
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
*/
|
||||
|
||||
var loadMask = function(){
|
||||
return {
|
||||
init: function() {
|
||||
var loading = Ext.get('loading');
|
||||
var mask = Ext.get('loading-mask');
|
||||
mask.setOpacity(0.8);
|
||||
mask.shift({
|
||||
xy: loading.getXY(),
|
||||
width: loading.getWidth(),
|
||||
height: loading.getHeight(),
|
||||
remove: true,
|
||||
duration: 1,
|
||||
opacity: 0.3,
|
||||
easing: 'bounceOut',
|
||||
callback: function(){
|
||||
loading.fadeOut({
|
||||
duration: 0.2,
|
||||
remove: true
|
||||
});
|
||||
document.getElementById('loginLogo').style.display = 'block';
|
||||
}
|
||||
});
|
||||
}};
|
||||
}();
|
||||
|
||||
Ext.onReady(loadMask.init, loadMask, true);
|
||||
|
||||
var Login = function() {
|
||||
return {
|
||||
/** Properties */
|
||||
form : null,
|
||||
window : null,
|
||||
enableVirtualKeyboard : true,
|
||||
fieldsWidth : 200,
|
||||
|
||||
/** Init method */
|
||||
init : function() {
|
||||
new Ext.KeyMap(document, {
|
||||
key: [10, 13],
|
||||
fn: function(keycode, e) {
|
||||
Login.submit();
|
||||
}
|
||||
});
|
||||
|
||||
Ext.QuickTips.init();
|
||||
Ext.form.Field.prototype.msgTarget = 'side';
|
||||
|
||||
this.initComponents();
|
||||
|
||||
Ext.getCmp('workspace').setValue(PMExt.cookie.read('x-pm-ws'));
|
||||
|
||||
this.window.show();
|
||||
Ext.getCmp('userTxt').focus(true, 1000);
|
||||
|
||||
if (typeof flyNotify != 'undefined') {
|
||||
Ext.msgBoxSlider.msgTopCenter(flyNotify.type, flyNotify.title, flyNotify.text, flyNotify.time);
|
||||
}
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
Login.initComponents = function()
|
||||
{
|
||||
var userTxt = {
|
||||
id : 'userTxt',
|
||||
name : 'form[USR_USERNAME]',
|
||||
fieldLabel: _('ID_USER'),
|
||||
allowBlank: false
|
||||
}
|
||||
|
||||
var passwordTxt = {
|
||||
fieldLabel: _('ID_PASSWORD'),
|
||||
name : 'form[USR_PASSWORD]',
|
||||
inputType : 'password',
|
||||
allowBlank: false,
|
||||
|
||||
validationEvent : this.enableVirtualKeyboard == true ? 'blur' : 'keyup',
|
||||
enableKeyEvents : true,
|
||||
width: this.fieldsWidth, //this.enableVirtualKeyboard == true ? 183 : this.fieldsWidth,
|
||||
keyboardConfig: {
|
||||
showIcon: true,
|
||||
languageSelection: true
|
||||
},
|
||||
plugins: this.enableVirtualKeyboard == true ? new Ext.ux.plugins.VirtualKeyboard() : null,
|
||||
|
||||
listeners: {
|
||||
render: function() {
|
||||
this.capsWarningTooltip = new Ext.ToolTip({
|
||||
target: this.id,
|
||||
anchor: 'top',
|
||||
width: 305,
|
||||
html: '<div class="ux-auth-warning">'+_('ID_CAPS_LOCK_IS_ON')+'</div><br />' +
|
||||
'<div>'+_('ID_CAPS_LOCK_ALERT1')+'</div><br />' +
|
||||
'<div>'+_('ID_CAPS_LOCK_ALERT2')+'</div>'
|
||||
});
|
||||
this.capsWarningTooltip.disable();
|
||||
this.capsWarningTooltip.on('enable', function() {
|
||||
this.disable();
|
||||
});
|
||||
},
|
||||
|
||||
keypress: {
|
||||
fn: function(field, e) {
|
||||
if(this.forceVirtualKeyboard) {
|
||||
field.plugins.expand();
|
||||
e.stopEvent();
|
||||
}
|
||||
else {
|
||||
var charCode = e.getCharCode();
|
||||
if((e.shiftKey && charCode >= 97 && charCode <= 122) ||
|
||||
(!e.shiftKey && charCode >= 65 && charCode <= 90)) {
|
||||
|
||||
field.capsWarningTooltip.show();
|
||||
}
|
||||
else {
|
||||
if(field.capsWarningTooltip.hidden == false) {
|
||||
field.capsWarningTooltip.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
scope: this
|
||||
},
|
||||
blur: function(field) {
|
||||
if(this.capsWarningTooltip.hidden == false) {
|
||||
this.capsWarningTooltip.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var workspaceField;
|
||||
|
||||
if (wsPrivate) {
|
||||
workspaceField = {
|
||||
id: 'workspace',
|
||||
name: 'form[USER_ENV]',
|
||||
fieldLabel: _('ID_WORKSPACE'),
|
||||
allowBlank: false
|
||||
}
|
||||
} else {
|
||||
workspaceField = new Ext.form.ComboBox({
|
||||
id: 'workspace',
|
||||
fieldLabel: _('ID_WORKSPACE'),
|
||||
name : 'form[USER_ENV]',
|
||||
store: new Ext.data.ArrayStore({
|
||||
fields: ['id', 'name'],
|
||||
data : workspaces
|
||||
}),
|
||||
displayField:'name',
|
||||
typeAhead : true,
|
||||
mode : 'local',
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
emptyText : _('ID_SELECT_WORKSPACE'),
|
||||
allowBlank : false,
|
||||
selectOnFocus: true,
|
||||
valueField : 'id',
|
||||
editable : true,
|
||||
listeners: {
|
||||
afterrender: function(){
|
||||
var store = workspaceField.getStore();
|
||||
var i = store.findExact('id', defaultWS, 0);
|
||||
if (i > -1){
|
||||
Ext.getCmp('workspace').setValue(store.getAt(i).data.id);
|
||||
Ext.getCmp('workspace').setRawValue(store.getAt(i).data.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var languagesCmb = new Ext.form.ComboBox({
|
||||
id : 'language',
|
||||
fieldLabel : _('ID_LAN_LANGUAGE'),
|
||||
name : 'form[USER_LANG]',
|
||||
displayField: 'name',
|
||||
typeAhead : true,
|
||||
mode : 'local',
|
||||
emptyText : _('ID_SELECT'),
|
||||
allowBlank : false,
|
||||
valueField : 'id',
|
||||
editable : true,
|
||||
selectOnFocus : true,
|
||||
forceSelection: true,
|
||||
triggerAction : 'all',
|
||||
store : new Ext.data.ArrayStore({
|
||||
fields: ['id', 'name'],
|
||||
data : languages
|
||||
}),
|
||||
listeners : {
|
||||
afterrender : function(){
|
||||
var store = languagesCmb.getStore();
|
||||
var i = store.findExact('id', defaultLang, 0);
|
||||
if (i > -1){
|
||||
Ext.getCmp('language').setValue(store.getAt(i).data.id);
|
||||
Ext.getCmp('language').setRawValue(store.getAt(i).data.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.form = new Ext.FormPanel({
|
||||
id : 'login-form',
|
||||
name : 'login_form',
|
||||
labelWidth: 80,
|
||||
labelAlign: 'right',
|
||||
url : "../main/sysLoginVerify",
|
||||
frame : true,
|
||||
width : 230,
|
||||
padding : 10,
|
||||
defaultType : 'textfield',
|
||||
monitorValid: true,
|
||||
defaults : {
|
||||
width:200
|
||||
},
|
||||
items: [
|
||||
userTxt,
|
||||
passwordTxt,
|
||||
workspaceField,
|
||||
languagesCmb
|
||||
],
|
||||
buttons: [{
|
||||
text: _('LOGIN'),
|
||||
formBind: true,
|
||||
handler: Login.submit
|
||||
}]
|
||||
});
|
||||
|
||||
this.window = new Ext.Window({
|
||||
layout: 'fit',
|
||||
width: 380,
|
||||
height: 210,
|
||||
title : _('LOGIN'),
|
||||
iconCls: 'ux-auth-header-icon',
|
||||
closable: false,
|
||||
resizable: false,
|
||||
plain: true,
|
||||
draggable: false,
|
||||
items: [this.form],
|
||||
bbar: new Ext.ux.StatusBar({
|
||||
defaultText: '',
|
||||
id: 'login-statusbar',
|
||||
statusAlign: 'right', // the magic config
|
||||
items: []
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Login.submiting = false;
|
||||
|
||||
Login.submit = function()
|
||||
{
|
||||
if (Login.submiting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Ext.getCmp('login-statusbar').showBusy();
|
||||
|
||||
if (!Login.form.getForm().isValid()) {
|
||||
Ext.getCmp('login-statusbar').setStatus({
|
||||
text: _('ID_VALIDATION_ERRORS'),
|
||||
iconCls: 'x-status-error',
|
||||
clear: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Login.submiting = true;
|
||||
|
||||
document.forms[0].action = '../login/sysLoginVerify';
|
||||
document.forms[0].submit();
|
||||
return;
|
||||
|
||||
|
||||
Login.form.getForm().submit({
|
||||
method: 'POST',
|
||||
//waitTitle: '',
|
||||
//waitMsg: 'Verifying User...',
|
||||
success: function(form, action)
|
||||
{
|
||||
// persistene on cookie
|
||||
PMExt.cookie.create('x-pm-ws', Ext.getCmp('workspace').getValue(), 30);
|
||||
|
||||
|
||||
serverResponse = Ext.util.JSON.decode(action.response.responseText);
|
||||
Ext.getCmp('login-statusbar').setStatus({
|
||||
text: serverResponse.message,
|
||||
iconCls: 'x-status-valid',
|
||||
clear: true // auto-clear after a set interval
|
||||
});
|
||||
window.location = serverResponse.url;
|
||||
},
|
||||
failure: function(form, action)
|
||||
{
|
||||
Login.submiting = false;
|
||||
if (action.failureType == 'server') {
|
||||
serverResponse = Ext.util.JSON.decode(action.response.responseText);
|
||||
Ext.getCmp('login-statusbar').setStatus({
|
||||
text: serverResponse.message,
|
||||
iconCls: 'x-status-error',
|
||||
clear: true // auto-clear after a set interval
|
||||
});
|
||||
//Ext.msgBoxSlider.msgTopCenter('alert', 'LOGIN ERROR', serverResponse.message, 10);
|
||||
}
|
||||
else {
|
||||
Ext.Msg.alert('ERROR', _('ID_SERVER_PROBLEM') + ' ' + action.response.responseText);
|
||||
}
|
||||
//Login.form.getForm().reset();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Ext.onReady(Login.init, Login, true);
|
||||
|
||||
36
workflow/engine/templates/main/systemInfo.js
Normal file
@@ -0,0 +1,36 @@
|
||||
Ext.onReady(function(){
|
||||
|
||||
var store = new Ext.data.ArrayStore({
|
||||
fields: ['name', 'value'],
|
||||
idIndex: 0
|
||||
});
|
||||
var propsGrid = new Ext.grid.GridPanel({
|
||||
store : store,
|
||||
columns : [{
|
||||
id : 'name',
|
||||
header : '',
|
||||
width : 150,
|
||||
sortable : false,
|
||||
dataIndex : 'name',
|
||||
renderer: function(v){return '<b><font color="#465070">'+v+'</font></b>'},
|
||||
align: 'right'
|
||||
},
|
||||
{
|
||||
header : '',
|
||||
width : 350,
|
||||
sortable : false,
|
||||
dataIndex : 'value'
|
||||
}],
|
||||
stripeRows : true,
|
||||
autoHeight : true,
|
||||
width : 480,
|
||||
columnLines: true,
|
||||
enableColumnHide: false,
|
||||
enableColumnResize: false,
|
||||
enableHdMenu: false
|
||||
});
|
||||
|
||||
store.loadData(properties);
|
||||
propsGrid.render(document.body);
|
||||
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
Ext.onReady(function(){
|
||||
|
||||
var cmbLanguages = new Ext.form.ComboBox({
|
||||
fieldLabel : TRANSLATIONS.ID_CACHE_LANGUAGE, // 'Language'
|
||||
fieldLabel : _('ID_DEFAULT_LANGUAGE'),
|
||||
hiddenName : 'lang',
|
||||
store : new Ext.data.Store( {
|
||||
proxy : new Ext.data.HttpProxy( {
|
||||
@@ -21,7 +21,9 @@ Ext.onReady(function(){
|
||||
editable : false,
|
||||
allowBlank : false,
|
||||
listeners:{
|
||||
select: function(){ChangeSettings('1');}
|
||||
select: function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -33,31 +35,42 @@ Ext.onReady(function(){
|
||||
handler : saveSettings
|
||||
});
|
||||
|
||||
loginFields = new Ext.form.FieldSet({
|
||||
loginFields = new Ext.form.FieldSet({
|
||||
title: _('ID_LOGIN_SETTINGS'),
|
||||
items : [
|
||||
cmbLanguages,
|
||||
{
|
||||
cmbLanguages,
|
||||
{
|
||||
name: 'forgotPasswd',
|
||||
xtype: 'checkbox',
|
||||
checked: currentOption,
|
||||
name: 'acceptRP',
|
||||
checked: forgotPasswd,
|
||||
fieldLabel: _('ID_ENABLE_FOTGOT_PASSWORD'),
|
||||
id: 'ch_ii',
|
||||
listeners:{
|
||||
check:function(){ChangeSettings('2');}
|
||||
check:function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'virtualKeyboad',
|
||||
xtype: 'checkbox',
|
||||
checked: virtualKeyboad,
|
||||
fieldLabel: _('ID_ENABLE_VIRTUAL_KEYBOARD'),
|
||||
listeners:{
|
||||
check:function(){
|
||||
changeSettings();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
buttons : [saveButton]
|
||||
buttons : [saveButton]
|
||||
});
|
||||
|
||||
|
||||
var frm = new Ext.FormPanel( {
|
||||
var frm = new Ext.FormPanel({
|
||||
title: ' ',
|
||||
id:'frm',
|
||||
labelWidth: 150,
|
||||
width:400,
|
||||
width:460,
|
||||
labelAlign:'right',
|
||||
autoScroll: true,
|
||||
bodyStyle:'padding:2px',
|
||||
@@ -74,9 +87,11 @@ Ext.onReady(function(){
|
||||
});
|
||||
//render to process-panel
|
||||
frm.render(document.body);
|
||||
});
|
||||
|
||||
function saveSettings() {
|
||||
}); //end onready()
|
||||
|
||||
function saveSettings()
|
||||
{
|
||||
Ext.getCmp('frm').getForm().submit( {
|
||||
url : 'loginSettingsAjax?request=saveSettings',
|
||||
waitMsg : _('ID_SAVING_PROCESS'),
|
||||
@@ -84,10 +99,7 @@ function saveSettings() {
|
||||
success : function(obj, resp) {
|
||||
//nothing to do
|
||||
response = Ext.decode(resp.response.responseText);
|
||||
if (response.enable)
|
||||
parent.PMExt.notify(_('ID_LOGIN_SETTINGS'),_('ID_ENABLE_FORGOT_PASSWORD'));
|
||||
else
|
||||
parent.PMExt.notify(_('ID_LOGIN_SETTINGS'),_('ID_DISABLE_FORGOT_PASSWORD'));
|
||||
parent.PMExt.notify(_('ID_INFO'),_('ID_SAVED_SUCCESSFULLY'));
|
||||
saveButton.disable();
|
||||
},
|
||||
failure: function(obj, resp) {
|
||||
@@ -96,6 +108,7 @@ function saveSettings() {
|
||||
});
|
||||
}
|
||||
|
||||
ChangeSettings = function(iType){
|
||||
changeSettings = function()
|
||||
{
|
||||
saveButton.enable();
|
||||
}
|
||||
|
||||
@@ -118,8 +118,13 @@ var main = function(){
|
||||
items: items
|
||||
}),
|
||||
{
|
||||
region: 'center', // a center region is ALWAYS required for border
|
||||
contentEl: 'setup-frame'
|
||||
region: 'center',
|
||||
xtype : 'iframepanel',
|
||||
frameConfig:{
|
||||
name : 'setup-frame',
|
||||
id : 'setup-frame'
|
||||
},
|
||||
deferredRender: false
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
BIN
workflow/public_html/images/canvastile_bg1.jpg
Normal file
|
After Width: | Height: | Size: 517 B |
BIN
workflow/public_html/images/canvastile_bg2.jpg
Normal file
|
After Width: | Height: | Size: 603 B |
BIN
workflow/public_html/images/close.png
Normal file
|
After Width: | Height: | Size: 832 B |
BIN
workflow/public_html/images/dashboard.png
Normal file
|
After Width: | Height: | Size: 940 B |
BIN
workflow/public_html/images/designerIcon.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
workflow/public_html/images/error.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
workflow/public_html/images/ext-ux-wiz-stepIndicator.png
Normal file
|
After Width: | Height: | Size: 356 B |
BIN
workflow/public_html/images/header_bg.jpg
Normal file
|
After Width: | Height: | Size: 361 B |
BIN
workflow/public_html/images/homeIcon.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
workflow/public_html/images/icon-logout.png
Normal file
|
After Width: | Height: | Size: 903 B |
BIN
workflow/public_html/images/icon-user-arrow.png
Normal file
|
After Width: | Height: | Size: 370 B |
BIN
workflow/public_html/images/icon-user-sep.png
Normal file
|
After Width: | Height: | Size: 231 B |
BIN
workflow/public_html/images/icon-user.png
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
workflow/public_html/images/info.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
workflow/public_html/images/login-loader.gif
Normal file
|
After Width: | Height: | Size: 723 B |
BIN
workflow/public_html/images/logo_processmaker2.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
workflow/public_html/images/logo_processmaker2.xcf
Normal file
BIN
workflow/public_html/images/logout.gif
Normal file
|
After Width: | Height: | Size: 389 B |
BIN
workflow/public_html/images/processmaker.logo.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
workflow/public_html/images/processmaker2.logo.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
workflow/public_html/images/processmaker2.logo2.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
workflow/public_html/images/profile-icontab.png
Normal file
|
After Width: | Height: | Size: 1003 B |
BIN
workflow/public_html/images/profile-picture.png
Normal file
|
After Width: | Height: | Size: 566 B |
BIN
workflow/public_html/images/profile.gif
Normal file
|
After Width: | Height: | Size: 932 B |
BIN
workflow/public_html/images/setup-gears.gif
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
workflow/public_html/images/setupIcon.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
workflow/public_html/images/start.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
workflow/public_html/images/sys-info-icon.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
workflow/public_html/images/x-icon-user.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
@@ -3,6 +3,6 @@
|
||||
<title>Redirector</title>
|
||||
<meta http-equiv="PRAGMA" content="NO-CACHE" />
|
||||
<meta http-equiv="CACHE-CONTROL" content="NO-STORE" />
|
||||
<meta http-equiv="REFRESH" content="0;URL=/sys/en/classic/login/login.html" />
|
||||
<meta http-equiv="REFRESH" content="0;URL=/sys/en/uxmodern/login/login" />
|
||||
</head>
|
||||
</html>
|
||||
@@ -58,6 +58,56 @@
|
||||
define('PATH_TRUNK', $pathTrunk );
|
||||
define('PATH_OUTTRUNK', $pathOutTrunk );
|
||||
|
||||
//////////////////////////// start, from paths.php
|
||||
|
||||
/* Default configuration values (do not change these, use env.ini) */
|
||||
// $default_config = array(
|
||||
// 'debug' => 0,
|
||||
// 'debug_sql' => 0,
|
||||
// 'debug_time' => 0,
|
||||
// 'debug_calendar' => 0,
|
||||
// 'wsdl_cache' => 1,
|
||||
// 'memory_limit' => '100M',
|
||||
// 'time_zone' => 'America/La_Paz',
|
||||
// 'memcached' => 0,
|
||||
// 'memcached_server' => ''
|
||||
// );
|
||||
|
||||
// /* Read the env.ini */
|
||||
// $env_file = realpath($pathhome . PATH_SEP . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'env.ini');
|
||||
// $config = $default_config;
|
||||
|
||||
// if ($env_file !== false && file_exists($env_file)) {
|
||||
// $ini_contents = parse_ini_file($env_file, false);
|
||||
// if ($ini_contents !== false)
|
||||
// $config = array_merge($default_config, $ini_contents);
|
||||
// }
|
||||
//var_dump($pathhome . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php'); die;
|
||||
require_once $pathhome . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php';
|
||||
$config = System::getSystemConfiguration($pathhome . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'env.ini');
|
||||
|
||||
//*** Do not change any of these settings directly, use env.ini instead
|
||||
ini_set('display_errors','On');
|
||||
|
||||
ini_set('short_open_tag', 'on');
|
||||
ini_set('asp_tags', 'on');
|
||||
// The register_globals feature has been DEPRECATED as of PHP 5.3.0. default value Off.
|
||||
// ini_set('register_globals', 'off');
|
||||
ini_set('default_charset', "UTF-8");
|
||||
$e_all = defined('E_DEPRECATED') ? E_ALL ^ E_DEPRECATED : E_ALL;
|
||||
ini_set('error_reporting', ($config['debug'] ? $e_all : $e_all ^ E_NOTICE) );
|
||||
ini_set('memory_limit', $config['memory_limit']);
|
||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||
|
||||
define ('DEBUG_SQL_LOG', $config['debug_sql'] );
|
||||
define ('DEBUG_TIME_LOG', $config['debug_time'] );
|
||||
define ('DEBUG_CALENDAR_LOG', $config['debug_calendar'] );
|
||||
define ('MEMCACHED_ENABLED', $config['memcached']);
|
||||
define ('MEMCACHED_SERVER', $config['memcached_server']);
|
||||
|
||||
define ('TIME_ZONE', $config['time_zone']);
|
||||
//////////////////////////// end, from paths.php
|
||||
|
||||
|
||||
//************* Including these files we get the PM paths and definitions (that should be just one file ***********
|
||||
require_once ( $pathhome . PATH_SEP . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php' );
|
||||
@@ -104,6 +154,13 @@
|
||||
$oHeadPublisher->addMaborakFile( PATH_CORE . 'js' . PATH_SEP . 'appFolder/core/appFolderList.js', true );
|
||||
$oHeadPublisher->addMaborakFile( PATH_THIRDPARTY . 'htmlarea/editor.js', true );
|
||||
|
||||
//erik: if it is a installation instance
|
||||
if(!defined('PATH_C')) {
|
||||
$tmpDir = G::getSysTemDir();
|
||||
define('PATH_C', $tmpDir . ((substr($tmpDir, -1) == PATH_SEP)? '': PATH_SEP));
|
||||
define('PATH_LANGUAGECONT', PATH_HOME . 'engine/content/languages/' );
|
||||
}
|
||||
|
||||
//************ defining Virtual URLs ****************/
|
||||
$virtualURITable = array();
|
||||
$virtualURITable['/plugin/(*)'] = 'plugin';
|
||||
@@ -214,7 +271,7 @@
|
||||
die;
|
||||
break;
|
||||
case 'errorFile':
|
||||
header ("location: /errors/error404.php");
|
||||
header ("location: /errors/error404.php?url=" . urlencode($_SERVER['REQUEST_URI']));
|
||||
if ( DEBUG_TIME_LOG ) logTimeByPage(); //log this page
|
||||
die;
|
||||
break;
|
||||
@@ -228,7 +285,8 @@
|
||||
|
||||
//************** the request correspond to valid php page, now parse the URI **************
|
||||
|
||||
G::parseURI ( getenv( "REQUEST_URI" ) );
|
||||
G::parseURI(getenv("REQUEST_URI" ), $config);
|
||||
|
||||
$oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . "widgets/jscalendar/lang/calendar-" . SYS_LANG . ".js");
|
||||
define( 'SYS_URI' , '/sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/' );
|
||||
|
||||
@@ -265,16 +323,32 @@
|
||||
|
||||
//************** Installer, redirect to install if we don't have a valid shared data folder ***************/
|
||||
if ( !defined('PATH_DATA') || !file_exists(PATH_DATA)) {
|
||||
if ( (SYS_TARGET==='installServer')) {
|
||||
$phpFile = G::ExpandPath('methods') ."install/installServer.php";
|
||||
require_once($phpFile);
|
||||
die();
|
||||
|
||||
/*new installer, extjs based*/
|
||||
|
||||
define('PATH_DATA', PATH_C);
|
||||
require_once ( PATH_CONTROLLERS . 'installer.php' );
|
||||
$controller = 'Installer';
|
||||
|
||||
//if the method name is empty set default to index method
|
||||
if (strpos(SYS_TARGET, '/') !== false)
|
||||
list($controller, $controllerAction) = explode('/', SYS_TARGET);
|
||||
else
|
||||
$controllerAction = SYS_TARGET;
|
||||
|
||||
$controllerAction = ($controllerAction != '' && $controllerAction != 'login')? $controllerAction: 'index';
|
||||
|
||||
//create the installer controller and call its method
|
||||
if( is_callable(Array('Installer', $controllerAction)) ) {
|
||||
$installer = new $controller();
|
||||
$installer->setHttpRequestData($_REQUEST);
|
||||
$installer->call($controllerAction);
|
||||
}
|
||||
else {
|
||||
$phpFile = G::ExpandPath('methods') ."install/install.php";
|
||||
require_once($phpFile);
|
||||
die();
|
||||
$_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
|
||||
header ("location: /errors/error404.php?url=" . urlencode($_SERVER['REQUEST_URI']));
|
||||
}
|
||||
die;
|
||||
}
|
||||
|
||||
// ************* Load Language Translation *****************
|
||||
@@ -303,15 +377,13 @@
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . PATH_WORKSPACE);
|
||||
}
|
||||
else {
|
||||
$aMessage['MESSAGE'] = G::LoadTranslation ('ID_NOT_WORKSPACE');
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish' );
|
||||
G::SendTemporalMessage ('ID_NOT_WORKSPACE', "error");
|
||||
G::header('location: /sys/' . SYS_LANG . '/' . SYS_SKIN . '/main/sysLogin?errno=2');
|
||||
die;
|
||||
}
|
||||
}
|
||||
else { //when we are in global pages, outside any valid workspace
|
||||
if ((SYS_TARGET==='sysLoginVerify') || (SYS_TARGET==='sysLogin') || (SYS_TARGET==='newSite')) {
|
||||
if (SYS_TARGET==='newSite') {
|
||||
$phpFile = G::ExpandPath('methods') . SYS_COLLECTION . "/" . SYS_TARGET.'.php';
|
||||
require_once($phpFile);
|
||||
die();
|
||||
@@ -321,7 +393,22 @@
|
||||
require_once( PATH_METHODS . "login/dbInfo.php" ) ;
|
||||
}
|
||||
else{
|
||||
require_once( PATH_METHODS . "login/sysLogin.php" ) ;
|
||||
|
||||
if (substr(SYS_SKIN, 0, 2) === 'ux' && SYS_TARGET != 'sysLoginVerify') { // new ux sysLogin - extjs based form
|
||||
require_once PATH_CONTROLLERS . 'main.php';
|
||||
$controllerClass = 'Main';
|
||||
$controllerAction = SYS_TARGET == 'sysLoginVerify' ? SYS_TARGET : 'sysLogin';
|
||||
//if the method exists
|
||||
if( is_callable(Array($controllerClass, $controllerAction)) ) {
|
||||
$controller = new $controllerClass();
|
||||
$controller->setHttpRequestData($_REQUEST);
|
||||
$controller->call($controllerAction);
|
||||
}
|
||||
}
|
||||
else { // classic sysLogin interface
|
||||
require_once( PATH_METHODS . "login/sysLogin.php" ) ;
|
||||
die();
|
||||
}
|
||||
}
|
||||
if ( DEBUG_TIME_LOG ) logTimeByPage(); //log this page
|
||||
die();
|
||||
@@ -486,7 +573,7 @@
|
||||
if ( ! $isControllerCall && ! file_exists( $phpFile ) ) {
|
||||
$_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
|
||||
print $phpFile;
|
||||
header ("location: /errors/error404.php");
|
||||
header ("location: /errors/error404.php?url=" . urlencode($_SERVER['REQUEST_URI']));
|
||||
die;
|
||||
}
|
||||
}
|
||||
@@ -494,8 +581,9 @@
|
||||
//redirect to login, if user changed the workspace in the URL
|
||||
if( ! $avoidChangedWorkspaceValidation && isset( $_SESSION['WORKSPACE'] ) && $_SESSION['WORKSPACE'] != SYS_SYS) {
|
||||
$_SESSION['WORKSPACE'] = SYS_SYS;
|
||||
|
||||
G::SendTemporalMessage ('ID_USER_HAVENT_RIGHTS_SYSTEM', "error");
|
||||
header ( 'Location: /sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/login' );
|
||||
header ( 'Location: /sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/main/login' );
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -516,7 +604,12 @@
|
||||
|
||||
if((isset( $_SESSION['USER_LOGGED'] ))&&(!(isset($_GET['sid'])))) {
|
||||
$RBAC->initRBAC();
|
||||
$RBAC->loadUserRolePermission( $RBAC->sSystem, $_SESSION['USER_LOGGED'] , PATH_DATA, session_id());
|
||||
//using optimization with memcache, the user data will be in memcache 8 hours, or until session id goes invalid
|
||||
$memKey = 'rbacSession' . session_id();
|
||||
if ( ($RBAC->aUserInfo = $memcache->get($memKey)) === false ) {
|
||||
$RBAC->loadUserRolePermission( $RBAC->sSystem, $_SESSION['USER_LOGGED'] );
|
||||
$memcache->set( $memKey, $RBAC->aUserInfo, PMmemcached::EIGHT_HOURS );
|
||||
}
|
||||
}
|
||||
else {
|
||||
// this is the blank list to allow execute scripts with no login (without session started)
|
||||
@@ -539,6 +632,7 @@
|
||||
|
||||
$noLoginFolders[] = 'services';
|
||||
$noLoginFolders[] = 'tracker';
|
||||
$noLoginFolders[] = 'installer';
|
||||
|
||||
//This sentence is used when you lost the Session
|
||||
if ( !in_array(SYS_TARGET, $noLoginFiles) && !in_array(SYS_COLLECTION, $noLoginFolders) && $bWE != true && $collectionPlugin != 'services') {
|
||||
@@ -556,6 +650,8 @@
|
||||
$bRedirect = false;
|
||||
$RBAC->initRBAC();
|
||||
$RBAC->loadUserRolePermission( $RBAC->sSystem, $_SESSION['USER_LOGGED'] );
|
||||
$memKey = 'rbacSession' . session_id();
|
||||
$memcache->set( $memKey, $RBAC->aUserInfo, PMmemcached::EIGHT_HOURS );
|
||||
}
|
||||
}
|
||||
if ($bRedirect) {
|
||||
@@ -564,14 +660,19 @@
|
||||
$loginUrl = 'home/login';
|
||||
}
|
||||
else {
|
||||
$loginUrl = 'login/login';
|
||||
$loginUrl = 'main/login';
|
||||
}
|
||||
|
||||
if (empty($_POST)) {
|
||||
header('location: ' . SYS_URI . $loginUrl . '?u=' . urlencode($_SERVER['REQUEST_URI']));
|
||||
}
|
||||
else {
|
||||
header('location: ' . SYS_URI . $loginUrl);
|
||||
if ( $isControllerCall ) {
|
||||
header("HTTP/1.0 302 session lost in controller");
|
||||
}
|
||||
else {
|
||||
header('location: ' . SYS_URI . $loginUrl);
|
||||
}
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||