tool tips correction

This commit is contained in:
Dante
2015-06-22 13:52:06 -04:00
parent f0838d6dd7
commit b8d6b0ed8f
4 changed files with 9 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,10 +1,11 @@
var ViewDashboardModel = function (oauthToken, server, workspace) {
var ViewDashboardModel = function (oauthToken, server, workspace, moneySymbol) {
this.server = server;
this.workspace = workspace;
this.baseUrl = "/api/1.0/" + workspace + "/";
//this.baseUrl = "http://127.0.0.1:8080/api/1.0/workflow/";
this.oauthToken = oauthToken;
this.helper = new ViewDashboardHelper();
this.moneySymbol = moneySymbol;
};
ViewDashboardModel.prototype.userDashboards = function(userId) {

View File

@@ -1,5 +1,3 @@
var ViewDashboardPresenter = function (model) {
this.helper = new ViewDashboardHelper();
this.helper.assert(model != null, "A model must be passed for the presenter work.")
@@ -40,7 +38,6 @@ ViewDashboardPresenter.prototype.userDashboardsViewModel = function(data) {
if (!hasFavorite && returnList.length > 0 ) {
returnList[0].isFavorite = 1;
}
return returnList;
};
@@ -263,6 +260,8 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
"inefficiencyCost" : "value"
};
var newObject = that.helper.merge(originalObject, {}, map);
//the values do not come with a minus and moneny symbol, so we add them
newObject.valuePrefix = that.model.moneySymbol + " -";
graphData.push(newObject);
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
//rounded to 1 decimal
@@ -294,6 +293,7 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
"deviationTime" : "dispersion"
};
var newObject = that.helper.merge(originalObject, {}, map);
newObject.valuePrefix = that.model.moneySymbol + " -";
graphData.push(newObject);
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10)/10;
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
@@ -429,6 +429,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelPei = function(modelD
"deviationTime" : "dispersion"
};
var newObject = that.helper.merge(originalObject, {}, map);
newObject.valuePrefix = that.model.moneySymbol + " -";
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10;
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
@@ -456,6 +457,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD
"deviationTime" : "dispersion"
};
var newObject = that.helper.merge(originalObject, {}, map);
newObject.valuePrefix = that.model.moneySymbol + " -";
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost * 10) / 10;
originalObject.efficiencyIndexToShow = that.roundedIndicatorValue(originalObject.efficiencyIndex);
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);

View File

@@ -231,7 +231,7 @@ WidgetBuilder.prototype.setColorForInefficiency = function ($widget, indicatorDa
/**********************************************************************/
helper = new ViewDashboardHelper();
var ws = urlProxy.split('/');
model = new ViewDashboardModel(token, urlProxy, ws[3]);
model = new ViewDashboardModel(token, urlProxy, ws[3], moneyUnit);
presenter = new ViewDashboardPresenter(model);
window.loadedIndicators = []; //updated in das-title-selector.click->fillIndicatorWidgets, ready->fillIndicatorWidgets