← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20544: Indicate if fileinfo could not be fetched on dataset load

 

------------------------------------------------------------
revno: 20544
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-10-07 00:13:49 +0200
message:
  Indicate if fileinfo could not be fetched on dataset load
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm


--
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-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2015-10-02 11:57:20 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2015-10-06 22:13:49 +0000
@@ -115,4 +115,5 @@
 there_is_no_audit_trail_for_this_value=There is no audit trail for this value
 are_you_sure_you_want_to_delete_this_file=Are you sure you want to delete this file?
 confirm_deletion=Confirm deletion
-file_upload_failed=File upload failed
\ No newline at end of file
+file_upload_failed=File upload failed
+loading_file_info_failed=Loading file info failed
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2015-10-02 23:47:42 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2015-10-06 22:13:49 +0000
@@ -1679,12 +1679,22 @@
             {
                 $( fieldId ).val( value.val );
 
+                var $container = $( '.entryfileresource-container[name=' + value.id + '-val]' );
+
+                var name = "", size = "";
+
                 if ( value.fileMeta )
                 {
-                    var $container = $( '.entryfileresource-container[name=' + value.id + '-val]' );
-                    $container.find( '.upload-fileinfo-name' ).text( value.fileMeta.name );
-                    $container.find( '.upload-fileinfo-size' ).text( '(' + filesize( value.fileMeta.size ) + ')' );
-                }
+                    name = value.fileMeta.name;
+                    size = '(' + filesize( value.fileMeta.size ) + ')';
+                }
+                else
+                {
+                    name = i18n_loading_file_info_failed;
+                }
+
+                $container.find( '.upload-fileinfo-name' ).text( name );
+                $container.find( '.upload-fileinfo-size' ).text( size );
             }
             else 
             {

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2015-10-02 22:43:45 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2015-10-06 22:13:49 +0000
@@ -55,6 +55,7 @@
 var i18n_no_orgunits = '$encoder.jsEscape( $i18n.getString( "no_orgunits" ) , "'")';
 var i18n_confirm_deletion = '$encoder.jsEscape( $i18n.getString( "confirm_deletion" ), "'" )';
 var i18n_file_upload_failed = '$encoder.jsEscape( $i18n.getString( "file_upload_failed" ), "'" )';
+var i18n_loading_file_info_failed = '$encoder.jsEscape( $i18n.getString( "loading_file_info_failed" ), "'" )';
 </script>
 
 <style type="text/css" media="print">