← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17553: PT DV selection issues fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 17553 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-11-20 17:17:02 +0100
message:
  PT DV selection issues fixed.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/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-apps/src/main/webapp/dhis-web-pivot/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-11-20 12:24:05 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-11-20 16:15:18 +0000
@@ -2717,7 +2717,6 @@
 				}
 
 				if (!path) {
-					console.log('Available indicators: invalid id');
 					return;
 				}
 
@@ -2762,12 +2761,11 @@
 
                 this.isPending = false;
 
+                ns.core.web.multiSelect.filterAvailable({store: indicatorAvailableStore}, {store: indicatorSelectedStore});
+
                 if (fn) {
 					fn();
 				}
-				else {
-					ns.core.web.multiSelect.filterAvailable({store: indicatorAvailableStore}, {store: indicatorSelectedStore});
-				}
             },
 			storage: {},
 			parent: null,
@@ -2863,7 +2861,6 @@
 				}
 
 				if (!path) {
-					alert('Available data elements: invalid id');
 					return;
 				}
 
@@ -2911,7 +2908,6 @@
 				}
 
 				if (!path) {
-					alert('Available data elements: invalid id');
 					return;
 				}
 
@@ -2960,12 +2956,11 @@
 
                 this.isPending = false;
 
+				ns.core.web.multiSelect.filterAvailable({store: dataElementAvailableStore}, {store: dataElementSelectedStore});
+
                 if (fn) {
 					fn();
 				}
-				else {
-					ns.core.web.multiSelect.filterAvailable({store: dataElementAvailableStore}, {store: dataElementSelectedStore});
-				}
             },
             sortStore: function() {
 				this.sort('name', 'ASC');
@@ -3080,12 +3075,11 @@
 
                 this.isPending = false;
 
+				ns.core.web.multiSelect.filterAvailable({store: dataSetAvailableStore}, {store: dataSetSelectedStore});
+
                 if (fn) {
 					fn();
 				}
-				else {
-					ns.core.web.multiSelect.filterAvailable({store: dataSetAvailableStore}, {store: dataSetSelectedStore});
-				}
             },
 			storage: {},
 			parent: null,
@@ -4968,12 +4962,11 @@
 
 					this.isPending = false;
 
+					ns.core.web.multiSelect.filterAvailable({store: availableStore}, {store: selectedStore});
+
 					if (fn) {
 						fn();
 					}
-					else {
-						ns.core.web.multiSelect.filterAvailable({store: availableStore}, {store: selectedStore});
-					}
 				},
 				sortStore: function() {
 					this.sort('name', 'ASC');

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2014-11-20 14:52:46 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2014-11-20 16:15:18 +0000
@@ -2750,7 +2750,6 @@
 				}
 				
 				if (!path) {
-					console.log('Available indicators: invalid id');
 					return;
 				}
 
@@ -2795,12 +2794,11 @@
 
                 this.isPending = false;
 
+                ns.core.web.multiSelect.filterAvailable({store: indicatorAvailableStore}, {store: indicatorSelectedStore});
+
                 if (fn) {
 					fn();
 				}
-				else {
-					ns.core.web.multiSelect.filterAvailable({store: indicatorAvailableStore}, {store: indicatorSelectedStore});
-				}
             },
 			storage: {},
 			parent: null,
@@ -2907,7 +2905,6 @@
 				}
 
 				if (!path) {
-					alert('Available data elements: invalid id');
 					return;
 				}
 
@@ -2955,7 +2952,6 @@
 				}
 
 				if (!path) {
-					alert('Available data elements: invalid id');
 					return;
 				}
 
@@ -3004,12 +3000,11 @@
 
                 this.isPending = false;
 
+				ns.core.web.multiSelect.filterAvailable({store: dataElementAvailableStore}, {store: dataElementSelectedStore});
+
                 if (fn) {
 					fn();
 				}
-				else {
-					ns.core.web.multiSelect.filterAvailable({store: dataElementAvailableStore}, {store: dataElementSelectedStore});
-				}
             },
             sortStore: function() {
 				this.sort('name', 'ASC');
@@ -3135,12 +3130,11 @@
 
                 this.isPending = false;
 
+				ns.core.web.multiSelect.filterAvailable({store: dataSetAvailableStore}, {store: dataSetSelectedStore});
+
                 if (fn) {
 					fn();
 				}
-				else {
-					ns.core.web.multiSelect.filterAvailable({store: dataSetAvailableStore}, {store: dataSetSelectedStore});
-				}
             },
 			storage: {},
 			parent: null,
@@ -5041,12 +5035,11 @@
 
 					this.isPending = false;
 
+					ns.core.web.multiSelect.filterAvailable({store: availableStore}, {store: selectedStore});
+
 					if (fn) {
 						fn();
 					}
-					else {
-						ns.core.web.multiSelect.filterAvailable({store: availableStore}, {store: selectedStore});
-					}
 				},
 				sortStore: function() {
 					this.sort('name', 'ASC');