dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12118
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3642: Applied new upload ajax into import excel file for patient
------------------------------------------------------------
revno: 3642
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-05-17 16:07:17 +0700
message:
Applied new upload ajax into import excel file for patient
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/import.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-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/import.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/import.js 2010-11-16 07:42:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/import.js 2011-05-17 09:07:17 +0000
@@ -22,27 +22,14 @@
function validateUploadExcelFile()
{
- $.ajaxFileUpload
- (
+ jQuery( "#upload" ).upload( 'validateUploadExcelFile.action',
+ function( data )
{
- url:'validateUploadExcelFile.action',
- secureuri:false,
- fileElementId:'upload',
- dataType: 'xml',
- success: function (data, status)
- {
- data = data.getElementsByTagName('message')[0];
- var type = data.getAttribute("type");
- if(type=='error'){
- showErrorMessage(data.firstChild.nodeValue);
- }else{
- byId('importingParam').submit();
- }
- },
- error: function (data, status, e)
- {
+ data = data.getElementsByTagName('message')[0];
+ var type = data.getAttribute("type");
- }
- }
+ if ( type=='error' ) showErrorMessage(data.firstChild.nodeValue);
+ else byId('importingParam').submit();
+ }, 'xml'
);
}
\ No newline at end of file