dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18399
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7745: Add confirmation when clicking to Remove empty event button in anonymous program.
------------------------------------------------------------
revno: 7745
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-07-27 22:29:04 +0700
message:
Add confirmation when clicking to Remove empty event button in anonymous program.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-07-27 08:07:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-07-27 15:29:04 +0000
@@ -383,4 +383,5 @@
value_is_valid = Value is valid
incomplete_confirm_message=Are you sure this event is incompleted ?
incomplete = Incomplete
-remove_empty_events_success = Remove empty events successfully
\ No newline at end of file
+remove_empty_events_success = Remove empty events successfully
+confirm_remove_empty_events = Are you sure you want to remove empty events ?
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-07-18 04:15:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-07-27 15:29:04 +0000
@@ -152,7 +152,7 @@
var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
var i18n_no_compulsary_data_elements = '$encoder.jsEscape( $i18n.getString( "no_compulsary_data_elements" ) , "'")';
var i18n_remove_empty_events_success = '$encoder.jsEscape( $i18n.getString( "remove_empty_events_success" ) , "'")';
-
+ var i18n_confirm_remove_empty_events = '$encoder.jsEscape( $i18n.getString( "confirm_remove_empty_events" ) , "'")';
isAjax = true;
contentDiv = '';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-07-18 04:15:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-07-27 15:29:04 +0000
@@ -350,16 +350,21 @@
function removeEmptyEvents()
{
- jQuery.getJSON( "removeEmptyEvents.action",
- {
- programStageId: jQuery('#selectDiv [id=programId] option:selected').attr('programStageId')
- },
- function( json )
- {
- if(json.response=='success')
+ var result = window.confirm( i18n_confirm_remove_empty_events );
+
+ if ( result )
+ {
+ jQuery.getJSON( "removeEmptyEvents.action",
{
- showSuccessMessage( i18n_remove_empty_events_success );
- validateSearchEvents( true )
- }
- });
+ programStageId: jQuery('#selectDiv [id=programId] option:selected').attr('programStageId')
+ },
+ function( json )
+ {
+ if(json.response=='success')
+ {
+ showSuccessMessage( i18n_remove_empty_events_success );
+ validateSearchEvents( true )
+ }
+ });
+ }
}
\ No newline at end of file