Merge remote branch 'upstream/master'
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
@@ -578,20 +578,20 @@ class indicatorsCalculator
|
||||
$result[$key]['overdue'] = $value['overdue'];
|
||||
$result[$key]['atRisk'] = $value['atRisk'];
|
||||
$result[$key]['onTime'] = $value['onTime'];
|
||||
$result[$key]['percentageOverdue'] = 0;
|
||||
$result[$key]['percentageAtRisk'] = 0;
|
||||
$result[$key]['percentageOnTime'] = 0;
|
||||
$result[$key]['percentageTotalOverdue'] = 0;
|
||||
$result[$key]['percentageTotalAtRisk'] = 0;
|
||||
$result[$key]['percentageTotalOnTime'] = 0;
|
||||
$result[$key]['percentageOverdue'] = 0;
|
||||
$result[$key]['percentageAtRisk'] = 0;
|
||||
$result[$key]['percentageOnTime'] = 0;
|
||||
$result[$key]['percentageTotalOverdue'] = 0;
|
||||
$result[$key]['percentageTotalAtRisk'] = 0;
|
||||
$result[$key]['percentageTotalOnTime'] = 0;
|
||||
$total = $value['overdue'] + $value['onTime'] + $value['atRisk'];
|
||||
if ($total != 0) {
|
||||
$result[$key]['percentageOverdue'] = ($value['overdue']*100)/$total;
|
||||
$result[$key]['percentageAtRisk'] = ($value['atRisk']*100)/$total;
|
||||
$result[$key]['percentageOnTime'] = ($value['onTime']*100)/$total;
|
||||
$result[$key]['percentageTotalOverdue'] = $response['overdue'] != 0 ? ($value['overdue']*100)/$response['overdue']: 0;
|
||||
$result[$key]['percentageTotalAtRisk'] = $response['atRisk'] != 0 ? ($value['atRisk']*100)/$response['atRisk'] : 0;
|
||||
$result[$key]['percentageTotalOnTime'] = $response['onTime'] != 0 ? ($value['onTime']*100)/$response['onTime']: 0;
|
||||
$result[$key]['percentageTotalOverdue'] = $response['overdue'] != 0 ? ($value['overdue']*100)/$response['overdue']: 0;
|
||||
$result[$key]['percentageTotalAtRisk'] = $response['atRisk'] != 0 ? ($value['atRisk']*100)/$response['atRisk'] : 0;
|
||||
$result[$key]['percentageTotalOnTime'] = $response['onTime'] != 0 ? ($value['onTime']*100)/$response['onTime']: 0;
|
||||
}
|
||||
}
|
||||
$response['dataList'] = $result;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -78,7 +78,6 @@ ViewDashboardModel.prototype.getPositionIndicator = function(callBack) {
|
||||
"y" : originalObject.y,
|
||||
"width" : originalObject.width,
|
||||
"height" : originalObject.height
|
||||
|
||||
};
|
||||
graphData.push(map);
|
||||
});
|
||||
|
||||
@@ -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++;
|
||||
});
|
||||
|
||||
@@ -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":
|
||||
$('#relatedLabel').css('visibility', 'visible');
|
||||
$('#relatedLabel').show();
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 = '';
|
||||
@@ -63,13 +61,13 @@ var tabActivate = [];
|
||||
Ext.onReady( function() {
|
||||
|
||||
myMask = new Ext.LoadMask(Ext.getBody(), {msg:_('ID_LOADING')});
|
||||
|
||||
|
||||
|
||||
Ext.QuickTips.init();
|
||||
|
||||
resultTpl = new Ext.XTemplate(
|
||||
'<tpl for="."><div class="x-combo-list-item" style="white-space:normal !important;word-wrap: break-word;">',
|
||||
'<span> {APP_PRO_TITLE}</span>',
|
||||
'<span> {APP_PRO_TITLE}</span>',
|
||||
'</div></tpl>'
|
||||
);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -238,7 +237,7 @@ Ext.onReady( function() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
storeIndicatorType = new Ext.data.GroupingStore( {
|
||||
proxy : new Ext.data.HttpProxy({
|
||||
api: {
|
||||
@@ -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'
|
||||
@@ -448,7 +447,7 @@ Ext.onReady( function() {
|
||||
return '<div class="search-item">' +
|
||||
'<h3><span>{owner_uid}</span>{owner_label}</h3>' +
|
||||
'{excerpt}' +
|
||||
'</div>';
|
||||
'</div>';
|
||||
}
|
||||
},
|
||||
//pageSize : 10,
|
||||
@@ -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,23 +527,24 @@ 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;
|
||||
}
|
||||
},
|
||||
scope: that
|
||||
});
|
||||
return false;
|
||||
return false;
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
tabchange : function ( that, tab ) {
|
||||
var id = tabPanel.getActiveTab().id;
|
||||
@@ -626,12 +626,9 @@ Ext.onReady( function() {
|
||||
items : [
|
||||
addTabButton,
|
||||
tabPanel
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
||||
//form
|
||||
frmDashboard = new Ext.FormPanel({
|
||||
id : 'frmDashboard',
|
||||
@@ -644,11 +641,11 @@ Ext.onReady( function() {
|
||||
waitMsgTarget : true,
|
||||
frame : true,
|
||||
defaults : {
|
||||
anchor : '100%',
|
||||
allowBlank : false,
|
||||
resizable : true,
|
||||
msgTarget : 'side',
|
||||
align : 'center'
|
||||
anchor : '100%',
|
||||
allowBlank : false,
|
||||
resizable : true,
|
||||
msgTarget : 'side',
|
||||
align : 'center'
|
||||
},
|
||||
items : [
|
||||
dashboardFields,
|
||||
@@ -671,10 +668,9 @@ Ext.onReady( function() {
|
||||
]
|
||||
});
|
||||
|
||||
ownerInfoGrid.store.load();
|
||||
ownerInfoGrid.on("afterrender", function(component) {
|
||||
component.getBottomToolbar().refresh.hideParent = true;
|
||||
component.getBottomToolbar().refresh.hide();
|
||||
component.getBottomToolbar().refresh.hide();
|
||||
});
|
||||
|
||||
viewport = new Ext.Viewport({
|
||||
@@ -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 = [];
|
||||
@@ -730,243 +727,245 @@ var addTab = function (flag) {
|
||||
return false;
|
||||
}
|
||||
var tab = {
|
||||
title : _('ID_INDICATOR')+ ' '+ (++indexTab),
|
||||
id : indexTab,
|
||||
iconCls : 'tabs',
|
||||
width : "100%",
|
||||
items : [
|
||||
new Ext.Panel({
|
||||
height : 230,
|
||||
width : "100%",
|
||||
border : true,
|
||||
bodyStyle : 'padding:10px',
|
||||
items : [
|
||||
new Ext.form.FieldSet({
|
||||
labelWidth : 150,
|
||||
labelAlign :'right',
|
||||
items : [
|
||||
{
|
||||
id : 'DAS_IND_UID_' + indexTab,
|
||||
xtype : 'textfield',
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
fieldLabel : _('ID_INDICATOR_TITLE'),
|
||||
id : 'IND_TITLE_'+ indexTab,
|
||||
xtype : 'textfield',
|
||||
anchor : '85%',
|
||||
maskRe : /([a-zA-Z0-9\s]+)$/,
|
||||
maxLength : 250,
|
||||
allowBlank : false
|
||||
},
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
id : 'IND_TYPE_'+ indexTab,
|
||||
fieldLabel : _('ID_INDICATOR_TYPE'),
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeIndicatorType,
|
||||
listeners:{
|
||||
scope: this,
|
||||
select: function(combo, record, index) {
|
||||
var value = combo.getValue();
|
||||
var field = '';
|
||||
var index = tabPanel.getActiveTab().id;
|
||||
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);
|
||||
title : _('ID_INDICATOR')+ ' '+ (++indexTab),
|
||||
id : indexTab,
|
||||
iconCls : 'tabs',
|
||||
width : "100%",
|
||||
items : [
|
||||
new Ext.Panel({
|
||||
height : 230,
|
||||
width : "100%",
|
||||
border : true,
|
||||
bodyStyle : 'padding:10px',
|
||||
items : [
|
||||
new Ext.form.FieldSet({
|
||||
labelWidth : 150,
|
||||
labelAlign :'right',
|
||||
items : [
|
||||
{
|
||||
id : 'DAS_IND_UID_' + indexTab,
|
||||
xtype : 'textfield',
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
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]+)$/,
|
||||
regex : /([a-zA-Z0-9_'\s]+)$/,
|
||||
regexText : _('ID_INVALID_VALUE', _('ID_INDICATOR_TITLE')),
|
||||
maxLength : 250,
|
||||
allowBlank : false
|
||||
},
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
id : 'IND_TYPE_'+ indexTab,
|
||||
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,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeIndicatorType,
|
||||
listeners:{
|
||||
scope: this,
|
||||
select: function(combo, record, index) {
|
||||
var value = combo.getValue();
|
||||
var field = '';
|
||||
var index = tabPanel.getActiveTab().id;
|
||||
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 {
|
||||
field = Ext.getCmp('IND_PROCESS_'+index);
|
||||
field.enable();
|
||||
field.show();
|
||||
}
|
||||
if (value == '1010' || value == '1030' || value == '1050') {
|
||||
for (var i=0; i<fields.length; i++) {
|
||||
field = Ext.getCmp(fields[i]);
|
||||
field.disable();
|
||||
field.hide();
|
||||
} else {
|
||||
field = Ext.getCmp('IND_PROCESS_'+index);
|
||||
}
|
||||
} else {
|
||||
for (var i=0; i<fields.length; i++) {
|
||||
field = Ext.getCmp(fields[i]);
|
||||
field.enable();
|
||||
field.show();
|
||||
}
|
||||
if (value == '1010' || value == '1030' || value == '1050') {
|
||||
for (var i=0; i<fields.length; i++) {
|
||||
field = Ext.getCmp(fields[i]);
|
||||
field.disable();
|
||||
field.hide();
|
||||
}
|
||||
} else {
|
||||
for (var i=0; i<fields.length; i++) {
|
||||
field = Ext.getCmp(fields[i]);
|
||||
field.enable();
|
||||
field.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
new Ext.form.FieldSet({
|
||||
title : _('ID_INDICATOR_GOAL'),
|
||||
width : "90%",
|
||||
id : 'fieldSet_'+ indexTab,
|
||||
bodyStyle: 'paddingLeft: 75px;',
|
||||
paddingLeft: "30px",
|
||||
marginLeft : "60px",
|
||||
layout : 'hbox',
|
||||
hidden : true,
|
||||
items : [
|
||||
new Ext.form.ComboBox({
|
||||
editable : false,
|
||||
id : 'DAS_IND_DIRECTION_'+ indexTab,
|
||||
displayField : 'label',
|
||||
valueField : 'id',
|
||||
value : '2',
|
||||
forceSelection : false,
|
||||
selectOnFocus : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
width : 90,
|
||||
triggerAction : 'all',
|
||||
mode : 'local',
|
||||
allowBlank : false,
|
||||
store : new Ext.data.ArrayStore({
|
||||
id: 2,
|
||||
fields: [
|
||||
'id',
|
||||
'label'
|
||||
],
|
||||
data: [['1', _('ID_LESS_THAN')], ['2', _('ID_MORE_THAN')]]
|
||||
})
|
||||
}),
|
||||
{
|
||||
fieldLabel : _('ID_INDICATOR_GOAL'),
|
||||
id : 'IND_GOAL_'+ indexTab,
|
||||
xtype : 'textfield',
|
||||
anchor : '40%',
|
||||
maskRe : /([0-9\.]+)$/,
|
||||
maxLength : 9,
|
||||
value : 1,
|
||||
width : 80,
|
||||
allowBlank : false,
|
||||
listeners : {
|
||||
focus : function(tb, e) {
|
||||
Ext.QuickTips.register({
|
||||
target: tb,
|
||||
title: _('ID_HELP'),
|
||||
text: _('ID_GOAL_HELP')
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
listeners:
|
||||
}
|
||||
}
|
||||
}),
|
||||
new Ext.form.FieldSet({
|
||||
title : _('ID_INDICATOR_GOAL'),
|
||||
width : "90%",
|
||||
id : 'fieldSet_'+ indexTab,
|
||||
bodyStyle: 'paddingLeft: 75px;',
|
||||
paddingLeft: "30px",
|
||||
marginLeft : "60px",
|
||||
layout : 'hbox',
|
||||
hidden : true,
|
||||
items : [
|
||||
new Ext.form.ComboBox({
|
||||
editable : false,
|
||||
id : 'DAS_IND_DIRECTION_'+ indexTab,
|
||||
displayField : 'label',
|
||||
valueField : 'id',
|
||||
value : '2',
|
||||
forceSelection : false,
|
||||
selectOnFocus : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
width : 90,
|
||||
triggerAction : 'all',
|
||||
mode : 'local',
|
||||
allowBlank : false,
|
||||
store : new Ext.data.ArrayStore({
|
||||
id: 2,
|
||||
fields: [
|
||||
'id',
|
||||
'label'
|
||||
],
|
||||
data: [['1', _('ID_LESS_THAN')], ['2', _('ID_MORE_THAN')]]
|
||||
})
|
||||
}),
|
||||
{
|
||||
render: function()
|
||||
{
|
||||
var index = tabPanel.getActiveTab().id;
|
||||
var myfieldset = document.getElementById('fieldSet_'+index);
|
||||
myfieldset.style.marginLeft = "70px";
|
||||
myfieldset.style.marginRight = "70px";
|
||||
fieldLabel : _('ID_INDICATOR_GOAL'),
|
||||
id : 'IND_GOAL_'+ indexTab,
|
||||
xtype : 'textfield',
|
||||
anchor : '40%',
|
||||
maskRe : /([0-9\.]+)$/,
|
||||
maxLength : 9,
|
||||
value : 1,
|
||||
width : 80,
|
||||
allowBlank : false,
|
||||
listeners : {
|
||||
focus : function(tb, e) {
|
||||
Ext.QuickTips.register({
|
||||
target: tb,
|
||||
title: _('ID_HELP'),
|
||||
text: _('ID_GOAL_HELP')
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
listeners:
|
||||
{
|
||||
render: function()
|
||||
{
|
||||
var index = tabPanel.getActiveTab().id;
|
||||
var myfieldset = document.getElementById('fieldSet_'+index);
|
||||
myfieldset.style.marginLeft = "70px";
|
||||
myfieldset.style.marginRight = "70px";
|
||||
}
|
||||
}
|
||||
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_PROCESS'),
|
||||
id : 'IND_PROCESS_'+ indexTab,
|
||||
displayField : 'prj_name',
|
||||
valueField : 'prj_uid',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_EMPTY_PROCESSES'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
value : '0',
|
||||
store : storeProject
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_FIRST_FIGURE'),
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
id : 'DAS_IND_FIRST_FIGURE_'+ indexTab,
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeGraphic
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_PERIODICITY'),
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
id : 'DAS_IND_FIRST_FREQUENCY_'+ indexTab,
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeFrecuency
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_SECOND_FIGURE'),
|
||||
id : 'DAS_IND_SECOND_FIGURE_'+ indexTab,
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeGraphic
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_PERIODICITY'),
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
id : 'DAS_IND_SECOND_FREQUENCY_'+ indexTab,
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeFrecuency
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
],
|
||||
listeners : {
|
||||
scope: this,
|
||||
activate : function (that) {
|
||||
if (tabActivate.indexOf(that.id) == -1 ) {
|
||||
tabActivate.push(that.id);
|
||||
}
|
||||
},
|
||||
},
|
||||
closable:true
|
||||
};
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
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 : true,
|
||||
emptyText : _('ID_EMPTY_PROCESSES'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeProject
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_FIRST_FIGURE'),
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
id : 'DAS_IND_FIRST_FIGURE_'+ indexTab,
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeGraphic
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_PERIODICITY'),
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
id : 'DAS_IND_FIRST_FREQUENCY_'+ indexTab,
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeFrequency
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_SECOND_FIGURE'),
|
||||
id : 'DAS_IND_SECOND_FIGURE_'+ indexTab,
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeGraphic
|
||||
}),
|
||||
new Ext.form.ComboBox({
|
||||
anchor : '85%',
|
||||
editable : false,
|
||||
fieldLabel : _('ID_PERIODICITY'),
|
||||
displayField : 'CAT_LABEL_ID',
|
||||
id : 'DAS_IND_SECOND_FREQUENCY_'+ indexTab,
|
||||
valueField : 'CAT_UID',
|
||||
forceSelection : false,
|
||||
emptyText : _('ID_SELECT'),
|
||||
selectOnFocus : true,
|
||||
hidden : true,
|
||||
typeAhead : true,
|
||||
autocomplete : true,
|
||||
triggerAction : 'all',
|
||||
store : storeFrequency
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
],
|
||||
listeners : {
|
||||
scope: this,
|
||||
activate : function (that) {
|
||||
if (tabActivate.indexOf(that.id) == -1 ) {
|
||||
tabActivate.push(that.id);
|
||||
}
|
||||
}
|
||||
},
|
||||
closable:true
|
||||
};
|
||||
if (flag != 'load') {
|
||||
tabPanel.add(tab).show();
|
||||
} else {
|
||||
@@ -1028,7 +1027,7 @@ var validateNameDashboard = function () {
|
||||
PMExt.warning(_('ID_DASHBOARD'), _('ID_DIRECTORY_NAME_EXISTS_ENTER_ANOTHER', title));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
saveDashboard();
|
||||
},
|
||||
failure: function (response) {
|
||||
@@ -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;
|
||||
@@ -1271,7 +1265,7 @@ var loadIndicators = function (DAS_UID) {
|
||||
addTab('load');
|
||||
}
|
||||
dataIndicator = jsonResp;
|
||||
|
||||
|
||||
for (var i=0; i<=jsonResp.length-1; i++) {
|
||||
addTab('load');
|
||||
tabPanel.getItem(i+1).setTitle(jsonResp[i]['DAS_IND_TITLE']);
|
||||
|
||||
@@ -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="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>
|
||||
<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>
|
||||
<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 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: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: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: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"} : <a id="sortListButton" class="fa fa-chevron-up fa-1x" style="color:#000;" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -453,3 +456,5 @@
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user