From 005f00a153e455fdf692198c307efb03d9304266 Mon Sep 17 00:00:00 2001 From: Dante Date: Thu, 7 May 2015 15:26:07 -0400 Subject: [PATCH 01/14] adding 1 decimal to costs --- .../engine/js/strategicDashboard/viewDashboardPresenter.js | 4 ++-- workflow/engine/js/strategicDashboard/viewDashboardView.js | 4 +++- .../engine/templates/strategicDashboard/viewDashboard.html | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js index 13c8be6bf..2ac674d22 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js @@ -88,12 +88,12 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { //rounding newObject.comparative = Math.round(newObject.comparative*100)/100; - newObject.comparative = ((newObject.comparative > 0)? "+": "") + newObject.comparative; + newObject.comparative = ((newObject.comparative > 0) ? "+": "") + newObject.comparative; newObject.percentComparative = (newObject.percentComparative != '--') ? '(' + newObject.percentComparative + '%)' : ""; - newObject.percentComparative = (newObject.comparative == 0) + newObject.percentComparative = (newObject.comparative == 0 && newObject.percentComparative != '') ? "(0%)" : newObject.percentComparative; diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index c5f03c931..6d2f112d3 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -535,7 +535,9 @@ var defaultEndDate = function () { var fillDashboardsList = function (presenterData) { if (presenterData == null || presenterData.length == 0) { - $('#dashboardsList').append(G_STRING['ID_NO_DATA_TO_DISPLAY']); + $('#dashboardMessage').text(G_STRING['ID_GRID_PAGE_NO_DASHBOARD_MESSAGE']); + $('#titleH4').text(G_STRING['ID_GRID_PAGE_NO_DASHBOARD_MESSAGE']); + $('#compareIndicators').hide(); } _.templateSettings.variable = "dashboard"; var template = _.template ($("script.dashboardButtonTemplate").html()) diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 4460e1c8b..18925611e 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -358,7 +358,7 @@

-
+
{translate label="ID_DASH_COMPARE_MONTH"}:
@@ -402,7 +402,7 @@
-

{translate label="ID_DASH_CLICK_TO_VIEW"}

+

{translate label="ID_DASH_CLICK_TO_VIEW"}

From 4723c6ab548cab8812e80a107854963fa62381a6 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Thu, 7 May 2015 16:44:30 -0400 Subject: [PATCH 02/14] IMPROVEMENT --- Rakefile | 1 + workflow/engine/methods/cases/cases_StepToRevise.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 82c3a4699..d90e3fdf6 100644 --- a/Rakefile +++ b/Rakefile @@ -387,6 +387,7 @@ def getJsIncludeFiles "gulliver/js/codemirror/addon/hint/javascript-hint.js", "gulliver/js/codemirror/addon/hint/sql-hint.js", "gulliver/js/codemirror/addon/hint/php-hint.js", + "gulliver/js/codemirror/addon/hint/html-hint.js", "gulliver/js/codemirror/mode/javascript/javascript.js", "gulliver/js/codemirror/addon/edit/matchbrackets.js", "gulliver/js/codemirror/mode/htmlmixed/htmlmixed.js", diff --git a/workflow/engine/methods/cases/cases_StepToRevise.php b/workflow/engine/methods/cases/cases_StepToRevise.php index dbf7e5f88..fb032ea3e 100755 --- a/workflow/engine/methods/cases/cases_StepToRevise.php +++ b/workflow/engine/methods/cases/cases_StepToRevise.php @@ -123,7 +123,16 @@ $oDbConnections->loadAdditionalConnections(); $G_PUBLISH = new Publisher(); if ($_GET['DYN_UID'] != '') { $_SESSION['CURRENT_DYN_UID'] = $_GET['DYN_UID']; - $G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '', $Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID=' . $_GET['DYN_UID'] ); + G::LoadClass('pmDynaform'); + $FieldsPmDynaform = $Fields; + $FieldsPmDynaform["PRO_UID"] = $_SESSION['PROCESS']; + $FieldsPmDynaform["CURRENT_DYNAFORM"] = $_GET['DYN_UID']; + $a = new pmDynaform($FieldsPmDynaform); + if ($a->isResponsive()) { + $a->printView(); + }else{ + $G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '', $Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID=' . $_GET['DYN_UID'] ); + } } G::RenderPage( 'publish', 'blank' ); From 51d45c5a7210556a59ad923d9e39062e23aa0a93 Mon Sep 17 00:00:00 2001 From: Dante Date: Thu, 7 May 2015 17:01:05 -0400 Subject: [PATCH 03/14] 20150507_1701PM --- .../js/strategicDashboard/viewDashboardPresenter.js | 12 ++++++------ .../templates/strategicDashboard/viewDashboard.html | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js index 2ac674d22..cc0615122 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js @@ -255,7 +255,7 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) { var newObject = that.helper.merge(originalObject, {}, map); graphData.push(newObject); originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex); - originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost); + originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10; originalObject.indicatorId = data.id; originalObject.json = JSON.stringify(originalObject); }); @@ -266,7 +266,7 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) { this.makeShortLabel(graphData, 10); retval.dataToDraw = this.adaptGraphData(graphData); - retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost); + retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost * 10) / 10; retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex); return retval; }; @@ -284,7 +284,7 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) { }; var newObject = that.helper.merge(originalObject, {}, map); graphData.push(newObject); - originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost); + originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10)/10; originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex); originalObject.indicatorId = data.id; originalObject.json = JSON.stringify(originalObject); @@ -295,7 +295,7 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) { this.makeShortLabel(graphData, 10); retval.dataToDraw = this.adaptGraphData(graphData); - retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost); + retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost * 10) / 10; retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex); return retval; }; @@ -418,7 +418,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelPei = function(modelD "deviationTime" : "dispersion" }; var newObject = that.helper.merge(originalObject, {}, map); - originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost); + originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10; originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex); originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime); originalObject.rankToShow = originalObject.rank + "/" + modelData.length; @@ -445,7 +445,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD "deviationTime" : "dispersion" }; var newObject = that.helper.merge(originalObject, {}, map); - originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost); + originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10; originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex); originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime); originalObject.rankToShow = originalObject.rank + "/" + modelData.length; diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 18925611e..033dc2c9f 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -208,7 +208,7 @@
<%- detailData.name %> - (<%- detailData.rankToShow %>) + (Ranking: <%- detailData.rankToShow %>)
@@ -363,7 +363,6 @@
{translate label="ID_DASH_COMPARE_MONTH"}:
-