dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30001
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15213: ER, filter param bug fixed + PT DV GIS, plugin fixes.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 15213 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-05-10 14:54:03 +0200
message:
ER, filter param bug fixed + PT DV GIS, plugin fixes.
modified:
dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.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-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.js 2014-05-06 12:23:34 +0000
+++ dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.js 2014-05-10 12:35:19 +0000
@@ -1838,8 +1838,19 @@
for (var i = 0, dim; i < view.filters.length; i++) {
dim = view.filters[i];
- paramString += '&filter=' + dim.dimension;
- paramString += dim.filter ? ':' + encodeURIComponent(dim.filter) : '';
+ paramString += '&filter=' + dim.dimension;
+
+ if (dim.items) {
+ paramString += ':';
+
+ for (var i = 0; i < dim.items.length; i++) {
+ paramString += encodeURIComponent(dim.items[i].id);
+ paramString += i < dim.items.length - 1 ? ';' : '';
+ }
+ }
+ else {
+ paramString += dim.filter ? ':' + encodeURIComponent(dim.filter) : '';
+ }
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2014-05-05 18:42:32 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2014-05-10 12:35:19 +0000
@@ -1980,7 +1980,7 @@
displayDensity,
fontSize,
isNumeric = Ext.isObject(config) && Ext.isString(config.type) && config.type.substr(0,5) === 'value' && !config.empty,
- isValue = Ext.isObject(config) && Ext.isString(config.type) && config.type === 'value' && !config.empty,
+ isValue = isNumeric && config.type === 'value',
cls = '',
html = '';
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js 2014-05-05 09:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js 2014-05-09 11:34:49 +0000
@@ -2692,6 +2692,7 @@
css += '.x-mask-msg { \n padding: 0; \n border: 0 none; \n background-image: none; \n background-color: transparent; \n } \n';
css += '.x-mask-msg div { \n background-position: 11px center; \n } \n';
css += '.x-mask-msg .x-mask-loading { \n border: 0 none; \n background-color: #000; \n color: #fff; \n border-radius: 2px; \n padding: 12px 14px 12px 30px; \n opacity: 0.65; \n } \n';
+ css += '.x-mask { opacity: 0 } \n';
css += '.pivot td.legend { \n padding: 0; \n } \n';
css += '.pivot div.legendCt { \n display: table; \n float: right; \n width: 100%; \n } \n';
@@ -2966,6 +2967,12 @@
config = web.pivot.getHtml(xLayout, xResponse, xColAxis, xRowAxis);
ns.app.centerRegion.update(config.html);
+ Ext.defer( function() {
+ Ext.get(ns.core.init.el).fadeIn({
+ duration: 400
+ });
+ }, 300 );
+
// after render
ns.app.layout = layout;
ns.app.xLayout = xLayout;
@@ -3027,6 +3034,8 @@
}
ns.core = PT.getCore(Ext.clone(init));
+ ns.core.init.el = config.el;
+ Ext.get(ns.core.init.el).setStyle('opacity', 0);
extendInstance(ns);
ns.app.viewport = createViewport();
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html 2014-05-03 12:10:51 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html 2014-05-09 11:18:28 +0000
@@ -10,7 +10,7 @@
h1 {font-size: 20px; margin: 20px 0;}
- #chart1, #chart2 {width: 90%; margin-bottom: 50px; height: 300px; border: 2px solid #d1d1d1; border-radius: 1px;}
+ #chart1, #chart2 {width: 90%; margin-bottom: 50px; height: 300px}
</style>
<script>
@@ -36,13 +36,13 @@
filters: [
{dimension: 'ou', items: [{id: 'USER_ORGUNIT'}]}
],
- targetLineValue: 70
+ //targetLineValue: 70
//baseLineValue: 20,
- //showTrendLine: true,
- //hideLegend: true,
+ showTrendLine: true,
+ hideLegend: true,
//title: 'My chart title',
- //domainAxisTitle: 'Periods',
- //rangeAxisTitle: 'Percent'
+ domainAxisTitle: 'Periods',
+ rangeAxisTitle: 'Percent'
});
});
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.js 2014-05-03 12:10:51 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.js 2014-05-09 11:18:28 +0000
@@ -66,7 +66,7 @@
DV.instances = [];
DV.i18n = {};
- DV.isDebug = true;
+ DV.isDebug = false;
DV.isSessionStorage = ('sessionStorage' in window && window['sessionStorage'] !== null);
DV.getCore = function(init) {
@@ -2731,9 +2731,10 @@
css += '.dv-chart-tips .x-tip-body div { font-family: arial,sans-serif,ubuntu,consolas !important; } \n';
// load mask css
- css += '.x-mask-msg { padding: 0; \n border: 0 none; background-image: none; background-color: transparent; } \n';
+ css += '.x-mask-msg { padding: 0; border: 0 none; background-image: none; background-color: transparent; } \n';
css += '.x-mask-msg div { background-position: 11px center; } \n';
css += '.x-mask-msg .x-mask-loading { border: 0 none; \n background-color: #000; color: #fff; border-radius: 2px; padding: 12px 14px 12px 30px; opacity: 0.65; } \n';
+ css += '.x-mask { opacity: 0; } \n';
Ext.util.CSS.createStyleSheet(css);
@@ -2864,6 +2865,7 @@
web = ns.core.web;
init.el = config.el;
+ Ext.get(init.el).setStyle('opacity', 0);
web.chart = web.chart || {};
@@ -2967,15 +2969,23 @@
// create chart
ns.app.chart = ns.core.web.chart.createChart(ns);
+ ns.app.chart.on('afterrender', function() {
+ Ext.defer( function() {
+ Ext.get(ns.core.init.el).fadeIn({
+ duration: 400
+ });
+ }, 300 );
+ });
+
// update viewport
ns.app.centerRegion.removeAll();
ns.app.centerRegion.add(ns.app.chart);
-
+
web.mask.hide(ns.app.centerRegion);
};
};
- createViewport = function() {
+ createViewport = function() {
var el = Ext.get(ns.core.init.el),
setFavorite,
centerRegion,