Merge remote branch 'upstream/master' into PM-2394

This commit is contained in:
dheeyi
2015-04-27 16:53:19 -04:00
70 changed files with 1811 additions and 331 deletions

View File

@@ -229,7 +229,7 @@ class PmSessionHandler //implements SessionHandlerInterface
/** /**
* Garbase Collection method * Garbase Collection method
* *
* @param int $maxlifetime max time that especify if the session is active or not * @param int $maxlifetime max time that specifies if the session is active or not
* @return bool always returns true * @return bool always returns true
*/ */
public function gc($maxlifetime) public function gc($maxlifetime)

View File

@@ -160,7 +160,7 @@ abstract class Zend_Uri
*/ */
$uri = explode(':', $uri, 2); $uri = explode(':', $uri, 2);
$scheme = strtolower($uri[0]); $scheme = strtolower($uri[0]);
$schemeSpecific = isset($uri[1]) ? $uri[1] : ''; $schemeSpecify = isset($uri[1]) ? $uri[1] : '';
if (!strlen($scheme)) { if (!strlen($scheme)) {
throw new Zend_Uri_Exception('An empty string was supplied for the scheme'); throw new Zend_Uri_Exception('An empty string was supplied for the scheme');

View File

@@ -1273,7 +1273,7 @@ class Bootstrap
$checkSum = ''; $checkSum = '';
foreach ($files as $file) { foreach ($files as $file) {
if (is_file($file)) { if (is_file($file)) {
$checkSum .= md5_file($file); $checkSum .= Bootstrap::encryptFileOld($file);
} }
} }
return Bootstrap::encryptOld($checkSum . $key); return Bootstrap::encryptOld($checkSum . $key);
@@ -1376,7 +1376,7 @@ class Bootstrap
{ {
global $translation; global $translation;
// if the second parameter $lang is an array does mean it was especified to use as data // if the second parameter ($lang) is an array, it was specified to use it as data
if (is_array($lang)) { if (is_array($lang)) {
$data = $lang; $data = $lang;
$lang = SYS_LANG; $lang = SYS_LANG;
@@ -1409,7 +1409,7 @@ class Bootstrap
* *
* @param $path path to scan recursively the write permission * @param $path path to scan recursively the write permission
* @param $flags to notive glob function * @param $flags to notive glob function
* @param $pattern pattern to filter some especified files * @param $pattern pattern to filter some specified files
* @return <array> array containing the recursive glob results * @return <array> array containing the recursive glob results
*/ */
public function rglob($pattern = '*', $flags = 0, $path = '') public function rglob($pattern = '*', $flags = 0, $path = '')
@@ -2934,4 +2934,3 @@ class Bootstrap
return md5($string); return md5($string);
} }
} }

View File

@@ -2095,7 +2095,7 @@ class G
{ {
global $translation; global $translation;
// if the second parameter $lang is an array does mean it was especified to use as data // if the second parameter ($lang) is an array, it was specified to use as data
if (is_array( $lang )) { if (is_array( $lang )) {
$data = $lang; $data = $lang;
$lang = SYS_LANG; $lang = SYS_LANG;
@@ -3133,6 +3133,9 @@ class G
*/ */
public function evalJScript ($c) public function evalJScript ($c)
{ {
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$c = $filter->xssFilterHard($c);
print ("<script language=\"javascript\">{$c}</script>") ; print ("<script language=\"javascript\">{$c}</script>") ;
} }
@@ -3634,7 +3637,7 @@ class G
* @author Erik Amaru Ortiz <erik@colosa.com> * @author Erik Amaru Ortiz <erik@colosa.com>
* *
* @param $path path to scan recursively the write permission * @param $path path to scan recursively the write permission
* @param $pattern pattern to filter some especified files * @param $pattern pattern to filter some specified files
* @return <boolean> if the $path, assuming that is a directory -> all files in it are writeables or not * @return <boolean> if the $path, assuming that is a directory -> all files in it are writeables or not
*/ */
public function is_rwritable($path, $pattern = '*') public function is_rwritable($path, $pattern = '*')
@@ -3655,7 +3658,7 @@ class G
* *
* @param $path path to scan recursively the write permission * @param $path path to scan recursively the write permission
* @param $flags to notive glob function * @param $flags to notive glob function
* @param $pattern pattern to filter some especified files * @param $pattern pattern to filter some specified files
* @return <array> array containing the recursive glob results * @return <array> array containing the recursive glob results
*/ */
public static function rglob($pattern = '*', $flags = 0, $path = '') public static function rglob($pattern = '*', $flags = 0, $path = '')
@@ -4582,7 +4585,7 @@ class G
$checkSum = ''; $checkSum = '';
foreach ($files as $file) { foreach ($files as $file) {
if (is_file( $file )) { if (is_file( $file )) {
$checkSum .= md5_file( $file ); $checkSum .= G::encryptFileOld( $file );
} }
} }
return G::encryptOld( $checkSum . $key ); return G::encryptOld( $checkSum . $key );
@@ -5600,6 +5603,17 @@ class G
return md5($string); return md5($string);
} }
/** /**
* encryptFileOld
*
* @param string $string
*
* @return md5_file($string)
*/
public function encryptFileOld ($string)
{
return md5_file($string);
}
/**
* crc32 * crc32
* *
* @param string $string * @param string $string
@@ -5705,4 +5719,3 @@ function __ ($msgID, $lang = SYS_LANG, $data = null)
{ {
return G::LoadTranslation( $msgID, $lang, $data ); return G::LoadTranslation( $msgID, $lang, $data );
} }

View File

@@ -80,8 +80,7 @@ class PgSQLTableInfo extends TableInfo {
require_once($pathTrunk.'gulliver/system/class.inputfilter.php'); require_once($pathTrunk.'gulliver/system/class.inputfilter.php');
$filter = new InputFilter(); $filter = new InputFilter();
$this->oid = $filter->validateInput($this->oid, 'int'); $this->oid = $filter->validateInput($this->oid, 'int');
$query = "SELECT
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT
att.attname, att.attname,
att.atttypmod, att.atttypmod,
att.atthasdef, att.atthasdef,
@@ -102,7 +101,9 @@ class PgSQLTableInfo extends TableInfo {
LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
WHERE att.attrelid = %d AND att.attnum > 0 WHERE att.attrelid = %d AND att.attnum > 0
AND att.attisdropped IS FALSE AND att.attisdropped IS FALSE
ORDER BY att.attnum", $this->oid)); ORDER BY att.attnum";
$query = $filter->preventSqlInjection($query);
$result = pg_query ($this->conn->getResource(), sprintf ($query, $this->oid));
if (!$result) { if (!$result) {
throw new SQLException("Could not list fields for table: " . $this->name, pg_last_error($this->conn->getResource())); throw new SQLException("Could not list fields for table: " . $this->name, pg_last_error($this->conn->getResource()));
@@ -224,8 +225,7 @@ class PgSQLTableInfo extends TableInfo {
require_once($pathTrunk.'gulliver/system/class.inputfilter.php'); require_once($pathTrunk.'gulliver/system/class.inputfilter.php');
$filter = new InputFilter(); $filter = new InputFilter();
$strDomain = $filter->validateInput($strDomain); $strDomain = $filter->validateInput($strDomain);
$query = "SELECT
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT
d.typname as domname, d.typname as domname,
b.typname as basetype, b.typname as basetype,
d.typlen, d.typlen,
@@ -237,7 +237,9 @@ class PgSQLTableInfo extends TableInfo {
WHERE WHERE
d.typtype = 'd' d.typtype = 'd'
AND d.typname = '%s' AND d.typname = '%s'
ORDER BY d.typname", $strDomain)); ORDER BY d.typname";
$query = $filter->preventSqlInjection($query);
$result = pg_query ($this->conn->getResource(), sprintf ($query, $strDomain));
if (!$result) { if (!$result) {
throw new SQLException("Query for domain [" . $strDomain . "] failed.", pg_last_error($this->conn->getResource())); throw new SQLException("Query for domain [" . $strDomain . "] failed.", pg_last_error($this->conn->getResource()));
@@ -276,7 +278,7 @@ class PgSQLTableInfo extends TableInfo {
$filter = new InputFilter(); $filter = new InputFilter();
$this->oid = $filter->validateInput($this->oid, 'int'); $this->oid = $filter->validateInput($this->oid, 'int');
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT $query = "SELECT
conname, conname,
confupdtype, confupdtype,
confdeltype, confdeltype,
@@ -294,7 +296,9 @@ class PgSQLTableInfo extends TableInfo {
AND conrelid = %d AND conrelid = %d
AND a2.attnum = ct.conkey[1] AND a2.attnum = ct.conkey[1]
AND a1.attnum = ct.confkey[1] AND a1.attnum = ct.confkey[1]
ORDER BY conname", $this->oid)); ORDER BY conname";
$query = $filter->preventSqlInjection($query);
$result = pg_query ($this->conn->getResource(), sprintf ($query, $this->oid));
if (!$result) { if (!$result) {
throw new SQLException("Could not list foreign keys for table: " . $this->name, pg_last_error($this->conn->getResource())); throw new SQLException("Could not list foreign keys for table: " . $this->name, pg_last_error($this->conn->getResource()));
} }
@@ -371,7 +375,7 @@ class PgSQLTableInfo extends TableInfo {
$filter = new InputFilter(); $filter = new InputFilter();
$this->oid = $filter->validateInput($this->oid, 'int'); $this->oid = $filter->validateInput($this->oid, 'int');
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT $query = "SELECT
DISTINCT ON(cls.relname) DISTINCT ON(cls.relname)
cls.relname as idxname, cls.relname as idxname,
indkey, indkey,
@@ -379,7 +383,9 @@ class PgSQLTableInfo extends TableInfo {
FROM pg_index idx FROM pg_index idx
JOIN pg_class cls ON cls.oid=indexrelid JOIN pg_class cls ON cls.oid=indexrelid
WHERE indrelid = %d AND NOT indisprimary WHERE indrelid = %d AND NOT indisprimary
ORDER BY cls.relname", $this->oid)); ORDER BY cls.relname";
$query = $filter->preventSqlInjection($query);
$result = pg_query ($this->conn->getResource(), sprintf ($query, $this->oid));
if (!$result) { if (!$result) {
@@ -407,10 +413,12 @@ class PgSQLTableInfo extends TableInfo {
{ {
$intColNum = $filter->validateInput($intColNum, 'int'); $intColNum = $filter->validateInput($intColNum, 'int');
$result2 = pg_query ($this->conn->getResource(), sprintf ("SELECT a.attname $query = "SELECT a.attname
FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON a.attrelid = c.oid FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON a.attrelid = c.oid
WHERE c.oid = '%s' AND a.attnum = %d AND NOT a.attisdropped WHERE c.oid = '%s' AND a.attnum = %d AND NOT a.attisdropped
ORDER BY a.attnum", $this->oid, $intColNum)); ORDER BY a.attnum";
$query = $filter->preventSqlInjection($query);
$result2 = pg_query ($this->conn->getResource(), sprintf ($query, $this->oid, $intColNum));
if (!$result2) if (!$result2)
{ {
throw new SQLException("Could not list indexes keys for table: " . $this->name, pg_last_error($this->conn->getResource())); throw new SQLException("Could not list indexes keys for table: " . $this->name, pg_last_error($this->conn->getResource()));
@@ -444,7 +452,7 @@ class PgSQLTableInfo extends TableInfo {
$filter = new InputFilter(); $filter = new InputFilter();
$this->oid = $filter->validateInput($this->oid); $this->oid = $filter->validateInput($this->oid);
$result = pg_query($this->conn->getResource(), sprintf ("SELECT $query = "SELECT
DISTINCT ON(cls.relname) DISTINCT ON(cls.relname)
cls.relname as idxname, cls.relname as idxname,
indkey, indkey,
@@ -452,7 +460,9 @@ class PgSQLTableInfo extends TableInfo {
FROM pg_index idx FROM pg_index idx
JOIN pg_class cls ON cls.oid=indexrelid JOIN pg_class cls ON cls.oid=indexrelid
WHERE indrelid = %s AND indisprimary WHERE indrelid = %s AND indisprimary
ORDER BY cls.relname", $this->oid)); ORDER BY cls.relname";
$query = $filter->preventSqlInjection($query);
$result = pg_query($this->conn->getResource(), sprintf ($query, $this->oid));
if (!$result) { if (!$result) {
throw new SQLException("Could not list primary keys for table: " . $this->name, pg_last_error($this->conn->getResource())); throw new SQLException("Could not list primary keys for table: " . $this->name, pg_last_error($this->conn->getResource()));
} }
@@ -477,10 +487,12 @@ class PgSQLTableInfo extends TableInfo {
{ {
$intColNum = $filter->validateInput($intColNum, 'int'); $intColNum = $filter->validateInput($intColNum, 'int');
$result2 = pg_query ($this->conn->getResource(), sprintf ("SELECT a.attname $query = "SELECT a.attname
FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON a.attrelid = c.oid FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON a.attrelid = c.oid
WHERE c.oid = '%s' AND a.attnum = %d AND NOT a.attisdropped WHERE c.oid = '%s' AND a.attnum = %d AND NOT a.attisdropped
ORDER BY a.attnum", $this->oid, $intColNum)); ORDER BY a.attnum";
$query = $filter->preventSqlInjection($query);
$result2 = pg_query ($this->conn->getResource(), sprintf ($query, $this->oid, $intColNum));
if (!$result2) if (!$result2)
{ {
throw new SQLException("Could not list indexes keys for table: " . $this->name, pg_last_error($this->conn->getResource())); throw new SQLException("Could not list indexes keys for table: " . $this->name, pg_last_error($this->conn->getResource()));

View File

@@ -123,7 +123,9 @@ class SQLiteTableInfo extends TableInfo {
$this->indexes[$name] = new IndexInfo($name); $this->indexes[$name] = new IndexInfo($name);
// get columns for that index // get columns for that index
$res2 = sqlite_query($this->conn->getResource(), "PRAGMA index_info('$name')"); $query = "PRAGMA index_info('$name')";
$query = $filter->preventSqlInjection($query);
$res2 = sqlite_query($this->conn->getResource(), $query);
while($row2 = sqlite_fetch_array($res2, SQLITE_ASSOC)) { while($row2 = sqlite_fetch_array($res2, SQLITE_ASSOC)) {
$colname = $row2['name']; $colname = $row2['name'];
$this->indexes[$name]->addColumn($this->columns[ $colname ]); $this->indexes[$name]->addColumn($this->columns[ $colname ]);

View File

@@ -72,6 +72,15 @@ class PEAR_Frontend_CLI extends PEAR
function _displayLine($text) function _displayLine($text)
{ {
$realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] );
$docuroot = explode( '/', $realdocuroot );
array_pop( $docuroot );
$pathhome = implode( '/', $docuroot ) . '/';
array_pop( $docuroot );
$pathTrunk = implode( '/', $docuroot ) . '/';
require_once($pathTrunk.'gulliver/system/class.inputfilter.php');
$filter = new InputFilter();
$text = $filter->xssFilterHard($text);
print "$this->lp$text\n"; print "$this->lp$text\n";
} }
@@ -124,15 +133,25 @@ class PEAR_Frontend_CLI extends PEAR
function userDialog($command, $prompts, $types = array(), $defaults = array()) function userDialog($command, $prompts, $types = array(), $defaults = array())
{ {
$realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] );
$docuroot = explode( '/', $realdocuroot );
array_pop( $docuroot );
$pathhome = implode( '/', $docuroot ) . '/';
array_pop( $docuroot );
$pathTrunk = implode( '/', $docuroot ) . '/';
require_once($pathTrunk.'gulliver/system/class.inputfilter.php');
$filter = new InputFilter();
$result = array(); $result = array();
if (is_array($prompts)) { if (is_array($prompts)) {
$fp = fopen("php://stdin", "r"); $fp = fopen("php://stdin", "r");
foreach ($prompts as $key => $prompt) { foreach ($prompts as $key => $prompt) {
$type = $types[$key]; $type = $types[$key];
$default = @$defaults[$key]; $default = @$defaults[$key];
$default = $filter->xssFilterHard($default);
if ($type == 'password') { if ($type == 'password') {
system('stty -echo'); system('stty -echo');
} }
$prompt = $filter->xssFilterHard($prompt);
print "$this->lp$prompt "; print "$this->lp$prompt ";
if ($default) { if ($default) {
print "[$default] "; print "[$default] ";

View File

@@ -82,10 +82,19 @@ function print_test_names()
function print_endpoint_names() function print_endpoint_names()
{ {
global $iop; global $iop;
$realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] );
$docuroot = explode( '/', $realdocuroot );
array_pop( $docuroot );
$pathhome = implode( '/', $docuroot ) . '/';
array_pop( $docuroot );
$pathTrunk = implode( '/', $docuroot ) . '/';
require_once($pathTrunk.'gulliver/system/class.inputfilter.php');
$filter = new InputFilter();
$currTest = $filter->xssFilterHard($iop->currentTest);
if (!$iop->getEndpoints($iop->currentTest)) { if (!$iop->getEndpoints($iop->currentTest)) {
die("Unable to retrieve endpoints for $iop->currentTest\n"); die("Unable to retrieve endpoints for $currTest\n");
} }
print "Interop Servers for $iop->currentTest:\n"; print "Interop Servers for $currTestt:\n";
foreach ($iop->endpoints as $server) { foreach ($iop->endpoints as $server) {
print " $server->name\n"; print " $server->name\n";
} }

View File

@@ -134,7 +134,7 @@ class wsdlcache {
$this->debug("Lock for $filename already exists"); $this->debug("Lock for $filename already exists");
return false; return false;
} }
$this->fplock[md5($filename)] = fopen($filename.".lock", "w"); $this->fplock[G::encryptOld($filename)] = fopen($filename.".lock", "w");
if ($mode == "r") { if ($mode == "r") {
return flock($this->fplock[G::encryptOld($filename)], LOCK_SH); return flock($this->fplock[G::encryptOld($filename)], LOCK_SH);
} else { } else {
@@ -173,9 +173,18 @@ class wsdlcache {
* @access private * @access private
*/ */
function releaseMutex($filename) { function releaseMutex($filename) {
$ret = flock($this->fplock[md5($filename)], LOCK_UN); if(!class_exists('G')){
fclose($this->fplock[md5($filename)]); $realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] );
unset($this->fplock[md5($filename)]); $docuroot = explode( '/', $realdocuroot );
array_pop( $docuroot );
$pathhome = implode( '/', $docuroot ) . '/';
array_pop( $docuroot );
$pathTrunk = implode( '/', $docuroot ) . '/';
require_once($pathTrunk.'gulliver/system/class.g.php');
}
$ret = flock($this->fplock[G::encryptOld($filename)], LOCK_UN);
fclose($this->fplock[G::encryptOld($filename)]);
unset($this->fplock[G::encryptOld($filename)]);
if (! $ret) { if (! $ret) {
$this->debug("Not able to release lock for $filename"); $this->debug("Not able to release lock for $filename");
} }

View File

@@ -2527,7 +2527,7 @@ class PHPMailer {
$mimeType = self::_mime_types($ext); $mimeType = self::_mime_types($ext);
if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; } if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; }
if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; } if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; }
if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($url), $filename, 'base64', $mimeType) ) { if ( $this->AddEmbeddedImage($basedir.$directory.$filename, G::encryptOld($url), $filename, 'base64', $mimeType) ) {
$message = preg_replace("/".$images[1][$i]."=[\"']".preg_quote($url, '/')."[\"']/Ui", $images[1][$i]."=\"".$cid."\"", $message); $message = preg_replace("/".$images[1][$i]."=[\"']".preg_quote($url, '/')."[\"']/Ui", $images[1][$i]."=\"".$cid."\"", $message);
} }
} }

View File

@@ -5,7 +5,7 @@
*/ */
if ( !defined('PATH_SEP') ) { if ( !defined('PATH_SEP') ) {
define('PATH_SEP', ( substr(PHP_OS, 0, 3) == 'WIN' ) ? '\\' : '/'); define("PATH_SEP", (substr(PHP_OS, 0, 3) == "WIN")? "\\" : "/");
} }
$docuroot = explode(PATH_SEP, str_replace('engine' . PATH_SEP . 'methods' . PATH_SEP . 'services', '', dirname(__FILE__))); $docuroot = explode(PATH_SEP, str_replace('engine' . PATH_SEP . 'methods' . PATH_SEP . 'services', '', dirname(__FILE__)));
@@ -129,7 +129,7 @@ if ($force || !$bCronIsRunning) {
$oDirectory = dir(PATH_DB); $oDirectory = dir(PATH_DB);
$cws = 0; $cws = 0;
while($sObject = $oDirectory->read()) { while (($sObject = $oDirectory->read()) !== false) {
if (($sObject != ".") && ($sObject != "..")) { if (($sObject != ".") && ($sObject != "..")) {
if (is_dir(PATH_DB . $sObject)) { if (is_dir(PATH_DB . $sObject)) {
if (file_exists(PATH_DB . $sObject . PATH_SEP . "db.php")) { if (file_exists(PATH_DB . $sObject . PATH_SEP . "db.php")) {
@@ -141,6 +141,10 @@ if ($force || !$bCronIsRunning) {
} }
} }
} else { } else {
if (!is_dir(PATH_DB . $ws) || !file_exists(PATH_DB . $ws . PATH_SEP . "db.php")) {
throw new Exception("Error: The workspace \"$ws\" does not exist");
}
$cws = 1; $cws = 1;
system("php -f \"" . dirname(__FILE__) . PATH_SEP . "cron_single.php\" $ws \"$sDate\" \"$dateSystem\" $argsx", $retval); system("php -f \"" . dirname(__FILE__) . PATH_SEP . "cron_single.php\" $ws \"$sDate\" \"$dateSystem\" $argsx", $retval);

View File

@@ -10,11 +10,6 @@ register_shutdown_function(
) )
); );
/**
* cron_single.php
* @package workflow-engine-bin
*/
if (!defined('SYS_LANG')) { if (!defined('SYS_LANG')) {
define('SYS_LANG', 'en'); define('SYS_LANG', 'en');
} }
@@ -220,9 +215,6 @@ Bootstrap::registerClass('CaseTrackerObject', PATH_HOME . "engine/classes/mod
Bootstrap::registerClass('BaseCaseTrackerObjectPeer',PATH_HOME . "engine/classes/model/om/BaseCaseTrackerObjectPeer.php"); Bootstrap::registerClass('BaseCaseTrackerObjectPeer',PATH_HOME . "engine/classes/model/om/BaseCaseTrackerObjectPeer.php");
Bootstrap::registerClass('CaseTrackerObjectPeer', PATH_HOME . "engine/classes/model/CaseTrackerObjectPeer.php"); Bootstrap::registerClass('CaseTrackerObjectPeer', PATH_HOME . "engine/classes/model/CaseTrackerObjectPeer.php");
Bootstrap::registerClass('BaseConfiguration', PATH_HOME . "engine/classes/model/om/BaseConfiguration.php");
Bootstrap::registerClass('Configuration', PATH_HOME . "engine/classes/model/Configuration.php");
Bootstrap::registerClass('BaseDbSource', PATH_HOME . "engine/classes/model/om/BaseDbSource.php"); Bootstrap::registerClass('BaseDbSource', PATH_HOME . "engine/classes/model/om/BaseDbSource.php");
Bootstrap::registerClass('DbSource', PATH_HOME . "engine/classes/model/DbSource.php"); Bootstrap::registerClass('DbSource', PATH_HOME . "engine/classes/model/DbSource.php");
@@ -367,7 +359,7 @@ Bootstrap::registerClass("AddonsManagerPeer", PATH_HOME . "engine" . PATH_SEP
Bootstrap::registerClass('dashboards', PATH_HOME . "engine/classes/class.dashboards.php"); Bootstrap::registerClass('dashboards', PATH_HOME . "engine/classes/class.dashboards.php");
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$arrayClass = array("EmailServer", "ListInbox", "ListParticipatedHistory"); $arrayClass = array("Configuration", "EmailServer", "ListInbox", "ListParticipatedHistory");
foreach ($arrayClass as $value) { foreach ($arrayClass as $value) {
Bootstrap::registerClass("Base" . $value, PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "Base" . $value . ".php"); Bootstrap::registerClass("Base" . $value, PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "Base" . $value . ".php");

View File

@@ -114,6 +114,10 @@ try {
} }
} }
} else { } else {
if (!is_dir(PATH_DB . $workspace) || !file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
throw new Exception("Error: The workspace \"$workspace\" does not exist");
}
$countw++; $countw++;
passthru("php -f \"$messageEventCronSinglePath\" $workspace \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\""); passthru("php -f \"$messageEventCronSinglePath\" $workspace \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\"");

View File

@@ -24,8 +24,8 @@ Usage: {$argv[0]} [build-crud] [gen-ini] [-p <plugin name>] [-w <workspace name>
Options: Options:
build-crud : Task, build Rest Crud API. build-crud : Task, build Rest Crud API.
gen-ini : Task, generates the rest config ini file. gen-ini : Task, generates the rest config ini file.
-p : Especify a plugin to set as enviroment to perform the tasks. -p : Specifies a plugin to set as environment to perform the tasks.
-w : Especify a workspace to set as enviroment to perform the tasks. -w : Specifies a workspace to set as environment to perform the tasks.
EOT; EOT;
@@ -42,7 +42,7 @@ try {
case 'gen-ini': case 'gen-ini':
if (isset($argv[2])) { if (isset($argv[2])) {
if (! isset($argv[3])) { if (! isset($argv[3])) {
throw new Exception("Missing option, need especify a valid argument after option '{$argv[2]}'"); throw new Exception("Missing option, need specify a valid argument after option '{$argv[2]}'");
} }
switch ($argv[2]) { switch ($argv[2]) {

View File

@@ -217,7 +217,7 @@ function run_unify_database($args)
if ($count > 1) { if ($count > 1) {
if(!Bootstrap::isLinuxOs()){ if(!Bootstrap::isLinuxOs()){
CLI::error("This is not a Linux enviroment, please especify workspace.\n"); CLI::error("This is not a Linux enviroment, please specify workspace.\n");
return; return;
} }
} }

View File

@@ -98,7 +98,7 @@ class Upgrade
$installedMD5 = ""; $installedMD5 = "";
} else { } else {
$time = microtime(1); $time = microtime(1);
$installedMD5 = md5_file($installedFile); $installedMD5 = G::encryptFileOld($installedFile);
$checksumTime += microtime(1) - $time; $checksumTime += microtime(1) - $time;
} }
$archiveMD5 = $checksum; $archiveMD5 = $checksum;

View File

@@ -4100,6 +4100,7 @@ class Cases
$oApplication = new Application(); $oApplication = new Application();
$aFields = $oApplication->load($sApplicationUID); $aFields = $oApplication->load($sApplicationUID);
$appStatusCurrent = $aFields['APP_STATUS'];
$oCriteria = new Criteria('workflow'); $oCriteria = new Criteria('workflow');
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID); $oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
$oCriteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL); $oCriteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
@@ -4170,7 +4171,8 @@ class Cases
$data = array ( $data = array (
'APP_UID' => $sApplicationUID, 'APP_UID' => $sApplicationUID,
'DEL_INDEX' => $iIndex, 'DEL_INDEX' => $iIndex,
'USR_UID' => $user_logged 'USR_UID' => $user_logged,
'APP_STATUS_CURRENT' => $appStatusCurrent
); );
$data = array_merge($aFields, $data); $data = array_merge($aFields, $data);
$oListCanceled = new ListCanceled(); $oListCanceled = new ListCanceled();

View File

@@ -752,14 +752,19 @@ class Derivation
//$appFields['APP_PROC_CODE'] = $nextDel['TAS_DEF_PROC_CODE']; //$appFields['APP_PROC_CODE'] = $nextDel['TAS_DEF_PROC_CODE'];
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if ($nextDel['TAS_UID'] != '-1') { if ($nextDel['TAS_UID'] != '-1') {
$taskCur = TaskPeer::retrieveByPK($nextDel['TAS_UID']); $taskNex = TaskPeer::retrieveByPK($nextDel['TAS_UID']);
$aTask = $taskCur->toArray( BasePeer::TYPE_FIELDNAME ); $aTask = $taskNex->toArray( BasePeer::TYPE_FIELDNAME );
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT"); $arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
if (!in_array($aTask['TAS_TYPE'], $arrayTaskTypeToExclude)) { if (!in_array($aTask['TAS_TYPE'], $arrayTaskTypeToExclude)) {
if (!empty($iNewDelIndex) && empty($aSP)) { if (!empty($iNewDelIndex) && empty($aSP)) {
$oAppDel = AppDelegationPeer::retrieveByPK( $appFields['APP_UID'], $iNewDelIndex ); $oAppDel = AppDelegationPeer::retrieveByPK( $appFields['APP_UID'], $iNewDelIndex );
$aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME ); $aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME );
$aFields['APP_STATUS'] = $currentDelegation['APP_STATUS']; $aFields['APP_STATUS'] = $currentDelegation['APP_STATUS'];
$taskCur = TaskPeer::retrieveByPK($currentDelegation['TAS_UID']);
$aTaskCur = $taskCur->toArray( BasePeer::TYPE_FIELDNAME );
if ($aTaskCur['TAS_TYPE'] == "INTERMEDIATE-CATCH-MESSAGE-EVENT") {
$removeList = false;
}
$aFields['REMOVED_LIST'] = $removeList; $aFields['REMOVED_LIST'] = $removeList;
$inbox = new ListInbox(); $inbox = new ListInbox();
$inbox->newRow($aFields, $appFields['CURRENT_USER_UID'], false, array(), ($nextDel['TAS_ASSIGN_TYPE'] == 'SELF_SERVICE' ? true : false)); $inbox->newRow($aFields, $appFields['CURRENT_USER_UID'], false, array(), ($nextDel['TAS_ASSIGN_TYPE'] == 'SELF_SERVICE' ? true : false));

View File

@@ -151,12 +151,12 @@ class indicatorsCalculator
$params[":endMonth"] = $endMonth; $params[":endMonth"] = $endMonth;
$params[":language"] = $language; $params[":language"] = $language;
$sqlString = " $sqlString = "select
select
i.PRO_UID as uid, i.PRO_UID as uid,
tp.CON_VALUE as name, tp.CON_VALUE as name,
efficiencyIndex, efficiencyIndex,
inefficiencyCost inefficiencyCost,
@curRow := @curRow + 1 AS rank
from from
( select ( select
PRO_UID, PRO_UID,
@@ -172,12 +172,14 @@ class indicatorsCalculator
AND AND
IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear) IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear)
group by PRO_UID group by PRO_UID
order by $this->peiFormula DESC
) i ) i
left join (select * left join (select *
from CONTENT from CONTENT
where CON_CATEGORY = 'PRO_TITLE' where CON_CATEGORY = 'PRO_TITLE'
and CON_LANG = :language and CON_LANG = :language
) tp on i.PRO_UID = tp.CON_ID"; ) tp on i.PRO_UID = tp.CON_ID
join (SELECT @curRow := 0) order_table";
//$retval = $this->propelExecutor($sqlString); //$retval = $this->propelExecutor($sqlString);
$retval = $this->pdoExecutor($sqlString, $params); $retval = $this->pdoExecutor($sqlString, $params);
@@ -210,7 +212,8 @@ class indicatorsCalculator
efficiencyIndex, efficiencyIndex,
inefficiencyCost, inefficiencyCost,
averageTime, averageTime,
deviationTime deviationTime,
@curRow := @curRow + 1 AS rank
from from
( select ( select
gu.GRP_UID, gu.GRP_UID,
@@ -224,12 +227,14 @@ class indicatorsCalculator
WHERE WHERE
IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear) IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear)
group by gu.GRP_UID group by gu.GRP_UID
order by $this->ueiFormula DESC
) i ) i
left join (select * left join (select *
from CONTENT from CONTENT
where CON_CATEGORY = 'GRP_TITLE' where CON_CATEGORY = 'GRP_TITLE'
and CON_LANG = :language and CON_LANG = :language
) tp on i.GRP_UID = tp.CON_ID"; ) tp on i.GRP_UID = tp.CON_ID
join (SELECT @curRow := 0) order_table";
$retval = $this->pdoExecutor($sqlString, $params); $retval = $this->pdoExecutor($sqlString, $params);
//$retval = $this->propelExecutor($sqlString); //$retval = $this->propelExecutor($sqlString);
@@ -262,7 +267,8 @@ class indicatorsCalculator
efficiencyIndex, efficiencyIndex,
inefficiencyCost, inefficiencyCost,
averageTime, averageTime,
deviationTime deviationTime,
@curRow := @curRow + 1 AS rank
from from
( select ( select
u.USR_UID, u.USR_UID,
@@ -279,7 +285,9 @@ class indicatorsCalculator
AND AND
IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear) IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear)
group by ur.USR_UID group by ur.USR_UID
) i"; order by $this->ueiFormula DESC
) i
join (SELECT @curRow := 0) order_table";
$retval = $this->pdoExecutor($sqlString, $params); $retval = $this->pdoExecutor($sqlString, $params);
//$returnValue = $this->propelExecutor($sqlString); //$returnValue = $this->propelExecutor($sqlString);

View File

@@ -399,23 +399,20 @@ class PMPluginRegistry
} }
/** /**
* get status plugin in the singleton * Get status plugin in the singleton
* *
* @param unknown_type $sNamespace * @param string $name Plugin name
*
* return mixed Return a string with status plugin, 0 otherwise
*/ */
public function getStatusPlugin ($sNamespace) public function getStatusPlugin($name)
{ {
foreach ($this->_aPluginDetails as $namespace => $detail) { try {
if ($sNamespace == $namespace) { return (isset($this->_aPluginDetails[$name]))? (($this->_aPluginDetails[$name]->enabled)? "enabled" : "disabled") : 0;
if ($this->_aPluginDetails[$sNamespace]->enabled) { } catch (Excepton $e) {
return 'enabled'; throw $e;
} else {
return 'disabled';
} }
} }
}
return 0;
}
/** /**
* Install a plugin archive. * Install a plugin archive.

View File

@@ -260,7 +260,7 @@ class System
continue; continue;
} }
if (file_exists( realpath( $filename ) )) { if (file_exists( realpath( $filename ) )) {
if (strcmp( $checksum, md5_file( realpath( $filename ) ) ) != 0) { if (strcmp( $checksum, G::encryptFileOld( realpath( $filename ) ) ) != 0) {
$result['diff'][] = $filename; $result['diff'][] = $filename;
} }
} else { } else {
@@ -542,7 +542,7 @@ class System
$file = PATH_TRUNK . trim( $line[2] ); $file = PATH_TRUNK . trim( $line[2] );
if (is_readable( $file )) { if (is_readable( $file )) {
$size = sprintf( "%07d", filesize( $file ) ); $size = sprintf( "%07d", filesize( $file ) );
$checksum = sprintf( "%010u", crc32( file_get_contents( $file ) ) ); $checksum = sprintf( "%010u", G::encryptCrc32( file_get_contents( $file ) ) );
if (! ($line[0] == $size && $line[1] == $checksum) && substr( $file, - 4 ) != '.xml') { if (! ($line[0] == $size && $line[1] == $checksum) && substr( $file, - 4 ) != '.xml') {
$distinctFiles .= $file . "\n"; $distinctFiles .= $file . "\n";
$distinct ++; $distinct ++;

View File

@@ -61,7 +61,7 @@ class AddonsManager extends BaseAddonsManager
if ($download_md5 == null) { if ($download_md5 == null) {
return null; return null;
} }
return (strcasecmp(md5_file($filename), $download_md5) == 0); return (strcasecmp(G::encryptFileOld($filename), $download_md5) == 0);
} }
/** /**

View File

@@ -367,7 +367,7 @@ class Application extends BaseApplication
$pin = G::generateCode(4, 'ALPHANUMERIC'); $pin = G::generateCode(4, 'ALPHANUMERIC');
$this->setAppData(serialize(array('PIN' => $pin))); $this->setAppData(serialize(array('PIN' => $pin)));
$this->setAppPin(md5($pin)); $this->setAppPin(G::encryptOld($pin));
$c = new Criteria(); $c = new Criteria();
$c->clearSelectColumns(); $c->clearSelectColumns();

View File

@@ -27,7 +27,7 @@ class DashboardIndicator extends BaseDashboardIndicator
throw $error; throw $error;
} }
} }
function loadbyDasUid ($dasUid, $vmeasureDate, $vcompareDate, $userUid) function loadbyDasUid ($dasUid, $vcompareDate, $vmeasureDate, $userUid)
{ {
G::loadClass('indicatorsCalculator'); G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator(); $calculator = new \IndicatorsCalculator();
@@ -64,11 +64,15 @@ class DashboardIndicator extends BaseDashboardIndicator
$value = current(reset($calculator->peiHistoric($uid, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE))); $value = current(reset($calculator->peiHistoric($uid, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
$oldValue = current(reset($calculator->peiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE))); $oldValue = current(reset($calculator->peiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
$row['DAS_IND_VARIATION'] = $value - $oldValue; $row['DAS_IND_VARIATION'] = $value - $oldValue;
$row['DAS_IND_OLD_VALUE'] = $oldValue;
$row['DAS_IND_PERCENT_VARIATION'] = round(($value - $oldValue) * 100 / (($oldValue == 0) ? 1 : $oldValue), 1);
break; break;
case '1030': case '1030':
$value = current(reset($calculator->ueiHistoric(null, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE))); $value = current(reset($calculator->ueiHistoric(null, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
$oldValue = current(reset($calculator->ueiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE))); $oldValue = current(reset($calculator->ueiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
$row['DAS_IND_VARIATION'] = $value - $oldValue; $row['DAS_IND_VARIATION'] = $value - $oldValue;
$row['DAS_IND_OLD_VALUE'] = $oldValue;
$row['DAS_IND_PERCENT_VARIATION'] = round(($value - $oldValue) * 100 / (($oldValue == 0) ? 1 : $oldValue), 1);
break; break;
case '1050': case '1050':
$value = $calculator->statusIndicatorGeneral($userUid); $value = $calculator->statusIndicatorGeneral($userUid);

View File

@@ -104,9 +104,21 @@ class ListCanceled extends BaseListCanceled {
$oListInbox->removeAll($data['APP_UID']); $oListInbox->removeAll($data['APP_UID']);
$users = new Users(); $users = new Users();
if (!empty($data['APP_STATUS_CURRENT']) && $data['APP_STATUS_CURRENT'] == 'DRAFT') {
$users->refreshTotal($data['USR_UID'], 'removed', 'draft');
} else {
$users->refreshTotal($data['USR_UID'], 'removed', 'inbox'); $users->refreshTotal($data['USR_UID'], 'removed', 'inbox');
}
$users->refreshTotal($data['USR_UID'], 'add', 'canceled'); $users->refreshTotal($data['USR_UID'], 'add', 'canceled');
//Update - WHERE
$criteriaWhere = new Criteria("workflow");
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data["APP_UID"], Criteria::EQUAL);
//Update - SET
$criteriaSet = new Criteria("workflow");
$criteriaSet->add(ListParticipatedLastPeer::APP_STATUS, 'CANCELLED');
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME ); $con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
try { try {
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME ); $this->fromArray( $data, BasePeer::TYPE_FIELDNAME );

View File

@@ -4844,15 +4844,15 @@
<column name="PRO_UID" type="VARCHAR" size="32" required="true" /> <column name="PRO_UID" type="VARCHAR" size="32" required="true" />
<column name="MONTH" type="INTEGER" required="true" default="0" primaryKey="true" /> <column name="MONTH" type="INTEGER" required="true" default="0" primaryKey="true" />
<column name="YEAR" type="INTEGER" required="true" default="0" primaryKey="true" /> <column name="YEAR" type="INTEGER" required="true" default="0" primaryKey="true" />
<column name="TOTAL_TIME_BY_TASK" type="DECIMAL" size="7,2"/> <column name="TOTAL_TIME_BY_TASK" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2" default="0" />
<column name="USER_HOUR_COST" type="DECIMAL" size="7,2"/> <column name="USER_HOUR_COST" type="DECIMAL" size="7,2" default="0" />
<column name="AVG_TIME" type="DECIMAL" size="7,2"/> <column name="AVG_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="SDV_TIME" type="DECIMAL" size="7,2"/> <column name="SDV_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="CONFIGURED_TASK_TIME" type="DECIMAL" size="7,2"/> <column name="CONFIGURED_TASK_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2" default="0" />
<index name="indexReporting"> <index name="indexReporting">
<index-column name="USR_UID"/> <index-column name="USR_UID"/>
<index-column name="TAS_UID"/> <index-column name="TAS_UID"/>
@@ -4891,15 +4891,15 @@
<column name="PRO_UID" type="VARCHAR" size="32" required="true" primaryKey="true" /> <column name="PRO_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
<column name="MONTH" type="INTEGER" required="true" default="0" primaryKey="true" /> <column name="MONTH" type="INTEGER" required="true" default="0" primaryKey="true" />
<column name="YEAR" type="INTEGER" required="true" default="0" primaryKey="true" /> <column name="YEAR" type="INTEGER" required="true" default="0" primaryKey="true" />
<column name="AVG_TIME" type="DECIMAL" size="7,2"/> <column name="AVG_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="SDV_TIME" type="DECIMAL" size="7,2"/> <column name="SDV_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2" default="0" />
<column name="CONFIGURED_PROCESS_TIME" type="DECIMAL" size="7,2"/> <column name="CONFIGURED_PROCESS_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="CONFIGURED_PROCESS_COST" type="DECIMAL" size="7,2"/> <column name="CONFIGURED_PROCESS_COST" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_OPEN" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_OPEN" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2"/> <column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2" default="0" />
</table> </table>
<table name="DASHBOARD"> <table name="DASHBOARD">
@@ -4942,7 +4942,7 @@
<column name="DAS_UID" type="VARCHAR" size="32" required="true" default="" /> <column name="DAS_UID" type="VARCHAR" size="32" required="true" default="" />
<column name="DAS_IND_TYPE" type="VARCHAR" size="32" required="true" default="" /> <column name="DAS_IND_TYPE" type="VARCHAR" size="32" required="true" default="" />
<column name="DAS_IND_TITLE" type="VARCHAR" size="255" required="true" default="" /> <column name="DAS_IND_TITLE" type="VARCHAR" size="255" required="true" default="" />
<column name="DAS_IND_GOAL" type="DECIMAL" size="7,2" required="true" /> <column name="DAS_IND_GOAL" type="DECIMAL" size="7,2" default="0" />
<column name="DAS_IND_DIRECTION" type="TINYINT" required="true" default="2"/> <column name="DAS_IND_DIRECTION" type="TINYINT" required="true" default="2"/>
<column name="DAS_UID_PROCESS" type="VARCHAR" size="32" required="true" default="" /> <column name="DAS_UID_PROCESS" type="VARCHAR" size="32" required="true" default="" />
<column name="DAS_IND_FIRST_FIGURE" type="VARCHAR" size="32" required="false" default="" /> <column name="DAS_IND_FIRST_FIGURE" type="VARCHAR" size="32" required="false" default="" />
@@ -4997,6 +4997,7 @@
</foreign-key> </foreign-key>
</table> </table>
<table name="CATALOG"> <table name="CATALOG">
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Name" value="CATALOG" /> <parameter name="Name" value="CATALOG" />
@@ -5011,7 +5012,7 @@
<parameter name="Create_options" value="" /> <parameter name="Create_options" value="" />
<parameter name="Comment" value="Definitions catalog."/> <parameter name="Comment" value="Definitions catalog."/>
</vendor> </vendor>
<column name="CAT_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default="0"/> <column name="CAT_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
<column name="CAT_LABEL_ID" type="VARCHAR" size="100" required="true" default=""/> <column name="CAT_LABEL_ID" type="VARCHAR" size="100" required="true" default=""/>
<column name="CAT_TYPE" type="VARCHAR" size="100" required="true" primaryKey="true" default=""/> <column name="CAT_TYPE" type="VARCHAR" size="100" required="true" primaryKey="true" default=""/>
<column name="CAT_FLAG" type="VARCHAR" size="50" required="false" default=""/> <column name="CAT_FLAG" type="VARCHAR" size="50" required="false" default=""/>

View File

@@ -848,7 +848,7 @@ class Installer extends Controller
// Write the paths_installed.php file (contains all the information configured so far) // Write the paths_installed.php file (contains all the information configured so far)
if (! file_exists( FILE_PATHS_INSTALLED )) { if (! file_exists( FILE_PATHS_INSTALLED )) {
$sh = md5( filemtime( PATH_GULLIVER . '/class.g.php' ) ); $sh = G::encryptOld( filemtime( PATH_GULLIVER . '/class.g.php' ) );
$h = G::encrypt( $db_hostname . $sh . $db_username . $sh . $db_password, $sh ); $h = G::encrypt( $db_hostname . $sh . $db_username . $sh . $db_password, $sh );
$dbText = "<?php\n"; $dbText = "<?php\n";
$dbText .= sprintf( " define('PATH_DATA', '%s');\n", $pathShared ); $dbText .= sprintf( " define('PATH_DATA', '%s');\n", $pathShared );
@@ -1152,18 +1152,18 @@ class Installer extends Controller
$query = sprintf( "USE %s;", $wf ); $query = sprintf( "USE %s;", $wf );
$this->mssqlQuery( $query ); $this->mssqlQuery( $query );
$query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) ); $query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );
$this->mssqlQuery( $query ); $this->mssqlQuery( $query );
$query = sprintf( "USE %s;", $wf ); $query = sprintf( "USE %s;", $wf );
$this->mssqlQuery( $query ); $this->mssqlQuery( $query );
$query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) ); $query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );
$this->mssqlQuery( $query ); $this->mssqlQuery( $query );
// Write the paths_installed.php file (contains all the information configured so far) // Write the paths_installed.php file (contains all the information configured so far)
if (! file_exists( FILE_PATHS_INSTALLED )) { if (! file_exists( FILE_PATHS_INSTALLED )) {
$sh = md5( filemtime( PATH_GULLIVER . '/class.g.php' ) ); $sh = G::encryptOld( filemtime( PATH_GULLIVER . '/class.g.php' ) );
$h = G::encrypt( $db_hostname . $sh . $db_username . $sh . $db_password . '1', $sh ); $h = G::encrypt( $db_hostname . $sh . $db_username . $sh . $db_password . '1', $sh );
$dbText = "<?php\n"; $dbText = "<?php\n";
$dbText .= sprintf( " define ('PATH_DATA', '%s' );\n", $pathShared ); $dbText .= sprintf( " define ('PATH_DATA', '%s' );\n", $pathShared );

View File

@@ -176,6 +176,7 @@ class StrategicDashboard extends Controller
$translation = array(); $translation = array();
$translation['ID_MANAGERS_DASHBOARDS'] = G::LoadTranslation( 'ID_MANAGERS_DASHBOARDS'); $translation['ID_MANAGERS_DASHBOARDS'] = G::LoadTranslation( 'ID_MANAGERS_DASHBOARDS');
$translation['ID_PRO_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_PRO_EFFICIENCY_INDEX'); $translation['ID_PRO_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_PRO_EFFICIENCY_INDEX');
$translation['ID_EFFICIENCY_USER'] = G::LoadTranslation( 'ID_EFFICIENCY_USER'); $translation['ID_EFFICIENCY_USER'] = G::LoadTranslation( 'ID_EFFICIENCY_USER');
@@ -193,9 +194,15 @@ class StrategicDashboard extends Controller
$translation['ID_PROCESS_TASKS'] = G::LoadTranslation( 'ID_PROCESS_TASKS'); $translation['ID_PROCESS_TASKS'] = G::LoadTranslation( 'ID_PROCESS_TASKS');
$translation['ID_TIME_HOURS'] = G::LoadTranslation( 'ID_TIME_HOURS'); $translation['ID_TIME_HOURS'] = G::LoadTranslation( 'ID_TIME_HOURS');
$translation['ID_GROUPS'] = G::LoadTranslation( 'ID_GROUPS'); $translation['ID_GROUPS'] = G::LoadTranslation( 'ID_GROUPS');
$translation['ID_COSTS'] = G::LoadTranslation( 'ID_COSTS');
$translation['ID_TASK'] = G::LoadTranslation( 'ID_TASK');
$translation['ID_USER'] = G::LoadTranslation( 'ID_USER');
$translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR'); $translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR');
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS'); $translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
$translation['ID_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
$this->setVar('translation', $translation); $this->setVar('translation', $translation);
$this->render(); $this->render();
} catch (Exception $error) { } catch (Exception $error) {
@@ -208,7 +215,41 @@ class StrategicDashboard extends Controller
{ {
try { try {
$this->setView( 'strategicDashboard/viewDashboardIE' ); $this->setView( 'strategicDashboard/viewDashboardIE' );
$this->setVar('urlProxy',$this->urlProxy);
$this->setVar('usrId',$this->usrId);
$this->setVar('credentials',$this->clientToken);
$translation = array();
$translation['ID_MANAGERS_DASHBOARDS'] = G::LoadTranslation( 'ID_MANAGERS_DASHBOARDS');
$translation['ID_PRO_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_PRO_EFFICIENCY_INDEX');
$translation['ID_EFFICIENCY_USER'] = G::LoadTranslation( 'ID_EFFICIENCY_USER');
$translation['ID_COMPLETED_CASES'] = G::LoadTranslation( 'ID_COMPLETED_CASES');
$translation['ID_WELL_DONE'] = G::LoadTranslation( 'ID_WELL_DONE');
$translation['ID_NUMBER_CASES'] = G::LoadTranslation( 'ID_NUMBER_CASES');
$translation['ID_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_EFFICIENCY_INDEX');
$translation['ID_INEFFICIENCY_COST'] = G::LoadTranslation( 'ID_INEFFICIENCY_COST');
$translation['ID_EFFICIENCY_COST'] = G::LoadTranslation( 'ID_EFFICIENCY_COST');
$translation['ID_RELATED_PROCESS'] = G::LoadTranslation( 'ID_RELATED_PROCESS');
$translation['ID_RELATED_GROUPS'] = G::LoadTranslation( 'ID_RELATED_GROUPS');
$translation['ID_RELATED_TASKS'] = G::LoadTranslation( 'ID_RELATED_TASKS');
$translation['ID_RELATED_USERS'] = G::LoadTranslation( 'ID_RELATED_USERS');
$translation['ID_GRID_PAGE_NO_DASHBOARD_MESSAGE'] = G::LoadTranslation( 'ID_GRID_PAGE_NO_DASHBOARD_MESSAGE');
$translation['ID_PROCESS_TASKS'] = G::LoadTranslation( 'ID_PROCESS_TASKS');
$translation['ID_TIME_HOURS'] = G::LoadTranslation( 'ID_TIME_HOURS');
$translation['ID_GROUPS'] = G::LoadTranslation( 'ID_GROUPS');
$translation['ID_COSTS'] = G::LoadTranslation( 'ID_COSTS');
$translation['ID_TASK'] = G::LoadTranslation( 'ID_TASK');
$translation['ID_USER'] = G::LoadTranslation( 'ID_USER');
$translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR');
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
$translation['ID_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
$this->setVar('translation', $translation);
$this->render(); $this->render();
} catch (Exception $error) {
} catch (Exception $error) { } catch (Exception $error) {
$_SESSION['__DASHBOARD_ERROR__'] = $error->getMessage(); $_SESSION['__DASHBOARD_ERROR__'] = $error->getMessage();
die(); die();

View File

@@ -2,6 +2,7 @@
# This is a fix for InnoDB in MySQL >= 4.1.x # This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set. # It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0; SET FOREIGN_KEY_CHECKS = 0;
SET @@global.sql_mode='MYSQL40';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- APPLICATION #-- APPLICATION
@@ -2705,13 +2706,14 @@ CREATE TABLE `USR_REPORTING`
`TOTAL_TIME_BY_TASK` DECIMAL(7,2) default 0, `TOTAL_TIME_BY_TASK` DECIMAL(7,2) default 0,
`TOTAL_CASES_IN` DECIMAL(7,2) default 0, `TOTAL_CASES_IN` DECIMAL(7,2) default 0,
`TOTAL_CASES_OUT` DECIMAL(7,2) default 0, `TOTAL_CASES_OUT` DECIMAL(7,2) default 0,
`USER_HOUR_COST` DECIMAL(7,2) default 0,
`AVG_TIME` DECIMAL(7,2) default 0, `AVG_TIME` DECIMAL(7,2) default 0,
`SDV_TIME` DECIMAL(7,2) default 0, `SDV_TIME` DECIMAL(7,2) default 0,
`CONFIGURED_TASK_TIME` DECIMAL(7,2) default 0, `CONFIGURED_TASK_TIME` DECIMAL(7,2) default 0,
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0, `TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0, `TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
PRIMARY KEY (`USR_UID`, `TAS_UID`,`MONTH`,`YEAR`) PRIMARY KEY (`USR_UID`, `TAS_UID`,`MONTH`,`YEAR`),
KEY `indexApp`(`USR_UID`, `TAS_UID`, `PRO_UID`) KEY `indexReporting`(`USR_UID`, `TAS_UID`, `PRO_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated users by task'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated users by task';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- PRO_REPORTING #-- PRO_REPORTING
@@ -2748,7 +2750,6 @@ CREATE TABLE `DASHBOARD`
`DAS_UID` VARCHAR(32) default '' NOT NULL, `DAS_UID` VARCHAR(32) default '' NOT NULL,
`DAS_TITLE` VARCHAR(255) default '' NOT NULL, `DAS_TITLE` VARCHAR(255) default '' NOT NULL,
`DAS_DESCRIPTION` MEDIUMTEXT, `DAS_DESCRIPTION` MEDIUMTEXT,
`DAS_VERSION` VARCHAR(10) default '1.0' NOT NULL,
`DAS_CREATE_DATE` DATETIME NOT NULL, `DAS_CREATE_DATE` DATETIME NOT NULL,
`DAS_UPDATE_DATE` DATETIME, `DAS_UPDATE_DATE` DATETIME,
`DAS_STATUS` TINYINT default 1 NOT NULL, `DAS_STATUS` TINYINT default 1 NOT NULL,
@@ -2768,12 +2769,16 @@ CREATE TABLE `DASHBOARD_INDICATOR`
`DAS_IND_TYPE` VARCHAR(32) default '' NOT NULL, `DAS_IND_TYPE` VARCHAR(32) default '' NOT NULL,
`DAS_IND_TITLE` VARCHAR(255) default '' NOT NULL, `DAS_IND_TITLE` VARCHAR(255) default '' NOT NULL,
`DAS_IND_GOAL` DECIMAL(7,2) default 0, `DAS_IND_GOAL` DECIMAL(7,2) default 0,
`DAS_IND_DIRECTION` TINYINT default 2 NOT NULL,
`DAS_UID_PROCESS` VARCHAR(32) default '' NOT NULL, `DAS_UID_PROCESS` VARCHAR(32) default '' NOT NULL,
`DAS_IND_PROPERTIES` MEDIUMTEXT, `DAS_IND_FIRST_FIGURE` VARCHAR(32) default '',
`DAS_CREATE_DATE` DATETIME NOT NULL, `DAS_IND_FIRST_FREQUENCY` VARCHAR(32) default '',
`DAS_UPDATE_DATE` DATETIME, `DAS_IND_SECOND_FIGURE` VARCHAR(32) default '',
`DAS_STATUS` TINYINT default 1 NOT NULL, `DAS_IND_SECOND_FREQUENCY` VARCHAR(32) default '',
PRIMARY KEY (`DAS_UID`), `DAS_IND_CREATE_DATE` DATETIME NOT NULL,
`DAS_IND_UPDATE_DATE` DATETIME,
`DAS_IND_STATUS` TINYINT default 1 NOT NULL,
PRIMARY KEY (`DAS_IND_UID`),
KEY `indexDashboard`(`DAS_UID`, `DAS_IND_TYPE`), KEY `indexDashboard`(`DAS_UID`, `DAS_IND_TYPE`),
CONSTRAINT `fk_dashboard_indicator_dashboard` CONSTRAINT `fk_dashboard_indicator_dashboard`
FOREIGN KEY (`DAS_UID`) FOREIGN KEY (`DAS_UID`)
@@ -2791,7 +2796,7 @@ CREATE TABLE `DASHBOARD_DAS_IND`
`DAS_UID` VARCHAR(32) default '' NOT NULL, `DAS_UID` VARCHAR(32) default '' NOT NULL,
`OWNER_UID` VARCHAR(32) default '' NOT NULL, `OWNER_UID` VARCHAR(32) default '' NOT NULL,
`OWNER_TYPE` VARCHAR(15) default '' NOT NULL, `OWNER_TYPE` VARCHAR(15) default '' NOT NULL,
PRIMARY KEY (`DAS_UID`), PRIMARY KEY (`DAS_UID`,`OWNER_UID`),
CONSTRAINT `fk_dashboard_indicator_dashboard_das_ind` CONSTRAINT `fk_dashboard_indicator_dashboard_das_ind`
FOREIGN KEY (`DAS_UID`) FOREIGN KEY (`DAS_UID`)
REFERENCES `DASHBOARD` (`DAS_UID`) REFERENCES `DASHBOARD` (`DAS_UID`)

View File

@@ -139,7 +139,8 @@ ViewDashboardHelper.prototype.merge = function (objFrom, objTo, propMap) {
toKey = propMap[fromKey]; toKey = propMap[fromKey];
//force toKey to an array of toKeys //force toKey to an array of toKeys
if (!Array.isArray(toKey)) { //if (!Array.isArray(toKey)) {
if (!$.isArray(toKey)) {
toKey = [toKey]; toKey = [toKey];
} }
@@ -147,14 +148,17 @@ ViewDashboardHelper.prototype.merge = function (objFrom, objTo, propMap) {
def = null; def = null;
transform = null; transform = null;
key = toKey[x]; key = toKey[x];
keyIsArray = Array.isArray(key); //keyIsArray = Array.isArray(key);
keyIsArray = $.isArray(key);
if (typeof(key) === "object" && !keyIsArray) { if (typeof(key) === "object" && !keyIsArray) {
def = key.default || null; //def = (key.default || null);
def = null;
transform = key.transform || null; transform = key.transform || null;
key = key.key; key = key.key;
//evaluate if the new key is an array //evaluate if the new key is an array
keyIsArray = Array.isArray(key); // keyIsArray = Array.isArray(key);
keyIsArray = $.isArray(key);
} }
if (keyIsArray) { if (keyIsArray) {

View File

@@ -57,6 +57,7 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
"DAS_IND_TITLE" : "title", "DAS_IND_TITLE" : "title",
"DAS_IND_TYPE" : "type", "DAS_IND_TYPE" : "type",
"DAS_IND_VARIATION" : "comparative", "DAS_IND_VARIATION" : "comparative",
"DAS_IND_PERCENT_VARIATION" : "percentComparative",
"DAS_IND_DIRECTION" : "direction", "DAS_IND_DIRECTION" : "direction",
"DAS_IND_VALUE" : "value", "DAS_IND_VALUE" : "value",
"DAS_IND_X" : "x", "DAS_IND_X" : "x",
@@ -76,7 +77,6 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
newObject.toDrawY = (newObject.y == 0) ? 6 : newObject.y; newObject.toDrawY = (newObject.y == 0) ? 6 : newObject.y;
newObject.toDrawHeight = (newObject.y == 0) ? 2 : newObject.height; newObject.toDrawHeight = (newObject.y == 0) ? 2 : newObject.height;
newObject.toDrawWidth = (newObject.y == 0) ? 12 / data.length : newObject.width; newObject.toDrawWidth = (newObject.y == 0) ? 12 / data.length : newObject.width;
newObject.comparative = ((newObject.comparative > 0)? "+": "") + that.helper.stringIfNull(newObject.comparative);
newObject.directionSymbol = (newObject.direction == "1") ? "<" : ">"; newObject.directionSymbol = (newObject.direction == "1") ? "<" : ">";
newObject.isWellDone = (newObject.direction == "1") newObject.isWellDone = (newObject.direction == "1")
? parseFloat(newObject.value) <= parseFloat(newObject.comparative) ? parseFloat(newObject.value) <= parseFloat(newObject.comparative)
@@ -86,10 +86,9 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
? "special" ? "special"
: "normal"; : "normal";
//round goals for normal indicators //rounding
newObject.comparative = (newObject.category == "normal") newObject.comparative = Math.round(newObject.comparative*1000)/1000;
? Math.round(newObject.comparative) + "" newObject.comparative = ((newObject.comparative > 0)? "+": "") + newObject.comparative;
: newObject.comparative;
newObject.value = (newObject.category == "normal") newObject.value = (newObject.category == "normal")
? Math.round(newObject.value) + "" ? Math.round(newObject.value) + ""
@@ -170,7 +169,19 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
: newObject.datalabel.substring(0,15); : newObject.datalabel.substring(0,15);
newObject.datalabel = shortLabel; newObject.datalabel = shortLabel;
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject); graphData.push(newObject);
}
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost); originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100; originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
originalObject.indicatorId = data.id; originalObject.indicatorId = data.id;
@@ -186,16 +197,6 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
}) })
retval.dataToDraw = graphData.splice(0,7); retval.dataToDraw = graphData.splice(0,7);
//use positive values for drawing;
$.each(retval.dataToDraw, function(index, item) {
if (item.value > 0) {
item.value = 0;
}
if (item.value < 0) {
item.value = Math.abs(item.value);
}
});
//TODO aumentar el símbolo de moneda $ //TODO aumentar el símbolo de moneda $
retval.inefficiencyCostToShow = "$ " +Math.round(retval.inefficiencyCost); retval.inefficiencyCostToShow = "$ " +Math.round(retval.inefficiencyCost);
@@ -220,7 +221,17 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
: newObject.datalabel.substring(0,7); : newObject.datalabel.substring(0,7);
newObject.datalabel = shortLabel; newObject.datalabel = shortLabel;
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject); graphData.push(newObject);
}
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost); originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100; originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
originalObject.indicatorId = data.id; originalObject.indicatorId = data.id;
@@ -231,22 +242,11 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
retval = data; retval = data;
graphData.sort(function(a,b) { graphData.sort(function(a,b) {
var retval = 0; var retval = 0;
retval = ((a.value*1.0 <= b.value*1.0) ? -1 : 1); retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
return retval; return retval;
}) })
retval.dataToDraw = graphData.splice(0,7); retval.dataToDraw = graphData.splice(0,7);
//use positive values for drawing;
$.each(retval.dataToDraw, function(index, item) {
if (item.value > 0) {
item.value = 0;
}
if (item.value < 0) {
item.value = Math.abs(item.value);
}
});
//TODO aumentar el símbolo de moneda $ //TODO aumentar el símbolo de moneda $
retval.inefficiencyCostToShow = "$ " + Math.round(retval.inefficiencyCost); retval.inefficiencyCostToShow = "$ " + Math.round(retval.inefficiencyCost);
retval.efficiencyIndexToShow = Math.round(retval.efficiencyIndex * 100) / 100; retval.efficiencyIndexToShow = Math.round(retval.efficiencyIndex * 100) / 100;
@@ -366,16 +366,32 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelPei = function(modelD
$.each(modelData, function(index, originalObject) { $.each(modelData, function(index, originalObject) {
var map = { var map = {
"name" : "datalabel", "name" : "datalabel",
"averageTime" : "value", "inefficiencyCost" : "value",
"deviationTime" : "dispersion" "deviationTime" : "dispersion"
}; };
var newObject = that.helper.merge(originalObject, {}, map); var newObject = that.helper.merge(originalObject, {}, map);
newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7)); newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7));
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost); originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100; originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject); graphData.push(newObject);
}
}); });
var retval = {}; var retval = {};
graphData.sort(function(a,b) {
var retval = 0;
retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
return retval;
})
retval.dataToDraw = graphData.splice(0,7); retval.dataToDraw = graphData.splice(0,7);
retval.entityData = modelData; retval.entityData = modelData;
return retval; return retval;
@@ -391,16 +407,33 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD
$.each(modelData, function(index, originalObject) { $.each(modelData, function(index, originalObject) {
var map = { var map = {
"name" : "datalabel", "name" : "datalabel",
"averageTime" : "value", "inefficiencyCost" : "value",
"deviationTime" : "dispersion" "deviationTime" : "dispersion"
}; };
var newObject = that.helper.merge(originalObject, {}, map); var newObject = that.helper.merge(originalObject, {}, map);
newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7)); newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7));
originalObject.inefficiencyCostToShow = "$ " +Math.round(originalObject.inefficiencyCost); originalObject.inefficiencyCostToShow = "$ " +Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100; originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject); graphData.push(newObject);
}
}); });
var retval = {}; var retval = {};
graphData.sort(function(a,b) {
var retval = 0;
retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
return retval;
})
retval.dataToDraw = graphData.splice(0,7); retval.dataToDraw = graphData.splice(0,7);
retval.entityData = modelData; retval.entityData = modelData;
return retval; return retval;

View File

@@ -134,7 +134,6 @@ WidgetBuilder.prototype.buildSpecialIndicatorSecondView = function (secondViewDa
$retval.find(".sind-index-selector").text(G_STRING.ID_EFFICIENCY_INDEX); $retval.find(".sind-index-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".sind-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST); $retval.find(".sind-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
$retval.find('.breadcrumb').find('li').remove(); $retval.find('.breadcrumb').find('li').remove();
$retval.find('.breadcrumb').append ('<li><a class="bread-back-selector" href="#"><i class="fa fa-chevron-left fa-fw"></i>' + window.currentIndicator.title + '</a></li>'); $retval.find('.breadcrumb').append ('<li><a class="bread-back-selector" href="#"><i class="fa fa-chevron-left fa-fw"></i>' + window.currentIndicator.title + '</a></li>');
$retval.find('.breadcrumb').append ('<li><b>' + window.currentEntityData.name + '</b></li>'); $retval.find('.breadcrumb').append ('<li><b>' + window.currentEntityData.name + '</b></li>');
@@ -273,7 +272,7 @@ $(document).ready(function() {
} else { } else {
favoriteData = 0; favoriteData = 0;
}*/ }*/
if (typeof idWidGet != "undefined") { if (typeof idWidGet != "undefined" && el.hasClass('ind-button-selector')) {
var widgetsObj = { var widgetsObj = {
'indicatorId': idWidGet, 'indicatorId': idWidGet,
'x': item.x, 'x': item.x,
@@ -588,8 +587,8 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
graph: { graph: {
allowDrillDown:false, allowDrillDown:false,
allowTransition:true, allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR }, axisX:{ showAxis: true, label: G_STRING.ID_GROUPS},
axisY:{ showAxis: true, label: "Q" }, axisY:{ showAxis: true, label: G_STRING.ID_COSTS},
gridLinesX:false, gridLinesX:false,
gridLinesY:true, gridLinesY:true,
showTip: true, showTip: true,
@@ -670,8 +669,8 @@ var fillSpecialIndicatorSecondView = function(presenterData) {
gridLinesX: true, gridLinesX: true,
gridLinesY: true, gridLinesY: true,
area: {visible: false, css:"area"}, area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: G_STRING.ID_USERS }, axisX:{ showAxis: true, label: G_STRING.ID_USER },
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS }, axisY:{ showAxis: true, label: G_STRING.ID_COSTS },
showErrorBars: true showErrorBars: true
} }
@@ -680,6 +679,7 @@ var fillSpecialIndicatorSecondView = function(presenterData) {
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(window.currentEntityData.indicatorId); var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(window.currentEntityData.indicatorId);
if (window.currentIndicator.type == "1010") { if (window.currentIndicator.type == "1010") {
detailParams.graph.axisX.label = G_STRING.ID_TASK;
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null); var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart(); graph.drawChart();
} }
@@ -788,7 +788,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
allowDrillDown:false, allowDrillDown:false,
allowTransition:true, allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR }, axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" }, axisY:{ showAxis: true, label: G_STRING.ID_COSTS},
gridLinesX:false, gridLinesX:false,
gridLinesY:true, gridLinesY:true,
showTip: true, showTip: true,
@@ -810,7 +810,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
allowDrillDown:false, allowDrillDown:false,
allowTransition:true, allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR }, axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" }, axisY:{ showAxis: true, label: G_STRING.ID_COSTS },
gridLinesX:false, gridLinesX:false,
gridLinesY:true, gridLinesY:true,
showTip: true, showTip: true,

View File

@@ -0,0 +1,760 @@
/**************************************************************/
var WidgetBuilder = function () {
this.helper = new ViewDashboardHelper();
}
WidgetBuilder.prototype.getIndicatorWidget = function (indicator) {
var retval = null;
switch(indicator.type) {
case "1010": retval = this.buildSpecialIndicatorButton(indicator); break;
case "1030": retval = this.buildSpecialIndicatorButton(indicator); break;
case "1050": retval = this.buildStatusIndicatorButton(indicator); break;
case "1020":
case "1040":
case "1060":
case "1070":
case "1080":
retval = this.buildIndicatorButton(indicator); break;
}
if(retval == null) {throw new Error(indicator.type + " has not associated a widget.");}
return retval;
};
WidgetBuilder.prototype.buildSpecialIndicatorButton = function (indicator) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.specialIndicatorButtonTemplate").html());
var $retval = $(template(indicator));
if(indicator.comparative < 0){
$retval.find(".ind-container-selector").removeClass("panel-green").addClass("panel-red");
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-up").addClass("fa-chevron-down");
}
if(indicator.comparative > 0){
$retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green");
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-down").addClass("fa-chevron-up");
}
if(indicator.comparative == 0){
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-up");
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-down");
$retval.find(".ind-symbol-selector").addClass("fa-circle-o");
$retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green");
}
return $retval;
}
WidgetBuilder.prototype.buildStatusIndicatorButton = function (indicator) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.statusIndicatorButtonTemplate").html());
var $retval = $(template(indicator));
return $retval;
}
WidgetBuilder.prototype.buildIndicatorButton = function (indicator) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.statusIndicatorButtonTemplate").html());
var $retval = $(template(indicator));
var $comparative = $retval.find('.ind-comparative-selector');
var $title = $retval.find('.ind-title-selector');
if (indicator.isWellDone) {
$comparative.text("(" + indicator.directionSymbol + " " + indicator.comparative + "%)-"+ G_STRING.ID_WELL_DONE);
$retval.find(".ind-container-selector").removeClass("panel-low").addClass("panel-high");
}
else {
$comparative.text("Goal: " + indicator.directionSymbol + " " + indicator.comparative + "%");
$retval.find(".ind-container-selector").removeClass("panel-high").addClass("panel-low");
}
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorFirstView = function (indicatorData) {
if (indicatorData == null) { throw new Error ("indicatorData is null."); }
if (!indicatorData.hasOwnProperty("id")) { throw new Error ("indicatorData has no id."); }
_.templateSettings.variable = "indicator";
var template = _.template ($("script.specialIndicatorMainPanel").html());
var $retval = $(template(indicatorData));
var indicatorPrincipalData = this.getIndicatorLoadedById(indicatorData.id)
$retval.find('.breadcrumb').find('li').remove()
$retval.find('.breadcrumb').append ('<li><b>'+indicatorPrincipalData.title+'</b></li>')
$retval.find(".sind-index-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".sind-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".sind-cost-number-selector"), indicatorData);
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorFirstViewDetail = function (oneItemDetail) {
//detailData = {indicatorId, uid, name, averateTime...}
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorDetail").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.buildStatusIndicatorFirstView = function (indicatorData) {
if (indicatorData == null) { throw new Error ("indicatorData is null."); }
if (!indicatorData.hasOwnProperty("id")) { throw new Error ("indicatorData has no id."); }
_.templateSettings.variable = "indicator";
var template = _.template ($("script.statusIndicatorMainPanel").html());
var $retval = $(template(indicatorData));
var indicatorPrincipalData = this.getIndicatorLoadedById(indicatorData.id)
$retval.find('.breadcrumb').find('li').remove()
$retval.find('.breadcrumb').append ('<li><b>'+indicatorPrincipalData.title+'</b></li>')
return $retval;
}
WidgetBuilder.prototype.buildStatusIndicatorFirstViewDetail = function (oneItemDetail) {
//detailData = {indicatorId, uid, name, averateTime...}
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("taskTitle")){throw new Error("detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.statusDetail").html());
var $retval = $(template(oneItemDetail));
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorSecondView = function (secondViewData) {
//presenterData= object {dataToDraw[], entityData[] //user/tasks data}
_.templateSettings.variable = "indicator";
var template = _.template ($("script.specialIndicatorMainPanel").html());
var $retval = $(template(window.currentEntityData));
//var indicatorPrincipalData = this.getIndicatorLoadedById(indicatorId);
//$retval.find(".sind-title-selector").text(indicatorPrincipalData.title);
$retval.find(".sind-index-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".sind-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
$retval.find('.breadcrumb').find('li').remove();
$retval.find('.breadcrumb').append ('<li><a class="bread-back-selector" href="#"><i class="fa fa-chevron-left fa-fw"></i>' + window.currentIndicator.title + '</a></li>');
$retval.find('.breadcrumb').append ('<li><b>' + window.currentEntityData.name + '</b></li>');
this.setColorForInefficiency($retval.find(".sind-cost-number-selector"), window.currentEntityData);
return $retval;
};
WidgetBuilder.prototype.buildSpecialIndicatorSecondViewDetailPei = function (oneItemDetail) {
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorSencondViewDetailPei").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorSecondViewDetailUei = function (oneItemDetail) {
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorSencondViewDetailUei").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorSecondViewDetaiUei = function (oneItemDetail) {
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorSencondViewDetailUei").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.getIndicatorLoadedById = function (searchedIndicatorId) {
var retval = null;
for (key in window.loadedIndicators) {
var indicator = window.loadedIndicators[key];
if (indicator.id == searchedIndicatorId) {
retval = indicator;
}
}
if (retval == null) { throw new Error(searchedIndicatorId + " was not found in the loaded indicators.");}
return retval;
}
WidgetBuilder.prototype.buildGeneralIndicatorFirstView = function (indicatorData) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.generalIndicatorMainPanel").html());
var $retval = $(template(indicatorData));
$retval.find(".ind-title-selector").text(window.currentIndicator.title);
return $retval;
}
WidgetBuilder.prototype.setColorForInefficiency = function ($widget, indicatorData) {
//turn red/gree the font according if is positive or negative: var $widget = $retval.find(".sind-cost-number-selector");
$widget.removeClass("red");
$widget.removeClass("green");
if (indicatorData.inefficiencyCost >= 0) {
$widget.addClass("green");
}
else {
$widget.addClass("red");
}
}
/**********************************************************************/
helper = new ViewDashboardHelper();
var ws = urlProxy.split('/');
model = new ViewDashboardModel(token, urlProxy, ws[3]);
presenter = new ViewDashboardPresenter(model);
window.loadedIndicators = []; //updated in das-title-selector.click->fillIndicatorWidgets, ready->fillIndicatorWidgets
window.currentEntityData = null;
window.currentIndicator = null;//updated in ind-button-selector.click ->loadIndicator, ready->loadIndicator
window.currentDashboardId = null;
window.currentDetailFunction = null;
window.currentDetailList = null;
$(document).ready(function() {
initialDraw();
});
var initialDraw = function () {
presenter.getUserDashboards(pageUserId)
.then(function(dashboardsVM) {
fillDashboardsList(dashboardsVM);
if (window.currentDashboardId == null) {return;}
/**** window initialization with favorite dashboard*****/
presenter.getDashboardIndicators(window.currentDashboardId, defaultInitDate(), defaultEndDate())
.done(function(indicatorsVM) {
fillIndicatorWidgets(indicatorsVM);
});
});
}
var loadIndicator = function (indicatorId, initDate, endDate) {
if (indicatorId == null || indicatorId === undefined) {return;}
var builder = new WidgetBuilder();
window.currentIndicator = builder.getIndicatorLoadedById(indicatorId);
presenter.getIndicatorData(indicatorId, window.currentIndicator.type, initDate, endDate)
.done(function (viewModel) {
switch (window.currentIndicator.type) {
case "1010":
case "1030":
fillSpecialIndicatorFirstView(viewModel);
break;
case "1050":
fillStatusIndicatorFirstView(viewModel);
break;
default:
fillGeneralIndicatorFirstView(viewModel);
break;
}
});
}
var setIndicatorActiveMarker = function () {
$('.panel-footer').each (function () {
$(this).removeClass('panel-active');
var indicatorId = $(this).parents('.ind-button-selector').data('indicator-id');
if (window.currentIndicator.id == indicatorId) {
$(this).addClass('panel-active');
}
});
}
var getFavoriteIndicator = function() {
var retval = (window.loadedIndicators.length > 0)
? window.loadedIndicators[0]
: null;
for (key in window.loadedIndicators) {
var indicator = window.loadedIndicators[key];
if (indicator.favorite == 1) {
retval = indicator;
}
}
if (retval==null) {throw new Error ('No favorites found.');}
return retval;
}
var defaultInitDate = function() {
var date = new Date();
var dateMonth = date.getMonth();
var dateYear = date.getFullYear();
var initDate = $('#year').val() + '-' + $('#month').val() + '-' + '01';
return initDate;
}
var defaultEndDate = function () {
var date = new Date();
var dateMonth = date.getMonth();
var dateYear = date.getFullYear();
return dateYear + "-" + (dateMonth + 1) + "-30";
}
var fillDashboardsList = function (presenterData) {
if (presenterData == null || presenterData.length == 0) {
$('#dashboardsList').append(G_STRING['ID_NO_DATA_TO_DISPLAY']);
}
_.templateSettings.variable = "dashboard";
var template = _.template ($("script.dashboardButtonTemplate").html())
for (key in presenterData) {
var dashboard = presenterData[key];
$('#dashboardsList').append(template(dashboard));
if (dashboard.isFavorite == 1) {
window.currentDashboardId = dashboard.id;
$('#dashboardButton-' + dashboard.id)
.find('.das-icon-selector')
.addClass('selected');
}
}
};
var fillIndicatorWidgets = function (presenterData) {
if (presenterData == null || presenterData === undefined) {return;}
var widgetBuilder = new WidgetBuilder();
var grid = $('#indicatorsGridStack');
window.loadedIndicators = presenterData;
$.each(presenterData, function(key, indicator) {
var $widget = widgetBuilder.getIndicatorWidget(indicator);
grid.append($widget, indicator.toDrawX, indicator.toDrawY, indicator.toDrawWidth, indicator.toDrawHeight, true);
});
}
var fillStatusIndicatorFirstView = function (presenterData) {
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
$('#relatedDetailGridStack').data('gridstack').remove_all();
var $widget = widgetBuilder.buildStatusIndicatorFirstView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
var graphParams1 = {
canvas : {
containerId:'graph1',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:true,
allowTransition:true,
showTip: true,
allowZoom: false,
showLabels: true
}
};
var graph1 = new PieChart(presenterData.graph1Data, graphParams1, null, null);
graph1.drawChart();
var graphParams2 = graphParams1;
graphParams2.canvas.containerId = "graph2";
var graph2 = new PieChart(presenterData.graph2Data, graphParams2, null, null);
graph2.drawChart();
var graphParams3 = graphParams1;
graphParams3.canvas.containerId = "graph3";
var graph3 = new PieChart(presenterData.graph3Data, graphParams3, null, null);
graph3.drawChart();
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id)
setIndicatorActiveMarker();
$('#relatedLabel').hide();
}
var fillStatusIndicatorFirstViewDetail = function(presenterData) {
var widgetBuilder = new WidgetBuilder();
var gridDetail = $('#relatedDetailGridStack').data('gridstack');
//gridDetail.remove_all();
$.each(presenterData.dataList, function(index, dataItem) {
var $widget = widgetBuilder.buildStatusIndicatorFirstViewDetail(dataItem);
var x = (index % 2 == 0) ? 6 : 0;
gridDetail.add_widget($widget, x, 15, 6, 2, true);
});
if (window.currentIndicator.type == "1010") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']);
}
if (window.currentIndicator.type == "1030") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_GROUPS']);
}
if (window.currentIndicator.type == "1050") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']);
}
}
var fillSpecialIndicatorFirstView = function(presenterData) {
$('#relatedLabel').show();
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
$('#relatedDetailGridStack').data('gridstack').remove_all();
var $widget = widgetBuilder.buildSpecialIndicatorFirstView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
var peiParams = {
canvas : {
containerId:'specialIndicatorGraph',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
showTip: true,
allowZoom: false,
gapWidth:0.3,
useShadows: true,
thickness: 30,
showLabels: true
}
};
var ueiParams = {
canvas : {
containerId:'specialIndicatorGraph',
width:500,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: "Group" },
axisY:{ showAxis: true, label: "Cost" },
gridLinesX:false,
gridLinesY:true,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50
}
};
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id)
if (indicatorPrincipalData.type == "1010") {
var graph = new Pie3DChart(presenterData.dataToDraw, peiParams, null, null);
graph.drawChart();
//the pie chart goes to much upwards,so a margin is added:
$('#specialIndicatorGraph').css('margin-top','60px');
}
if (indicatorPrincipalData.type == "1030") {
var graph = new BarChart(presenterData.dataToDraw, ueiParams, null, null);
graph.drawChart();
}
this.fillSpecialIndicatorFirstViewDetail(presenter.orderDataList(presenterData.data, selectedOrderOfDetailList()));
setIndicatorActiveMarker();
}
var fillSpecialIndicatorFirstViewDetail = function (list) {
//presenterData = { id: "indId", efficiencyIndex: "0.11764706", efficiencyVariation: -0.08235294,
// inefficiencyCost: "-127.5000", inefficiencyCostToShow: -127, efficiencyIndexToShow: 0.12
// data: {indicatorId, uid, name, averateTime...}, dataToDraw: [{datalabe, value}] }
var widgetBuilder = new WidgetBuilder();
var gridDetail = $('#relatedDetailGridStack').data('gridstack');
gridDetail.remove_all();
window.currentDetailList = list;
window.currentDetailFunction = fillSpecialIndicatorFirstViewDetail;
$.each(list, function(index, dataItem) {
var $widget = widgetBuilder.buildSpecialIndicatorFirstViewDetail(dataItem);
var x = (index % 2 == 0) ? 6 : 0;
//the first 2 elements are not hidden
if (index < 2) {
$widget.removeClass("hideme");
}
gridDetail.add_widget($widget, x, 15, 6, 2, true);
});
if (window.currentIndicator.type == "1010") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']);
}
if (window.currentIndicator.type == "1030") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_GROUPS']);
}
hideScrollIfAllDivsAreVisible();
}
var fillSpecialIndicatorSecondView = function(presenterData) {
//presenterData= object {dataToDraw[], entityData[] //user/tasks data}
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
var $widget = widgetBuilder.buildSpecialIndicatorSecondView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
var detailParams = {
canvas : {
containerId:'specialIndicatorGraph',
width:300,
height:300,
stretch:true
},
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
gridLinesY: true,
area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: "User" },
axisY:{ showAxis: true, label: "Cost" },
showErrorBars: true
}
};
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(window.currentEntityData.indicatorId);
if (window.currentIndicator.type == "1010") {
detailParams.graph.axisX.label = "Task";
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart();
}
if (window.currentIndicator.type == "1030") {
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart();
}
this.fillSpecialIndicatorSecondViewDetail(presenter.orderDataList(presenterData.entityData, selectedOrderOfDetailList()));
}
var fillSpecialIndicatorSecondViewDetail = function (list) {
//presenterData = { entityData: Array[{name,uid,inefficiencyCost,
// inefficiencyIndex, deviationTime,
// averageTime}],
// dataToDraw: Array[{datalabel, value}] }
var widgetBuilder = new WidgetBuilder();
var gridDetail = $('#relatedDetailGridStack').data('gridstack');
gridDetail.remove_all();
window.currentDetailList = list;
window.currentDetailFunction = fillSpecialIndicatorSecondViewDetail;
$.each(list, function(index, dataItem) {
if (window.currentIndicator.type == "1010") {
var $widget = widgetBuilder.buildSpecialIndicatorSecondViewDetailPei(dataItem);
}
if (window.currentIndicator.type == "1030") {
var $widget = widgetBuilder.buildSpecialIndicatorSecondViewDetailUei(dataItem);
}
var x = (index % 2 == 0) ? 6 : 0;
//the first 2 elements are not hidden
if (index < 2) {
$widget.removeClass("hideme");
}
gridDetail.add_widget($widget, x, 15, 6, 2, true);
});
if (window.currentIndicator.type == "1010") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_TASKS']);
}
if (window.currentIndicator.type == "1030") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_USERS']);
}
hideScrollIfAllDivsAreVisible();
}
var fillGeneralIndicatorFirstView = function (presenterData) {
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
$('#relatedDetailGridStack').data('gridstack').remove_all();
var $widget = widgetBuilder.buildGeneralIndicatorFirstView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
$('#relatedLabel').find('h3').text('');
var generalLineParams1 = {
canvas : {
containerId:'generalGraph1',
width:300,
height:300,
stretch:true
},
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
gridLinesY: true,
area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: G_STRING.ID_PROCESS_TASKS },
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
showErrorBars: false
}
};
var generalLineParams2 = {
canvas : {
containerId:'generalGraph2',
width:300,
height:300,
stretch:true
},
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
gridLinesY: true,
area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: G_STRING.ID_PROCESS_TASKS },
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
showErrorBars: false
}
};
var generalBarParams1 = {
canvas : {
containerId:'generalGraph1',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" },
gridLinesX:false,
gridLinesY:true,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50,
colorPalette: ['#5486bf','#bf8d54','#acb30c','#7a0c0c','#bc0000','#906090','#007efb','#62284a','#0c7a7a','#74a9a9']
}
};
var generalBarParams2 = {
canvas : {
containerId:'generalGraph2',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" },
gridLinesX:false,
gridLinesY:true,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50,
colorPalette: ['#5486bf','#bf8d54','#acb30c','#7a0c0c','#bc0000','#906090','#007efb','#62284a','#0c7a7a','#74a9a9']
}
};
var graph1 = null;
if (presenterData.graph1Type == '10') {
generalBarParams1.graph.axisX.label = presenterData.graph1XLabel;
generalBarParams1.graph.axisY.label = presenterData.graph1YLabel;
graph1 = new BarChart(presenterData.graph1Data, generalBarParams1, null, null);
} else {
generalLineParams1.graph.axisX.label = presenterData.graph1XLabel;
generalLineParams1.graph.axisY.label = presenterData.graph1YLabel;
graph1 = new LineChart(presenterData.graph1Data, generalLineParams1, null, null);
}
graph1.drawChart();
var graph2 = null;
if (presenterData.graph2Type == '10') {
generalBarParams2.graph.axisX.label = presenterData.graph2XLabel;
generalBarParams2.graph.axisY.label = presenterData.graph2YLabel;
graph2 = new BarChart(presenterData.graph2Data, generalBarParams2, null, null);
} else {
generalLineParams2.graph.axisX.label = presenterData.graph2XLabel;
generalLineParams2.graph.axisY.label = presenterData.graph2YLabel;
graph2 = new LineChart(presenterData.graph2Data, generalLineParams2, null, null);
}
graph2.drawChart();
setIndicatorActiveMarker();
}
var animateProgress = function (indicatorItem, widget){
var getRequestAnimationFrame = function () {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function ( callback ){
window.setTimeout(enroute, 1 / 60 * 1000);
};
};
var fpAnimationFrame = getRequestAnimationFrame();
var i = 0;
var j = 0;
var indicator = indicatorItem;
var animacion = function () {
var intComparative = parseInt(indicator.comparative);
var divId = "#indicatorButton" + indicator.id;
var $valueLabel = widget
.find('.ind-value-selector');
var $progressBar = widget
.find('.ind-progress-selector');
if (!($valueLabel.length > 0)) {throw new Error ('"No ind-value-selector found for " + divId');}
this.helper.assert($progressBar.length > 0, "No ind-progress-selector found for " + divId);
$progressBar.attr('aria-valuemax', intComparative);
var indexToPaint = Math.min(indicator.value * 100 / intComparative, 100);
if (i <= indexToPaint) {
$progressBar.css('width', i+'%').attr('aria-valuenow', i);
i++;
fpAnimationFrame(animacion);
}
if(j <= indicator.value){
$valueLabel.text(j + "%");
j++;
fpAnimationFrame(animacion);
}
}
fpAnimationFrame(animacion);
};
/*var dashboardButtonTemplate = ' <div class="btn-group pull-left"> \
<button id="favorite" type="button" class="btn btn-success"><i class="fa fa-star fa-1x"></i></button> \
<button id="dasB" type="button" class="btn btn-success">'+ G_STRING.ID_MANAGERS_DASHBOARDS +'</button> \
</div>';*/

View File

@@ -149,16 +149,30 @@ try {
} }
break; break;
case 'authSourcesNew': case 'authSourcesNew':
$pluginRegistry = &PMPluginRegistry::getSingleton();
$arr = Array (); $arr = Array ();
$oDirectory = dir( PATH_RBAC . 'plugins' . PATH_SEP ); $oDirectory = dir( PATH_RBAC . 'plugins' . PATH_SEP );
$aAuthSourceTypes = array ();
while ($sObject = $oDirectory->read()) { while ($sObject = $oDirectory->read()) {
if (($sObject != '.') && ($sObject != '..') && ($sObject != '.svn') && ($sObject != 'ldap')) { if (($sObject != '.') && ($sObject != '..') && ($sObject != '.svn') && ($sObject != 'ldap')) {
if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) { if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) {
$sType = trim( str_replace( 'class.', '', str_replace( '.php', '', $sObject ) ) ); $sType = trim(str_replace(array("class.", ".php"), "", $sObject));
$aAuthSourceTypes['sType'] = $sType;
$aAuthSourceTypes['sLabel'] = $sType; $statusPlugin = $pluginRegistry->getStatusPlugin($sType);
$arr[] = $aAuthSourceTypes; $flagAdd = false;
if (preg_match("/^(?:enabled|disabled)$/", $statusPlugin)) {
if ($statusPlugin == "enabled") {
$flagAdd = true;
}
} else {
$flagAdd = true;
}
if ($flagAdd) {
$arr[] = array("sType" => $sType, "sLabel" => $sType);
}
} }
} }
} }

View File

@@ -137,7 +137,7 @@ if ($actionAjax == "showDynaformHistoryGetNomDynaform_JXP") {
$dynTitle = $contentObjeto->getConValue(); $dynTitle = $contentObjeto->getConValue();
} }
$md5Hash = md5( $idDin . $dynDate ); $md5Hash = G::encryptOld( $idDin . $dynDate );
//assign task //assign task
$result = new stdClass(); $result = new stdClass();

View File

@@ -42,6 +42,12 @@ switch ($action) {
$urlProxy = 'proxyCasesList'; $urlProxy = 'proxyCasesList';
$action = 'unassigned'; $action = 'unassigned';
break; break;
case 'to_revise':
$urlProxy = 'proxyCasesList';
break;
case 'to_reassign':
$urlProxy = 'proxyCasesList';
break;
} }
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/

View File

@@ -138,7 +138,7 @@ if (! isset( $_GET['ex'] )) {
// DEPRECATED this JS section is marked for removal // DEPRECATED this JS section is marked for removal
function setSelect() function setSelect()
{ {
var ex=<?php echo $_GET['ex']?>; var ex=<?php echo $filter->xssFilterHard($_GET['ex'])?>;
try { try {
for(i=1; i<50; i++) { for(i=1; i<50; i++) {
if (i == ex) { if (i == ex) {

View File

@@ -140,7 +140,7 @@ G::RenderPage( 'publish', 'blank' );
//Deprecated Section since the interface are now movig to ExtJS //Deprecated Section since the interface are now movig to ExtJS
function setSelect() function setSelect()
{ {
var ex=<?php echo $_GET['ex']?>; var ex=<?php echo $filter->xssFilterHard($_GET['ex'])?>;
try { try {
for (i=1; i<50; i++) { for (i=1; i<50; i++) {
if (i == ex) { if (i == ex) {

View File

@@ -84,7 +84,7 @@ if (! isset( $_GET['ex'] )) {
//Deprecated Section since the interface are now movig to ExtJS //Deprecated Section since the interface are now movig to ExtJS
function setSelect() function setSelect()
{ {
var ex=<?php echo $_GET['ex']?>; var ex=<?php echo $filter->xssFilterHard($_GET['ex'])?>;
try{ try{
for (i=1; i<50; i++) { for (i=1; i<50; i++) {
if (i == ex) { if (i == ex) {

View File

@@ -104,7 +104,7 @@ if (! isset( $_GET['ex'] )) {
/*------------------------------ To Revise Routines ---------------------------*/ /*------------------------------ To Revise Routines ---------------------------*/
function setSelect() function setSelect()
{ {
var ex=<?php echo $_GET['ex']?>; var ex=<?php echo $filter->xssFilterHard($_GET['ex'])?>;
try{ try{
for(i=1; i<50; i++) for(i=1; i<50; i++)
{ {

View File

@@ -170,12 +170,12 @@ G::RenderPage( "publish", "raw" );
<script> <script>
var toolbar = document.getElementById('fields_Toolbar') var toolbar = document.getElementById('fields_Toolbar')
var fieldsList = document.getElementById('dynaformEditor[0]') var fieldsList = document.getElementById('dynaformEditor[0]')
var tableHeight=<?php echo $config['FieldsList']['height'] ?>; var tableHeight=<?php echo $filter->xssFilterHard($config['FieldsList']['height']) ?>;
var tableWidth=<?php echo $config['FieldsList']['width'] ?>; var tableWidth=<?php echo $filter->xssFilterHard($config['FieldsList']['width']) ?>;
var toolbarTop=<?php echo $config['Toolbar']['top'] ?>; var toolbarTop=<?php echo $filter->xssFilterHard($config['Toolbar']['top']) ?>;
var toolbarLeft=<?php echo $config['Toolbar']['left'] ?>; var toolbarLeft=<?php echo $filter->xssFilterHard($config['Toolbar']['left']) ?>;
var fieldsListTop=<?php echo $config['FieldsList']['top'] ?>//(toolbarTop+toolbar.clientHeight+44+8 ); var fieldsListTop=<?php echo $filter->xssFilterHard($config['FieldsList']['top']) ?>//(toolbarTop+toolbar.clientHeight+44+8 );
var fieldsListLeft=<?php echo $config['FieldsList']['left'] ?>; var fieldsListLeft=<?php echo $filter->xssFilterHard($config['FieldsList']['left']) ?>;
mainPanel.elements.headerBar.style.backgroundColor='#CBDAEF'; mainPanel.elements.headerBar.style.backgroundColor='#CBDAEF';
mainPanel.elements.headerBar.style.borderBottom='1px solid #808080'; mainPanel.elements.headerBar.style.borderBottom='1px solid #808080';
mainPanel.elements.headerBar.appendChild(toolbar); mainPanel.elements.headerBar.appendChild(toolbar);

View File

@@ -269,7 +269,7 @@ try {
} }
/////// ///////
$boundary = "---------------------" . substr(md5(rand(0, 32000)), 0, 10); $boundary = "---------------------" . substr(G::encryptOld(rand(0, 32000)), 0, 10);
$data = null; $data = null;
$data = $data . "--$boundary\n"; $data = $data . "--$boundary\n";

View File

@@ -2,25 +2,25 @@
G::LoadSystem('inputfilter'); G::LoadSystem('inputfilter');
$filter = new InputFilter(); $filter = new InputFilter();
if(isset($_GET['srv'])) { if(isset($_GET['srv'])) {
$_GET['srv'] = $filter->xssFilterHard($_GET['srv']); $srv = $filter->xssFilterHard($_GET['srv']);
} }
if(isset($_GET['usr'])) { if(isset($_GET['usr'])) {
$_GET['usr'] = $filter->xssFilterHard($_GET['usr']); $usr = $filter->xssFilterHard($_GET['usr']);
} }
if(isset($_GET['pass'])) { if(isset($_GET['pass'])) {
$_GET['pass'] = $filter->xssFilterHard($_GET['pass']); $pass = $filter->xssFilterHard($_GET['pass']);
} }
if(isset($_GET['gen'])) { if(isset($_GET['gen'])) {
$_GET['gen'] = $filter->xssFilterHard($_GET['gen']); $gen = $filter->xssFilterHard($_GET['gen']);
} }
?> ?>
<form action="r"> <form action="r">
Server: <input type="text" name="srv" Server: <input type="text" name="srv"
value="<?php echo isset($_GET['srv'])?$_GET['srv']:'';?>"> User: <input value="<?php echo isset($srv)? $srv:'';?>"> User: <input
type="text" name="usr" type="text" name="usr"
value="<?php echo isset($_GET['usr'])?$_GET['usr']:'';?>" /> Passwd: <input value="<?php echo isset($usr)? $usr:'';?>" /> Passwd: <input
type="text" name="pass" type="text" name="pass"
value="<?php echo isset($_GET['pass'])?$_GET['pass']:'';?>" /> <input value="<?php echo isset($pass)? $pass:'';?>" /> <input
type="submit" value="Gen" name="gen" /> <input type="submit" type="submit" value="Gen" name="gen" /> <input type="submit"
value="Regenerate paths_installed" name="reg" /><br /> value="Regenerate paths_installed" name="reg" /><br />
</form> </form>
@@ -28,14 +28,18 @@ if(isset($_GET['gen'])) {
if (isset( $_GET['gen'] )) { if (isset( $_GET['gen'] )) {
$sh = G::encryptOld( filemtime( PATH_GULLIVER . "/class.g.php" ) ); $sh = G::encryptOld( filemtime( PATH_GULLIVER . "/class.g.php" ) );
$sh = $filter->xssFilterHard($sh);
$h = G::encrypt( $_GET['srv'] . $sh . $_GET['usr'] . $sh . $_GET['pass'] . $sh . (1), $sh ); $h = G::encrypt( $_GET['srv'] . $sh . $_GET['usr'] . $sh . $_GET['pass'] . $sh . (1), $sh );
$h = $filter->xssFilterHard($h);
echo "HASH_INSTALLATION<br/>"; echo "HASH_INSTALLATION<br/>";
echo "<textarea cols=120>$h</textarea><br/>"; echo "<textarea cols=120>$h</textarea><br/>";
echo "SYSTEM_HASH<br/>"; echo "SYSTEM_HASH<br/>";
echo "<textarea cols=120>$sh</textarea>"; echo "<textarea cols=120>$sh</textarea>";
} elseif (isset( $_GET['reg'] )) { } elseif (isset( $_GET['reg'] )) {
$sh = G::encryptOld( filemtime( PATH_GULLIVER . "/class.g.php" ) ); $sh = G::encryptOld( filemtime( PATH_GULLIVER . "/class.g.php" ) );
$sh = $filter->xssFilterHard($sh);
$h = G::encrypt( $_GET['srv'] . $sh . $_GET['usr'] . $sh . $_GET['pass'] . $sh . (1), $sh ); $h = G::encrypt( $_GET['srv'] . $sh . $_GET['usr'] . $sh . $_GET['pass'] . $sh . (1), $sh );
$h = $filter->xssFilterHard($h);
echo "HASH_INSTALLATION<br/>"; echo "HASH_INSTALLATION<br/>";
echo "<textarea cols=120>$h</textarea><br/>"; echo "<textarea cols=120>$h</textarea><br/>";
echo "SYSTEM_HASH<br/>"; echo "SYSTEM_HASH<br/>";

View File

@@ -302,7 +302,7 @@ switch ($request) {
list($sucess, $msgErr) = testConnection(DB_ADAPTER, $serverName, $user, $passwd, $port); list($sucess, $msgErr) = testConnection(DB_ADAPTER, $serverName, $user, $passwd, $port);
if ($sucess) { if ($sucess) {
$sh = md5( filemtime( PATH_GULLIVER . "/class.g.php" ) ); $sh = G::encryptOld( filemtime( PATH_GULLIVER . "/class.g.php" ) );
$h = G::encrypt( $_POST['host'] . $sh . $_POST['user'] . $sh . $_POST['password'] . $sh . (1), $sh ); $h = G::encrypt( $_POST['host'] . $sh . $_POST['user'] . $sh . $_POST['password'] . $sh . (1), $sh );
$insertStatements = "define ( 'HASH_INSTALLATION','{$h}' ); \ndefine ( 'SYSTEM_HASH', '{$sh}' ); \n"; $insertStatements = "define ( 'HASH_INSTALLATION','{$h}' ); \ndefine ( 'SYSTEM_HASH', '{$sh}' ); \n";
$lines = array (); $lines = array ();

View File

@@ -39,7 +39,8 @@ switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE'))
}*/ }*/
G::LoadClass( "plugin" ); G::LoadClass( "plugin" );
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$pluginName = $_REQUEST["pluginUid"]; $pluginName = $_REQUEST["pluginUid"];
if (file_exists( PATH_PLUGINS . $pluginName . ".php" )) { if (file_exists( PATH_PLUGINS . $pluginName . ".php" )) {
@@ -50,5 +51,5 @@ if (file_exists( PATH_PLUGINS . $pluginName . ".php" )) {
$pluginRegistry->unSerializeInstance( file_get_contents( PATH_DATA_SITE . "plugin.singleton" ) ); $pluginRegistry->unSerializeInstance( file_get_contents( PATH_DATA_SITE . "plugin.singleton" ) );
} }
G::auditLog("RemovePlugin","Plugin Name: ".$pluginName); G::auditLog("RemovePlugin","Plugin Name: ".$pluginName);
echo $pluginName . " " . nl2br( G::LoadTranslation( "ID_MSG_REMOVE_PLUGIN_SUCCESS" ) ); echo $pluginName . " " . nl2br( $filter->xssFilterHard(G::LoadTranslation( "ID_MSG_REMOVE_PLUGIN_SUCCESS" )) );

View File

@@ -15,7 +15,7 @@
<tr> <tr>
{if $user_logged neq '' or $tracker neq ''} {if $user_logged neq '' or $tracker neq ''}
<td rowspan="2" style="vertical-align:top;width: 245px;"><img src="{$logo_company}" class="logo_company"/></td> <td rowspan="2" style="vertical-align:top;width: 245px;"><img src="{$logo_company}" class="logo_company"/></td>
<td class="mainMenuBG" rowspan="2" valign="center" > <td id="mainMenuBG" class="mainMenuBG" rowspan="2" valign="center" >
{include file="$tpl_menu"} {include file="$tpl_menu"}
{if (count($subMenus)>0) } {if (count($subMenus)>0) }
{include file= "$tpl_submenu"} {include file= "$tpl_submenu"}
@@ -30,7 +30,7 @@
<label class="textBlue"><a href="../../uxs/home">{$switch_interface_label}</a> | </label> <label class="textBlue"><a href="../../uxs/home">{$switch_interface_label}</a> | </label>
{/if} {/if}
<a href="{$linklogout}" class="tableOption">{$logout}</a>&nbsp;&nbsp;<br/> <a href="{$linklogout}" class="tableOption">{$logout}</a>&nbsp;&nbsp;<br/>
<label class="textBlack"><b>{$rolename}</b> {$workspace_label} <b><u>{$workspace}</u></b> &nbsp; &nbsp; <br/> <label class="textBlack"><b>{$rolename}</b> {$workspace_label} <b><u>{$workspace}</u></b><br />
{$udate}</label>&nbsp; &nbsp; {$udate}</label>&nbsp; &nbsp;
{else} {else}
{if $tracker eq 1} {if $tracker eq 1}

View File

@@ -861,15 +861,33 @@ class Cases
* *
* @access public * @access public
* @param string $app_uid, Uid for case * @param string $app_uid, Uid for case
* @param string $usr_uid, Uid user
* @return array * @return array
* *
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com> * @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia * @copyright Colosa - Bolivia
*/ */
public function deleteCase($app_uid) public function deleteCase($app_uid, $usr_uid)
{ {
Validator::isString($app_uid, '$app_uid'); Validator::isString($app_uid, '$app_uid');
Validator::appUid($app_uid, '$app_uid'); Validator::appUid($app_uid, '$app_uid');
$criteria = new \Criteria();
$criteria->addSelectColumn( \ApplicationPeer::APP_STATUS );
$criteria->addSelectColumn( \ApplicationPeer::APP_INIT_USER );
$criteria->add( \ApplicationPeer::APP_UID, $app_uid, \Criteria::EQUAL );
$dataset = \ApplicationPeer::doSelectRS($criteria);
$dataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
if ($aRow['APP_STATUS'] != 'DRAFT') {
throw (new \Exception(\G::LoadTranslation("ID_DELETE_CASE_NO_STATUS")));
}
if ($aRow['APP_INIT_USER'] != $usr_uid) {
throw (new \Exception(\G::LoadTranslation("ID_DELETE_CASE_NO_OWNER")));
}
$case = new \Cases(); $case = new \Cases();
$case->removeCase( $app_uid ); $case->removeCase( $app_uid );
} }

View File

@@ -190,12 +190,11 @@ class FilesManager
break; break;
} }
$content = $aData['prf_content']; $content = $aData['prf_content'];
if (is_string($content)) { if (file_exists($sDirectory) ) {
if (file_exists($sDirectory)) {
$directory = $sMainDirectory. PATH_SEP . $sSubDirectory . $aData['prf_filename']; $directory = $sMainDirectory. PATH_SEP . $sSubDirectory . $aData['prf_filename'];
throw new \Exception(\G::LoadTranslation("ID_EXISTS_FILE", array($directory))); throw new \Exception(\G::LoadTranslation("ID_EXISTS_FILE", array($directory)));
} }
}
if (!file_exists($sCheckDirectory)) { if (!file_exists($sCheckDirectory)) {
$sPkProcessFiles = \G::generateUniqueID(); $sPkProcessFiles = \G::generateUniqueID();
$oProcessFiles = new \ProcessFiles(); $oProcessFiles = new \ProcessFiles();
@@ -555,4 +554,3 @@ class FilesManager
} }
} }
} }

View File

@@ -33,7 +33,7 @@ class ReportingIndicators
$retval = array( $retval = array(
"id" => $indicatorUid, "id" => $indicatorUid,
"efficiencyIndex" => $peiValue, "efficiencyIndex" => $peiValue,
"efficiencyIndexCompare" => $peiCompare, "efficiencyIndexToCompare" => $peiCompare,
"efficiencyVariation" => ($peiValue-$peiCompare), "efficiencyVariation" => ($peiValue-$peiCompare),
"inefficiencyCost" => $peiCost, "inefficiencyCost" => $peiCost,
"data"=>$processes); "data"=>$processes);
@@ -68,6 +68,7 @@ class ReportingIndicators
"efficiencyIndex" => $ueiValue, "efficiencyIndex" => $ueiValue,
"efficiencyVariation" => ($ueiValue-$ueiCompare), "efficiencyVariation" => ($ueiValue-$ueiCompare),
"inefficiencyCost" => $ueiCost, "inefficiencyCost" => $ueiCost,
"efficiencyIndexToCompare" => $ueiCompare,
"data"=>$groups); "data"=>$groups);
return $retval; return $retval;
} }

View File

@@ -363,7 +363,7 @@ class User
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$this->getFieldNameByFormatFieldName("USR_COST_BY_HOUR") => $record["USR_COST_BY_HOUR"], $this->getFieldNameByFormatFieldName("USR_COST_BY_HOUR") => $record["USR_COST_BY_HOUR"],
$this->getFieldNameByFormatFieldName("USR_UNIT_COST") => $record["USR_UNIT_COST"], $this->getFieldNameByFormatFieldName("USR_UNIT_COST") => $record["USR_UNIT_COST"],
/*---------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$this->getFieldNameByFormatFieldName("USR_TOTAL_INBOX") => $record["USR_TOTAL_INBOX"], $this->getFieldNameByFormatFieldName("USR_TOTAL_INBOX") => $record["USR_TOTAL_INBOX"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_DRAFT") => $record["USR_TOTAL_DRAFT"], $this->getFieldNameByFormatFieldName("USR_TOTAL_DRAFT") => $record["USR_TOTAL_DRAFT"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_CANCELLED") => $record["USR_TOTAL_CANCELLED"], $this->getFieldNameByFormatFieldName("USR_TOTAL_CANCELLED") => $record["USR_TOTAL_CANCELLED"],

View File

@@ -497,7 +497,10 @@ class BpmnWorkflow extends Project\Bpmn
//Setting as start Task //Setting as start Task
//or //or
//Remove as start Task //Remove as start Task
$bwp = new self;
if ($bwp->getActivity($arrayFlowData["FLO_ELEMENT_DEST"])) {
$this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask); $this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask);
}
break; break;
} }
} }
@@ -1384,6 +1387,10 @@ class BpmnWorkflow extends Project\Bpmn
$activity = $bwp->getActivity($activityData["ACT_UID"]); $activity = $bwp->getActivity($activityData["ACT_UID"]);
if ($activity["BOU_CONTAINER"] != $activityData["BOU_CONTAINER"]) {
$activity = null;
}
if ($forceInsert || is_null($activity)) { if ($forceInsert || is_null($activity)) {
if ($generateUid) { if ($generateUid) {
//Generate and update UID //Generate and update UID

View File

@@ -809,8 +809,9 @@ class Cases extends Api
public function doDeleteCase($cas_uid) public function doDeleteCase($cas_uid)
{ {
try { try {
$usr_uid = $this->getUserId();
$cases = new \ProcessMaker\BusinessModel\Cases(); $cases = new \ProcessMaker\BusinessModel\Cases();
$cases->deleteCase($cas_uid); $cases->deleteCase($cas_uid, $usr_uid);
} catch (\Exception $e) { } catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage())); throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
} }

View File

@@ -317,6 +317,11 @@ CloseWindow = function(){
Ext.getCmp('w').hide(); Ext.getCmp('w').hide();
}; };
SaveNewDepartment = function(){ SaveNewDepartment = function(){
if( newForm.getForm().findField('dep_name').getValue().trim() == "") {
Ext.Msg.alert(_('ID_WARNING'), _("ID_FIELD_REQUIRED", _("ID_DEPARTMENT_NAME")));
newForm.getForm().findField('dep_name').setValue("");
return false;
}
waitLoading.show(); waitLoading.show();
var dep_node = Ext.getCmp('treePanel').getSelectionModel().getSelectedNode(); var dep_node = Ext.getCmp('treePanel').getSelectionModel().getSelectedNode();
if (dep_node) dep_node.unselect(); if (dep_node) dep_node.unselect();

View File

@@ -79,6 +79,7 @@
</head> </head>
<body onresize="resizingFrame();"> <body onresize="resizingFrame();">
<!--<div class="ui-layout-north">--> <!--<div class="ui-layout-north">-->
<div class="loader"></div>
<section class="navBar" id="idNavBar"> <section class="navBar" id="idNavBar">
<div class="head"></div> <div class="head"></div>
<nav> <nav>

View File

@@ -182,7 +182,13 @@ Ext.onReady(function(){
text: _("ID_SAVE"), text: _("ID_SAVE"),
handler: function (btn, ev) handler: function (btn, ev)
{ {
if( newForm.getForm().findField('name').getValue().trim() == "") {
Ext.Msg.alert(_('ID_WARNING'), _("ID_FIELD_REQUIRED", _("ID_GROUP_NAME")));
newForm.getForm().findField('name').setValue("");
return false;
} else {
Ext.getCmp("btnCreateSave").setDisabled(true); Ext.getCmp("btnCreateSave").setDisabled(true);
}
SaveNewGroupAction(); SaveNewGroupAction();
} }

View File

@@ -207,10 +207,10 @@ Ext.onReady(function(){
Ext.Ajax.request({ Ext.Ajax.request({
url: 'checkDatabases', url: 'checkDatabases',
success: function(response){ success: function(response){
var existMsg = '<span style="color: red;">' + _('ID_EXIST') + '</span>'; var existMsg = '<span style="color: red;">' + _('ID_NOT_AVAILABLE_DATABASE') + '</span>';
var noExistsMsg = '<span style="color: green;">' + _('ID_NO_EXIST') + '</span>'; var noExistsMsg = '<span style="color: green;">' + _('ID_AVAILABLE_DATABASE') + '</span>';
var response = Ext.util.JSON.decode(response.responseText); var response = Ext.util.JSON.decode(response.responseText);
Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg); Ext.get('database_message').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
var dbFlag = ((!response.wfDatabaseExists) || Ext.getCmp('deleteDB').getValue()); var dbFlag = ((!response.wfDatabaseExists) || Ext.getCmp('deleteDB').getValue());
wizard.onClientValidation(4, dbFlag); wizard.onClientValidation(4, dbFlag);
@@ -784,7 +784,7 @@ Ext.onReady(function(){
}), }),
{ {
xtype : 'textfield', xtype : 'textfield',
fieldLabel: _('ID_WF_DATABASE_NAME') + ' <span id="wfDatabaseSpan"></span>', fieldLabel: _('ID_WF_DATABASE_NAME'),
id : 'wfDatabase', id : 'wfDatabase',
value :'wf_workflow', value :'wf_workflow',
allowBlank : false, allowBlank : false,
@@ -799,6 +799,10 @@ Ext.onReady(function(){
wizard.onClientValidation(4, false); wizard.onClientValidation(4, false);
}} }}
}, },
{
xtype : 'displayfield',
id : 'database_message'
},
new Ext.form.Checkbox({ new Ext.form.Checkbox({
boxLabel : _('ID_DELETE_DATABASES'), boxLabel : _('ID_DELETE_DATABASES'),
id : 'deleteDB', id : 'deleteDB',

View File

@@ -1402,7 +1402,11 @@ importProcessBpmnSubmit = function () {
return; return;
} }
Ext.getCmp('importProcessWindow').close(); Ext.getCmp('importProcessWindow').close();
window.location.href = "../designer?prj_uid=" + resp_.prj_uid; if (typeof(importProcessGlobal.processFileType) != "undefined" && importProcessGlobal.processFileType == "bpmn") {
openWindowIfIE("../designer?prj_uid=" + resp_.prj_uid);
} else {
window.location.href = "processes_Map?PRO_UID=" + resp_.prj_uid;
}
}, },
failure: function (o, resp) { failure: function (o, resp) {
Ext.getCmp('importProcessWindow').close(); Ext.getCmp('importProcessWindow').close();

View File

@@ -25,6 +25,24 @@
document.getElementById('pm_submenu').style.display = 'none'; document.getElementById('pm_submenu').style.display = 'none';
document.documentElement.style.overflowY = 'hidden'; document.documentElement.style.overflowY = 'hidden';
function autoResizeScreen() { function autoResizeScreen() {
var containerList1, containerList2;
oCasesFrame = document.getElementById('frameMain');
containerList1 = document.getElementById("pm_header");
if (document.getElementById("mainMenuBG") &&
document.getElementById("mainMenuBG").parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode
){
containerList2 = document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode;
}
if (containerList1 === containerList2) {
height = oClientWinSize.height - containerList1.clientHeight;
oCasesFrame.style.height = height;
if (oCasesFrame.height ) {
oCasesFrame.height = height;
}
} else {
oCasesFrame = document.getElementById('frameMain'); oCasesFrame = document.getElementById('frameMain');
oClientWinSize = getClientWindowSize(); oClientWinSize = getClientWindowSize();
height = oClientWinSize.height-105; height = oClientWinSize.height-105;
@@ -32,6 +50,7 @@
if (oCasesFrame.height ) { if (oCasesFrame.height ) {
oCasesFrame.height = height; oCasesFrame.height = height;
} }
}
//oCasesSubFrame = oCasesFrame.contentWindow.document.getElementById('casesSubFrame'); //oCasesSubFrame = oCasesFrame.contentWindow.document.getElementById('casesSubFrame');
//oCasesSubFrame.style.height = height-10; //oCasesSubFrame.style.height = height-10;
} }

View File

@@ -20,7 +20,7 @@ if(isset($_GET['gui'])) {
} }
</style> </style>
<body onresize="autoResizeScreen()" onload="autoResizeScreen()"> <body onresize="autoResizeScreen()" onload="autoResizeScreen()">
<iframe name="frameMain" id="frameMain" src ="../reportTables/mainInit?PRO_UID=<?php echo $gui?>" width="99%" height="200" frameborder="0"> <iframe name="frameMain" id="frameMain" src ="../reportTables/mainInit?PRO_UID=<?php echo $filter->xssFilterHard($gui)?>" width="99%" height="200" frameborder="0">
<p>Your browser does not support iframes.</p> <p>Your browser does not support iframes.</p>
</iframe> </iframe>
</body> </body>

View File

@@ -33,7 +33,7 @@
border-right: #fff 1px solid; border-right: #fff 1px solid;
padding-right: 10px; padding-right: 10px;
border-top: #fff 1px solid; border-top: #fff 1px solid;
padding-top: 10px; padding-top: 5px;
border-left: #fff 1px solid; border-left: #fff 1px solid;
padding-left: 10px; padding-left: 10px;
border-bottom: #fff 1px solid; border-bottom: #fff 1px solid;
@@ -47,6 +47,16 @@
span.cLow { span.cLow {
color: #002c72; color: #002c72;
} }
span.cLow-min {
color: #002c72;
font-size: 13px;
line-height: 1.3em;
}
span.cLow-autor {
color: #002c72;
font-size: 15px;
line-height: 1.3em;
}
</style> </style>
<!--[if IE]> <!--[if IE]>
@@ -68,23 +78,23 @@
<a target="_blank" href="http://www.processmaker.com"><img src="/images/get_started.png" border="0" width="163" height="438"></a> <a target="_blank" href="http://www.processmaker.com"><img src="/images/get_started.png" border="0" width="163" height="438"></a>
</td> </td>
<td class="cell2" valign="top"> <td class="cell2" valign="top">
<p><span class="cLow">Welcome to ProcessMaker!</span></p> <p><b><span class="cLow">Welcome to ProcessMaker 3.</span></b></p>
<p><span class="cLow">To get started, log in using the following credentials. You can change them later:</span></p> <p style="text-align: justify;"><span class="cLow-min">This new version features a new process designer based upon the Business Process Management Notation 2 standard. It offers a new form designer with flexible layouts for desktops, tablets and cellphones and a new REST API to remotely access ProcessMaker.</span></p>
<p style="text-align: justify;"><span class="cLow-min">To get started, log in using the following credentials. You can change them later:</span></p>
<span class="cNeg">Username:</span><span class="cLow"> {name}</span><br> <span class="cNeg">Username:</span><span class="cLow"> {name}</span><br>
<span class="cNeg">Password:</span><span class="cLow"> {pass}</span> <span class="cNeg">Password:</span><span class="cLow"> {pass}</span><br><br>
<p><span class="cLow">We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at&nbsp;<a target="_blank" href="http://www.processmaker.com/demos/">http://www.processmaker.com/demos/</a> </span></p> <p style="text-align: justify;"><span class="cLow-min">We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at <a target="_blank" href="http://www.processmaker.com/tutorials">http://www.processmaker.com/tutorials/</a></span></p>
<span class="cLow">Other Resources:</span><br/><br/> <b><span class="cLow">Other Resources:</span></b><br/><br/>
<span class="cLow"><a target="_blank" href="http://wiki.processmaker.com">PM Wiki </a>- Manuals</span><br/> <span class="cLow"><a target="_blank" href="http://wiki.processmaker.com">PM Wiki </a>- Manuals</span><br/>
<span class="cLow"><a target="_blank" href="http://forum.processmaker.com">PM Forum </a>- Ask Questions</span><br/> <span class="cLow"><a target="_blank" href="http://forum.processmaker.com">PM Forum </a>- Ask Questions</span><br/><br/>
<p><span class="cLow">We hope you enjoy using ProcessMaker. For more information about our enterprise support and consulting services <a target="_blank" href="http://www.processmaker.com/contact-us">contact us.</a> <p style="text-align: justify;"><span class="cLow-min">We hope you enjoy using ProcessMaker. For more information about our enterprise support and consulting services <a target="_blank" href="http://www.processmaker.com/contact-us">contact us.</a></span></p>
</span></p> <p><b><span class="cLow-autor">The ProcessMaker Team</span></b></p>
<p><span class="cLow">The ProcessMaker Team</span></p>
<input type="checkbox" name="getStarted" id="getStarted" onclick="saveConfig();"><span class="cLow">Don't show me again</span> <input type="checkbox" name="getStarted" id="getStarted" onclick="saveConfig();"><span class="cLow"> Don't show me again</span>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -79,11 +79,13 @@ Ext.onReady( function() {
items : [ items : [
{ {
id : 'DAS_TITLE', id : 'DAS_TITLE',
fieldLabel : _('ID_DASHBOARD_TITLE'), fieldLabel : _('ID_DASHBOARD_TITLE')+ ' *',
xtype : 'textfield', xtype : 'textfield',
anchor : '85%', anchor : '85%',
maxLength : 250, maxLength : 250,
maskRe : /([a-zA-Z0-9\s]+)$/, maskRe : /([a-zA-Z0-9_'\s]+)$/,
regex : /([a-zA-Z0-9_'\s]+)$/,
regexText : _('ID_INVALID_VALUE', _('ID_DASHBOARD_TITLE')),
allowBlank : false allowBlank : false
}, },
{ {
@@ -92,7 +94,7 @@ Ext.onReady( function() {
fieldLabel : _('ID_DESCRIPTION'), fieldLabel : _('ID_DESCRIPTION'),
labelSeparator : '', labelSeparator : '',
anchor : '85%', anchor : '85%',
maskRe : /([a-zA-Z0-9\s]+)$/, maskRe : /([a-zA-Z0-9_'\s]+)$/,
height : 50, height : 50,
} }
] ]
@@ -528,13 +530,14 @@ Ext.onReady( function() {
flag = true; flag = true;
break; break;
case 'yes': case 'yes':
tabPanel.getItem(component.id).show();
flag = false; flag = false;
var dasIndUid = Ext.getCmp('DAS_IND_UID_'+component.id).getValue(); var dasIndUid = Ext.getCmp('DAS_IND_UID_'+component.id).getValue();
if (typeof dasIndUid != 'undefined' && dasIndUid != '') { if (typeof dasIndUid != 'undefined' && dasIndUid != '') {
removeIndicator(dasIndUid); removeIndicator(dasIndUid);
} }
tabActivate.remove(component.id); tabActivate.remove(component.id);
tabPanel.remove(component); tabPanel.remove(component, true);
break; break;
} }
}, },
@@ -671,7 +674,6 @@ Ext.onReady( function() {
] ]
}); });
ownerInfoGrid.store.load();
ownerInfoGrid.on("afterrender", function(component) { ownerInfoGrid.on("afterrender", function(component) {
component.getBottomToolbar().refresh.hideParent = true; component.getBottomToolbar().refresh.hideParent = true;
component.getBottomToolbar().refresh.hide(); component.getBottomToolbar().refresh.hide();
@@ -698,6 +700,7 @@ Ext.onReady( function() {
} }
dashboardOwnerFields.items.items[0].bindStore(dataUserGroup); dashboardOwnerFields.items.items[0].bindStore(dataUserGroup);
} ); } );
storeUsers.on( 'load', function( store, records, options ) { storeUsers.on( 'load', function( store, records, options ) {
for (var i=0; i< store.data.length; i++) { for (var i=0; i< store.data.length; i++) {
row = []; row = [];
@@ -751,11 +754,13 @@ var addTab = function (flag) {
hidden : true hidden : true
}, },
{ {
fieldLabel : _('ID_INDICATOR_TITLE'), fieldLabel : _('ID_INDICATOR_TITLE')+ ' *',
id : 'IND_TITLE_'+ indexTab, id : 'IND_TITLE_'+ indexTab,
xtype : 'textfield', xtype : 'textfield',
anchor : '85%', anchor : '85%',
maskRe : /([a-zA-Z0-9\s]+)$/, maskRe : /([a-zA-Z0-9_'\s]+)$/,
regex : /([a-zA-Z0-9_'\s]+)$/,
regexText : _('ID_INVALID_VALUE', _('ID_INDICATOR_TITLE')),
maxLength : 250, maxLength : 250,
allowBlank : false allowBlank : false
}, },
@@ -763,7 +768,7 @@ var addTab = function (flag) {
anchor : '85%', anchor : '85%',
editable : false, editable : false,
id : 'IND_TYPE_'+ indexTab, id : 'IND_TYPE_'+ indexTab,
fieldLabel : _('ID_INDICATOR_TYPE'), fieldLabel : _('ID_INDICATOR_TYPE')+ ' *',
displayField : 'CAT_LABEL_ID', displayField : 'CAT_LABEL_ID',
valueField : 'CAT_UID', valueField : 'CAT_UID',
forceSelection : false, forceSelection : false,
@@ -782,6 +787,7 @@ var addTab = function (flag) {
var fields = ['DAS_IND_FIRST_FIGURE_'+index,'DAS_IND_FIRST_FREQUENCY_'+index,'DAS_IND_SECOND_FIGURE_'+index, 'DAS_IND_SECOND_FREQUENCY_'+index]; var fields = ['DAS_IND_FIRST_FIGURE_'+index,'DAS_IND_FIRST_FREQUENCY_'+index,'DAS_IND_SECOND_FIGURE_'+index, 'DAS_IND_SECOND_FREQUENCY_'+index];
if (value == '1050') { if (value == '1050') {
field = Ext.getCmp('IND_PROCESS_'+index); field = Ext.getCmp('IND_PROCESS_'+index);
field.setValue('0');
field.disable(); field.disable();
field.hide(); field.hide();
} else { } else {
@@ -874,18 +880,17 @@ var addTab = function (flag) {
new Ext.form.ComboBox({ new Ext.form.ComboBox({
anchor : '85%', anchor : '85%',
editable : false, editable : false,
fieldLabel : _('ID_PROCESS'), fieldLabel : _('ID_PROCESS')+ ' *',
id : 'IND_PROCESS_'+ indexTab, id : 'IND_PROCESS_'+ indexTab,
displayField : 'prj_name', displayField : 'prj_name',
valueField : 'prj_uid', valueField : 'prj_uid',
forceSelection : false, forceSelection : true,
emptyText : _('ID_EMPTY_PROCESSES'), emptyText : _('ID_EMPTY_PROCESSES'),
selectOnFocus : true, selectOnFocus : true,
hidden : true, hidden : true,
typeAhead : true, typeAhead : true,
autocomplete : true, autocomplete : true,
triggerAction : 'all', triggerAction : 'all',
value : '0',
store : storeProject store : storeProject
}), }),
new Ext.form.ComboBox({ new Ext.form.ComboBox({
@@ -1086,7 +1091,6 @@ var saveDashboard = function () {
}, },
data: JSON.stringify(data), data: JSON.stringify(data),
success: function (response) { success: function (response) {
var jsonResp = Ext.util.JSON.decode(response.responseText);
saveAllDashboardOwner(DAS_UID); saveAllDashboardOwner(DAS_UID);
saveAllIndicators(DAS_UID); saveAllIndicators(DAS_UID);
myMask.hide(); myMask.hide();
@@ -1109,11 +1113,25 @@ var saveAllIndicators = function (DAS_UID) {
tabPanel.getItem(tabActivate[tab]).show(); tabPanel.getItem(tabActivate[tab]).show();
var fieldsTab = tabPanel.getItem(tabActivate[tab]).items.items[0].items.items[0].items.items; var fieldsTab = tabPanel.getItem(tabActivate[tab]).items.items[0].items.items[0].items.items;
if (fieldsTab[1].getValue().trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TITLE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
fieldsTab[1].focus(true,10);
return false;
} else if (fieldsTab[2].getValue().trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TYPE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
fieldsTab[2].focus(true,10);
return false;
} else if (fieldsTab[2].getValue() != '1050' && fieldsTab[4].getValue().trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_PROCESS_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
fieldsTab[4].focus(true,10);
return false;
}
var goal = fieldsTab[3]; var goal = fieldsTab[3];
fieldsTab.push(goal.items.items[0]); fieldsTab.push(goal.items.items[0]);
fieldsTab.push(goal.items.items[1]); fieldsTab.push(goal.items.items[1]);
data = []; var data = [];
data['DAS_UID'] = DAS_UID; data['DAS_UID'] = DAS_UID;
for (var index in fieldsTab) { for (var index in fieldsTab) {
@@ -1122,12 +1140,12 @@ var saveAllIndicators = function (DAS_UID) {
continue; continue;
} }
id = node.id; var id = node.id;
if (typeof id == 'undefined' || id.indexOf('fieldSet_') != -1 ) { if (typeof id == 'undefined' || id.indexOf('fieldSet_') != -1 ) {
continue; continue;
} }
id = id.split('_'); id = id.split('_');
field = ''; var field = '';
for (var part = 0; part<id.length-1; part++) { for (var part = 0; part<id.length-1; part++) {
if (part == 0) { if (part == 0) {
field = id[part]; field = id[part];
@@ -1135,25 +1153,7 @@ var saveAllIndicators = function (DAS_UID) {
field = field+'_'+id[part]; field = field+'_'+id[part];
} }
} }
value = node.getValue(); var value = node.getValue();
if (field == 'IND_TITLE' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TITLE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
} else if (field == 'IND_TYPE' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TYPE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
} else if (field == 'IND_GOAL' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_GOAL_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
} else if (field == 'IND_PROCESS' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_PROCESS_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
}
field = field == 'IND_TITLE' ? 'DAS_IND_TITLE' : field; field = field == 'IND_TITLE' ? 'DAS_IND_TITLE' : field;
field = field == 'IND_TYPE' ? 'DAS_IND_TYPE' : field; field = field == 'IND_TYPE' ? 'DAS_IND_TYPE' : field;

View File

@@ -55,7 +55,9 @@
<div class="huge ind-value-selector"><%- indicator.value %></div> <div class="huge ind-value-selector"><%- indicator.value %></div>
</div> </div>
<div class="col-xs-9 text-right"><i class="ind-symbol-selector fa fa-chevron-up fa-3x"></i> <div class="col-xs-9 text-right"><i class="ind-symbol-selector fa fa-chevron-up fa-3x"></i>
<div class="small ind-comparative-selector"><%- indicator.comparative %></div> <div class="small ind-comparative-selector">
<%- indicator.comparative %> (<%- indicator.percentComparative %> %)
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -209,14 +211,18 @@
</div> </div>
<div class="text-center huge"> <div class="text-center huge">
<div class="col-xs-12 vcenter-task"> <div class="col-xs-12 vcenter-task">
<div class="col-xs-5 "> <div class="col-xs-4 ">
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div> <div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
<div class="smallB grey fontMedium detail-efficiency-selector ellipsis"></div> <div class="smallB grey detail-efficiency-selector ellipsis"></div>
</div> </div>
<div class="col-xs-5 "> <div class="col-xs-4 ">
<div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div> <div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div>
<div class="smallB grey detail-cost-selector ellipsis"></div> <div class="smallB grey detail-cost-selector ellipsis"></div>
</div> </div>
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.deviationTimeToShow%></div>
<div class="smallB grey detail-sdv-selector ellipsis">SDV</div>
</div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
@@ -236,15 +242,15 @@
<div class="col-xs-12 vcenter-task"> <div class="col-xs-12 vcenter-task">
<div class="col-xs-4 "> <div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOverdue%> %</div> <div class="blue small"><%- detailData.percentageOverdue%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">Overdue</div> <div class="smallB grey fontMedium detail-efficiency-selector">{translate label="ID_OVERDUE"}</div>
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
<div class="blue small"><%- detailData.percentageAtRisk%> %</div> <div class="blue small"><%- detailData.percentageAtRisk%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">At Risk</div> <div class="smallB grey fontMedium detail-efficiency-selector">{translate label="ID_AT_RISK"}</div>
</div> </div>
<div class="col-xs-4 "> <div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOnTime%> %</div> <div class="blue small"><%- detailData.percentageOnTime%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">On Time</div> <div class="smallB grey fontMedium detail-efficiency-selector">{translate label="ID_ON_TIME"}</div>
</div> </div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@@ -286,18 +292,18 @@
<li class="ind-title-selector"></li> <li class="ind-title-selector"></li>
</ol> </ol>
</div> </div>
<div class="text-center huge" style="margin:0 auto; width:90%;"> <div class="text-center huge" style="margin:0 auto; width:98%;">
<div class="col-xs-4" style="width:auto;"> <div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-low">Overdue:</div> <div class="status-graph-title-low">{translate label="ID_OVERDUE"}:</div>
<div id="graph1" style="width:450px; height:300px;"></div> <div id="graph1" style="width:400px; height:300px;"></div>
</div> </div>
<div class="col-xs-4" style="width:auto;"> <div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-medium">At Risk:</div> <div class="status-graph-title-medium">{translate label="ID_AT_RISK"}:</div>
<div id="graph2" style="width:450px; height:300px;"></div> <div id="graph2" style="width:400px; height:300px;"></div>
</div> </div>
<div class="col-xs-4" style="width:auto;"> <div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-high">On Time:</div> <div class="status-graph-title-high">{translate label="ID_ON_TIME"}:</div>
<div id="graph3" style="width:450px; height:300px;"></div> <div id="graph3" style="width:400px; height:300px;"></div>
</div> </div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@@ -399,7 +405,7 @@
<center><h3></h3></center> <center><h3></h3></center>
</div> </div>
<div> <div>
Sort: &nbsp; &nbsp;<a id="sortListButton" class="fa fa-chevron-down fa-1x" style="color:#000;" href="#"></a> Sort by Cost: &nbsp; &nbsp;<a id="sortListButton" class="fa fa-chevron-up fa-1x" style="color:#000;" href="#"></a>
</div> </div>
</div> </div>

View File

@@ -1,17 +1,450 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Dashboards</title>
</head> <link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
<body id="page-top" class="index"> <link rel="stylesheet" href="/css/sb-admin-2.css">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<div id="wrapper"> <link href="/css/gridstack.css" rel="stylesheet">
For better compatibility with Internet Explorer, a new tab with the KPIs has been opened. Please select this tab on the tab list above to see all the KPI's functionality. <link href="/css/general.css" rel="stylesheet">
<link href="/css/dashboardStylesForIE.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Chivo:400,400italic' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="/js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery-ui-1.11.2.min.js" ></script>
<script src="/lib/pmdynaform/libs/bootstrap-3.1.1/js/bootstrap.min.js"></script>
<script src="/lib/pmdynaform/libs/underscore/underscore.js"></script>
<script type="text/javascript" >
var urlProxy = '{$urlProxy}';
var pageUserId = '{$usrId}';
var token = '{$credentials.access_token}';
var G_STRING = [];
{foreach from=$translation key=index item=option}
G_STRING['{$index}'] = "{$option}";
{/foreach}
</script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardHelper.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardModel.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardPresenter.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardViewIE.js"></script>
<script type="text/template" class="specialIndicatorButtonTemplate">
<div class="col-lg-3 col-md-6 dashPro ind-button-selector"
id="indicatorButton-<%- indicator.id %>"
data-indicator-id="<%- indicator.id %>"
data-indicator-type="<%- indicator.type %>"
data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">
<div class="ind-container-selector panel panel-green grid-stack-item-content" style="min-width:200px;">
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
<div class="panel-heading" >
<div class="row">
<div class="col-xs-3">
<div class="huge ind-value-selector"><%- indicator.value %></div>
</div>
<div class="col-xs-9 text-right"><i class="ind-symbol-selector fa fa-chevron-up fa-3x"></i>
<div class="small ind-comparative-selector">
<%- indicator.comparative %> (<%- indicator.percentComparative %> %)
</div>
</div>
</div>
</div>
<div class="panel-footer text-center ind-title-selector">
<%- indicator.title %>
</div>
</a>
</div>
</div>
</script>
<script type="text/template" class="statusIndicatorButtonTemplate">
<div class="col-lg-3 col-md-6 dashPro ind-button-selector"
id="indicatorButton-<%- indicator.id %>"
data-indicator-id="<%- indicator.id %>"
data-indicator-type="<%- indicator.type %>"
data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">
<div class="ind-container-selector panel grid-stack-item-content" style="min-width:200px;">
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
<div class="panel-heading status-indicator-low"
style=" width:<%- indicator.percentageOverdue %>%;
visibility: <%- indicator.overdueVisibility %>" >
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageOverdue %>%</div>
</div>
</div>
</div>
<div class="panel-heading status-indicator-medium"
style=" width:<%- indicator.percentageAtRisk %>%;
visibility: <%- indicator.atRiskVisibility %>;" >
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageAtRisk %>%</div>
</div>
</div>
</div>
<div class="panel-heading status-indicator-high"
style=" width:<%- indicator.percentageOnTime %>%;
visibility: <%- indicator.onTimeVisibility %>;">
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageOnTime %>%</div>
</div>
</div>
</div>
<div class="panel-footer text-center ind-title-selector" style="clear:both;">
<%- indicator.title %>
</div>
</a>
</div>
</div>
</script>
<script type="text/template" class="indicatorButtonTemplate">
<div class="col-lg-3 col-md-6 ind-button-selector" id="generalLowItem"
id="indicatorButton-<%- indicator.id %>"
data-indicator-id="<%- indicator.id %>"
data-indicator-type="<%- indicator.type %>"
data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2" >
<div class="panel ie-panel panel-low grid-stack-item-content ind-container-selector" style="min-width: 200px;">
<a data-toggle="collapse" href="#completedcases" aria-expanded="false" aria-controls="completedcases">
<div class="panel-heading"> <div class="row"> <div class="col-xs-3">
<div class="huge ind-value-selector">X</div>
</div>
<div class="col-xs-9 text-right"><i class="fa fa-file-text-o fa-3x"></i>
<div class="small ind-comparative-selector ellipsis"><%- indicator.comparative %></div>
</div>
</div>
</div>
<div class="progress progress-xs progress-dark-base ie-progress-dark-base mar-no">
<div role="progressbar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"
class="progress-bar progress-bar-light ind-progress-selector"
style="width: 0%">
</div>
</div>
<div class="panel-footer text-center ind-title-selector">
<span>
<%- indicator.title %>
</span>
</div>
</a>
</div>
</div>
</script>
<script type="text/template" class="specialIndicatorMainPanel">
<div class="process-div well" id="specialIndicatorMainPanel"
data-gs-no-resize="true"
style="clear:both;position:relative;height:auto;">
<div class="panel-heading bluebg sind-title-selector"">
<ol class="breadcrumb">
</ol>
</div> </div>
<div class="text-center huge">
<div class="col-xs-3 vcenter">
<div class="green"><%- indicator.efficiencyIndexToShow %></div>
<div class="small grey sind-index-selector ellipsis"></div>
</div>
<div class="col-xs-3 vcenter" style="margin-right:40px">
<div class="red sind-cost-number-selector"><%- indicator.inefficiencyCostToShow %></div>
<div class="small grey sind-cost-selector ellipsis"></div>
</div>
<div class="col-xs-6" id="specialIndicatorGraph" style="width:540px;height:300px;"></div>
</div>
<div class="clearfix"></div>
</div>
</script>
<script type="text/template" class="specialIndicatorDetail">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>"
data-detail-index="<%- detailData.efficiencyIndexToShow %>"
data-detail-cost-to-show="<%- detailData.inefficiencyCostToShow %>"
data-detail-cost="<%- detailData.inefficiencyCost%>"
data-detail-name="<%- detailData.name %>"
>
<div class="col-lg-12 vcenter-task">
<a href="#" class="process-button">
<div class="col-xs-5 text-left title-process">
<div class="small grey detail-title-selector"> <%- detailData.name %></div>
</div>
<div class="col-xs-3 text-center ">
<div class="blue"><%- detailData.efficiencyIndexToShow%></div>
<div class="small grey detail-efficiency-selector ellipsis"></div>
</div>
<div class="col-xs-3 text-center ">
<div class="red detail-cost-number-selector"><%- detailData.inefficiencyCostToShow %></div>
<div class="small grey detail-cost-selector ellipsis"></div>
</div>
<div class="col-xs-1 text-right arrow"><i class="fa fa-chevron-right fa-fw"></i></div>
</a>
</div>
<div class="clearfix"></div>
</div>
</script>
<script type="text/template" class="specialIndicatorSencondViewDetailUei">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
<div class="panel-heading greenbg">
<div class="col-xs-12 text-center detail-title-selector">
<i class="fa fa-tasks fa-fw"></i>
<span id="usrName"><%- detailData.name %> </span>
<span>(<%- detailData.rankToShow %>)</span>
</div>
<div class="clearfix"></div>
</div>
<div class="text-center huge">
<div class="col-xs-12 vcenter-task">
<div class="col-xs-6 ">
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
<div class="smallB grey detail-efficiency-selector ellipsis"></div>
</div>
<div class="col-xs-6 ">
<div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div>
<div class="smallB grey detail-cost-selector ellipsis"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</script>
<script type="text/template" class="specialIndicatorSencondViewDetailPei">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
<div class="panel-heading greenbg">
<div class="col-xs-12 text-center detail-title-selector">
<i class="fa fa-tasks fa-fw"></i>
<span id="usrName"><%- detailData.name %> </span>
</div>
<div class="clearfix"></div>
</div>
<div class="text-center huge">
<div class="col-xs-12 vcenter-task">
<div class="col-xs-6 ">
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
<div class="smallB grey detail-efficiency-selector ellipsis"></div>
</div>
<div class="col-xs-6 ">
<div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div>
<div class="smallB grey detail-cost-selector ellipsis"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</script>
<script type="text/template" class="statusDetail">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
<div class="panel-heading greenbg">
<div class="col-xs-12 text-center detail-title-selector"><i class="fa fa-tasks fa-fw"></i> <span id="usrName"><%- detailData.taskTitle %></span> </div>
<div class="clearfix"></div>
</div>
<div class="text-center huge">
<div class="col-xs-12 vcenter-task">
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOverdue%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">Overdue</div>
</div>
<div class="col-xs-4">
<div class="blue small"><%- detailData.percentageAtRisk%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">At Risk</div>
</div>
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOnTime%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">On Time</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</script>
<script type="text/template" class="dashboardButtonTemplate">
<div id="dashboardButton-<%- dashboard.id %>" class="btn-group pull-left"
data-dashboard-id="<%- dashboard.id %>" >
<button type="button" class="btn btn-success das-icon-selector">
<i class="fa fa-star fa-1x"></i>
</button>
<button type="button" class="btn btn-success das-title-selector" >
<%- dashboard.title %>
</button>
</div>
</script>
<script type="text/template" class="generalIndicatorMainPanel">
<div class="process-div well" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">
<div class="panel-heading bluebg">
<ol class="breadcrumb">
<li class="ind-title-selector"></li>
</ol>
</div>
<div class="text-center huge">
<div class="col-xs-6" id="generalGraph1" style="width:600px; height:300px;"><img src="../dist/img/graph.png" /></div>
<div class="col-xs-6" id="generalGraph2" style="width:600px; height:300px;margin-left:60px;"><img src="../dist/img/graph.png" /></div>
</div>
<div class="clearfix"></div>
</div>
</script>
<script type="text/template" class="statusIndicatorMainPanel">
<div class="process-div well" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">
<div class="panel-heading bluebg">
<ol class="breadcrumb">
<li class="ind-title-selector"></li>
</ol>
</div>
<div class="text-center huge" style="margin:0 auto; width:98%;">
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-low">Overdue:</div>
<div id="graph1" style="width:400px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-medium">At Risk:</div>
<div id="graph2" style="width:400px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-high">On Time:</div>
<div id="graph3" style="width:400px; height:300px;"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</script>
</head>
<body id="page-top" class="index">
<div id="wrapper">
<div id="page-wrapper">
<div class="title-process" style="height:50px;"> </div>
<div class="title-process" style="margin-top:50px; width:500px; clear:both; border:1px solid #999; margin:0 auto; padding:15px;">
This is just a basic view of your indexes. For better compatibility with Internet Explorer, a new tab with the KPIs has been opened. Please select this new tab on the tab list above to see all our KPIs functionality.
</div>
<!--Cabezera-->
<div class="row" style="visibility:hidden;">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-body">
<a class="btn btn-primary dashboard-button" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
<i class="fa fa-bar-chart fa-2x"></i>
<i class="fa fa-chevron-down fa-1x"></i>
</a>
<h4 id="titleH4" class="header-dashboard">{translate label="ID_MANAGERS_DASHBOARDS"}</h4>
<div class="pull-right dashboard-right container-fluid">
<div class="row pull-left">
<div class="span4 pull-left">
<h5 class="pull-left">{translate label="ID_DASH_COMPARE_MONTH"}:</h5>
</div>
<div class="span4 pull-left">
<select id="year" class="form-control pull-right ">
{literal}
<script>
now = new Date();
anio = now.getFullYear();
for(a=anio;a>=anio-7;a--){
document.write('<option value="'+a+'">'+a+'</option>');
}
</script>
{/literal}
</select>
<select id="month" class="form-control pull-right ">
<option value="1">{translate label="ID_MONTH_ABB_1"}</option>
<option value="2">{translate label="ID_MONTH_ABB_2"}</option>
<option value="3">{translate label="ID_MONTH_ABB_3"}</option>
<option value="4">{translate label="ID_MONTH_ABB_4"}</option>
<option value="5">{translate label="ID_MONTH_ABB_5"}</option>
<option value="6">{translate label="ID_MONTH_ABB_6"}</option>
<option value="7">{translate label="ID_MONTH_ABB_7"}</option>
<option value="8">{translate label="ID_MONTH_ABB_8"}</option>
<option value="9">{translate label="ID_MONTH_ABB_9"}</option>
<option value="10">{translate label="ID_MONTH_ABB_10"}</option>
<option value="11">{translate label="ID_MONTH_ABB_11"}</option>
<option value="12">{translate label="ID_MONTH_ABB_12"}</option>
</select>
</div>
<div class="span4 pull-left">
<button type="button" class="btn btn-compare btn-success pull-right btn-date">{translate label="ID_DASH_COMPARE"}</button>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="collapse" id="collapseExample">
<div class="well">
<p class="text-center">{translate label="ID_DASH_CLICK_TO_VIEW"}</p>
<p>
<!-- Split button -->
<div id="dashboardsList">
</div>
</p>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- Indicators -->
<div class="row">
<div class="indicators">
<div id="indicatorsGridStack" class="grid-stack" data-gs-width="12" data-gs-animate="no" >
<!--Here are added dynamically the Indicators-->
</div>
</div>
<!-- Details by Indicator -->
<div class="col-lg-12 col-md-12 bottom">
<div id="indicatorsDataGridStack" class="grid-stack" data-gs-width="12" data-gs-animate="no" >
<!--Here are added dynamically the Dat by indicator-->
</div>
</div>
<div id="relatedLabel" style="clear:both; visibility:hidden;">
<div>
<center><h3></h3></center>
</div>
<div>
Sort by Cost: &nbsp; &nbsp;<a id="sortListButton" class="fa fa-chevron-up fa-1x" style="color:#000;" href="#"></a>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div id="relatedDetailGridStack" class="grid-stack" data-gs-width="12"
data-gs-animate="no" style="clear:both;">
</div>
</div>
</div>
</div>
</div>
</body> </body>
</html> </html>

View File

@@ -521,7 +521,11 @@ Ext.onReady(function () {
id : 'USR_COST_BY_HOUR', id : 'USR_COST_BY_HOUR',
fieldLabel : _('ID_COST_BY_HOUR'), fieldLabel : _('ID_COST_BY_HOUR'),
xtype : 'numberfield', xtype : 'numberfield',
allowNegative: false,
decimalSeparator : '.', decimalSeparator : '.',
maskRe : /^[0-9]/i,
regex : /^[0-9]/i,
regexText : _('ID_INVALID_VALUE', _('ID_COST_BY_HOUR')),
maxLength : 13, maxLength : 13,
width : 80 width : 80
}, },

View File

@@ -6,7 +6,7 @@
<USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any" autocomplete="0"> <USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any" autocomplete="0">
<en><![CDATA[User]]></en> <en><![CDATA[User]]></en>
</USR_USERNAME> </USR_USERNAME>
<USR_EMAIL type="text" size="30" required="true" maxlength="254" autocomplete="0"> <USR_EMAIL type="text" size="30" required="true" maxlength="100" autocomplete="0">
<en><![CDATA[Email]]></en> <en><![CDATA[Email]]></en>
</USR_EMAIL> </USR_EMAIL>
<URL type="hidden"/> <URL type="hidden"/>

View File

@@ -16,7 +16,7 @@
{$form.updateButton} {$form.updateButton}
</fieldset> </fieldset>
<div class="FormRequiredTextMessage"><font color="red">* </font>Required Field</div> </div> <div class="FormRequiredTextMessage"></div>
<div class="boxBottom"><div class="a">&nbsp;</div><div class="b">&nbsp;</div><div class="c">&nbsp;</div></div> <div class="boxBottom"><div class="a">&nbsp;</div><div class="b">&nbsp;</div><div class="c">&nbsp;</div></div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">

View File

@@ -342,7 +342,7 @@
} }
else { else {
if(SYS_TARGET=="dbInfo"){ //Show dbInfo when no SYS_SYS if(SYS_TARGET=="dbInfo"){ //Show dbInfo when no SYS_SYS
$pathFile = PATH_METHODS . "login/dbInfo.php"; $pathFile = PATH_METHODS . 'login/dbInfo.php';
$pathFile = $filter->validateInput($pathFile,'path'); $pathFile = $filter->validateInput($pathFile,'path');
require_once($pathFile); require_once($pathFile);
} }
@@ -361,7 +361,7 @@
} }
} }
else { // classic sysLogin interface else { // classic sysLogin interface
$pathFile = PATH_METHODS . "login/sysLogin.php"; $pathFile = PATH_METHODS . 'login/sysLogin.php';
$pathFile = $filter->validateInput($pathFile,'path'); $pathFile = $filter->validateInput($pathFile,'path');
require_once($pathFile) ; require_once($pathFile) ;
die(); die();

View File

@@ -53,7 +53,7 @@
background-color: #e14333; background-color: #e14333;
} }
.status-indicator-medium { .status-indicator-medium {
background-color: #fada5e; background-color: #fcb322;
} }
.status-indicator-high { .status-indicator-high {
background-color: #1fbc99; background-color: #1fbc99;
@@ -87,7 +87,7 @@
.ind-title-selector { .ind-title-selector {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow:hidden; /*overflow:hidden;*/
} }
.ellipsis { .ellipsis {

View File

@@ -71,18 +71,19 @@
content: "\f065"; content: "\f065";
} }
.grid-stack-item[data-gs-width="12"] { width: 100% } .grid-stack-item[data-gs-width="12"] { width: 100%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="11"] { width: 91.66666667% } .grid-stack-item[data-gs-width="11"] { width: 91.66666667%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="10"] { width: 83.33333333% } .grid-stack-item[data-gs-width="10"] { width: 83.33333333% ; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="9"] { width: 75% } .grid-stack-item[data-gs-width="9"] { width: 75%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="8"] { width: 66.66666667% } .grid-stack-item[data-gs-width="8"] { width: 66.66666667% ; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="7"] { width: 58.33333333% } .grid-stack-item[data-gs-width="7"] { width: 58.33333333%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="6"] { width: 50% } .grid-stack-item[data-gs-width="6"] { width: 50%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="5"] { width: 41.66666667% } .grid-stack-item[data-gs-width="5"] { width: 41.66666667%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="4"] { width: 33.33333333% } .grid-stack-item[data-gs-width="4"] { width: 33.33333333%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="3"] { width: 25% } .grid-stack-item[data-gs-width="3"] { width: 25%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="2"] { width: 16.66666667% } .grid-stack-item[data-gs-width="2"] { width: 16.66666667%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="1"] { width: 8.33333333% } .grid-stack-item[data-gs-width="1"] { width: 8.33333333%; margin-bottom: 45px; }
.grid-stack-item[data-gs-x="12"] { left: 100% } .grid-stack-item[data-gs-x="12"] { left: 100% }
.grid-stack-item[data-gs-x="11"] { left: 91.66666667% } .grid-stack-item[data-gs-x="11"] { left: 91.66666667% }

View File

@@ -547,6 +547,7 @@ table.dataTable thead .sorting:after {
.indicators{ .indicators{
margin-bottom: 20px; margin-bottom: 20px;
margin-bottom: 45px;
} }
.panel-green:hover, .panel-red:hover, .panel-high:hover, .panel-low:hover{ .panel-green:hover, .panel-red:hover, .panel-high:hover, .panel-low:hover{
@@ -566,7 +567,7 @@ table.dataTable thead .sorting:after {
} }
.panel-active{ .panel-active{
background-color: #D99058; /*background-color: #D99058;*/
position: relative; position: relative;
} }
@@ -583,7 +584,7 @@ table.dataTable thead .sorting:after {
.panel-active:after { .panel-active:after {
border-color: rgba(136, 183, 213, 0); border-color: rgba(136, 183, 213, 0);
background-color: #000; /*background-color: #000;*/
border-top-color: #fff; border-top-color: #fff;
border-width: 20px; border-width: 20px;
margin-left: -20px; margin-left: -20px;
@@ -633,6 +634,7 @@ table.dataTable thead .sorting:after {
.process-div .panel-heading{ .process-div .panel-heading{
color:#606368; color:#606368;
font-size: 20px;
} }
.process-div .panel-heading a{ .process-div .panel-heading a{