Changeset 731


Ignore:
Timestamp:
01/18/13 17:21:45 (11 years ago)
Author:
cbipsl
Message:

Mise à jour interface quicklook

Location:
ether_iasi/trunk/web
Files:
4 edited

Legend:

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

    r722 r731  
    5050    </div> 
    5151 
    52     <div id="containerQuickLookA" class="containerQuickLooks"><spring:message code="label.MetOpA"/></div> 
     52    <div id="containerQuickLookA" class="containerQuickLooks"><spring:message code="label.MetOpA"/> 
     53        <div id="containerResultA"></div> 
    5354 
    54     <div id="containerQuickLookB" class="containerQuickLooks"><spring:message code="label.MetOpB"/></div> 
     55    </div> 
     56 
     57 
     58    <div id="containerQuickLookB" class="containerQuickLooks"> 
     59        <div id="containerResultB"></div> 
     60    </div> 
    5561 
    5662    <div id="errors"></div> 
  • ether_iasi/trunk/web/project/quicklook_script.jsp

    r729 r731  
    1212            this.containerQuickLookA = $( "#containerQuickLookA" ); 
    1313            this.containerQuickLookB = $( "#containerQuickLookB" ); 
     14            this.containerResultA = $( "#containerResultA" ); 
     15            this.containerResultB = $( "#containerResultB" ); 
    1416            this.containerErrors = $( "#errors" ); 
    1517 
     
    99101            } ); 
    100102 
     103            $( "#beginDate" ).val( formatDate( removeDaysToDate( new Date(), 1 ), "%Y-%m-%d" )); 
     104            this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
    101105        }, 
    102106 
     
    116120        { 
    117121 
    118             var plotName = jQuery.parseJSON( result ).plotNameResult; 
    119             this.containerQuickLookA.html(plotName); 
     122            var plotNameA = jQuery.parseJSON( result ).plotNameResultA; 
     123            var plotNameB = jQuery.parseJSON( result ).plotNameResultB; 
     124            if (plotNameA) 
     125//                this.containerResultA.html(plotNameA); 
     126                this.containerResultA.html("<img src='"+plotNameA+"' width='80px' height='80'>"); 
     127             if (plotNameB) 
     128                this.containerResultB.html(plotNameB); 
     129 
    120130        }, 
    121131 
     
    124134        onClickQuicklook: function() 
    125135        { 
     136            this.containerResultA.empty(); 
     137            this.containerResultB.empty(); 
    126138            this.requestQuickLooksBySelectValues(); 
    127139        }, 
  • ether_iasi/trunk/web/resources/js/classesForJQuery/etherHelper.js

    r728 r731  
    7878} 
    7979 
     80  // This method add days to a date 
     81function removeDaysToDate( date, numberOfDays ) 
     82{ 
     83    var dayToMs = 24 * 60 * 60 * 1000; 
     84    var newDate = date.getTime() - numberOfDays * dayToMs; 
     85    return new Date( newDate ); 
     86} 
     87 
    8088// This method add hours to a date 
    8189function addHoursToDate( date, numberOfHours ) 
  • ether_iasi/trunk/web/src/com/ether/Controller.java

    r724 r731  
    7272        final Date date = calendar.getTime(); 
    7373        final String fmtDate = DateHelper.formatDate( date, "yyyyMMdd" ); 
    74         final String plotName = "iasi_" + species + "_" + projection + "_" + fmtDate + "_" + satellite + ".png"; 
     74        String plotNameA = ""; 
     75        String plotNameB = ""; 
     76        if (satellite.equals( "metopa" ) || satellite.equals( "metopab" )) 
     77            plotNameA = "iasi_" + species + "_" + projection + "_" + fmtDate + "_" + satellite + ".png"; 
     78        if (satellite.equals( "metopb" ) || satellite.equals( "metopab" )) 
     79            plotNameB = "iasi_" + species + "_" + projection + "_" + fmtDate + "_" + satellite + ".png"; 
     80 
    7581        final JSONObject result = new JSONObject(); 
    76         result.put( "plotNameResult", plotName ); 
     82        result.put( "plotNameResultA", plotNameA ); 
     83        result.put( "plotNameResultB", plotNameB ); 
    7784        return result; 
    7885 
Note: See TracChangeset for help on using the changeset viewer.