dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04625
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1540: Excel Template Management - Quickly fixed.
------------------------------------------------------------
revno: 1540
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-03-04 12:05:34 +0700
message:
Excel Template Management - Quickly fixed.
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/exceltemplate.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-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm 2010-02-25 09:05:59 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm 2010-03-04 05:05:34 +0000
@@ -6,8 +6,7 @@
<td width="18%" style=" width:25% ">$i18n.getString( 'select_excel_file' ):</td>
<td width="82%">
<input type="file" id="upload" name="upload" onChange="enable('uploadButton');" />
- <!-- <input name="uploadButton" id="uploadButton" type="submit" value="$i18n.getString( 'upload_file' )" disabled /> -->
- <input name="uploadButton" id="uploadButton" type="button" value="$i18n.getString( 'upload_file' )" onclick="validateUploadExcelTemplate()" />
+ <input name="uploadButton" id="uploadButton" type="submit" value="$i18n.getString( 'upload_file' )" disabled />
</td>
</tr>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/exceltemplate.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/exceltemplate.js 2010-02-25 09:05:59 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/exceltemplate.js 2010-03-04 05:05:34 +0000
@@ -38,7 +38,7 @@
}
}
-function validateUploadExcelTemplate ( fileName, columnIndex ) {
+function validateUploadExistExcelTemplate ( fileName, columnIndex ) {
var list = byId( 'list' );
@@ -221,29 +221,31 @@
// Validate Upload Excel Template
//----------------------------------------------------------
-function validateUploadExcelTemplate(){
-
- $.ajaxFileUpload
- (
+function validateUploadExcelTemplate( fileName, columnIndex ) {
+
+ return validateUploadExistExcelTemplate( fileName, columnIndex );
+
+ $.ajaxFileUpload
+ (
+ {
+ url:'validateUploadExcelTemplate.action',
+ secureuri:false,
+ fileElementId:'upload',
+ dataType: 'xml',
+ success: function (data, status)
{
- url:'validateUploadExcelTemplate.action',
- secureuri:false,
- fileElementId:'upload',
- dataType: 'xml',
- success: function (data, status)
- {
- data = data.getElementsByTagName('message')[0];
- var type = data.getAttribute("type");
- if(type=='error'){
- setMessage(data.firstChild.nodeValue);
- }else{
- document.forms['uploadForm'].submit();
- }
- },
- error: function (data, status, e)
- {
-
+ data = data.getElementsByTagName('message')[0];
+ var type = data.getAttribute("type");
+ if(type=='error'){
+ setMessage(data.firstChild.nodeValue);
+ }else{
+ document.forms['uploadForm'].submit();
}
+ },
+ error: function (data, status, e)
+ {
+
}
- );
- }
\ No newline at end of file
+ }
+ );
+}
\ No newline at end of file