← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3404: fixed selection list in data locking

 

------------------------------------------------------------
revno: 3404
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-04-15 14:27:41 +0200
message:
  fixed selection list in data locking
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/collectiveDataLockingForm.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-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/collectiveDataLockingForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/collectiveDataLockingForm.js	2011-04-11 12:08:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/collectiveDataLockingForm.js	2011-04-15 12:27:41 +0000
@@ -1,7 +1,14 @@
-jQuery(document).ready(function() {
-	validation2('lockingForm', function(form) {
-		validateCollectiveDataLockingForm(form);
-	}, {
-		'rules' : getValidationRules("dataLocking")
-	});
+jQuery(document).ready(function()
+{
+    validation2('lockingForm', function( form )
+    {
+        validateCollectiveDataLockingForm(form);
+    },
+    {
+        'beforeValidateHandler' : function() {
+            $("#selectedPeriods option").each(function() { $(this).attr("selected", "true"); });
+            $("#selectedDataSets option").each(function() { $(this).attr("selected", "true"); });
+        },
+        'rules' : getValidationRules("dataLocking")
+    });
 });