dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37404
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19141: EV option names fix.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 19141 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-05-12 14:18:55 +0200
message:
EV option names fix.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/eventchart.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js 2015-05-12 12:01:58 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js 2015-05-12 12:17:53 +0000
@@ -3573,12 +3573,12 @@
else {
for (var i = 0, id, name, mxl, ids; i < store.rangeFields.length; i++) {
id = failSafeColumnIdMap[store.rangeFields[i]];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id];
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}
@@ -3601,12 +3601,12 @@
else {
for (var i = 0, id, name; i < rowIds.length; i++) {
id = rowIds[i];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id] || id;
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/eventchart.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/eventchart.js 2015-05-12 12:08:19 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/eventchart.js 2015-05-12 12:17:53 +0000
@@ -3656,12 +3656,12 @@
else {
for (var i = 0, id, name, mxl, ids; i < store.rangeFields.length; i++) {
id = failSafeColumnIdMap[store.rangeFields[i]];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id];
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}
@@ -3684,12 +3684,12 @@
else {
for (var i = 0, id, name; i < rowIds.length; i++) {
id = rowIds[i];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id] || id;
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js 2015-05-12 12:08:19 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js 2015-05-12 12:17:53 +0000
@@ -3656,12 +3656,12 @@
else {
for (var i = 0, id, name, mxl, ids; i < store.rangeFields.length; i++) {
id = failSafeColumnIdMap[store.rangeFields[i]];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id];
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}
@@ -3684,12 +3684,12 @@
else {
for (var i = 0, id, name; i < rowIds.length; i++) {
id = rowIds[i];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id] || id;
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2015-03-02 16:08:15 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2015-05-12 12:17:53 +0000
@@ -650,7 +650,6 @@
labelFont: '9px sans-serif'
},
legendStyle: {
- labelMaxLength: 10,
labelFont: 'normal 10px sans-serif',
labelColor: '#222',
labelMarkerSize: 10,
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js 2015-05-12 12:08:19 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js 2015-05-12 12:17:53 +0000
@@ -3656,12 +3656,12 @@
else {
for (var i = 0, id, name, mxl, ids; i < store.rangeFields.length; i++) {
id = failSafeColumnIdMap[store.rangeFields[i]];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id];
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}
@@ -3684,12 +3684,12 @@
else {
for (var i = 0, id, name; i < rowIds.length; i++) {
id = rowIds[i];
- name = md.booleanNames[id] || md.optionNames[id] || md.names[id] || id;
+ name = '' + (md.booleanNames[id] || md.optionNames[id] || md.names[id] || id);
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
- if (Ext.isNumber(mxl)) {
+ if (Ext.isNumber(mxl) && name.length > mxl) {
name = name.substr(0, mxl) + '..';
}
}