Changeset 44 for trunk/web-app


Ignore:
Timestamp:
Apr 6, 2011, 1:28:11 PM (8 years ago)
Author:
robert@…
Message:

Removed mass sample editing (to prevent the edit tags screen opening very slowly). Also added the possibility to add an excel file which matches sequence files to samples (when uploading) (#13). Finally added some 'return false' to onClick events, when dialogs were opened, to prevent the browser from scrolling to the top.

Location:
trunk/web-app
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/css/metagenomics.css

    r41 r44  
    500500.ui-dialog .assaySampleDetails li label, .ui-dialog .assaySampleDetails li span { padding: 3px 0; }
    501501.ui-dialog .assaySampleDetails label { border-right: 1px solid #666; }
    502 .ui-dialog .assaySampleDetails span.value { width: 150px; display: inline-block; *display: inline; zoom: 1; }
     502.ui-dialog .assaySampleDetails span.value { width: 250px; display: inline-block; *display: inline; zoom: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    503503
    504504.uploadContainer { display: inline-block; *display: inline; zoom: 1 }
  • trunk/web-app/js/fileuploads.new.js

    r25 r44  
    66 * Functions for file upload fields
    77 *
    8  * The file upload fields use the ajax upload mechanism of http://valums.com/ajax-upload/.
     8 * The file upload fields use the uploadify jquery plugin (www.uploadify.com)
    99 *
    1010 ************************************************/
     
    6464                    'height'    : 20,
    6565                    'buttonImg': baseUrl + '/uploadify/button.png',
    66                     'onSelect'  : function(event, id, fileObj) {
     66                    onSelect  : function(event, id, fileObj) {
    6767                        var oldFile = $('#' + field_id).val();
    6868                                if( oldFile != '' ) {
     
    8787                               
    8888                        },
    89                         'onSelectOnce': function( event, data ) {
     89                        onSelectOnce: function( event, data ) {
    9090                                // This is a hack to cancel upload if the user doesn't want to overwrite his already
    9191                                // uploaded file. It should be possible to cancel an upload using 'return false' from
     
    9696                                }
    9797                        },
    98                         'onComplete' : function(event, id, file, response, data) {
     98                        onComplete : function(event, id, file, response, data) {
    9999                                // Parse as json
    100                                 var responseJSON = JSON.parse( response );
     100                                var responseJSON = jQuery.parseJSON( response );
    101101                               
    102                                 if( response == "" || !responseJSON.success ) {
     102                                if( response == null || response == "" || !responseJSON.success ) {
    103103                                        $('#' + field_id).val( '' );
    104104                                        $('#' + field_id + 'Example').html('<span class="error">Error uploading ' + createFileHTML( file.name ) + '</span>' );
     
    156156                    'height'    : 20,
    157157                    'buttonImg': baseUrl + '/uploadify/button.png',
    158                     'onSelect'  : function(event, id, fileObj) {
     158                    onSelect  : function(event, id, fileObj) {
    159159                                $('#upload_field_' + field_id ).uploadifySettings( 'scriptData', {
    160160                                        'field':   field_id,
     
    162162                                }, true);
    163163                        },
    164                         'onComplete' : function(event, id, file, response, data) {
     164                        onComplete : function(event, id, file, response, data) {
    165165                                // Parse as json
    166                                 var responseJSON = JSON.parse( response );
    167 
    168                                 if( response == "" || !responseJSON.success ) {
     166                                var responseJSON = jQuery.parseJSON( response );
     167
     168                                if( response == null || response == "" || !responseJSON.success ) {
    169169                                        $('#' + field_id).val( '' );
    170170                                        $('#' + field_id + 'Example').html('<span class="error">Error uploading ' + createFileHTML( file.name ) + '</span>' );
Note: See TracChangeset for help on using the changeset viewer.