dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13581
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4380: Fixed issue, data entry works properly if user refreshes page in offline mode
------------------------------------------------------------
revno: 4380
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-19 20:37:09 +0200
message:
Fixed issue, data entry works properly if user refreshes page in offline mode
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.vm
dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
--
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-commons-resources/src/main/webapp/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2011-08-19 08:51:51 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2011-08-19 18:37:09 +0000
@@ -18,6 +18,7 @@
javascripts/jQuery/jquery.glob.js
javascripts/jQuery/jquery.date.js
javascripts/jQuery/jquery.tmpl.js
+i18nJavaScript.action
javascripts/commons.js
javascripts/lists.js
javascripts/periodType.js
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm 2011-04-11 13:46:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm 2011-08-19 18:37:09 +0000
@@ -69,80 +69,3 @@
i18n_weekday_short_thursday,
i18n_weekday_short_friday,
i18n_weekday_short_saturday]
-
-var i18n_please_enter_name = '$encoder.jsEscape($i18n.getString( 'please_enter_name' ) , "'")';
-var i18n_please_select_period = '$encoder.jsEscape($i18n.getString( 'please_select_period' ) , "'")';
-var i18n_please_select_dataset = '$encoder.jsEscape($i18n.getString( 'please_select_dataset' ) , "'")';
-var i18n_please_select_dataelement = '$encoder.jsEscape($i18n.getString( 'please_select_dataelement' ) , "'")';
-var i18n_please_select_indicator = '$encoder.jsEscape($i18n.getString( 'please_select_indicator' ) , "'")';
-var i18n_please_enter_description = '$encoder.jsEscape($i18n.getString( 'please_enter_description' ) , "'")';
-var i18n_delete_confirm = '$encoder.jsEscape($i18n.getString( 'delete_confirm' ) , "'")';
-var i18n_ok = '$encoder.jsEscape($i18n.getString( 'ok' ) , "'")';
-var i18n_cancel = '$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")';
-var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
-var i18n_available = '$encoder.jsEscape($i18n.getString( 'available' ) , "'")';
-var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
-var i18n_selected = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
-var i18n_show_menu = '$encoder.jsEscape( $i18n.getString( "show_menu" ) , "'")';
-var i18n_warning = '$encoder.jsEscape( $i18n.getString( "warning" ) , "'")';
-var i18n_error = '$encoder.jsEscape( $i18n.getString( "error" ) , "'")';
-var i18n_success = '$encoder.jsEscape( $i18n.getString( "success" ) , "'")';
-var i18n_hide_menu = '$encoder.jsEscape( $i18n.getString( "hide_menu" ) , "'")';
-var i18n_waiting = '$encoder.jsEscape( $i18n.getString( "waiting" ) , "'")';
-var i18n_enter_digits = '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
-
-
-// ===========================================================================
-// FORM VALIDATION
-// ===========================================================================
-
-var validationMessage = {
- required: '$encoder.jsEscape($i18n.getString( 'this_field_is_required' ) , "'")'
- ,remote: '$encoder.jsEscape($i18n.getString( 'please_fix_this_field' ) , "'")'
- ,email: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_email_address' ) , "'")'
- ,url: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_url' ) , "'")'
- ,date: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date' ) , "'")'
- ,dateISO: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date_iso' ) , "'")'
- ,number: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_number' ) , "'")'
- ,digits: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
- ,lettersdigitsonly: '$encoder.jsEscape($i18n.getString( 'please_enter_a_letters_or_digits' ) , "'")'
- ,equalTo: '$encoder.jsEscape($i18n.getString( 'please_enter_the_equal_values_again' ) , "'")'
- ,accept: '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_with_a_valid_expression' ) , "'")'
- ,firstletteralphabet: '$encoder.jsEscape($i18n.getString( 'first_character_must_be_alphabetical' ) , "'")'
- ,maxlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_no_more_than_n_character' ) , "'")')
- ,minlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_than_n_character' ) , "'")')
- ,rangelength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_n_character' ) , "'")')
- ,range: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_a_and_b' ) , "'")')
- ,max: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to_n' ) , "'")')
- ,min: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to_n' ) , "'")')
- ,notequalto: '$encoder.jsEscape($i18n.getString( 'please_enter_a_different_value_to_above' ) , "'")'
- ,decimals: '$encoder.jsEscape($i18n.getString( 'digits_decimal_only_please' ) , "'")'
- ,alphanumeric: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_underscores_only' ) , "'")'
- ,alphanumericwithbasicpuncspaces: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
- ,letterswithbasicspecialchars: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
- ,lessthanequal: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to' ) , "'")')
- ,greaterthanequal: validatorFormat( '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to' ) , "'")' )
- ,unique: '$encoder.jsEscape($i18n.getString( 'please_do_not_enter_same_values' ) , "'")'
- ,letterswithbasicpunc: '$encoder.jsEscape($i18n.getString( 'letters_or_punctuation_only_please' ) , "'")'
- ,maxWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_n_words_or_less' ) , "'")')
- ,minWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_words' ) , "'")')
- ,rangeWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_betwwen_a_and_b_words' ) , "'")')
- ,lettersonly : '$encoder.jsEscape($i18n.getString( 'letters_only_please' ) , "'")'
- ,nowhitespace : '$encoder.jsEscape($i18n.getString( 'no_white_space_please' ) , "'")'
- ,nostartwhitespace : '$encoder.jsEscape($i18n.getString( 'no_start_white_space_please' ) , "'")'
- ,ziprange : '$encoder.jsEscape($i18n.getString( 'ZIP_code_must_be_in_the_range' ) , "'")'
- ,time : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_time' ) , "'")'
- ,phone : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_phone_number' ) , "'")'
- ,strippedminlength : '$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_character' ) , "'")'
- ,datelessthanequaltoday: '$encoder.jsEscape($i18n.getString( 'this_date_can_not_be_after_today' ) , "'")'
- ,required_group : '$encoder.jsEscape($i18n.getString( 'please_fill_out_at_least_one_of_these_fields' ) , "'")'
- ,password: '$encoder.jsEscape($i18n.getString( 'password_must_contain_at_least_one_capital_letter_and_one_digit' ) , "'")'
- ,notOnlyDigits: '$encoder.jsEscape($i18n.getString('only_digits_are_not_allowed' ) , "'")'
- ,custome_regex: validatorFormat("{1}")
- ,greaterDate: '$encoder.jsEscape($i18n.getString('closedDate_should_be_greater_than_openDate' ) , "'")'
- ,unicodechars: '$encoder.jsEscape($i18n.getString('please_unicode_chars_only' ) , "'")'
- ,unrecognizedcoordinatestring: '$encoder.jsEscape($i18n.getString('unrecognized_coordinate_string' ) , "'")'
-
-};
-var i18n_process = '$encoder.jsEscape( $i18n.getString( "process" ) , "'" )';
-var i18n_delete_success = '$encoder.jsEscape( $i18n.getString( "delete_success" ) , "'" )';
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm 2011-08-19 18:37:09 +0000
@@ -0,0 +1,71 @@
+var i18n_please_enter_name = '$encoder.jsEscape($i18n.getString( 'please_enter_name' ) , "'")';
+var i18n_please_select_period = '$encoder.jsEscape($i18n.getString( 'please_select_period' ) , "'")';
+var i18n_please_select_dataset = '$encoder.jsEscape($i18n.getString( 'please_select_dataset' ) , "'")';
+var i18n_please_select_dataelement = '$encoder.jsEscape($i18n.getString( 'please_select_dataelement' ) , "'")';
+var i18n_please_select_indicator = '$encoder.jsEscape($i18n.getString( 'please_select_indicator' ) , "'")';
+var i18n_please_enter_description = '$encoder.jsEscape($i18n.getString( 'please_enter_description' ) , "'")';
+var i18n_delete_confirm = '$encoder.jsEscape($i18n.getString( 'delete_confirm' ) , "'")';
+var i18n_ok = '$encoder.jsEscape($i18n.getString( 'ok' ) , "'")';
+var i18n_cancel = '$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")';
+var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
+var i18n_available = '$encoder.jsEscape($i18n.getString( 'available' ) , "'")';
+var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
+var i18n_selected = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
+var i18n_show_menu = '$encoder.jsEscape( $i18n.getString( "show_menu" ) , "'")';
+var i18n_warning = '$encoder.jsEscape( $i18n.getString( "warning" ) , "'")';
+var i18n_error = '$encoder.jsEscape( $i18n.getString( "error" ) , "'")';
+var i18n_success = '$encoder.jsEscape( $i18n.getString( "success" ) , "'")';
+var i18n_hide_menu = '$encoder.jsEscape( $i18n.getString( "hide_menu" ) , "'")';
+var i18n_waiting = '$encoder.jsEscape( $i18n.getString( "waiting" ) , "'")';
+var i18n_enter_digits = '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
+var i18n_process = '$encoder.jsEscape( $i18n.getString( "process" ) , "'" )';
+var i18n_delete_success = '$encoder.jsEscape( $i18n.getString( "delete_success" ) , "'" )';
+
+var validationMessage = {
+ required: '$encoder.jsEscape($i18n.getString( 'this_field_is_required' ) , "'")'
+ ,remote: '$encoder.jsEscape($i18n.getString( 'please_fix_this_field' ) , "'")'
+ ,email: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_email_address' ) , "'")'
+ ,url: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_url' ) , "'")'
+ ,date: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date' ) , "'")'
+ ,dateISO: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date_iso' ) , "'")'
+ ,number: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_number' ) , "'")'
+ ,digits: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
+ ,lettersdigitsonly: '$encoder.jsEscape($i18n.getString( 'please_enter_a_letters_or_digits' ) , "'")'
+ ,equalTo: '$encoder.jsEscape($i18n.getString( 'please_enter_the_equal_values_again' ) , "'")'
+ ,accept: '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_with_a_valid_expression' ) , "'")'
+ ,firstletteralphabet: '$encoder.jsEscape($i18n.getString( 'first_character_must_be_alphabetical' ) , "'")'
+ ,maxlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_no_more_than_n_character' ) , "'")')
+ ,minlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_than_n_character' ) , "'")')
+ ,rangelength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_n_character' ) , "'")')
+ ,range: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_a_and_b' ) , "'")')
+ ,max: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to_n' ) , "'")')
+ ,min: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to_n' ) , "'")')
+ ,notequalto: '$encoder.jsEscape($i18n.getString( 'please_enter_a_different_value_to_above' ) , "'")'
+ ,decimals: '$encoder.jsEscape($i18n.getString( 'digits_decimal_only_please' ) , "'")'
+ ,alphanumeric: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_underscores_only' ) , "'")'
+ ,alphanumericwithbasicpuncspaces: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
+ ,letterswithbasicspecialchars: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
+ ,lessthanequal: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to' ) , "'")')
+ ,greaterthanequal: validatorFormat( '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to' ) , "'")' )
+ ,unique: '$encoder.jsEscape($i18n.getString( 'please_do_not_enter_same_values' ) , "'")'
+ ,letterswithbasicpunc: '$encoder.jsEscape($i18n.getString( 'letters_or_punctuation_only_please' ) , "'")'
+ ,maxWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_n_words_or_less' ) , "'")')
+ ,minWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_words' ) , "'")')
+ ,rangeWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_betwwen_a_and_b_words' ) , "'")')
+ ,lettersonly : '$encoder.jsEscape($i18n.getString( 'letters_only_please' ) , "'")'
+ ,nowhitespace : '$encoder.jsEscape($i18n.getString( 'no_white_space_please' ) , "'")'
+ ,nostartwhitespace : '$encoder.jsEscape($i18n.getString( 'no_start_white_space_please' ) , "'")'
+ ,ziprange : '$encoder.jsEscape($i18n.getString( 'ZIP_code_must_be_in_the_range' ) , "'")'
+ ,time : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_time' ) , "'")'
+ ,phone : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_phone_number' ) , "'")'
+ ,strippedminlength : '$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_character' ) , "'")'
+ ,datelessthanequaltoday: '$encoder.jsEscape($i18n.getString( 'this_date_can_not_be_after_today' ) , "'")'
+ ,required_group : '$encoder.jsEscape($i18n.getString( 'please_fill_out_at_least_one_of_these_fields' ) , "'")'
+ ,password: '$encoder.jsEscape($i18n.getString( 'password_must_contain_at_least_one_capital_letter_and_one_digit' ) , "'")'
+ ,notOnlyDigits: '$encoder.jsEscape($i18n.getString('only_digits_are_not_allowed' ) , "'")'
+ ,custome_regex: validatorFormat("{1}")
+ ,greaterDate: '$encoder.jsEscape($i18n.getString('closedDate_should_be_greater_than_openDate' ) , "'")'
+ ,unicodechars: '$encoder.jsEscape($i18n.getString('please_unicode_chars_only' ) , "'")'
+ ,unrecognizedcoordinatestring: '$encoder.jsEscape($i18n.getString('unrecognized_coordinate_string' ) , "'")'
+
+};
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-08-18 16:40:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-08-19 18:37:09 +0000
@@ -39,7 +39,8 @@
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.glob.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.date.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tmpl.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/i18nJavaScriptSupport.action"></script>
+ <script type="text/javascript" src="../dhis-web-commons/i18nJavaScript.action"></script>
+ <script type="text/javascript" src="../dhis-web-commons/messagesJavaScript.action"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/lists.js"></script>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.vm 2011-08-18 11:24:10 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.vm 2011-08-19 18:37:09 +0000
@@ -21,7 +21,8 @@
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.cookie.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tmpl.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/i18nJavaScriptSupport.action"></script>
+ <script type="text/javascript" src="../dhis-web-commons/i18nJavaScript.action"></script>
+ <script type="text/javascript" src="../dhis-web-commons/messagesJavaScript.action"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/lists.js"></script>
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-08-16 12:16:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-08-19 18:37:09 +0000
@@ -309,11 +309,16 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <action name="i18nJavaScriptSupport" class="org.hisp.dhis.commons.action.NoAction">
+ <action name="i18nJavaScript" class="org.hisp.dhis.commons.action.NoAction">
<result name="success" type="velocity-javascript">/dhis-web-commons/i18n/i18n.vm
</result>
</action>
+ <action name="messagesJavaScript" class="org.hisp.dhis.commons.action.NoAction">
+ <result name="success" type="velocity-javascript">/dhis-web-commons/i18n/messages.vm
+ </result>
+ </action>
+
</package>
<!-- Common actions XML -->