Changeset 746


Ignore:
Timestamp:
01/23/13 18:00:59 (11 years ago)
Author:
vmipsl
Message:

DisplayNoImage?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ether_iasi/trunk/web/project/quicklook_script.jsp

    r745 r746  
    8282            this.selectSpecies = new Select( paramSelect ); 
    8383            this.selectSpecies.add( "CO", 'CO' ); 
    84             this.selectSpecies.add( "H2O",'H2O' ); 
    85             this.selectSpecies.add( "TS",'<spring:message code="label.surftemp"/>' ); 
     84            this.selectSpecies.add( "H2O", 'H2O' ); 
     85            this.selectSpecies.add( "TS", '<spring:message code="label.surftemp"/>' ); 
    8686            this.selectSpecies.selectFirst(); 
    8787        }, 
     
    101101            } ); 
    102102 
    103             $( "#beginDate" ).val( formatDate( removeDaysToDate( new Date(), 1 ), "%Y-%m-%d" )); 
     103            $( "#beginDate" ).val( formatDate( removeDaysToDate( new Date(), 1 ), "%Y-%m-%d" ) ); 
    104104            this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
    105105        }, 
     
    109109        { 
    110110            $.ajax( { 
    111                 url: "project?methodName=getQuicklookByValues&satellite="+ this.selectSatellites.getValue()+"&projection="+this.selectProjections.getValue()+"&species="+this.selectSpecies.getValue()+"&date="+this.beginDate, 
     111                url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&date=" + this.beginDate, 
    112112                success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 
    113113                error: jQuery.proxy( this.showErrors, this ) 
     
    125125            var plotNameD = jQuery.parseJSON( result ).plotNameResultD; 
    126126 
    127             if (plotNameA) 
    128             { 
     127            if( plotNameA ) 
     128                this.containerResultA.html( "<center>MetOp-A</center><center><img src='resources/img/" + plotNameA + "' width='430px' height='350px' onerror='javascript:displayNoImage()'><img src='resources/img/" + plotNameC + "' width='430px' height='350px'></center>" ); 
     129 
     130            if( plotNameB ) 
     131                this.containerResultA.html( "<center>MetOp-B</center><center><img src='resources/img/" + plotNameB + "' width='430px' height='350px'><img src='resources/img/" + plotNameD + "' width='430px' height='350px'></center>" ); 
    129132 
    130133 
    131                  this.containerResultA.html("<center>MetOp-A</center><center><img src='resources/img/"+plotNameA+"' width='430px' height='350px' onerror='"+this.bob+"'><img src='resources/img/"+plotNameC+"' width='430px' height='350px'></center>"); 
    132  
     134            if( plotNameA && plotNameB ) 
     135            { 
     136                this.containerResultA.html( plotNameA + plotNameC ); 
     137                this.containerResultB.html( plotNameB + plotNameD ); 
    133138            } 
    134             if (plotNameB) 
    135                 this.containerResultA.html("<center>MetOp-B</center><center><img src='resources/img/"+plotNameB+"' width='430px' height='350px'><img src='resources/img/"+plotNameD+"' width='430px' height='350px'></center>"); 
    136  
    137  
    138             if (plotNameA &&  plotNameB ) 
    139             { 
    140                 this.containerResultA.html(plotNameA + plotNameC); 
    141                 this.containerResultB.html(plotNameB + plotNameD); 
    142            } 
    143139 
    144140 
     
    166162            this.containerErrors.show(); 
    167163            this.containerErrors.html( result ); 
    168         }, 
    169  
    170          bob:function() 
    171     { 
    172         alert("pif"); 
    173     } 
     164        } 
    174165    } ); 
    175166 
     167    function displayNoImage() 
     168    { 
     169        $( "#containerQuickLookA" ).html("No image"); 
     170    } 
    176171</script> 
Note: See TracChangeset for help on using the changeset viewer.