Changeset 1654


Ignore:
Timestamp:
Mar 21, 2011, 10:34:04 AM (6 years ago)
Author:
robert@…
Message:

Fixed a bug in uploading files. The bug appeared in the simple wizard, but probably also in other places

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/FileController.groovy

    r1509 r1654  
    8080        // Return data to the user
    8181        if( newfilename ) {
    82             render( newfilename );
     82            render( text: newfilename, contentType: "text/plain" );
    8383        } else {
    8484            response.status = 500;
  • trunk/grails-app/views/simpleWizard/simpleWizard/samples.gsp

    r1610 r1654  
    4040                                    </td>
    4141                                    <td width="100px">
     42                                        ${sampleForm?.importFile}
    4243                                                <af:fileField name="importfile" value="${sampleForm?.importFile}"/>
    4344                                    </td>
  • trunk/web-app/js/studywizard.js

    r1553 r1654  
    296296                                $('#' + field_id + 'Delete').hide();
    297297                        } else {
     298                                // Sometimes, the response is returned with HTML tags.
     299                                // It is unknown why this happens, but the tags are not needed.
     300                                response = response.replace(/<\/?[^>]+>/gi, '');
     301
    298302                                $('#' + field_id).val(response);
    299303                                $('#' + field_id + 'Example').html('Uploaded ' + createFileHTML(file));
Note: See TracChangeset for help on using the changeset viewer.