dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18439
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7778: (DV) Relative period gui bug fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 7778 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-07-31 08:25:20 +0200
message:
(DV) Relative period gui bug fixed.
modified:
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-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 2012-07-28 11:01:29 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2012-07-31 06:23:24 +0000
@@ -1166,13 +1166,24 @@
},
checkbox: {
setRelativePeriods: function(rp) {
- for (var r in rp) {
- var cmp = DV.util.getCmp('checkbox[paramName="' + r + '"]');
- if (cmp) {
- cmp.setValue(rp[r]);
- }
- }
- }
+ if (rp) {
+ for (var r in rp) {
+ var cmp = DV.util.getCmp('checkbox[paramName="' + r + '"]');
+ if (cmp) {
+ cmp.setValue(rp[r]);
+ }
+ }
+ }
+ else {
+ DV.util.checkbox.setFalse();
+ }
+ },
+ setFalse: function() {
+ var a = DV.cmp.dimension.relativeperiod.checkbox;
+ for (var i = 0; i < a.length; i++) {
+ a[i].setValue(false);
+ }
+ }
},
toolbar: {
separator: {