Changeset 722 for ether_iasi


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

Mise à jour interface quicklook

Location:
ether_iasi/trunk/web
Files:
5 edited

Legend:

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

    r720 r722  
    4343 
    4444    <div class="containerTools"> 
    45         <div id="containerTools"></div> 
    46         <div class="selectTools"> 
     45        <div id="containerSelect"></div> 
     46        <div id="containerCalendar" class="selectTools"> 
    4747            <spring:message code="label.date"/> :<br/> 
    4848            <input type="text" id="beginDate" size="10"/> 
  • ether_iasi/trunk/web/project/quicklook_script.jsp

    r720 r722  
    88            /** *********** CONTAINERS *********** **/ 
    99            this.parent = $( "#pageWrapper" ); 
    10             this.containerTools = $( "#containerTools" ); 
     10            this.containerSelect = $( "#containerSelect" ); 
     11            this.containerCalendar = $( "#containerCalendar" ); 
    1112            this.containerQuickLookA = $( "#containerQuickLookA" ); 
    1213            this.containerQuickLookB = $( "#containerQuickLookB" ); 
     
    2930 
    3031 
    31             var quickLookButton = new Button( {id:"quickLookButton", value:"<spring:message code="label.quicklook.button"/>", parent:this.containerTools, className: "small", onClick:jQuery.proxy( this.onClickButton, this )} ); 
     32            var quickLookButton = new Button( {id:"quickLookButton", value:"<spring:message code="label.quicklook.button"/>", parent:this.containerSelect, className: "small", onClick:jQuery.proxy( this.onClickQuicklook, this )} ); 
    3233        }, 
    3334 
     
    3738            div.html( '<spring:message code="label.satellite"/> :' ); 
    3839            div.addClass( "selectTools" ); 
    39             this.containerTools.append( div ); 
     40            this.containerSelect.append( div ); 
    4041 
    4142            var paramSelect = new Object(); 
     
    5455            div.html( '<spring:message code="label.projection"/> :' ); 
    5556            div.addClass( "selectTools" ); 
    56             this.containerTools.append( div ); 
     57            this.containerSelect.append( div ); 
    5758 
    5859            var paramSelect = new Object(); 
     
    7273            div.html( '<spring:message code="label.species"/> :' ); 
    7374            div.addClass( "selectTools" ); 
    74             this.containerTools.append( div ); 
     75            this.containerSelect.append( div ); 
    7576 
    7677            var paramSelect = new Object(); 
     
    8081            this.selectSpecies.add( "CO", 'CO' ); 
    8182            this.selectSpecies.add( "H2O",'H2O' ); 
    82             this.selectSpecies.add( "TS",'Temp. Surf.' ) 
     83            this.selectSpecies.add( "TS",'Temp. Surf.' ); 
    8384            this.selectSpecies.selectFirst(); 
    8485        }, 
     
    9899            } ); 
    99100 
    100  
    101  
    102 //        $( "#beginDate" ).val( this.firstDate ); 
    103 //        $( "#endDate" ).val( this.lastDate ); 
    104 //        this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
    105 //        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
    106  
    107 //        this.clearCalendarButton = new Button( {value:interfaceTexts["visualization.button.clear"], parent:this.containerOptionCalendar, id:"button_clear_calendar", className:"small", onClick:jQuery.proxy( this.onClickClear, this )} ); 
     101            this.clearCalendarButton = new Button( {value:'<spring:message code="label.clear"/>', parent:this.containerCalendar, id:"button_clear_calendar", className:"small", onClick:jQuery.proxy( this.onClickClear, this )} ); 
    108102 
    109103        }, 
     
    113107        { 
    114108            $.ajax( { 
    115                 url: "statistic?methodName=searchMainStatisticsByProject&name=" + this.selectedLogo.id, 
     109                url: "project?methodName=getQuicklookByValues&satellite="+ this.selectSatellites.getValue()+"&projection="+this.selectProjections.getValue()+"&species="+this.selectSpecies.getValue()+"&date="+this.beginDate, 
    116110                success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 
    117111                error: jQuery.proxy( this.showErrors, this ) 
     
    123117        handleQuickLooksBySelectValues: function( result ) 
    124118        { 
    125 //        this.displaySummary(); 
     119 
     120            var plotName = jQuery.parseJSON( result ).plotNameResult; 
     121            this.containerQuickLookA.html(plotName); 
    126122        }, 
    127123 
    128124 
    129125        // EVENTS ******************************************************** 
    130         onClickButton: function() 
     126        onClickQuicklook: function() 
    131127        { 
    132             alert( "paf : " + this.selectProjections.getValue() + ",  " + this.selectSatellites.getValue() ); 
     128            this.requestQuickLooksBySelectValues(); 
    133129        }, 
    134130 
     
    136132        { 
    137133            this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
     134        }, 
     135 
     136        onClickClear: function() 
     137        { 
     138            $( "#beginDate" ).val( "" ); 
     139            this.beginDate = false; 
    138140        }, 
    139141 
  • ether_iasi/trunk/web/src/com/ether/Controller.java

    r716 r722  
    1212import javax.servlet.http.HttpServletRequest; 
    1313import javax.servlet.http.HttpServletResponse; 
     14import java.text.ParseException; 
     15import java.util.Calendar; 
     16import java.util.Date; 
    1417import java.util.HashMap; 
    1518import java.util.Map; 
     
    4548    /** *********************************************************** **/ 
    4649    /** 
    47      * Search main statistics for the selected project 
    4850     * 
    49      * @param projectName 
     51     * @param satellite 
     52     * @param projection 
     53     * @param species 
     54     * @param strDate 
    5055     * @return 
    51      * @throws ServiceException 
     56     * @throws WebException 
    5257     */ 
    53     @ControllerMethod(jsonResult = true, loginMandatory = true) 
    54     public JSONObject searchMainStatisticsByProject( @Mandatory @ParamName(ParameterConstants.PARAMETER_NAME) final String projectName ) 
    55             throws ServiceException 
     58    @ControllerMethod(jsonResult = true) 
     59    public JSONObject getQuicklookByValues( @Mandatory @ParamName("satellite") final String satellite, 
     60                                            @Mandatory @ParamName("projection") final String projection, 
     61                                            @Mandatory @ParamName("species") final String species, 
     62                                            @Mandatory @ParamName("date") final String strDate) 
     63            throws WebException 
    5664    { 
    57 //        final List<Parametre> fullParametersByPlateform = getEtherService().getParametersByPlateformId( plateformId ); 
    58 //        final List<List<Parametre>> parametersByPlateform = getEtherService().manageMenusForParameterList( fullParametersByPlateform ); 
     65        final Calendar calendar= Calendar.getInstance(); 
     66        calendar.setTimeInMillis( Long.valueOf( strDate ) ); 
     67        final Date date = calendar.getTime(); 
     68        final String fmtDate=DateHelper.formatDate( date, "yyyyMMdd" ) ; 
     69        final String plotName="iasi_"+species+"_"+projection+"_"+fmtDate+"_"+satellite+".png"; 
     70        final JSONObject result = new JSONObject(); 
     71        result.put("plotNameResult",plotName ); 
     72        return result; 
    5973 
    60         final JSONObject result = new JSONObject(); 
    61 //        result.put( ParameterConstants.PARAMETER_PARAMETERS, getJsonHelper().toJSON( parametersByPlateform ) ); 
    62         return result; 
    6374    } 
    6475 
  • ether_iasi/trunk/web/src/messages_en.properties

    r720 r722  
    2323label.daycalendar=Day 
    2424label.quicklook.button=Get quicklook 
     25label.clear=Clear 
  • ether_iasi/trunk/web/src/messages_fr.properties

    r720 r722  
    2424label.daycalendar=Jour 
    2525label.quicklook.button=Go quicklook 
     26label.clear=Initialiser 
Note: See TracChangeset for help on using the changeset viewer.