dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00194
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 58: Fixed bug #340914 Data Locking Exception error
------------------------------------------------------------
revno: 58
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Sat 2009-03-14 07:16:14 +0100
message:
Fixed bug #340914 Data Locking Exception error
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/locking.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2009-03-12 05:19:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2009-03-14 06:16:14 +0000
@@ -94,3 +94,5 @@
view_violations = View violations
data_integrity_checks_performed = Data integrity checks performed
data_elements_assigned_to_period_types_with_different_period_types = Data elements assigned to data sets with different period types
+select_a_period_type = Please select a period type
+select_a_period = Please select a period
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/locking.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/locking.js 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/locking.js 2009-03-14 06:16:14 +0000
@@ -90,8 +90,28 @@
function updateDataSets()
{
- selectAllById( "lockedDataSets" );
- selectAllById( "unlockedDataSets" );
-
- document.getElementById( "lockingForm" ).submit();
+ if ( validateLocking() )
+ {
+ selectAllById( "lockedDataSets" );
+ selectAllById( "unlockedDataSets" );
+
+ document.getElementById( "lockingForm" ).submit();
+ }
+}
+
+function validateLocking()
+{
+ if ( getListValue( "periodTypeId" ) == "null" )
+ {
+ setMessage( i18n_select_a_period_type );
+ return false;
+ }
+
+ if ( getListValue( "periodId" ) == "null" )
+ {
+ setMessage( i18n_select_a_period );
+ return false;
+ }
+
+ return true;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm 2009-03-14 06:16:14 +0000
@@ -70,3 +70,10 @@
</table>
</form>
+
+<span id="message"></span>
+
+<script type="text/javascript">
+ var i18n_select_a_period_type = '$encoder.jsEscape( $i18n.getString( "select_a_period_type" ), "'" )';
+ var i18n_select_a_period = '$encoder.jsEscape( $i18n.getString( "select_a_period" ), "'" )';
+</script>
--
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.