Merge remote branch 'upstream/dashboards2' into dashboards2

This commit is contained in:
Marco Antonio Nina Mena
2015-04-06 11:53:37 -04:00
21 changed files with 616 additions and 451 deletions

View File

@@ -443,8 +443,16 @@ class DataBaseMaintenance
if (empty( $aTables ))
return false;
printf( "%-70s", "LOCK TABLES" );
if(is_array($aTables)) {
foreach($aTables as $k => $v) {
$aTables[$k] = mysql_real_escape_string($v);
}
}
$sQuery = "LOCK TABLES " . implode( " READ, ", $aTables ) . " READ; ";
$sQuery = $filter->preventSqlInjection($sQuery);
if (@mysql_query( $sQuery )) {
echo " [OK]\n";
return true;

View File

@@ -4819,16 +4819,37 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
}
}
$withHours = (strpos($mask, '%H') !== false || strpos($mask, '%M') !== false || strpos($mask, '%S') !== false);
$withHours = (strpos($mask, '%H') !== false || strpos($mask, '%I') !== false || strpos($mask, '%k') !== false || strpos($mask, '%l') !== false || strpos($mask, '%M') !== false || strpos($mask, '%S') !== false);
$tmp = str_replace( "%", "", $mask );
return $this->date_create_from_format($tmp, $value, $withHours);
}
/*
//Year
%Y year with the century
%y year without the century (range 00 to 99)
//Month
%m month, range 01 to 12
%B full month name
%b abbreviated month name
//Day
%d the day of the month (range 01 to 31)
%e the day of the month (range 1 to 31)
//Hour
%H hour, range 00 to 23 (24h format)
%I hour, range 01 to 12 (12h format)
%k hour, range 0 to 23 (24h format)
%l hour, range 1 to 12 (12h format)
//Min
%M minute, range 00 to 59
//Sec
%S seconds, range 00 to 59
*/
function date_create_from_format( $dformat, $dvalue, $withHours = false )
{
$schedule = $dvalue;
$schedule_format = str_replace(array('Y','m','d','H','M','S'),array('%Y','%m','%d','%H','%M','%S') ,$dformat);
$schedule_format = str_replace(array('Y','y','m','B','b','d','e','H','I','k','l','M','S'),array('%Y','%y','%m','%B','%b','%d','%e','%H','%I','%k','%l','%M','%S') ,$dformat);
$ugly = strptime($schedule, $schedule_format);
$ymd = sprintf(
'%04d-%02d-%02d %02d:%02d:%02d',

View File

@@ -244,7 +244,7 @@ class Creole {
try {
$obj->connect($dsninfo, $flags);
} catch(SQLException $sqle) {
$sqle->setUserInfo($dsninfo);
$sqle->setUserInfo((isset($dsninfo["username"]))? $dsninfo["username"] : "");
throw $sqle;
}
$persistent = ($flags & Creole::PERSISTENT) === Creole::PERSISTENT;

View File

@@ -70,6 +70,17 @@ class PgSQLTableInfo extends TableInfo {
// Get the columns, types, etc.
// Based on code from pgAdmin3 (http://www.pgadmin.org/)
$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();
$this->oid = $filter->validateInput($this->oid, 'int');
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT
att.attname,
att.atttypmod,
@@ -203,6 +214,17 @@ class PgSQLTableInfo extends TableInfo {
{
throw new SQLException ("Invalid domain name [" . $strDomain . "]");
} // if (strlen (trim ($strDomain)) < 1)
$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();
$strDomain = $filter->validateInput($strDomain);
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT
d.typname as domname,
b.typname as basetype,
@@ -243,6 +265,16 @@ class PgSQLTableInfo extends TableInfo {
protected function initForeignKeys()
{
include_once 'creole/metadata/ForeignKeyInfo.php';
$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();
$this->oid = $filter->validateInput($this->oid, 'int');
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT
conname,
@@ -328,6 +360,16 @@ class PgSQLTableInfo extends TableInfo {
// columns have to be loaded first
if (!$this->colsLoaded) $this->initColumns();
$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();
$this->oid = $filter->validateInput($this->oid, 'int');
$result = pg_query ($this->conn->getResource(), sprintf ("SELECT
DISTINCT ON(cls.relname)
@@ -343,6 +385,16 @@ class PgSQLTableInfo extends TableInfo {
if (!$result) {
throw new SQLException("Could not list indexes keys for table: " . $this->name, pg_last_error($this->conn->getResource()));
}
$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();
$this->oid = $filter->validateInput($this->oid);
while($row = pg_fetch_assoc($result)) {
$name = $row["idxname"];
@@ -353,6 +405,8 @@ class PgSQLTableInfo extends TableInfo {
$arrColumns = explode (' ', $row['indkey']);
foreach ($arrColumns as $intColNum)
{
$intColNum = $filter->validateInput($intColNum, 'int');
$result2 = pg_query ($this->conn->getResource(), sprintf ("SELECT a.attname
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
@@ -380,6 +434,16 @@ class PgSQLTableInfo extends TableInfo {
// Primary Keys
$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();
$this->oid = $filter->validateInput($this->oid);
$result = pg_query($this->conn->getResource(), sprintf ("SELECT
DISTINCT ON(cls.relname)
cls.relname as idxname,
@@ -395,11 +459,24 @@ class PgSQLTableInfo extends TableInfo {
// Loop through the returned results, grouping the same key_name together
// adding each column for that key.
$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();
$this->oid = $filter->validateInput($this->oid);
while($row = pg_fetch_assoc($result)) {
$arrColumns = explode (' ', $row['indkey']);
foreach ($arrColumns as $intColNum)
{
$intColNum = $filter->validateInput($intColNum, 'int');
$result2 = pg_query ($this->conn->getResource(), sprintf ("SELECT a.attname
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

View File

@@ -103,13 +103,23 @@ class SQLiteTableInfo extends TableInfo {
include_once 'creole/metadata/IndexInfo.php';
// columns have to be loaded first
if (!$this->colsLoaded) $this->initColumns();
if (!$this->colsLoaded) $this->initColumns();
$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();
$sql = "PRAGMA index_list('".$this->name."')";
$res = sqlite_query($this->conn->getResource(), $sql);
while($row = sqlite_fetch_array($res, SQLITE_ASSOC)) {
$name = $row['name'];
$name = $filter->validateInput($name);
$this->indexes[$name] = new IndexInfo($name);
// get columns for that index

View File

@@ -451,6 +451,17 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
}
$plist = implode(" ", $params);
$cmd = "$php -C -d include_path=$cwd$ps$ip -f $run_tests -- $plist";
$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();
$cmd = $filter->validateInput($cmd);
system($cmd);
return true;
}

View File

@@ -6,6 +6,7 @@ class ConsolidatedCases
{
function saveConsolidated ($data)
{
$status = $data['con_status'];
$sTasUid = $data['tas_uid'];
$sDynUid = $data['dyn_uid'];
$sProUid = $data['pro_uid'];
@@ -14,11 +15,21 @@ class ConsolidatedCases
$title = $data['title'];
if ($sRepTabUid != '') {
if (!$status) {
$oCaseConsolidated = new CaseConsolidated();
$oCaseConsolidated = CaseConsolidatedPeer::retrieveByPK($sTasUid);
if (!(is_object($oCaseConsolidated)) || get_class($oCaseConsolidated) != 'CaseConsolidated') {
$oCaseConsolidated = new CaseConsolidated();
$oCaseConsolidated->setTasUid($sTasUid);
$oCaseConsolidated->setConStatus('INACTIVE');
$oCaseConsolidated->save();
}
return 1;
}
$rptUid = null;
$criteria = new Criteria();
$criteria->addSelectColumn(ReportTablePeer::REP_TAB_UID);
$criteria->add(ReportTablePeer::REP_TAB_NAME, $tableName);
$criteria->add(ReportTablePeer::REP_TAB_UID, $sRepTabUid);
$rsCriteria = ReportTablePeer::doSelectRS($criteria);
if ($rsCriteria->next()) {
@@ -39,6 +50,7 @@ class ConsolidatedCases
@unlink($sPath . PATH_SEP . 'map' . PATH_SEP . $sClassName . 'MapBuilder.php');
@unlink($sPath . PATH_SEP . 'om' . PATH_SEP . 'Base' . $sClassName . '.php');
@unlink($sPath . PATH_SEP . 'om' . PATH_SEP . 'Base' . $sClassName . 'Peer.php');
$sRepTabUid = '';
}

View File

@@ -97,7 +97,6 @@ class indicatorsCalculator
$connection = $this->pdoConnection();
$result = $this->pdoExecutorWithConnection($sqlString, array(), $connection);
$result2 = $this->pdoExecutorWithConnection("select @median", array(), $connection);
print_r($result2);
if (sizeof($result) > 0) {
$returnValue = current(reset($result2));
}
@@ -374,29 +373,60 @@ class indicatorsCalculator
'$graph2' as graph2Type,
'$freq2' as frequency2Type,";
$params = Array();
switch ($indicatorType) {
//process inefficience
case "1020":
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_TIME_BY_TASK) / SUM(CONFIGURED_TASK_TIME) as value";
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
, $indicatorProcessId, $periodicity
, $initDate, $endDate
, $calcField, $params);
break;
//employee inefficience
case "1040":
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_TIME_BY_TASK) / SUM(CONFIGURED_TASK_TIME) as value";
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
, $indicatorProcessId, $periodicity
, $initDate, $endDate
, $calcField, $params);
break;
//overdue
case "1050":
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_OVERDUE) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
, $indicatorProcessId, $periodicity
, $initDate, $endDate
, $calcField, $params);
break;
//new cases
case "1060":
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_IN) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
, $indicatorProcessId, $periodicity
, $initDate, $endDate
, $calcField, $params);
break;
//completed
case "1070":
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_OUT) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
, $indicatorProcessId, $periodicity
, $initDate, $endDate
, $calcField, $params);
break;
case "1080":
$calcField = "$graphConfigurationString 100 * SUM(TOTAL_CASES_OPEN) / SUM(TOTAL_CASES_ON_TIME + TOTAL_CASES_OVERDUE) as value";
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
, $indicatorProcessId, $periodicity
, $initDate, $endDate
, $calcField, $params);
break;
default:
throw new Exception(" The indicator id '$indicatorId' with type $indicatorType hasn't an associated operation.");
}
$params = Array();
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::PROCESS
, $indicatorProcessId, $periodicity
, $initDate, $endDate
, $calcField, $params);
$retval = $this->pdoExecutor($sqlString, $params);
//$returnValue = $this->propelExecutor($sqlString);
return $retval;
@@ -477,38 +507,7 @@ class indicatorsCalculator
return $retval;
}
/*private function propelExecutor($sqlString) {
$con = Propel::getConnection(self::$connectionName);
$qry = $con->PrepareStatement($sqlString);
try {
$dataSet = $qry->executeQuery();
} catch (Exception $e) {
throw new Exception("Can't execute query " . $sqlString);
}
$rows = Array();
while ($dataSet->next()) {
$rows[] = $dataSet->getRow();
}
return $rows;
}
*/
private function pdoExecutor($sqlString, $params) {
/*G::loadClass('wsTools');
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
$workSpace = new workspaceTools($currentWS);
$host = $workSpace->dbHost;
$db = $workSpace->dbName;
$user = $workSpace->dbUser;
$pass = $workSpace->dbPass;
$dbh = new PDO("mysql:host=".$host.";dbname=$db;charset=utf8", $user, $pass);
$statement = $dbh->prepare($sqlString);
$statement->execute($params);
$result = $statement->fetchAll(PDO::FETCH_ASSOC); */
$connection = $this->pdoConnection ();
$result = $this->pdoExecutorWithConnection($sqlString, $params, $connection);
@@ -519,11 +518,15 @@ class indicatorsCalculator
G::loadClass('wsTools');
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
$workSpace = new workspaceTools($currentWS);
$host = $workSpace->dbHost;
$db = $workSpace->dbName;
$arrayHost = split(":", $workSpace->dbHost);
$host = "host=".$arrayHost[0];
$port = count($arrayHost) > 1 ? ";port=".$arrayHost[1] : "";
$db = ";dbname=".$workSpace->dbName;
$user = $workSpace->dbUser;
$pass = $workSpace->dbPass;
$dbh = new PDO("mysql:host=".$host.";dbname=$db;charset=utf8", $user, $pass);
$connString = "mysql:$host$port$db;";
$dbh = new PDO($connString, $user, $pass);
return $dbh;
}
@@ -618,11 +621,12 @@ class indicatorsCalculator
}
public function interpolateQuery($query, $params) {
/* For debug only:
* public function interpolateQuery($query, $params) {
$keys = array();
# build a regular expression for each parameter
foreach ($params as $key => $value) {
echo "<br>llave", $key, " -- valor", $value;
echo "<br>key", $key, " -- value", $value;
if (is_string($key)) {
$keys[] = '/:'.$key.'/';
} else {
@@ -631,7 +635,7 @@ class indicatorsCalculator
}
$query = preg_replace($keys, $params, $query, 1, $count);
return $query;
}
}*/
}

File diff suppressed because it is too large Load Diff

View File

@@ -322,7 +322,7 @@ class Installer extends Controller
if (is_dir( $aux['dirname'] )) {
if (! file_exists( $_REQUEST['pathLogFile'] )) {
@file_put_contents( $_REQUEST['pathLogFile'], '' );
chmod($_REQUEST['pathShared'], 0770);
@chmod($_REQUEST['pathShared'], 0770);
}
}
}

View File

@@ -255,7 +255,7 @@
//Items by each type:
var proEffic = '<div class="col-lg-3 col-md-6 dashPro" id="proEfficItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="proGreen panel panel-green grid-stack-item-content">\
<div class="proGreen 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">\
@@ -273,7 +273,7 @@
</div>';
var userEffic = '<div class="col-lg-3 col-md-6 dashUsr" id="userEfficItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="proRed panel panel-red grid-stack-item-content">\
<div class="proRed panel panel-red grid-stack-item-content" style="min-width: 200px;">\
<a data-toggle="collapse" href="#userefficiency" aria-expanded="false" aria-controls="userefficiency">\
<div class="panel-heading">\
<div class="row">\
@@ -291,7 +291,7 @@
</div>';
var compCases = '<div class="col-lg-3 col-md-6" id="generalLowItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="panel ie-panel panel-primary grid-stack-item-content">\
<div class="panel ie-panel panel-primary grid-stack-item-content" style="min-width: 200px;">\
<a data-toggle="collapse" href="#completedcases" aria-expanded="false" aria-controls="completedcases">\
<div class="panel-heading">\
<div class="row">\
@@ -312,7 +312,7 @@
</div>';
var numCases = '<div class="col-lg-3 col-md-6" id="generalGreatItem" data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">\
<div class="panel ie-panel panel-yellow grid-stack-item-content">\
<div class="panel ie-panel panel-yellow grid-stack-item-content" style="min-width: 200px;">\
<a data-toggle="collapse" href="#numbercases" aria-expanded="false" aria-controls="numbercases">\
<div class="panel-heading">\
<div class="row">\
@@ -333,11 +333,44 @@
</div>';
//Data by Indicator elements:
var proEfficDataGen = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true" style="height:auto;"><div class="panel-heading greenbg"><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></div><div class="text-center huge"><div class="col-xs-3 vcenter"><div id="proEfficIndex" class="green">26%</div><div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div></div><div class="col-xs-3 vcenter"><div id="proEfficCost" class="red">$1813.50</div><div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div></div><div class="col-xs-6" id="proEfficGenGraph" style="width:500px;height:300px; margin-left:80px;"><img src="../dist/img/graph.png"/></div></div><div class="clearfix"></div></div>';
var proEfficDataGen = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">\
<div class="panel-heading greenbg"><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></div>\
<div class="text-center huge">\
<div class="col-xs-3 vcenter">\
<div id="proEfficIndex" class="green">26%</div>\
<div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div>\
</div>\
<div class="col-xs-3 vcenter">\
<div id="proEfficCost" class="red">$1813.50</div>\
<div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div>\
</div>\
<div class="col-xs-6" id="proEfficGenGraph" style="width:500px;height:300px; margin-left:80px;"><img src="../dist/img/graph.png" /></div>\
</div>\
<div class="clearfix"></div>\
</div>';
var proEfficData = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true"><div class="panel-heading greenbg"><ol class="breadcrumb"><li><a id="link" href="javascript:back();"><i class="fa fa-chevron-left fa-fw"></i><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></a></li><li id="proDetName">Process 1 name</li></ol></div><div class="text-center huge"><div class="col-xs-3 vcenter"><div id="proEfficIndex" class="green">26%</div><div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div></div><div class="col-xs-3 vcenter"><div id="proEfficCost" class="red">$1813.50</div><div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div></div><div class="col-xs-6" id="proEfficGraph" style="width:570px; height:300px; margin-left:70px; "><img src="../dist/img/graph.png"/></div></div><div class="clearfix"></div></div>';
var proEfficData = '<div class="process-div well" id="proEfficiencyData" data-gs-no-resize="true" style="clear:both;position:relative;">\
<div class="panel-heading greenbg">\
<ol class="breadcrumb">\
<li><a id="link" href="javascript:back();"><i class="fa fa-chevron-left fa-fw"></i><span id="proEfficTitle"> '+ G_STRING.ID_PRO_EFFICIENCY_INDEX +' </span></a></li>\
<li id="proDetName">Process 1 name</li>\
</ol>\
</div>\
<div class="text-center huge">\
<div class="col-xs-3 vcenter">\
<div id="proEfficIndex" class="green">26%</div>\
<div class="small grey">'+ G_STRING.ID_EFFICIENCY_INDEX +'</div>\
</div>\
<div class="col-xs-3 vcenter">\
<div id="proEfficCost" class="red">$1813.50</div>\
<div class="small grey">'+ G_STRING.ID_INEFFICIENCY_COST +'</div>\
</div>\
<div class="col-xs-6" id="proEfficGraph" style="width:570px; height:300px; margin-left:70px; "><img src="../dist/img/graph.png" /></div>\
</div>\
<div class="clearfix"></div>\
</div>';
var proEfficDetail = '<div id="process" class="process-div well hideme" data-gs-no-resize="true">\
var proEfficDetail = '<div id="process" class="process-div well hideme" data-gs-no-resize="true" style="clear:both;position:relative;">\
<div class="col-lg-12 vcenter-task">\
<a href="#" class="process-button">\
<div class="col-xs-3 text-left title-process">\
@@ -402,11 +435,32 @@
</div>\
</div>';
var generalDataLow = '<div class="process-div well" data-gs-no-resize="true"><div class="panel-heading bluebg"><ol class="breadcrumb"><li id="generalLowTitle">'+ G_STRING.ID_COMPLETED_CASES +'</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>';
var generalDataLow = '<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 id="generalLowTitle">'+ G_STRING.ID_COMPLETED_CASES +'</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>';
var generalDataGreat = ' <div class="process-div well" data-gs-no-resize="true"><div class="panel-heading yellowbg"><ol class="breadcrumb"><li id="generalGreatTitle">'+ G_STRING.ID_NUMBER_CASES +'</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>';
var generalDataGreat = '<div class="process-div well" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">\
<div class="panel-heading yellowbg">\
<ol class="breadcrumb">\
<li id="generalGreatTitle">'+ G_STRING.ID_NUMBER_CASES +'</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>';
var oType;
var actualDashId;
@@ -1006,6 +1060,8 @@
var widget = userEffic;
var id = "userEffic";
break;
case "1020":
case "1040":
case "1050":
case "1060":
case "1070":

View File

@@ -1134,222 +1134,4 @@ class DynaForm
throw $e;
}
}
/**
* download file *.po
*
* @param string $projectUid Unique id of Project
* @param string $dynaFormUid Unique id of DynaForm
*
* return
*/
public function downloadLanguage($projectUid, $dynaFormUid, $lang)
{
try {
$dynaForm = new \Dynaform();
$arraydata = $dynaForm->Load($dynaFormUid);
$data = \G::json_decode($arraydata["DYN_LABEL"]);
$string = "";
$string = $string . "msgid \"\"\n";
$string = $string . "msgstr \"\"\n";
foreach ($data->{$lang} as $key => $value) {
if (is_string($value)) {
$string = $string . "\"" . $key . ":" . $value . "\\n\"\n";
}
}
$string = $string . "\n";
foreach ($data->{$lang}->Labels as $key => $value) {
$string = $string . "msgid \"" . $value->msgid . "\"\n";
$string = $string . "msgstr \"" . $value->msgstr . "\"\n\n";
}
return array("labels" => $string, "lang" => $lang);
} catch (\Exception $e) {
throw $e;
}
}
/**
* upload file *.po
*
* @param string $projectUid Unique id of Project
* @param string $dynaFormUid Unique id of DynaForm
*
* return
*/
public function uploadLanguage($projectUid, $dynaFormUid)
{
try {
if (isset($_FILES["LANGUAGE"]) && pathinfo($_FILES["LANGUAGE"]["name"], PATHINFO_EXTENSION) == "po") {
$translation = array();
\G::LoadSystem('i18n_po');
$i18n = new \i18n_PO($_FILES["LANGUAGE"]["tmp_name"]);
$i18n->readInit();
while ($rowTranslation = $i18n->getTranslation()) {
array_push($translation, $rowTranslation);
}
$name = $_FILES["LANGUAGE"]["name"];
$name = explode(".", $name);
$content = $i18n->getHeaders();
$content["File-Name"] = $_FILES["LANGUAGE"]["name"];
$content["Labels"] = $translation;
$dynaForm = new \Dynaform();
$arraydata = $dynaForm->Load($dynaFormUid);
if ($arraydata["DYN_LABEL"] !== null && $arraydata["DYN_LABEL"] !== "") {
$dyn_labels = \G::json_decode($arraydata["DYN_LABEL"]);
} else {
$dyn_labels = new \stdClass();
}
$dyn_labels->$name[count($name) - 2] = $content;
$arraydata["DYN_LABEL"] = \G::json_encode($dyn_labels);
$dynaForm->update($arraydata);
return $dyn_labels;
} else {
throw new \Exception(\G::LoadTranslation("ID_DYNAFORM_INCORRECT_FILE_NAME"));
}
} catch (\Exception $e) {
throw $e;
}
}
/**
* list file .po
*
* @param string $projectUid Unique id of Project
* @param string $dynaFormUid Unique id of DynaForm
*
* return
*/
public function listLanguage($projectUid, $dynaFormUid)
{
try {
$list = array();
$dynaForm = new \Dynaform();
$arraydata = $dynaForm->Load($dynaFormUid);
if ($arraydata["DYN_LABEL"] === null || $arraydata["DYN_LABEL"] === "")
return $list;
$dyn_labels = \G::json_decode($arraydata["DYN_LABEL"]);
foreach ($dyn_labels as $key => $value) {
array_push($list, array(
"Lang" => $key,
"File-Name" => isset($value->{"File-Name"}) ? $value->{"File-Name"} : "",
"Project-Id-Version" => isset($value->{"Project-Id-Version"}) ? $value->{"Project-Id-Version"} : "",
"POT-Creation-Date" => isset($value->{"POT-Creation-Date"}) ? $value->{"POT-Creation-Date"} : "",
"PO-Revision-Date" => isset($value->{"PO-Revision-Date"}) ? $value->{"PO-Revision-Date"} : "",
"Last-Translator" => isset($value->{"Last-Translator"}) ? $value->{"Last-Translator"} : "",
"Language-Team" => isset($value->{"Language-Team"}) ? $value->{"Language-Team"} : "",
"MIME-Version" => isset($value->{"MIME-Version"}) ? $value->{"MIME-Version"} : "",
"Content-Type" => isset($value->{"Content-Type"}) ? $value->{"Content-Type"} : "",
"Content-Transfer_Encoding" => isset($value->{"Content-Transfer_Encoding"}) ? $value->{"Content-Transfer_Encoding"} : "",
"X-Poedit-Language" => isset($value->{"X-Poedit-Language"}) ? $value->{"X-Poedit-Language"} : "",
"X-Poedit-Country" => isset($value->{"X-Poedit-Country"}) ? $value->{"X-Poedit-Country"} : "",
"X-Poedit-SourceCharset" => isset($value->{"X-Poedit-SourceCharset"}) ? $value->{"X-Poedit-SourceCharset"} : "",
"Content-Transfer-Encoding" => isset($value->{"Content-Transfer-Encoding"}) ? $value->{"Content-Transfer-Encoding"} : ""
));
}
return $list;
} catch (\Exception $e) {
throw $e;
}
}
/**
* list file .po
*
* @param string $projectUid Unique id of Project
* @param string $dynaFormUid Unique id of DynaForm
*
* return
*/
public function downloadLabels($projectUid, $dynaFormUid)
{
try {
$dynaForm = new \Dynaform();
$arraydata = $dynaForm->Load($dynaFormUid);
if ($arraydata["DYN_CONTENT"] !== null && $arraydata["DYN_CONTENT"] !== "") {
$json = \G::json_decode($arraydata["DYN_CONTENT"]);
$this->jsonr($json);
}
$string = "";
$string = $string . "msgid \"\"\n";
$string = $string . "msgstr \"\"\n";
$string = $string . "\"Project-Id-Version: PM 4.0.1\\n\"\n";
$string = $string . "\"POT-Creation-Date: \\n\"\n";
$string = $string . "\"PO-Revision-Date: 2010-12-02 11:44+0100 \\n\"\n";
$string = $string . "\"Last-Translator: Colosa<colosa@colosa.com>\\n\"\n";
$string = $string . "\"Language-Team: Colosa Developers Team <developers@colosa.com>\\n\"\n";
$string = $string . "\"MIME-Version: 1.0\\n\"\n";
$string = $string . "\"Content-Type: text/plain; charset=utf-8\\n\"\n";
$string = $string . "\"Content-Transfer_Encoding: 8bit\\n\"\n";
$string = $string . "\"X-Poedit-Language: English\\n\"\n";
$string = $string . "\"X-Poedit-Country: United States\\n\"\n";
$string = $string . "\"X-Poedit-SourceCharset: utf-8\\n\"\n";
$string = $string . "\"Content-Transfer-Encoding: 8bit\\n\"\n\n";
$n = count($this->dyn_conten_labels);
for ($i = 0; $i < $n; $i++) {
$string = $string . "msgid \"" . $this->dyn_conten_labels[$i] . "\"\n";
$string = $string . "msgstr \"" . $this->dyn_conten_labels[$i] . "\"\n\n";
}
return array("labels" => $string, "lang" => "en");
} catch (\Exception $e) {
throw $e;
}
}
private $dyn_conten_labels = array();
/**
* labels in dyn_content
*
* @param array $dyn_content
*/
private function jsonr(&$json)
{
foreach ($json as $key => $value) {
$sw1 = is_array($value);
$sw2 = is_object($value);
if ($sw1 || $sw2) {
$this->jsonr($value);
}
if (!$sw1 && !$sw2) {
if ($key === "label") {
$json->label;
array_push($this->dyn_conten_labels, $json->label);
}
}
}
}
/**
* delete labels
*
* @param string $projectUid Unique id of Project
* @param string $dynaFormUid Unique id of DynaForm
*
* return
*/
public function deleteLanguage($projectUid, $dynaFormUid, $lang)
{
try {
$dynaForm = new \Dynaform();
$arraydata = $dynaForm->Load($dynaFormUid);
if ($arraydata["DYN_LABEL"] !== null && $arraydata["DYN_LABEL"] !== "") {
$dyn_labels = \G::json_decode($arraydata["DYN_LABEL"]);
unset($dyn_labels->{$lang});
}
$arraydata["DYN_LABEL"] = \G::json_encode($dyn_labels);
$dynaForm->update($arraydata);
return;
} catch (\Exception $e) {
throw $e;
}
}
}

View File

@@ -387,6 +387,7 @@ class Task
G::LoadClass("consolidatedCases");
$consolidated = new \ConsolidatedCases();
$dataConso = array(
'con_status' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_enable'],
'tas_uid' => $arrayProperty['TAS_UID'],
'dyn_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'],
'pro_uid' => $arrayProperty['PRO_UID'],
@@ -395,7 +396,6 @@ class Task
'title' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_title']
);
$consolidated->saveConsolidated($dataConso);
}
$arrayResult["status"] = "OK";

View File

@@ -1060,7 +1060,7 @@ class User
}
}
}
$oCriteria->add(\UsersPeer::USR_STATUS, 'CLOSED', \Criteria::ALT_NOT_EQUAL);
$oCriteria->add(\UsersPeer::USR_STATUS, "ACTIVE", \Criteria::EQUAL);
$oDataset = \UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {

View File

@@ -494,30 +494,12 @@ class Variable
$process->throwExceptionIfNotExistsProcess($processUid, strtolower("PRJ_UID"));
//Set data
$variableDbConnectionUid = "";
$variableSql = "";
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_DBCONNECTION);
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_SQL);
$criteria->add(\ProcessVariablesPeer::PRJ_UID, $processUid, \Criteria::EQUAL);
$criteria->add(\ProcessVariablesPeer::VAR_NAME, $variableName, \Criteria::EQUAL);
$rsCriteria = \ProcessVariablesPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
if ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$variableDbConnectionUid = $row["VAR_DBCONNECTION"];
$variableSql = strtoupper($row["VAR_SQL"]);
} else {
throw new \Exception(G::LoadTranslation("ID_PROCESS_VARIABLE_DOES_NOT_EXIST", array("VAR_NAME", $variableName)));
}
//Verify data
$this->throwExceptionIfSomeRequiredVariableSqlIsMissingInVariables($variableName, $variableSql, $arrayVariable);
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$field = $pmDynaform->searchField($arrayVariable["dyn_uid"], $arrayVariable["field_id"]);
$variableDbConnectionUid = $field !== null ? $field->dbConnection : "";
$variableSql = $field !== null ? $field->sql : "";
//Get data
$_SESSION["PROCESS"] = $processUid;
@@ -533,7 +515,7 @@ class Variable
$arrayRecord[] = array(
strtolower("VALUE") => $row[0],
strtolower("TEXT") => $row[1]
strtolower("TEXT") => isset($row[1]) ? $row[1] : $row[0]
);
}

View File

@@ -122,13 +122,12 @@ class DynaForm extends Api
public function doGetDynaFormLanguage($dyn_uid, $prj_uid, $lang)
{
try {
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$response = $dynaForm->downloadLanguage($prj_uid, $dyn_uid, $lang);
return $response;
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
return $pmDynaform->downloadLanguage($dyn_uid, $lang);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
}
/**
@@ -140,10 +139,9 @@ class DynaForm extends Api
public function doPostDynaFormLanguage($dyn_uid, $prj_uid)
{
try {
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$response = $dynaForm->uploadLanguage($prj_uid, $dyn_uid);
return $response;
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$pmDynaform->uploadLanguage($dyn_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -158,10 +156,9 @@ class DynaForm extends Api
public function doDeleteDynaFormLanguage($dyn_uid, $prj_uid, $lang)
{
try {
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$response = $dynaForm->deleteLanguage($prj_uid, $dyn_uid, $lang);
return $response;
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$pmDynaform->deleteLanguage($dyn_uid, $lang);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -176,33 +173,12 @@ class DynaForm extends Api
public function doGetListDynaFormLanguage($dyn_uid, $prj_uid)
{
try {
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$response = $dynaForm->listLanguage($prj_uid, $dyn_uid);
return $response;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* @url GET /:prj_uid/dynaform/:dyn_uid/download-labels
*
* @param string $dyn_uid {@min 32}{@max 32}
* @param string $prj_uid {@min 32}{@max 32}
*/
public function doGetListDynaFormLabels($dyn_uid, $prj_uid)
{
try {
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$response = $dynaForm->downloadLabels($prj_uid, $dyn_uid);
return $response;
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
return $pmDynaform->listLanguage($dyn_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
}

View File

@@ -83,7 +83,7 @@
<div class="head"></div>
<nav>
<ul>
<li><a href="#" ><span class="mafe-button-close" ></span></a></li>
<li><a class="mafe-close" href="#" ><span class="mafe-button-close" ></span></a></li>
<li class="mafe-save-process"><a href="#" class="mafe-button-save"></a></li>
<li><a href="#" class="mafe-button-export-process"></a></li>
<li><a class="mafe-button-export-bpmn-process"></a></li>

View File

@@ -601,13 +601,7 @@ function saveProcess()
if (projectType == 'classicProject') {
location.href = 'processes_Map?PRO_UID='+resp.result.PRO_UID;
} else {
if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Trident") != -1)) {
winDesigner = window.open("../designer?prj_uid=" + resp.result.PRO_UID, 'winDesigner');
Ext.getCmp('newProjectWin').close();
processesGrid.store.reload();
} else {
location.href = '../designer?prj_uid=' + resp.result.PRO_UID;
}
openWindowIfIE('../designer?prj_uid=' + resp.result.PRO_UID);
}
},
failure: function(obj, resp) {
@@ -656,12 +650,7 @@ editProcess = function(typeParam)
} else {
url = 'processes_Map?PRO_UID=' + pro_uid;
}
if ( ((navigator.userAgent.indexOf("MSIE")!=-1) || (navigator.userAgent.indexOf("Trident")!=-1)) && (type == "bpmn") ) {
winDesigner = window.open(url, 'winDesigner');
} else {
location.href = url;
}
openWindowIfIE(url);
}
editNewProcess = function(){
@@ -870,6 +859,7 @@ importProcessExistGroup = function()
var processFileType = importProcessGlobal.processFileType;
var w = new Ext.Window({
id : 'importProcessExistGroupWindow',
title : _('ID_IMPORT_PROCESS') + processFileTypeTitle,
header : false,
width : 460,
@@ -966,13 +956,7 @@ importProcessExistGroup = function()
var sNewProUid = resp_.sNewProUid;
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Trident") != -1)) {
winDesigner = window.open("../designer?prj_uid=" + sNewProUid, 'winDesigner');
w.close();
processesGrid.store.reload();
} else {
window.location.href = "../designer?prj_uid=" + sNewProUid;
}
openWindowIfIE("../designer?prj_uid=" + sNewProUid);
} else {
window.location.href = "processes_Map?PRO_UID=" + sNewProUid;
}
@@ -1012,6 +996,7 @@ importProcessExistProcess = function()
var proFileName = importProcessGlobal.proFileName;
var w = new Ext.Window({
id : 'importProcessExistProcessWindow',
title : _('ID_IMPORT_PROCESS') + processFileTypeTitle,
header : false,
width : 460,
@@ -1115,14 +1100,7 @@ importProcessExistProcess = function()
if (resp_.ExistGroupsInDatabase == 0) {
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Trident") != -1)) {
winDesigner = window.open("../designer?prj_uid=" + sNewProUid,'winDesigner');
Ext.getCmp('importProcessWindow').close();
w.close();
processesGrid.store.reload();
} else {
window.location.href = "../designer?prj_uid=" + sNewProUid;
}
openWindowIfIE("../designer?prj_uid=" + sNewProUid);
} else {
window.location.href = "processes_Map?PRO_UID=" + sNewProUid;
}
@@ -1263,13 +1241,7 @@ importProcess = function()
var sNewProUid = resp_.sNewProUid;
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Trident") != -1)) {
winDesigner = window.open("../designer?prj_uid=" + sNewProUid,"winDesigner");
w.close();
processesGrid.store.reload();
} else {
window.location.href = "../designer?prj_uid=" + sNewProUid;
}
openWindowIfIE("../designer?prj_uid=" + sNewProUid);
} else {
window.location.href = "processes_Map?PRO_UID=" + sNewProUid;
}
@@ -1334,6 +1306,7 @@ importProcess = function()
}
var windowbpmnoption = new Ext.Window({
id: 'windowBpmnOptionWindow',
title: _('ID_IMPORT_PROCESS'),
header: false,
width: 420,
@@ -1507,3 +1480,31 @@ Ext.EventManager.on(window, 'beforeunload', function () {
if (winDesigner)
winDesigner.close();
});
function openWindowIfIE(pathDesigner) {
if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Trident") != -1)) {
if (Ext.getCmp('newProjectWin'))
Ext.getCmp('newProjectWin').close();
if (Ext.getCmp('importProcessWindow'))
Ext.getCmp('importProcessWindow').close();
if (Ext.getCmp('importProcessExistGroupWindow'))
Ext.getCmp('importProcessExistGroupWindow').close();
if (Ext.getCmp('importProcessExistProcessWindow'))
Ext.getCmp('importProcessExistProcessWindow').close();
if (Ext.getCmp('windowBpmnOptionWindow'))
Ext.getCmp('windowBpmnOptionWindow').close();
processesGrid.store.reload();
if (winDesigner && winDesigner.closed === false) {
if (winDesigner.window.PMDesigner.project.isDirty()) {
Ext.Msg.alert(_('ID_REFRESH_LABEL'), _('ID_UNSAVED_TRIGGERS_WINDOW'));
} else {
winDesigner = window.open(pathDesigner, 'winDesigner');
}
} else {
winDesigner = window.open(pathDesigner, 'winDesigner');
}
return;
}
location.href = pathDesigner;
}

View File

@@ -209,7 +209,8 @@ Ext.onReady( function() {
store: store,
displayInfo: true,
displayMsg: _('ID_GRID_PAGE_DISPLAYING_0WNER_MESSAGE') + '&nbsp; &nbsp; ',
emptyMsg: _('ID_GRID_PAGE_NO_OWNER_MESSAGE'),
//emptyMsg: _('ID_GRID_PAGE_NO_OWNER_MESSAGE')
emptyMsg: ''
});
cmodel = new Ext.grid.ColumnModel({
@@ -517,7 +518,7 @@ Ext.onReady( function() {
Ext.MessageBox.show({
title: _('ID_CONFIRM'),
msg: _('ID_DELETE_INDICATOR_SURE'),
buttons: Ext.MessageBox.YESNOCANCEL,
buttons: Ext.MessageBox.YESNO,
fn: function(buttonId) {
switch(buttonId) {
case 'no':
@@ -532,9 +533,6 @@ Ext.onReady( function() {
tabActivate.remove(component.id);
tabPanel.remove(component);
break;
case 'cancel':
flag = true;
break;
}
},
scope: that
@@ -803,6 +801,7 @@ var addTab = function (flag) {
selectOnFocus : true,
typeAhead : true,
autocomplete : true,
width : 90,
triggerAction : 'all',
mode : 'local',
allowBlank : false,
@@ -823,7 +822,16 @@ var addTab = function (flag) {
maskRe : /([0-9\.]+)$/,
maxLength : 9,
width : 80,
allowBlank : false
allowBlank : false,
listeners : {
focus : function(tb, e) {
Ext.QuickTips.register({
target: tb,
title: _('ID_HELP'),
text: _('ID_GOAL_HELP')
});
}
}
}
],
listeners:
@@ -1070,7 +1078,7 @@ var saveDashboard = function () {
var saveAllIndicators = function (DAS_UID) {
for (var tab in tabActivate) {
if (tab == 'remove') {
if (tab == 'remove' || tab == 'indexOf' || tab == 'map') {
continue;
}
tabPanel.getItem(tabActivate[tab]).show();
@@ -1085,12 +1093,12 @@ var saveAllIndicators = function (DAS_UID) {
for (var index in fieldsTab) {
var node = fieldsTab[index];
if (index == 'remove') {
if (index == 'remove' || index == 'map') {
continue;
}
id = node.id;
if (id.indexOf('fieldSet_') != -1 ) {
if (typeof id == 'undefined' || id.indexOf('fieldSet_') != -1 ) {
continue;
}
id = id.split('_');

View File

@@ -38,7 +38,6 @@
G_STRING['{$index}'] = "{$option}";
{/foreach}
</script>
<script type="text/javascript" src="/jscore/strategicDashboard/dashboardProxyTest.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/dashboard.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/dashboardProxy.js"></script>
</head>
@@ -56,37 +55,47 @@
<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">
<h5 class="pull-left">{translate label="ID_DASH_COMPARE_MONTH"}:</h5>
<button type="button" class="btn btn-compare btn-success pull-right btn-date">{translate label="ID_DASH_COMPARE"}</button>
<div class="pull-right dashboard-right container-fluid">
<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>
<div class="row pull-left">
<div class="span4 pull-left">
<h5 class="pull-left">{translate label="ID_DASH_COMPARE_MONTH"}:</h5>
</div>
<select id="mounth" 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 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 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="mounth" 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>
</div>
<div class="clearfix"></div>
<div class="collapse" id="collapseExample">

View File

@@ -7,7 +7,7 @@
<body id="page-top" class="index">
<div id="wrapper">
//Change xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
</div>