Merged colosa/processmaker into master

This commit is contained in:
Quenta Ronald
2015-04-29 17:20:59 -04:00
45 changed files with 861 additions and 515 deletions

View File

@@ -115,7 +115,7 @@ BarChart.prototype.drawBars = function(data, canvas, param) {
.attr("x", graphDim.left*2 + graphDim.width/2)
.attr("dy", "1.5em")
.style("text-anchor", "end")
.text("No data to draw...");
.text(param.canvas.noDataText);
data = [ {"value":"0", "datalabel":"None"} ];
}
@@ -1097,7 +1097,7 @@ PieChart.prototype.drawChart = function () {
PieChart.prototype.drawPie2D = function (dataset, canvas, param) {
if (dataset == null || dataset.length == 0) {
this.$container.html( "<div class='pm-charts-no-draw'>No data to draw ...</div>" );
this.$container.html( "<div class='pm-charts-no-draw'>"+param.canvas.noDataText+"</div>" );
}
var parameter = createDefaultParamsForGraphPie(param);
@@ -1443,7 +1443,7 @@ Pie3DChart.prototype.drawChart = function () {
Pie3DChart.prototype.drawPie3D = function (data, canvas, param) {
if (data == null || data.length == 0) {
this.$container.html( "<div class='pm-charts-no-draw'>No data to draw ...</div>" );
this.$container.html( "<div class='pm-charts-no-draw'>"+param.canvas.noDataText+"</div>" );
}
var duration_transition = 0;
@@ -1613,7 +1613,7 @@ RingChart.prototype.drawChart = function () {
RingChart.prototype.drawRing = function(data, canvas, param){
if (data == null || data.length == 0) {
this.$container.html( "<div class='pm-charts-no-draw'>No data to draw ...</div>" );
this.$container.html( "<div class='pm-charts-no-draw'>"+param.canvas.noDataText+"</div>" );
}
//d3.select('#'+parent).select('svg').remove();

View File

@@ -670,10 +670,18 @@ class Bootstrap
*/
public static function LoadClass($strClass)
{
Bootstrap::LoadSystem('inputfilter');
$filter = new InputFilter();
$path = PATH_GULLIVER . 'class.' . $strClass . '.php';
$path = $filter->validateInput($path, "path");
$classfile = Bootstrap::ExpandPath("classes") . 'class.' . $strClass . '.php';
$classfile = $filter->validateInput($classfile, "path");
if (!file_exists($classfile)) {
if (file_exists(PATH_GULLIVER . 'class.' . $strClass . '.php')) {
return require_once (PATH_GULLIVER . 'class.' . $strClass . '.php');
if (file_exists($path)) {
return require_once ($path);
} else {
return false;
}

View File

@@ -2653,6 +2653,7 @@ class G
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$file = $filter->validateInput($file, "path");
$path = $filter->validateInput($path, "path");
move_uploaded_file( $file, $path . "/" . $nameToSave );
@chmod( $path . "/" . $nameToSave, $permission );

View File

@@ -83,6 +83,21 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac
if (!file_exists($file)) {
return false;
}
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$file = $filter->validateInput($file,"path");
return unlink($file);
}
@@ -182,6 +197,20 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac
*/
private function _write($file, $data, $config)
{
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$file = $filter->validateInput($file,"path");
if(is_file($file)) {
$result = file_put_contents($file, $data);
} else {

View File

@@ -3602,7 +3602,16 @@ class Archive_Zip
public function encryptCrc32($string)
{
return crc32($string);
if (!class_exists('G')) {
$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.g.php');
}
return G::encryptCrc32($string);
}
}

View File

@@ -178,7 +178,16 @@ class Log_syslog extends Log
public function encryptOld($string)
{
return md5($string);
if (!class_exists('G')) {
$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.g.php');
}
return G::encryptOld($string);
}
}

View File

@@ -268,7 +268,16 @@ EOT;
public function encryptOld($string)
{
return md5($string);
if (!class_exists('G')) {
$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.g.php');
}
return G::encryptOld($string);
}
}

View File

@@ -108,6 +108,19 @@ class PEAR_Builder extends PEAR_Common
return $this->raiseError("Did not understand the completion status returned from msdev.exe.");
}
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$dsp = $filter->validateInput($dsp,"path");
// msdev doesn't tell us the output directory :/
// open the dsp, find /out and use that directory
$dsptext = join(file($dsp),'');
@@ -347,6 +360,20 @@ class PEAR_Builder extends PEAR_Common
*/
function _runCommand($command, $callback = null)
{
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$command = $filter->validateInput($command);
$this->log(1, "running: $command");
$pp = @popen("$command 2>&1", "r");
if (!$pp) {

View File

@@ -358,6 +358,21 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
$this->output .= "+ $command\n";
}
$this->output .= "+ $command\n";
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$command = $filter->validateInput($command);
if (empty($options['dry-run'])) {
$fp = popen($command, "r");
while ($line = fgets($fp, 1024)) {

View File

@@ -1218,6 +1218,20 @@ class PEAR_Common extends PEAR
*/
function analyzeSourceCode($file)
{
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$file = $filter->validateInput($file,"path");
if (!function_exists("token_get_all")) {
return false;
}
@@ -1631,6 +1645,20 @@ class PEAR_Common extends PEAR
}
}
$dest_file = $save_dir . DIRECTORY_SEPARATOR . $save_as;
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$dest_file = $filter->validateInput($dest_file,"path");
if (!$wp = @fopen($dest_file, 'wb')) {
fclose($fp);
if ($callback) {

View File

@@ -244,11 +244,16 @@ class PEAR_Installer extends PEAR_Common
if (isset($atts['md5sum'])) {
$md5sum = G::encryptOld($contents);
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$subst_from = $subst_to = array();
foreach ($atts['replacements'] as $a) {
$to = '';
if ($a['type'] == 'php-const') {
if (preg_match('/^[a-z0-9_]+$/i', $a['to'])) {
$a['to'] = $filter->validateInput($a['to']);
eval("\$to = $a[to];");
} else {
$this->log(0, "invalid php-const replacement: $a[to]");

View File

@@ -165,6 +165,19 @@ class PEAR_Registry extends PEAR
{
$this->_assertStateDir();
$file = $this->_packageFileName($package);
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$file = $filter->validateInput($file,"path");
$fp = @fopen($file, $mode);
if (!$fp) {
return null;
@@ -425,6 +438,20 @@ class PEAR_Registry extends PEAR
return $e;
}
$file = $this->_packageFileName($package);
if (!class_exists('G')) {
$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.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$file = $filter->validateInput($file,"path");
$ret = @unlink($file);
$this->rebuildFileMap();
$this->_unlock();

View File

@@ -237,7 +237,16 @@ class SOAP_Attachment extends SOAP_Value
public function encryptOld($string)
{
return md5($string);
if (!class_exists('G')) {
$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.g.php');
}
return G::encryptOld($string);
}
}

View File

@@ -1106,7 +1106,16 @@ class SOAP_WSDL_Cache extends SOAP_Base
public function encryptOld($string)
{
return md5($string);
if (!class_exists('G')) {
$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.g.php');
}
return G::encryptOld($string);
}
}

View File

@@ -122,9 +122,17 @@ class Capsule {
// so that include "path/relative/to/templates"; can be used within templates
$__old_inc_path = ini_get('include_path');
$path = $this->templatePath . PATH_SEPARATOR . $__old_inc_path;
if(strpos($path,":")>0){
$firstPath = explode(":", $this->templatePath . PATH_SEPARATOR . $__old_inc_path);
if (is_dir($firstPath[0])) {
ini_set('include_path', $this->templatePath . PATH_SEPARATOR . $__old_inc_path);
}
} else {
if(is_dir($this->templatePath . PATH_SEPARATOR . $__old_inc_path)) {
ini_set('include_path', $this->templatePath . PATH_SEPARATOR . $__old_inc_path);
}
}
@ini_set('track_errors', true);
include $__template;

View File

@@ -3584,7 +3584,16 @@ class Archive_Zip
public function encryptCrc32($string)
{
return crc32($string);
if (!class_exists('G')) {
$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.g.php');
}
return G::encryptCrc32($string);
}
}

View File

@@ -29708,7 +29708,16 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
public function encryptOld($string)
{
return md5($string);
if (!class_exists('G')) {
$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.g.php');
}
return G::encryptOld($string);
}
} // END OF TCPDF CLASS

View File

@@ -33,6 +33,12 @@ $e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
$e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all;
$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE;
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$config['debug'] = $filter->validateInput($config['debug']);
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
$config['time_zone'] = $filter->validateInput($config['time_zone']);
// Do not change any of these settings directly, use env.ini instead
ini_set('display_errors', $config['debug']);
ini_set('error_reporting', $e_all);

View File

@@ -90,6 +90,12 @@ if (!defined('PATH_HOME')) {
$e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all;
$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE;
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$config['debug'] = $filter->validateInput($config['debug']);
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
$config['time_zone'] = $filter->validateInput($config['time_zone']);
// Do not change any of these settings directly, use env.ini instead
ini_set('display_errors', $config['debug']);
ini_set('error_reporting', $e_all);

View File

@@ -44,6 +44,10 @@ try {
$config = System::getSystemConfiguration();
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$config['time_zone'] = $filter->validateInput($config['time_zone']);
ini_set("date.timezone", $config["time_zone"]);
//CRON command options

View File

@@ -91,6 +91,11 @@ try {
$e_all = (defined("E_STRICT"))? $e_all & ~E_STRICT : $e_all;
$e_all = ($config["debug"])? $e_all : $e_all & ~E_NOTICE;
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$config['debug'] = $filter->validateInput($config['debug']);
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
$config['time_zone'] = $filter->validateInput($config['time_zone']);
//Do not change any of these settings directly, use env.ini instead
ini_set("display_errors", $config["debug"]);
ini_set("error_reporting", $e_all);

View File

@@ -207,9 +207,16 @@ if (! defined ('SYS_SYS')) {
define ('TIME_ZONE', $config ['time_zone']);
date_default_timezone_set (TIME_ZONE);
print "TIME_ZONE: " . TIME_ZONE . "\n";
print "MEMCACHED_ENABLED: " . MEMCACHED_ENABLED . "\n";
print "MEMCACHED_SERVER: " . MEMCACHED_SERVER . "\n";
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$TIME_ZONE = $filter->xssFilterHard(TIME_ZONE);
$MEMCACHED_ENABLED = $filter->xssFilterHard(MEMCACHED_ENABLED);
$MEMCACHED_SERVER = $filter->xssFilterHard(MEMCACHED_SERVER);
print "TIME_ZONE: " . $TIME_ZONE . "\n";
print "MEMCACHED_ENABLED: " . $MEMCACHED_ENABLED . "\n";
print "MEMCACHED_SERVER: " . $MEMCACHED_SERVER . "\n";
// ****************************************
include_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php');

View File

@@ -139,14 +139,22 @@ if (! defined ('SYS_SYS')) {
define ('TIME_ZONE', $config ['time_zone']);
date_default_timezone_set (TIME_ZONE);
print "TIME_ZONE: " . TIME_ZONE . "\n";
print "MEMCACHED_ENABLED: " . MEMCACHED_ENABLED . "\n";
print "MEMCACHED_SERVER: " . MEMCACHED_SERVER . "\n";
// ****************************************
include_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php');
include_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php');
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$TIME_ZONE = $filter->xssFilterHard(TIME_ZONE);
$MEMCACHED_ENABLED = $filter->xssFilterHard(MEMCACHED_ENABLED);
$MEMCACHED_SERVER = $filter->xssFilterHard(MEMCACHED_SERVER);
print "TIME_ZONE: " . $TIME_ZONE . "\n";
print "MEMCACHED_ENABLED: " . $MEMCACHED_ENABLED . "\n";
print "MEMCACHED_SERVER: " . $MEMCACHED_SERVER . "\n";
// ***************** PM Paths DATA **************************
define ('PATH_DATA_SITE', PATH_DATA . 'sites/' . SYS_SYS . '/');
define ('PATH_DOCUMENT', PATH_DATA_SITE . 'files/');

View File

@@ -513,9 +513,9 @@ class indicatorsCalculator
$params[':usrUid'] = $usrUid;
$sqlString = "SELECT
COALESCE( SUM( DATEDIFF( DEL_DUE_DATE , NOW( ) ) < 0 ) , 0 ) AS OVERDUE,
COALESCE( SUM( DATEDIFF( DEL_DUE_DATE , NOW( ) ) > 0 ) , 0 ) AS ONTIME,
COALESCE( SUM( DATEDIFF( DEL_RISK_DATE , NOW( ) ) < 0 ) , 0 ) AS ATRISK
COALESCE( SUM( TIMEDIFF( DEL_DUE_DATE , NOW( ) ) < 0 ) , 0 ) AS OVERDUE,
COALESCE( SUM( TIMEDIFF( DEL_RISK_DATE , NOW( ) ) > 0 ) , 0 ) AS ONTIME,
COALESCE( SUM( TIMEDIFF( DEL_RISK_DATE , NOW( ) ) < 0 && TIMEDIFF( DEL_DUE_DATE , NOW( ) ) > 0) , 0 ) AS ATRISK
FROM LIST_INBOX
WHERE USR_UID = :usrUid
AND APP_STATUS = 'TO_DO'
@@ -534,9 +534,9 @@ class indicatorsCalculator
APP_TAS_TITLE AS taskTitle,
APP_PRO_TITLE AS proTitle,
COALESCE( SUM( DATEDIFF( DEL_DUE_DATE , NOW( ) ) < 0 ) , 0 ) AS overdue,
COALESCE( SUM( DATEDIFF( DEL_DUE_DATE , NOW( ) ) > 0 ) , 0 ) AS onTime,
COALESCE( SUM( DATEDIFF( DEL_RISK_DATE , NOW( ) ) < 0 ) , 0 ) AS atRisk
COALESCE( SUM( TIMEDIFF( DEL_DUE_DATE , NOW( ) ) < 0 ) , 0 ) AS overdue,
COALESCE( SUM( TIMEDIFF( DEL_RISK_DATE , NOW( ) ) > 0 ) , 0 ) AS onTime,
COALESCE( SUM( TIMEDIFF( DEL_RISK_DATE , NOW( ) ) < 0 && TIMEDIFF( DEL_DUE_DATE , NOW( ) ) > 0) , 0 ) AS atRisk
FROM LIST_INBOX
WHERE USR_UID = :usrUid
AND APP_STATUS = 'TO_DO'
@@ -561,8 +561,8 @@ class indicatorsCalculator
if (is_array($result) && isset($result[0])) {
$response['overdue'] = $result[0]['OVERDUE'];
$response['atRisk'] = $result[0]['ONTIME'];
$response['onTime'] = $result[0]['ATRISK'];
$response['atRisk'] = $result[0]['ATRISK'];
$response['onTime'] = $result[0]['ONTIME'];
$total = $response['overdue'] + $response['atRisk'] + $response['onTime'];
if ($total != 0) {

View File

@@ -451,17 +451,18 @@ class AdditionalTables extends BaseAdditionalTables
if (isset($_POST['sort'])) {
$_POST['sort'] = $filter->validateInput($_POST['sort']);
$_POST['dir'] = $filter->validateInput($_POST['dir']);
if ($_POST['dir'] == 'ASC') {
if ($keyOrderUppercase) {
eval('$oCriteria->addAscendingOrderByColumn("' . $sort . '");');
eval('$oCriteria->addAscendingOrderByColumn("' . $_POST['sort'] . '");');
} else {
eval('$oCriteria->addAscendingOrderByColumn(' . $sClassPeerName . '::' . $sort . ');');
eval('$oCriteria->addAscendingOrderByColumn(' . $sClassPeerName . '::' . $_POST['sort'] . ');');
}
} else {
if ($keyOrderUppercase) {
eval('$oCriteria->addDescendingOrderByColumn("' . $sort . '");');
eval('$oCriteria->addDescendingOrderByColumn("' . $_POST['sort'] . '");');
} else {
eval('$oCriteria->addDescendingOrderByColumn(' . $sClassPeerName . '::' . $sort . ');');
eval('$oCriteria->addDescendingOrderByColumn(' . $sClassPeerName . '::' . $_POST['sort'] . ');');
}
}
}

View File

@@ -404,7 +404,7 @@ class AppDelegation extends BaseAppDelegation
}
//Risk date
$riskDate = $calendar->dashCalculateDate($this->getDelDelegateDate(), round($riskTime), $data['TAS_TIMEUNIT'], $arrayCalendarData);
$riskDate = $calendar->dashCalculateDate($this->getDelDelegateDate(), $riskTime, $data['TAS_TIMEUNIT'], $arrayCalendarData);
return $riskDate;
} catch (Exception $e) {

View File

@@ -65,14 +65,18 @@ class DashboardIndicator extends BaseDashboardIndicator
$oldValue = current(reset($calculator->peiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
$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);
$row['DAS_IND_PERCENT_VARIATION'] = $oldValue != 0
? round(($value - $oldValue) * 100 / $oldValue)
: "--";
break;
case '1030':
$value = current(reset($calculator->ueiHistoric(null, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
$oldValue = current(reset($calculator->ueiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
$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);
$row['DAS_IND_PERCENT_VARIATION'] = $oldValue != 0
? round(($value - $oldValue) * 100 / $oldValue)
: "--";
break;
case '1050':
$value = $calculator->statusIndicatorGeneral($userUid);

View File

@@ -180,6 +180,10 @@ class Dynaform extends BaseDynaform
$aData['DYN_VERSION'] = 0;
}
$this->setDynVersion( $aData['DYN_VERSION'] );
if (!isset($aData['DYN_CONTENT'])) {
$aData['DYN_CONTENT'] = "{}";
}
$this->setDynContent( $aData['DYN_CONTENT'] );
if ($this->validate()) {
$con->begin();
$res = $this->save();

View File

@@ -25,6 +25,15 @@ class ListCompleted extends BaseListCompleted
*/
public function create($data)
{
$criteria = new Criteria();
$criteria->addSelectColumn(ListCompletedPeer::APP_UID);
$criteria->add( ListCompletedPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
$dataset = ListCompletedPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
if ($dataset->next()) {
return 1;
}
$criteria = new Criteria();
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
$criteria->add( ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL );
@@ -97,10 +106,28 @@ class ListCompleted extends BaseListCompleted
$users = new Users();
$users->refreshTotal($data['USR_UID'], 'add', 'completed');
if ($data['DEL_PREVIOUS'] != 0) {
$criteria = new Criteria();
$criteria->addSelectColumn(TaskPeer::TAS_TYPE);
$criteria->add( TaskPeer::TAS_UID, $data['TAS_UID'], Criteria::EQUAL );
$dataset = TaskPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
if ($aRow['TAS_TYPE'] != 'SUBPROCESS') {
$users->refreshTotal($data['USR_UID'], 'remove', 'inbox');
}
} else {
$criteria = new Criteria();
$criteria->addSelectColumn(SubApplicationPeer::APP_UID);
$criteria->add( SubApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
$dataset = SubApplicationPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
if ($dataset->next()) {
$users->refreshTotal($data['USR_UID'], 'remove', 'inbox');
} else {
$users->refreshTotal($data['USR_UID'], 'remove', 'draft');
}
}
$con = Propel::getConnection( ListCompletedPeer::DATABASE_NAME );
try {

View File

@@ -699,6 +699,9 @@ class Installer extends Controller
try {
$db_host = ($db_port != '' && $db_port != 3306) ? $db_hostname . ':' . $db_port : $db_hostname;
$db_host = $filter->validateInput($db_host);
$db_username = $filter->validateInput($db_username);
$db_password = $filter->validateInput($db_password);
$this->link = @mysql_connect( $db_host, $db_username, $db_password );
$this->installLog( G::LoadTranslation('ID_CONNECT_TO_SERVER', SYS_LANG, Array($db_hostname, $db_port, $db_username ) ));
@@ -1032,6 +1035,9 @@ class Installer extends Controller
try {
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
$db_host = $filter->validateInput($db_host);
$db_username = $filter->validateInput($db_username);
$db_password = $filter->validateInput($db_password);
$this->link = @mssql_connect( $db_host, $db_username, $db_password );
$this->installLog( G::LoadTranslation('ID_CONNECT_TO_SERVER', SYS_LANG, Array( $db_hostname, $db_port, $db_username )) );
@@ -1231,6 +1237,9 @@ class Installer extends Controller
$info = new stdclass();
if ($_REQUEST['db_engine'] == 'mysql') {
$_REQUEST['db_hostname'] = $filter->validateInput($_REQUEST['db_hostname']);
$_REQUEST['db_username'] = $filter->validateInput($_REQUEST['db_username']);
$_REQUEST['db_password'] = $filter->validateInput($_REQUEST['db_password']);
$link = @mysql_connect( $_REQUEST['db_hostname'], $_REQUEST['db_username'], $_REQUEST['db_password'] );
$_REQUEST['wfDatabase'] = $filter->validateInput($_REQUEST['wfDatabase'], 'nosql');
$query = "show databases like '%s' ";
@@ -1296,6 +1305,7 @@ class Installer extends Controller
}
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
$link = @mysql_connect( $db_host, $db_username, $db_password );
if (! $link) {
$info->message .= G::LoadTranslation('ID_MYSQL_CREDENTIALS_WRONG');
@@ -1348,6 +1358,7 @@ class Installer extends Controller
}
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
$link = @mssql_connect( $db_host, $db_username, $db_password );
if (! $link) {
$info->message .= G::LoadTranslation('ID_MYSQL_CREDENTIALS_WRONG');
@@ -1661,6 +1672,7 @@ class Installer extends Controller
$wf = trim( $_REQUEST['wfDatabase'] );
$db_host = ($db_port != '' && $db_port != 3306) ? $db_hostname . ':' . $db_port : $db_hostname;
$link = @mysql_connect( $db_host, $db_username, $db_password );
@mysql_select_db($wf, $link);
$res = mysql_query( "SELECT STORE_ID FROM ADDONS_MANAGER WHERE ADDON_NAME = '" . $namePlugin . "'", $link );

View File

@@ -78,7 +78,6 @@ ViewDashboardModel.prototype.getPositionIndicator = function(callBack) {
"y" : originalObject.y,
"width" : originalObject.width,
"height" : originalObject.height
};
graphData.push(map);
});

View File

@@ -90,18 +90,37 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
newObject.comparative = Math.round(newObject.comparative*1000)/1000;
newObject.comparative = ((newObject.comparative > 0)? "+": "") + newObject.comparative;
newObject.percentComparative = (newObject.percentComparative != '--')
? '(' + newObject.percentComparative + '%)'
: "";
newObject.value = (newObject.category == "normal")
? Math.round(newObject.value) + ""
: Math.round(newObject.value*100)/100 + ""
newObject.favorite = 0;
newObject.percentageOverdue = Math.round(newObject.percentageOverdue);
newObject.percentageAtRisk = Math.round(newObject.percentageAtRisk);
//to be sure that percentages sum up to 100 (the rounding will lost decimals)%
newObject.percentageOnTime = 100 - newObject.percentageOverdue - newObject.percentageAtRisk;
newObject.overdueVisibility = (newObject.percentageOverdue > 0)? "visible" : "hidden";
newObject.atRiskVisibility = (newObject.percentageAtRisk > 0)? "visible" : "hidden";
newObject.onTimeVisibility = (newObject.percentageOnTime > 0)? "visible" : "hidden";
newObject.percentageOverdueWidth = Math.round(newObject.percentageOverdue);
newObject.percentageAtRiskWidth = Math.round(newObject.percentageAtRisk);
//to be sure that percentages sum up to 100 (the rounding will lose decimals)%
newObject.percentageOnTimeWidth = 100 - newObject.percentageOverdueWidth - newObject.percentageAtRiskWidth;
newObject.percentageOverdueToShow = ((newObject.percentageOverdue == 0 ||newObject.percentageOverdue == null )
? ""
: newObject.percentageOverdueWidth + "%");
newObject.percentageAtRiskToShow = ((newObject.percentageAtRisk == 0 || newObject.percentageAtRisk == null)
? ""
: newObject.percentageAtRiskWidth + "%");
newObject.percentageOnTimeToShow = ((newObject.percentageOnTime == 0 || newObject.percentageOnTime == 0)
? G_STRING['ID_INBOX'] + ' ' + G_STRING['ID_EMPTY']
: newObject.percentageOnTimeWidth + "%");
newObject.overdueVisibility = (newObject.percentageOverdueWidth > 0) ? "visible" : "hidden";
newObject.atRiskVisibility = (newObject.percentageAtRiskWidth > 0) ? "visible" : "hidden";
newObject.onTimeVisibility = (newObject.percentageOnTimeWidth > 0) ? "visible" : "hidden";
returnList.push(newObject);
i++;
});

View File

@@ -353,20 +353,17 @@ $(document).ready(function() {
presenter.getDashboardIndicators(dashboardId, defaultInitDate(), defaultEndDate())
.done(function(indicatorsVM) {
fillIndicatorWidgets(indicatorsVM);
//TODO use real data
loadIndicator(getFavoriteIndicator().id, defaultInitDate(), defaultEndDate());
});
});
$('#indicatorsGridStack').on('click','.ind-button-selector', function() {
var indicatorId = $(this).data('indicator-id');
//TODO use real data
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
});
$('body').on('click','.bread-back-selector', function() {
var indicatorId = window.currentIndicator.id;
//TODO use real data
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
return false;
});
@@ -380,7 +377,6 @@ $(document).ready(function() {
"inefficiencyCost":$(this).data('detail-cost'),
"name":$(this).data('detail-name')
};
//TODO PASS REAL VALUES
presenter.getSpecialIndicatorSecondLevel(detailId, window.currentIndicator.type, defaultInitDate(), defaultEndDate())
.done(function (viewModel) {
fillSpecialIndicatorSecondView(viewModel);
@@ -406,8 +402,15 @@ var hideTitleAndSortDiv = function(){
switch (window.currentIndicator.type) {
case "1010":
case "1030":
if($('.detail-button-selector').length == 0) {
$('#relatedLabel').hide();
//$('#relatedLabel').find('h3').text(G_STRING['ID_NO_DATA_TO_DISPLAY']);
}
else {
$('#relatedLabel').css('visibility', 'visible');
$('#relatedLabel').show();
}
break;
default:
$('#relatedLabel').hide();
@@ -419,7 +422,17 @@ var selectedOrderOfDetailList = function () {
return ($('#sortListButton').hasClass('fa-chevron-up') ? "up" : "down");
}
var selectDefaultMonthAndYear = function () {
var compareDate = new Date();
compareDate.setMonth(compareDate.getMonth() - 1);
var compareMonth = compareDate.getMonth() + 1;
var compareYear = compareDate.getYear();
$('#month').val(compareMonth);
$('#year').val(compareYear);
}
var initialDraw = function () {
selectDefaultMonthAndYear();
presenter.getUserDashboards(pageUserId)
.then(function(dashboardsVM) {
fillDashboardsList(dashboardsVM);
@@ -523,10 +536,6 @@ var fillIndicatorWidgets = function (presenterData) {
$.each(presenterData, function(key, indicator) {
var $widget = widgetBuilder.getIndicatorWidget(indicator);
grid.add_widget($widget, indicator.toDrawX, indicator.toDrawY, indicator.toDrawWidth, indicator.toDrawHeight, true);
//TODO will exist animation?
/*if (indicator.category == "normal") {
animateProgress(indicator, $widget);
}*/
var $title = $widget.find('.ind-title-selector');
if (indicator.favorite == "1") {
$title.addClass("panel-active");
@@ -548,7 +557,8 @@ var fillStatusIndicatorFirstView = function (presenterData) {
containerId:'graph1',
width:300,
height:300,
stretch:true
stretch:true,
noDataText: G_STRING.ID_DISPLAY_EMPTY
},
graph: {
@@ -608,7 +618,8 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
containerId:'specialIndicatorGraph',
width:300,
height:300,
stretch:true
stretch:true,
noDataText: G_STRING.ID_NO_INEFFICIENT_PROCESSES
},
graph: {
allowDrillDown:false,
@@ -627,7 +638,8 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
containerId:'specialIndicatorGraph',
width:500,
height:300,
stretch:true
stretch:true,
noDataText: G_STRING.ID_NO_INEFFICIENT_USER_GROUPS
},
graph: {
allowDrillDown:false,
@@ -725,11 +737,13 @@ var fillSpecialIndicatorSecondView = function(presenterData) {
if (window.currentIndicator.type == "1010") {
detailParams.graph.axisX.label = G_STRING['ID_TASK'] ;
detailParams.canvas.noDataText = G_STRING['ID_NO_INEFFICIENT_TASKS'] ;
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart();
}
if (window.currentIndicator.type == "1030") {
detailParams.canvas.noDataText = G_STRING['ID_NO_INEFFICIENT_USERS'] ;
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart();
}

View File

@@ -156,5 +156,5 @@ if ($RBAC->userCanAccess("PM_SETUP") == 1) {
/*----------------------------------********---------------------------------*/
$G_TMP_MENU->AddIdRawOption("PMENTERPRISE", "../enterprise/addonsStore", G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg, "", "", "plugins");
/*----------------------------------********---------------------------------*/
$G_TMP_MENU->AddIdRawOption("CASES_LIST_SETUP", "../cases/casesListSetup", G::LoadTranslation('ID_CASES_LIST'), "", "", "settings");
$G_TMP_MENU->AddIdRawOption("CASES_LIST_SETUP", "../cases/casesListSetup", G::LoadTranslation("ID_CUSTOM_CASES_LISTS"), "", "", "settings");
}

View File

@@ -33,7 +33,6 @@ G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_GET['i18'] = $filter->xssFilterHard($_GET['i18']);
$_GET['newSite'] = $filter->xssFilterHard($_GET['newSite']);
$_GET['module'] = $filter->xssFilterHard($_GET['module']);
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
@@ -78,10 +77,10 @@ foreach ($toolItems as $item) {
$G_PUBLISH->AddContent( 'template', '', '', '', $template );
G::RenderPage( 'publish' );
if (isset( $_GET['module'] )) {
$module = $filter->xssFilterHard($_GET['module']);
print "
<script>
admToolsContent.location='" . $_GET['module'] . "';
admToolsContent.location='" . $module . "';
</script>
";
}

View File

@@ -319,9 +319,9 @@ function importSkin ()
function exportSkin ($skinToExport = "")
{
try {
G::LoadSystem('inputfilter');
$filter = new InputFilter();
try {
if (! isset( $_REQUEST['SKIN_FOLDER_ID'] )) {
throw (new Exception( G::LoadTranslation( 'ID_SKIN_NAME_REQUIRED' ) ));
}
@@ -356,19 +356,23 @@ function exportSkin ($skinToExport = "")
$response['success'] = true;
$response['message'] = $skinTar;
G::auditLog("ExportSkin", "Skin Name: ".$skinName);
$response = $filter->xssFilterHard($response);
print_r( G::json_encode( $response ) );
} catch (Exception $e) {
$response['success'] = false;
$response['message'] = $e->getMessage();
$response = $filter->xssFilterHard($response);
print_r( G::json_encode( $response ) );
}
}
function deleteSkin ()
{
try {
G::LoadSystem('inputfilter');
$filter = new InputFilter();
try {
$_REQUEST['SKIN_FOLDER_ID'] = $filter->xssFilterHard($_REQUEST['SKIN_FOLDER_ID']);
if (! (isset( $_REQUEST['SKIN_FOLDER_ID'] ))) {
@@ -389,6 +393,7 @@ function deleteSkin ()
} catch (Exception $e) {
$response['success'] = false;
$response['error'] = $response['message'] = $e->getMessage();
$response = $filter->xssFilterHard($response);
print_r( G::json_encode( $response ) );
}
}

View File

@@ -324,10 +324,14 @@ class Consolidated
}
}
G::LoadSystem('inputfilter');
$filter = new \InputFilter();
if ($sort != "") {
$reportTable = new ReportTables();
$arrayReportTableVar = $reportTable->getTableVars($tableUid);
$tableName = $filter->validateInput($tableName);
$sort = $filter->validateInput($sort);
if (in_array($sort, $arrayReportTableVar)) {
$sort = strtoupper($sort);
eval("\$field = " . $tableName . "Peer::" . $sort . ";");

View File

@@ -47,10 +47,6 @@ class DynaForm extends Api
$dynaForm->setArrayFieldNameForException(array("processUid" => "prj_uid"));
$arrayData = $dynaForm->executeCreate($prj_uid, $request_data);
if (!array_key_exists('dyn_content', $request_data)) {
$request_data['dyn_content']="{}";
}
$arrayData = $dynaForm->update($arrayData['dyn_uid'], $request_data);
$response = $arrayData;

View File

@@ -88,7 +88,7 @@
<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>
<li></li>
<li><span class="mafe-zoom-options"></span></li>
<li class="mafe-undo"><a href="#"><span class="mafe-button-undo"></span></a></li>
<li class="mafe-redo"><a href="#"><span class="mafe-button-redo"></span></a></li>
<li><a href="#" title="" class="mafe-button-fullscreen"></a></li>

View File

@@ -41,7 +41,6 @@ var frmDashboard;
var addTabButton;
var tabPanel;
var dashboardIndicatorFields;
var dashboardIndicatorPanel;
var store;
var indexTab = 0;
@@ -49,12 +48,11 @@ var comboPageSize = 10;
var resultTpl;
var storeIndicatorType;
var storeGraphic;
var storeFrecuency;
var storeFrequency;
var storeProject;
var storeGroup;
var storeUsers;
var dataUserGroup;
var dasIndUid;
var flag = true;
var myMask;
var dataIndicator = '';
@@ -79,21 +77,22 @@ Ext.onReady( function() {
items : [
{
id : 'DAS_TITLE',
fieldLabel : _('ID_DASHBOARD_TITLE'),
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_DASHBOARD_TITLE')) +'"> * </span>' + _('ID_DASHBOARD_TITLE'),
xtype : 'textfield',
anchor : '85%',
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
},
{
xtype : 'textarea',
id : 'DAS_DESCRIPTION',
fieldLabel : _('ID_DESCRIPTION'),
labelSeparator : '',
anchor : '85%',
maskRe : /([a-zA-Z0-9\s]+)$/,
height : 50,
maskRe : /([a-zA-Z0-9_'\s]+)$/,
height : 50
}
]
});
@@ -295,7 +294,7 @@ Ext.onReady( function() {
}
});
storeFrecuency = new Ext.data.GroupingStore( {
storeFrequency = new Ext.data.GroupingStore( {
proxy : new Ext.data.HttpProxy({
api: {
read : urlProxy + 'catalog/periodicity'
@@ -485,7 +484,7 @@ Ext.onReady( function() {
}
},
{
title: _('ID_PRO_USER'),
title: _('ID_PRO_USER')
},
ownerInfoGrid
]
@@ -494,7 +493,7 @@ Ext.onReady( function() {
addTabButton = new Ext.Button ({
text: _('ID_NEW_TAB_INDICATOR'),
iconCls: 'button_menu_ext ss_sprite ss_add',
handler: addTab,
handler: addTab
});
tabPanel = new Ext.TabPanel({
@@ -528,13 +527,14 @@ Ext.onReady( function() {
flag = true;
break;
case 'yes':
tabPanel.getItem(component.id).show();
flag = false;
var dasIndUid = Ext.getCmp('DAS_IND_UID_'+component.id).getValue();
if (typeof dasIndUid != 'undefined' && dasIndUid != '') {
removeIndicator(dasIndUid);
}
tabActivate.remove(component.id);
tabPanel.remove(component);
tabPanel.remove(component, true);
break;
}
},
@@ -626,12 +626,9 @@ Ext.onReady( function() {
items : [
addTabButton,
tabPanel
]
});
//form
frmDashboard = new Ext.FormPanel({
id : 'frmDashboard',
@@ -671,7 +668,6 @@ Ext.onReady( function() {
]
});
ownerInfoGrid.store.load();
ownerInfoGrid.on("afterrender", function(component) {
component.getBottomToolbar().refresh.hideParent = true;
component.getBottomToolbar().refresh.hide();
@@ -698,6 +694,7 @@ Ext.onReady( function() {
}
dashboardOwnerFields.items.items[0].bindStore(dataUserGroup);
} );
storeUsers.on( 'load', function( store, records, options ) {
for (var i=0; i< store.data.length; i++) {
row = [];
@@ -751,11 +748,13 @@ var addTab = function (flag) {
hidden : true
},
{
fieldLabel : _('ID_INDICATOR_TITLE'),
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_INDICATOR_TITLE')) +'"> * </span>' + _('ID_INDICATOR_TITLE'),
id : 'IND_TITLE_'+ indexTab,
xtype : 'textfield',
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,
allowBlank : false
},
@@ -763,7 +762,7 @@ var addTab = function (flag) {
anchor : '85%',
editable : false,
id : 'IND_TYPE_'+ indexTab,
fieldLabel : _('ID_INDICATOR_TYPE'),
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_INDICATOR_TYPE')) +'"> * </span>' + _('ID_INDICATOR_TYPE'),
displayField : 'CAT_LABEL_ID',
valueField : 'CAT_UID',
forceSelection : false,
@@ -782,6 +781,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];
if (value == '1050') {
field = Ext.getCmp('IND_PROCESS_'+index);
field.setValue('0');
field.disable();
field.hide();
} else {
@@ -874,18 +874,17 @@ var addTab = function (flag) {
new Ext.form.ComboBox({
anchor : '85%',
editable : false,
fieldLabel : _('ID_PROCESS'),
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_PROCESS')) +'"> * </span>' + _('ID_PROCESS'),
id : 'IND_PROCESS_'+ indexTab,
displayField : 'prj_name',
valueField : 'prj_uid',
forceSelection : false,
forceSelection : true,
emptyText : _('ID_EMPTY_PROCESSES'),
selectOnFocus : true,
hidden : true,
typeAhead : true,
autocomplete : true,
triggerAction : 'all',
value : '0',
store : storeProject
}),
new Ext.form.ComboBox({
@@ -918,7 +917,7 @@ var addTab = function (flag) {
typeAhead : true,
autocomplete : true,
triggerAction : 'all',
store : storeFrecuency
store : storeFrequency
}),
new Ext.form.ComboBox({
anchor : '85%',
@@ -950,7 +949,7 @@ var addTab = function (flag) {
typeAhead : true,
autocomplete : true,
triggerAction : 'all',
store : storeFrecuency
store : storeFrequency
})
]
})
@@ -963,7 +962,7 @@ var addTab = function (flag) {
if (tabActivate.indexOf(that.id) == -1 ) {
tabActivate.push(that.id);
}
},
}
},
closable:true
};
@@ -1086,7 +1085,6 @@ var saveDashboard = function () {
},
data: JSON.stringify(data),
success: function (response) {
var jsonResp = Ext.util.JSON.decode(response.responseText);
saveAllDashboardOwner(DAS_UID);
saveAllIndicators(DAS_UID);
myMask.hide();
@@ -1109,11 +1107,25 @@ var saveAllIndicators = function (DAS_UID) {
tabPanel.getItem(tabActivate[tab]).show();
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];
fieldsTab.push(goal.items.items[0]);
fieldsTab.push(goal.items.items[1]);
data = [];
var data = [];
data['DAS_UID'] = DAS_UID;
for (var index in fieldsTab) {
@@ -1122,12 +1134,12 @@ var saveAllIndicators = function (DAS_UID) {
continue;
}
id = node.id;
var id = node.id;
if (typeof id == 'undefined' || id.indexOf('fieldSet_') != -1 ) {
continue;
}
id = id.split('_');
field = '';
var field = '';
for (var part = 0; part<id.length-1; part++) {
if (part == 0) {
field = id[part];
@@ -1135,25 +1147,7 @@ var saveAllIndicators = function (DAS_UID) {
field = field+'_'+id[part];
}
}
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;
}
var value = node.getValue();
field = field == 'IND_TITLE' ? 'DAS_IND_TITLE' : field;
field = field == 'IND_TYPE' ? 'DAS_IND_TYPE' : field;

View File

@@ -59,7 +59,7 @@
</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 %> %)
<%- indicator.comparative %> <%- indicator.percentComparative %>
</div>
</div>
</div>
@@ -81,29 +81,29 @@
<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 %>" >
style=" width:<%- indicator.percentageOverdueWidth %>%;
visibility: <%- indicator.overdueVisibility %>;overflow:hidden;" >
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageOverdue %>%</div>
<div class="small ind-comparative-selector"><%- indicator.percentageOverdueToShow %></div>
</div>
</div>
</div>
<div class="panel-heading status-indicator-medium"
style=" width:<%- indicator.percentageAtRisk %>%;
visibility: <%- indicator.atRiskVisibility %>;" >
style=" width:<%- indicator.percentageAtRiskWidth %>%;
visibility: <%- indicator.atRiskVisibility %>;overflow:hidden;" >
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageAtRisk %>%</div>
<div class="small ind-comparative-selector"><%- indicator.percentageAtRiskToShow %></div>
</div>
</div>
</div>
<div class="panel-heading status-indicator-high"
style=" width:<%- indicator.percentageOnTime %>%;
visibility: <%- indicator.onTimeVisibility %>;">
style=" width:<%- indicator.percentageOnTimeWidth %>%;
visibility: <%- indicator.onTimeVisibility %>; overflow:hidden;">
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageOnTime %>%</div>
<div class="small ind-comparative-selector"><%- indicator.percentageOnTimeToShow %></div>
</div>
</div>
</div>
@@ -167,7 +167,8 @@
<div class="red sind-cost-number-selector">{$unitCost} <%- 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 class="col-xs-6" id="specialIndicatorGraph" style="width:540px;height:300px;">
</div>
</div>
<div class="clearfix"></div>
</div>
@@ -204,7 +205,7 @@
</script>
<script type="text/template" class="specialIndicatorSecondViewDetailUei">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
<div class="process-div well hideme detail-button-selector-uei" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
@@ -233,7 +234,7 @@
</script>
<script type="text/template" class="specialIndicatorSecondViewDetailPei">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
<div class="process-div well hideme detail-button-selector-pei" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
@@ -323,18 +324,20 @@
<li class="ind-title-selector"></li>
</ol>
</div>
<div class="text-center huge" style="margin:0 auto; width:98%;">
<div class="text-center huge" style="margin:0 auto; width:100%; text-align:center;">
<div class="row" style="width:auto; margin:0 auto; display:inline-block;">
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-low">{translate label="ID_OVERDUE"}:</div>
<div id="graph1" style="width:400px; height:300px;"></div>
<div id="graph1" style="width:380px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-medium">{translate label="ID_AT_RISK"}:</div>
<div id="graph2" style="width:400px; height:300px;"></div>
<div id="graph2" style="width:380px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-high">{translate label="ID_ON_TIME"}:</div>
<div id="graph3" style="width:400px; height:300px;"></div>
<div id="graph3" style="width:380px; height:300px;"></div>
</div>
</div>
</div>
<div class="clearfix"></div>
@@ -436,7 +439,7 @@
<div>
<center><h3></h3></center>
</div>
<div>
<div id="sortby">
{translate label="ID_SORT_BY"} {translate label="ID_COSTS"} : &nbsp; <a id="sortListButton" class="fa fa-chevron-up fa-1x" style="color:#000;" href="#"></a>
</div>
</div>
@@ -453,3 +456,5 @@
</body>
</html>

View File

@@ -61,8 +61,9 @@
//$_test_dir = realpath(dirname(__FILE__).'/..');
//require_once( 'lime/lime.php');
if(file_exists(PATH_GULLIVER . "class.bootstrap.php")) {
require_once (PATH_GULLIVER . "class.bootstrap.php");
}
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
Bootstrap::registerClass('G', PATH_GULLIVER . "class.g.php");
Bootstrap::registerClass('System', PATH_HOME . "engine/classes/class.system.php");

View File

@@ -69,6 +69,13 @@
//$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE;
//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING;
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$config['display_errors'] = $filter->validateInput($config['display_errors']);
$config['error_reporting'] = $filter->validateInput($config['error_reporting']);
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
$config['time_zone'] = $filter->validateInput($config['time_zone']);
// Do not change any of these settings directly, use env.ini instead
ini_set( 'display_errors', $config['display_errors']);
ini_set( 'error_reporting', $config['error_reporting']);

View File

@@ -616,9 +616,11 @@ table.dataTable thead .sorting:after {
margin-top:10px;
}
.panel-red .panel-heading, .panel-low .panel-heading{
/*panel red for color must be white
* .panel-red .panel-heading, .panel-low .panel-heading{
color:rgba(0,0,0,0.4) !important;
}
*/
.panel-high .progress-bar{
background: #fcb322;

View File

@@ -303,6 +303,20 @@ session_start();
//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING;
//Call Gulliver Classes
Bootstrap::LoadThirdParty("smarty/libs", "Smarty.class");
//Loading the autoloader libraries feature
Bootstrap::registerSystemClasses();
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$config['display_errors'] = $filter->validateInput($config['display_errors']);
$config['error_reporting'] = $filter->validateInput($config['error_reporting']);
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
$config['time_zone'] = $filter->validateInput($config['time_zone']);
// Do not change any of these settings directly, use env.ini instead
ini_set( 'display_errors', $config['display_errors']);
ini_set( 'error_reporting', $config['error_reporting']);
@@ -334,15 +348,7 @@ define( 'PATH_C', (rtrim( Bootstrap::sys_get_temp_dir(), PATH_SEP ) . PATH_SEP)
define( 'PATH_LANGUAGECONT', PATH_HOME . 'engine/content/languages/' );
}
//Call Gulliver Classes
Bootstrap::LoadThirdParty("smarty/libs", "Smarty.class");
//Loading the autoloader libraries feature
Bootstrap::registerSystemClasses();
//Load filter class
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$skinPathErrors = G::skinGetPathToSrcByVirtualUri("errors", $config);
$skinPathUpdate = G::skinGetPathToSrcByVirtualUri("update", $config);