dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23214
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11279: (PT, DV) Detailed data element gui issues fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 11279 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-06-28 15:16:49 +0200
message:
(PT, DV) Detailed data element gui issues fixed.
modified:
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-06-28 12:11:39 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-06-28 13:15:50 +0000
@@ -332,11 +332,12 @@
this.load({
scope: this,
callback: function() {
- this.sortStore();
+ pt.util.multiselect.filterAvailable({store: this}, {store: store.dataElementSelected});
}
});
},
setDetailsProxy: function(uid) {
+ console.log(uid);
if (Ext.isString(uid)) {
this.setProxy({
type: 'ajax',
@@ -354,8 +355,8 @@
r.set('id', r.data.dataElementId + '-' + r.data.optionComboId);
r.set('name', r.data.operandName);
});
-
- this.sortStore();
+
+ pt.util.multiselect.filterAvailable({store: this}, {store: store.dataElementSelected});
}
});
}
@@ -4249,6 +4250,14 @@
pt.util.multiselect.filterAvailable({store: pt.store.dataElementAvailable}, {store: pt.store.dataElementSelected});
}
+ // Operands
+ objectName = dimConf.operand.objectName;
+ if (dimMap[objectName]) {
+ pt.store.dataElementSelected.add(Ext.clone(recMap[objectName]));
+ pt.util.multiselect.filterAvailable({store: pt.store.dataElementAvailable}, {store: pt.store.dataElementSelected});
+ dataElementDetailLevel.setValue(objectName);
+ }
+
// Data sets
pt.store.dataSetSelected.removeAll();
objectName = dimConf.dataSet.objectName;
@@ -4419,6 +4428,7 @@
interpretationButton: interpretationButton,
userOrganisationUnit: userOrganisationUnit,
userOrganisationUnitChildren: userOrganisationUnitChildren,
+ dataElementDetailLevel: dataElementDetailLevel,
setFavorite: setFavorite,
items: [
westRegion,
=== 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 2013-06-28 10:42:07 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-06-28 13:15:50 +0000
@@ -1472,7 +1472,7 @@
for (var j = 0, id, value, htmlValue, empty; j < colSize; j++) {
id = (xColAxis ? pt.util.str.replaceAll(xColAxis.ids[j], '-', '') : '') + (xRowAxis ? pt.util.str.replaceAll(xRowAxis.ids[i], '-', '') : '');
empty = false;
-console.log(id);
+
if (idValueMap[id]) {
value = parseFloat(idValueMap[id]);
htmlValue = pt.util.number.roundIf(idValueMap[id], 1).toString();
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-06-28 11:52:44 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-06-28 13:15:50 +0000
@@ -284,7 +284,7 @@
a.store.clearFilter();
this.filterAvailable(a, s);
},
- filterAvailable: function(a, s) {
+ filterAvailable: function(a, s) {
a.store.filterBy( function(r) {
var keep = true;
s.store.each( function(r2) {
@@ -598,7 +598,7 @@
this.load({
scope: this,
callback: function() {
- this.sortStore();
+ dv.util.multiselect.filterAvailable({store: this}, {store: store.dataElementSelected});
}
});
},
@@ -620,14 +620,19 @@
r.set('id', r.data.dataElementId + '-' + r.data.optionComboId);
r.set('name', r.data.operandName);
});
-
- this.sortStore();
+
+ dv.util.multiselect.filterAvailable({store: this}, {store: store.dataElementSelected});
}
});
}
else {
alert('Invalid parameter');
}
+ },
+ listeners: {
+ load: function(s) {
+
+ }
}
});
@@ -4378,6 +4383,7 @@
dv.util.chart.createChart(layout, dv);
// Set gui
+
xLayout = dv.util.chart.getExtendedLayout(layout);
dimMap = xLayout.objectNameDimensionsMap;
recMap = xLayout.objectNameItemsMap;
@@ -4404,7 +4410,7 @@
objectName = dimConf.operand.objectName;
if (dimMap[objectName]) {
dv.store.dataElementSelected.add(Ext.clone(recMap[objectName]));
- dv.util.multiselect.filterAvailable({store: dv.store.dataSetAvailable}, {store: dv.store.dataSetSelected});
+ dv.util.multiselect.filterAvailable({store: dv.store.dataElementAvailable}, {store: dv.store.dataElementSelected});
dv.viewport.dataElementDetailLevel.setValue(objectName);
}