dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18212
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7595: if previous locally saved datavalue (strings) are too long to be uploadet to the server, slice th...
------------------------------------------------------------
revno: 7595
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-12 16:55:34 +0300
message:
if previous locally saved datavalue (strings) are too long to be uploadet to the server, slice them to max length 255
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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-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 2012-06-25 20:39:32 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2012-07-12 13:55:34 +0000
@@ -224,8 +224,7 @@
error: function( jqXHR, textStatus, errorThrown )
{
var message = i18n_sync_failed
- + ' <button id="sync_button" type="button">' + i18n_sync_now
- + '</button>';
+ + ' <button id="sync_button" type="button">' + i18n_sync_now + '</button>';
setHeaderMessage( message );
@@ -248,7 +247,12 @@
var key = array[0];
var value = dataValues[key];
- log( 'Uploaded data value: ' + key + ', with value: ' + value );
+ if( value.value.length > 255 )
+ {
+ value.value = value.value.slice(0, 254);
+ }
+
+ log( 'Uploading data value: ' + key + ', with value: ' + value );
$.ajax( {
url: 'saveValue.action',