Changeset 724


Ignore:
Timestamp:
01/18/13 14:25:32 (11 years ago)
Author:
vmipsl
Message:

dataAccess + clean

Location:
ether_iasi/trunk/web
Files:
82 deleted
5 edited
2 copied

Legend:

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

    r723 r724  
    2929    <ether:htmlJs jsFile="classesForJQuery/etherHelper"/> 
    3030    <ether:htmlJs jsFile="classesForJQuery/Button"/> 
    31     <ether:htmlJs jsFile="classesForJQuery/DragSlide"/> 
    3231    <ether:htmlJs jsFile="classesForJQuery/Select"/> 
     32    <ether:htmlJs jsFile="classesForJQuery/Tab"/> 
    3333    <ether:htmlJs jsFile="calendar/anytime"/> 
    3434 
    35     <ether:htmlJsp jspFile="quicklook_script"/> 
     35    <ether:htmlJsp jspFile="dataAccess_script"/> 
    3636</HEAD> 
    3737 
     
    4040<div id="pageWrapper" class="pageWrapper"> 
    4141 
    42     <div id="title" class="containerTitle"><spring:message code="label.quicklook"/></div> 
     42    <div id="tab" class="containerTabs"></div> 
    4343 
    44     <div class="containerTools"> 
    45         <div id="containerSelect"></div> 
    46         <div id="containerCalendar" class="selectTools"> 
    47             <spring:message code="label.date"/> :<br/> 
    48             <input type="text" id="beginDate" size="10"/> 
    49         </div> 
     44    <div class="containerDataAccess"> 
     45        <div id="title" class="containerTitle"></div> 
     46 
     47        <div id="productLevel" class="containerProduct"></div> 
     48 
     49        <div id="spatial" class="containerSpatial"><spring:message code="label.access.spatial"/></div> 
     50 
     51        <div id="temporal" class="containerTemporal"><spring:message code="label.access.temporal"/></div> 
     52 
     53        <div id="errors"></div> 
    5054    </div> 
    51  
    52     <div id="containerQuickLookA" class="containerQuickLooks"><spring:message code="label.MetOpA"/></div> 
    53  
    54     <div id="containerQuickLookB" class="containerQuickLooks"><spring:message code="label.MetOpB"/></div> 
    55  
    56     <div id="errors"></div> 
    5755    <%-- ****************** TITLE & TOOLS ****************** --%> 
    5856    <script type="text/javascript"> 
    5957        var interfaceTexts = $A( "" ); 
    6058 
    61         new InterfaceIasi(); 
     59        new InterfaceAccess(); 
    6260    </script> 
    6361 
  • ether_iasi/trunk/web/project/dataAccess_script.jsp

    r723 r724  
    33<script type="text/javascript"> 
    44 
    5     var InterfaceIasi = Class.create( { 
     5    var InterfaceAccess = Class.create( { 
    66        initialize: function() 
    77        { 
    88            /** *********** CONTAINERS *********** **/ 
    99            this.parent = $( "#pageWrapper" ); 
    10             this.containerSelect = $( "#containerSelect" ); 
    11             this.containerCalendar = $( "#containerCalendar" ); 
    12             this.containerQuickLookA = $( "#containerQuickLookA" ); 
    13             this.containerQuickLookB = $( "#containerQuickLookB" ); 
     10            this.containerTab = $( "#tab" ); 
     11            this.containerTitle = $( "#title" ); 
     12            this.containerProductLevel = $( "#productLevel" ); 
     13            this.containerSpatial = $( "#spatial" ); 
     14            this.containerTemporal = $( "#temporal" ); 
    1415            this.containerErrors = $( "#errors" ); 
    1516 
     
    1718 
    1819 
    19             this.createTools(); 
     20            this.createTab(); 
    2021        }, 
    2122 
    2223 
    2324        // CREATES AND BINDS ******************************************************** 
     25        createTab: function() 
     26        { 
     27            var tabBalloon = new Tab( {id:"tabBalloon", numTab:"3", parent:this.containerTab, value:'<spring:message code="label.access.balloon"/>', onClick:jQuery.proxy( this.onClickMetopBallon, this )} ); 
     28            var tabB = new Tab( {id:"tabB", numTab:"2", parent:this.containerTab, value:"<spring:message code="label.access.metopB"/>", onClick:jQuery.proxy( this.onClickMetopB, this )} ); 
     29            var tabA = new Tab( {id:"tabA", numTab:"1", parent:this.containerTab, value:"<spring:message code="label.access.metopA"/>", onClick:jQuery.proxy( this.onClickMetopA, this )} ); 
     30            tabA.active(); 
     31            this.onClickMetopA(); 
     32        }, 
     33 
     34 
    2435        createTools: function() 
    2536        { 
     
    8091            this.selectSpecies = new Select( paramSelect ); 
    8192            this.selectSpecies.add( "CO", 'CO' ); 
    82             this.selectSpecies.add( "H2O",'H2O' ); 
    83             this.selectSpecies.add( "TS",'Temp. Surf.' ); 
     93            this.selectSpecies.add( "H2O", 'H2O' ); 
     94            this.selectSpecies.add( "TS", 'Temp. Surf.' ); 
    8495            this.selectSpecies.selectFirst(); 
    8596        }, 
     
    107118        { 
    108119            $.ajax( { 
    109                 url: "project?methodName=getQuicklookByValues&satellite="+ this.selectSatellites.getValue()+"&projection="+this.selectProjections.getValue()+"&species="+this.selectSpecies.getValue()+"&date="+this.beginDate, 
     120                url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&date=" + this.beginDate, 
    110121                success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 
    111122                error: jQuery.proxy( this.showErrors, this ) 
     
    119130 
    120131            var plotName = jQuery.parseJSON( result ).plotNameResult; 
    121             this.containerQuickLookA.html(plotName); 
     132            this.containerQuickLookA.html( plotName ); 
    122133        }, 
    123134 
    124135 
    125136        // EVENTS ******************************************************** 
    126         onClickQuicklook: function() 
     137        onClickMetopA: function() 
    127138        { 
    128             this.requestQuickLooksBySelectValues(); 
     139            this.containerTitle.html( '<spring:message code="label.access.metopA.title"/>' ); 
    129140        }, 
    130141 
    131         onClickBeginDate: function() 
     142        onClickMetopB: function() 
    132143        { 
    133             this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
     144            this.containerTitle.html( '<spring:message code="label.access.metopB.title"/>' ); 
    134145        }, 
    135146 
    136         onClickClear: function() 
     147        onClickMetopBallon: function() 
    137148        { 
    138             $( "#beginDate" ).val( "" ); 
    139             this.beginDate = false; 
     149            this.containerTitle.html( '<spring:message code="label.access.balloon.title"/>' ); 
    140150        }, 
    141151 
  • ether_iasi/trunk/web/resources/css/iasi.css

    r720 r724  
    4949} 
    5050 
     51.containerDataAccess { 
     52    -moz-border-radius: 4px 0 4px 4px; 
     53    -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); 
     54    -webkit-border-radius: 4px 0 4px 4px; 
     55    -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); 
     56    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); 
     57    background: -moz-linear-gradient(#EDEDED, white); 
     58    background: -webkit-linear-gradient(#EDEDED, white); 
     59    background: -ms-linear-gradient(#EDEDED, white) repeat scroll 0 0 transparent; /*For IE10*/ 
     60    filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#EDEDED', endColorstr = 'white'); /*For IE7-8-9*/ 
     61    float: right; 
     62    width: 960px; 
     63    padding: 10px; 
     64} 
     65 
     66.containerTabs { 
     67    position: relative; 
     68    float: right; 
     69    margin-right: 9px; 
     70} 
     71 
    5172/** ***************************************************** **/ 
    5273/** ************************ OTHERS ********************* **/ 
     
    6788    background-repeat: no-repeat; 
    6889} 
     90 
     91/** ***************************************************** **/ 
     92/** ************************ TABS *********************** **/ 
     93/** ***************************************************** **/ 
     94.tab_class { 
     95    background: none repeat scroll 0 0 gray; 
     96    border-radius: 4px 4px 0 0; 
     97    color: white; 
     98    float: right; 
     99    height: 19px; 
     100    margin-left: 11px; 
     101    margin-right: -10px; 
     102    margin-top: 3px; 
     103    padding: 4px; 
     104} 
     105 
     106.tab_class.activated { 
     107    background: none repeat scroll 0 0 #EDEDED; 
     108    color: #04155D; 
     109} 
  • ether_iasi/trunk/web/resources/js/classesForJQuery/Tab.js

    r710 r724  
    77 
    88var Tab = Class.create( { 
    9             initialize: function( param ) 
    10             { 
    11                 // Init 
    12                 this.numTab = param.numTab ? param.numTab : 1; 
    13                 this.id = param.id ? param.id : ""; 
    14                 this.parent = param.parent ? param.parent : false; 
    15                 this.value = param.value ? param.value : ""; 
    16                 this.title = param.title ? param.title : false; 
    17                 this.className = param.className ? param.className : false; 
    18                 this.callbackOnClick = param.onClick ? param.onClick : false; 
    19                 this.contextToSave = param.contextToSave ? param.contextToSave : false; 
     9    initialize: function( param ) 
     10    { 
     11        // Init 
     12        this.numTab = param.numTab ? param.numTab : 1; 
     13        this.id = param.id ? param.id : ""; 
     14        this.parent = param.parent ? param.parent : false; 
     15        this.value = param.value ? param.value : ""; 
     16        this.title = param.title ? param.title : false; 
     17        this.className = param.className ? param.className : "tab_class"; 
     18        this.callbackOnClick = param.onClick ? param.onClick : false; 
     19        this.contextToSave = param.contextToSave ? param.contextToSave : false; 
    2020 
    21                 // Create tab elements 
    22                 this.divContainer = $( document.createElement( "div" ) ); 
    23                 if( this.className ) 
    24                     this.divContainer.addClass( this.className ); 
    25                 if( this.title ) 
    26                     this.divContainer.attr( {id:this.id, title:this.title, name:this.numTab} ); 
    27                 else 
    28                     this.divContainer.attr( {id:this.id, name:this.numTab} ); 
     21        // Create tab elements 
     22        this.divContainer = $( document.createElement( "div" ) ); 
     23        this.divContainer.addClass( this.className ); 
     24        if( this.title ) 
     25            this.divContainer.attr( {id:this.id, title:this.title, name:this.numTab} ); 
     26        else 
     27            this.divContainer.attr( {id:this.id, name:this.numTab} ); 
    2928 
    30                 this.divContainer.html( this.value ); 
     29        this.divContainer.html( this.value ); 
    3130 
    32                 if( this.parent ) 
    33                     this.parent.append( this.divContainer ); 
     31        if( this.parent ) 
     32            this.parent.append( this.divContainer ); 
    3433 
    35                 // Define button events 
    36                 if( this.contextToSave ) 
    37                     this.divContainer.bind( 'click', [this, this.contextToSave], this.onClickEvent ); 
    38                 else 
    39                     this.divContainer.bind( 'click', this, this.onClickEvent ); 
     34        // Define button events 
     35        if( this.contextToSave ) 
     36            this.divContainer.bind( 'click', [this, this.contextToSave], this.onClickEvent ); 
     37        else 
     38            this.divContainer.bind( 'click', this, this.onClickEvent ); 
    4039 
    4140 
    42             }, 
     41    }, 
    4342 
    44             // Getter / Setter ******************************************************** 
    45             getContainer: function() 
    46             { 
    47                 return this.divContainer; 
    48             }, 
     43    // Getter / Setter ******************************************************** 
     44    getContainer: function() 
     45    { 
     46        return this.divContainer; 
     47    }, 
    4948 
    50             setValue : function( value ) 
    51             { 
    52                 this.value = value; 
    53                 this.divText.html( this.value ); 
    54             }, 
     49    setValue : function( value ) 
     50    { 
     51        this.value = value; 
     52        this.divText.html( this.value ); 
     53    }, 
    5554 
    56             setCallbackOnClick : function( value ) 
    57             { 
    58                 this.callbackOnClick = value; 
    59             }, 
     55    setCallbackOnClick : function( value ) 
     56    { 
     57        this.callbackOnClick = value; 
     58    }, 
    6059 
    61             // Actions ******************************************************** 
    62             active : function() 
    63             { 
    64                 this.divContainer.addClass( "activated" ); 
    65             }, 
     60    // Actions ******************************************************** 
     61    active : function() 
     62    { 
     63        this.divContainer.addClass( "activated" ); 
     64    }, 
    6665 
    67             inactive : function() 
    68             { 
    69                 this.divContainer.removeClass( "activated" ); 
    70             }, 
     66    inactive : function() 
     67    { 
     68        this.divContainer.removeClass( "activated" ); 
     69    }, 
    7170 
    72             remove : function() 
    73             { 
    74                 this.divContainer.remove(); 
     71    remove : function() 
     72    { 
     73        this.divContainer.remove(); 
    7574 
    76             }, 
     75    }, 
    7776 
    78             // Events ******************************************************** 
    79             onClickEvent : function( event ) 
    80             { 
    81                 var clickedTab = event.data; 
    82                 if( (undefined == event.detail || 1 == event.detail) && clickedTab.callbackOnClick ) 
    83                     clickedTab.callbackOnClick( event ); 
    84             } 
     77    // Events ******************************************************** 
     78    onClickEvent : function( event ) 
     79    { 
     80        var clickedTab = event.data; 
    8581 
    86         } ); 
     82        //tabs 
     83        $( "." + this.className ).removeClass( "activated" ); 
     84        clickedTab.divContainer.addClass( "activated" ); 
     85 
     86        if( (undefined == event.detail || 1 == event.detail) && clickedTab.callbackOnClick ) 
     87            clickedTab.callbackOnClick( event ); 
     88    } 
     89 
     90} ); 
  • ether_iasi/trunk/web/src/com/ether/Controller.java

    r722 r724  
    1212import javax.servlet.http.HttpServletRequest; 
    1313import javax.servlet.http.HttpServletResponse; 
    14 import java.text.ParseException; 
    1514import java.util.Calendar; 
    1615import java.util.Date; 
     
    4443    } 
    4544 
     45    @ControllerMethod(view = VIEW_DATA_ACCESS) 
     46    public Map<String, Object> viewDataAccess() 
     47            throws ServiceException 
     48    { 
     49        return new HashMap<String, Object>(); 
     50    } 
     51 
    4652    /** *********************************************************** **/ 
    4753    /** *********************** CALLS ***************************** **/ 
    4854    /** *********************************************************** **/ 
    4955    /** 
    50      * 
    5156     * @param satellite 
    5257     * @param projection 
     
    6065                                            @Mandatory @ParamName("projection") final String projection, 
    6166                                            @Mandatory @ParamName("species") final String species, 
    62                                             @Mandatory @ParamName("date") final String strDate) 
     67                                            @Mandatory @ParamName("date") final String strDate ) 
    6368            throws WebException 
    6469    { 
    65         final Calendar calendar= Calendar.getInstance(); 
     70        final Calendar calendar = Calendar.getInstance(); 
    6671        calendar.setTimeInMillis( Long.valueOf( strDate ) ); 
    6772        final Date date = calendar.getTime(); 
    68         final String fmtDate=DateHelper.formatDate( date, "yyyyMMdd" ) ; 
    69         final String plotName="iasi_"+species+"_"+projection+"_"+fmtDate+"_"+satellite+".png"; 
     73        final String fmtDate = DateHelper.formatDate( date, "yyyyMMdd" ); 
     74        final String plotName = "iasi_" + species + "_" + projection + "_" + fmtDate + "_" + satellite + ".png"; 
    7075        final JSONObject result = new JSONObject(); 
    71         result.put("plotNameResult",plotName ); 
     76        result.put( "plotNameResult", plotName ); 
    7277        return result; 
    7378 
     
    8691    private static final String VIEW_INIT = "init"; 
    8792    private static final String VIEW_IASI = "project/quicklook"; 
     93    private static final String VIEW_DATA_ACCESS = "project/dataAccess"; 
    8894} 
  • ether_iasi/trunk/web/src/messages_en.properties

    r722 r724  
    2424label.quicklook.button=Get quicklook 
    2525label.clear=Clear 
     26 
     27label.access.metopA=MetOp-A 
     28label.access.metopB=MetOp-B 
     29label.access.balloon=IASI Balloon 
     30label.access.metopA.title=ACCESS TO METOP-A IASI DATA 
     31label.access.metopB.title=ACCESS TO METOP-B IASI DATA 
     32label.access.balloon.title=ACCESS TO BALLOON IASI DATA 
     33label.access.level=Product Level 
     34label.access.level.balloon=IASI balloon validation spectra 
     35label.access.level.balloon.comment=Comment IASI balloon validation spectra 
     36label.access.level.clouds=IASI clouds (L2 Eumetsat) 
     37label.access.level.clouds.comment=Comment IASI clouds (L2 Eumetsat) 
     38label.access.level.temp=IASI temperatures and humidity (L2 Eumetsat) 
     39label.access.level.temp.comment=Comment IASI temperatures and humidity (L2 Eumetsat) 
     40label.access.level.carbon=IASI carbon monoxide (L2 ULB-LATMOS) 
     41label.access.level.carbon.comment=Comment IASI carbon monoxide (L2 ULB-LATMOS) 
     42label.access.spatial=Spatial 
     43label.access.temporal=Temporal 
     44label.access.date.begin=Start Date 
     45label.access.date.end=End Date 
     46label.access.time.begin=Start Time (UTC) 
     47label.access.time.end=End Time (UTC) 
     48label.access.get=GET DATA 
  • ether_iasi/trunk/web/src/messages_fr.properties

    r722 r724  
    2525label.quicklook.button=Go quicklook 
    2626label.clear=Initialiser 
     27 
     28label.access.metopA=MetOp-A 
     29label.access.metopB=MetOp-B 
     30label.access.balloon=IASI Ballons 
     31label.access.metopA.title=ACCES AUX DONNEES IASI METOP-A 
     32label.access.metopB.title=ACCES AUX DONNEES IASI METOP-B 
     33label.access.balloon.title=ACCES AUX DONNEES IASI BALLONS 
     34label.access.level=Level product 
     35label.access.level.balloon=IASI balloon validation spectra 
     36label.access.level.balloon.comment=Commentaire IASI balloon validation spectra 
     37label.access.level.clouds=IASI clouds (L2 Eumetsat) 
     38label.access.level.clouds.comment=Commentaire IASI clouds (L2 Eumetsat) 
     39label.access.level.temp=IASI temperatures and humidity (L2 Eumetsat) 
     40label.access.level.temp.comment=Commentaire IASI temperatures and humidity (L2 Eumetsat) 
     41label.access.level.carbon=IASI carbon monoxide (L2 ULB-LATMOS) 
     42label.access.level.carbon.comment=Commentaire IASI carbon monoxide (L2 ULB-LATMOS) 
     43label.access.satial=Spatiale 
     44label.access.temporal=Temporel 
     45label.access.date.begin=Date de Début 
     46label.access.date.end=Date de Fin 
     47label.access.time.begin=Heure de Départ (UTC) 
     48label.access.time.end=Heure de Fin (UTC) 
     49label.access.get=GO DONNEES 
Note: See TracChangeset for help on using the changeset viewer.