Changeset 768


Ignore:
Timestamp:
11/14/13 17:58:23 (11 years ago)
Author:
cbipsl
Message:

Ajout Openlayers

Location:
ether_iasi/trunk/web
Files:
9 edited

Legend:

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

    r732 r768  
    1818    <ether:htmlCss cssFile="select"/> 
    1919    <ether:htmlCss cssFile="calendar/anytime"/> 
     20    <ether:htmlCss cssFile="style"/> 
    2021 
    2122    <ether:htmlJs jsFile="library/jquery-1.4.2.min"/> 
     
    3334    <ether:htmlJs jsFile="classesForJQuery/Radio"/> 
    3435    <ether:htmlJs jsFile="calendar/anytime"/> 
     36    <ether:htmlJs jsFile="OpenLayers-2.12/OpenLayers"/> 
    3537 
    3638    <ether:htmlJsp jspFile="dataAccess_script"/> 
     
    5759            <div id="spatial" class="containerAccess"> 
    5860                <div class="subTitle"><spring:message code="label.access.spatial"/></div> 
     61                <BR/> 
     62 
     63                <div id='map' class='smallmap'></div> 
     64                <div id='geo' class='geoform'> 
     65                    <div id='geoLatn' class='geoformlat'> 
     66                        <input type="text" id="latn" size="3" value="90.00"/> 
     67                    </div> 
     68                    <div id='geoLon' class='geoformlon'> 
     69                        <input type="text" id="lonw" size="4" value="-180.00"/> 
     70                        <input type="text" id="lone" size="4" value="180.00"/> 
     71                    </div> 
     72                    <div id='geoLats' class='geoformlat'> 
     73                        <input type="text" id="lats" size="3" value="-90.00"/> 
     74                    </div> 
     75                    <div id='geoReset' class='geoformreset'> 
     76                      <input type="reset" value="Max area"/> 
     77                    </div> 
     78                </div> 
    5979            </div> 
    6080 
  • ether_iasi/trunk/web/project/dataAccess_script.jsp

    r732 r768  
    33<script type="text/javascript"> 
    44 
    5     var InterfaceAccess = Class.create( { 
    6         initialize: function() 
    7         { 
    8             /** *********** CONTAINERS *********** **/ 
    9             this.parent = $( "#pageWrapper" ); 
    10             this.containerTab = $( "#tab" ); 
    11             this.containerTitle = $( "#title" ); 
    12             this.containterAccessContent = $( "#accessContent" ); 
    13             this.containerProductLevel = $( "#productLevel" ); 
    14             this.containerProductLevelComment = $( "#productLevelComment" ); 
    15             this.containerSpatial = $( "#spatial" ); 
    16             this.containerTemporal = $( "#temporal" ); 
    17             this.containerButton = $( "#buttonDataAccess" ); 
    18             this.containerErrors = $( "#errors" ); 
    19  
    20             /** *********** VARIABLES *********** **/ 
    21             this.calendarFormat = "%Y-%m-%d %H:%i"; 
    22             this.beginDate = false; 
    23             this.endDate = false; 
    24             this.firstDate = formatDate( new Date() ); 
    25             this.lastDate = formatDate( addHoursToDate( new Date(), 1 ) ); 
    26  
    27             this.createProductLevels(); 
    28             this.createTemporal(); 
    29             this.createTabs(); 
    30  
    31             var dataButton = new Button( {id:"dataButton", value:"<spring:message code="label.access.get"/>", parent:this.containerButton, className: "small get", onClick:jQuery.proxy( this.onClickData, this )} ); 
    32         }, 
    33  
    34  
    35         // CREATES AND BINDS ******************************************************** 
    36         createTabs: function() 
    37         { 
    38             var tabBalloon = new Tab( {id:"tabBalloon", numTab:"3", parent:this.containerTab, value:'<spring:message code="label.access.balloon"/>', onClick:jQuery.proxy( this.onClickMetopBallon, this )} ); 
    39             var tabB = new Tab( {id:"tabB", numTab:"2", parent:this.containerTab, value:"<spring:message code="label.access.metopB"/>", onClick:jQuery.proxy( this.onClickMetopB, this )} ); 
    40             var tabA = new Tab( {id:"tabA", numTab:"1", parent:this.containerTab, value:"<spring:message code="label.access.metopA"/>", onClick:jQuery.proxy( this.onClickMetopA, this )} ); 
    41             tabA.active(); 
    42             this.onClickMetopA(); 
    43         }, 
    44  
    45         createProductLevels: function() 
    46         { 
    47             this.radioBalloon = new Radio( {id:"ballonRadio", name:"productLevel", value:"balloon", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.balloon"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.balloon.comment"/>'] )} ); 
    48             this.radioCloud = new Radio( {id:"cloudRadio", name:"productLevel", value:"cloud", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.clouds"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.clouds.comment"/>'] )} ); 
    49             this.radioTemp = new Radio( {id:"tempRadio", name:"productLevel", value:"temp", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.temp"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.temp.comment"/>'] )} ); 
    50             this.radioCarbon = new Radio( {id:"carbonRadio", name:"productLevel", value:"carbon", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.carbon"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.carbon.comment"/>'] )} ); 
    51         }, 
    52  
    53         createTemporal: function() 
    54         { 
    55             // Calendar 
    56             this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } ); 
    57  
    58             AnyTime.picker( "beginDate", { format: this.calendarFormat, firstDOW: 1, 
    59                 labelTitle: '<spring:message code="label.titlecalendar"/> :' , 
    60                 labelYear:  '<spring:message code="label.yearcalendar"/> :' , 
    61                 labelMonth:  '<spring:message code="label.monthcalendar"/> :', 
    62                 labelDayOfMonth: '<spring:message code="label.daycalendar"/> :', 
    63                 labelHour: '<spring:message code="label.hourcalendar"/> :', 
    64                 labelMinute: '<spring:message code="label.minutecalendar"/> :', 
    65                 methodToCall: jQuery.proxy( this.onClickBeginDate, this ) 
    66             } ); 
    67  
    68             AnyTime.picker( "endDate", { format: this.calendarFormat, firstDOW: 1, 
    69                 labelTitle: '<spring:message code="label.titlecalendar"/> :' , 
    70                 labelYear:  '<spring:message code="label.yearcalendar"/> :' , 
    71                 labelMonth:  '<spring:message code="label.monthcalendar"/> :', 
    72                 labelDayOfMonth: '<spring:message code="label.daycalendar"/> :', 
    73                 labelHour: '<spring:message code="label.hourcalendar"/> :', 
    74                 labelMinute: '<spring:message code="label.minutecalendar"/> :', 
    75                 methodToCall: jQuery.proxy( this.onClickEndDate, this ), 
    76                 idToUpdateEarliest: "beginDate" 
    77             } ); 
    78  
    79             $( "#beginDate" ).val( this.firstDate ); 
    80             $( "#endDate" ).val( this.lastDate ); 
    81             this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
    82             this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
    83         }, 
    84  
    85         // REQUESTS ******************************************************** 
    86         requestDataAccessBySelectValues: function() 
    87         { 
    88             var radioValue = $( 'input[type=radio][name=productLevel]:checked' ).attr( 'value' ); 
    89             $.ajax( { 
    90                 url: "project?methodName=getDataByValues&productLevel=" + radioValue + "&dateBegin=" + this.beginDate + "&dateEnd=" + this.endDate, 
    91                 success:jQuery.proxy( this.handleDataAccessBySelectValues, this ), 
    92                 error: jQuery.proxy( this.showErrors, this ) 
    93             } ); 
    94         }, 
    95  
    96  
    97         // HANDLES ******************************************************** 
    98         handleDataAccessBySelectValues: function( result ) 
    99         { 
    100             var resu = jQuery.parseJSON( result ).resultTest; 
    101             alert( resu ); 
    102         }, 
    103  
    104  
    105         // EVENTS ******************************************************** 
    106         onClickMetopA: function() 
    107         { 
    108             this.containerTitle.html( '<spring:message code="label.access.metopA.title"/>' ); 
    109             this.containterAccessContent.show(); 
    110             this.initFieldsAB(); 
    111         }, 
    112  
    113         onClickMetopB: function() 
    114         { 
    115             this.containerTitle.html( '<spring:message code="label.access.metopB.title"/>' ); 
    116             this.containterAccessContent.show(); 
    117             this.initFieldsAB(); 
    118         }, 
    119  
    120         onClickMetopBallon: function() 
    121         { 
    122             this.containerTitle.html( '<spring:message code="label.access.balloon.title"/>' ); 
    123             this.containterAccessContent.hide(); 
    124         }, 
    125  
    126         onClickRadio: function() 
    127         { 
    128             var context = this[0]; 
    129             var comment = this[1]; 
    130             context.containerProductLevelComment.html( comment ); 
    131         }, 
    132  
    133         onClickBeginDate: function() 
    134         { 
    135             var oneHour = 60 * 60 * 1000; 
    136             var beginDateTime = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
    137             var endDateTime = null; 
    138             if( "" != $( "#endDate" ).val() ) 
    139                 endDateTime = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
    140             this.beginDateWithAnHourLater = new Date( beginDateTime + oneHour ); 
    141  
    142             if( null == endDateTime || endDateTime < beginDateTime ) 
    143                 $( "#endDate" ).val( this.calendarConverter.format( this.beginDateWithAnHourLater ) ); 
    144  
    145             this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
    146             this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
    147         }, 
    148  
    149         onClickEndDate: function() 
    150         { 
    151             this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
    152         }, 
    153  
    154         onClickData : function() 
    155         { 
    156             this.requestDataAccessBySelectValues(); 
    157         }, 
    158  
    159         // OTHERS ******************************************************** 
    160         showErrors: function( result ) 
    161         { 
    162             this.containerErrors.show(); 
    163             this.containerErrors.html( result ); 
    164         }, 
    165  
    166         initFieldsAB: function() 
    167         { 
    168             this.radioBalloon.check(); 
    169             $( "#beginDate" ).val( this.firstDate ); 
    170             $( "#endDate" ).val( this.lastDate ); 
    171             this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
    172             this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
     5var InterfaceAccess = Class.create( { 
     6    initialize: function() 
     7    { 
     8        /** *********** CONTAINERS *********** **/ 
     9        this.parent = $( "#pageWrapper" ); 
     10        this.containerTab = $( "#tab" ); 
     11        this.containerTitle = $( "#title" ); 
     12        this.containterAccessContent = $( "#accessContent" ); 
     13        this.containerProductLevel = $( "#productLevel" ); 
     14        this.containerProductLevelComment = $( "#productLevelComment" ); 
     15        this.containerSpatial = $( "#spatial" ); 
     16        this.containerTemporal = $( "#temporal" ); 
     17        this.containerButton = $( "#buttonDataAccess" ); 
     18        this.containerErrors = $( "#errors" ); 
     19 
     20        /** *********** VARIABLES *********** **/ 
     21        this.calendarFormat = "%Y-%m-%d %H:%i"; 
     22        this.beginDate = false; 
     23        this.endDate = false; 
     24        this.firstDate = formatDate( new Date() ); 
     25        this.lastDate = formatDate( addHoursToDate( new Date(), 1 ) ); 
     26 
     27        this.createProductLevels(); 
     28        this.createMap1(); 
     29 
     30        this.createTemporal(); 
     31        this.createTabs(); 
     32        this.bindEvents(); 
     33 
     34        var dataButton = new Button( {id:"dataButton", value:"<spring:message code="label.access.get"/>", parent:this.containerButton, className: "small get", onClick:jQuery.proxy( this.onClickData, this )} ); 
     35    }, 
     36 
     37 
     38    // CREATES AND BINDS ******************************************************** 
     39    createTabs: function() 
     40    { 
     41        var tabBalloon = new Tab( {id:"tabBalloon", numTab:"3", parent:this.containerTab, value:'<spring:message code="label.access.balloon"/>', onClick:jQuery.proxy( this.onClickMetopBallon, this )} ); 
     42        var tabB = new Tab( {id:"tabB", numTab:"2", parent:this.containerTab, value:"<spring:message code="label.access.metopB"/>", onClick:jQuery.proxy( this.onClickMetopB, this )} ); 
     43        var tabA = new Tab( {id:"tabA", numTab:"1", parent:this.containerTab, value:"<spring:message code="label.access.metopA"/>", onClick:jQuery.proxy( this.onClickMetopA, this )} ); 
     44        tabA.active(); 
     45        this.onClickMetopA(); 
     46    }, 
     47 
     48    createProductLevels: function() 
     49    { 
     50        this.radioBalloon = new Radio( {id:"ballonRadio", name:"productLevel", value:"balloon", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.balloon"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.balloon.comment"/>'] )} ); 
     51        this.radioCloud = new Radio( {id:"cloudRadio", name:"productLevel", value:"cloud", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.clouds"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.clouds.comment"/>'] )} ); 
     52        this.radioTemp = new Radio( {id:"tempRadio", name:"productLevel", value:"temp", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.temp"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.temp.comment"/>'] )} ); 
     53        this.radioCarbon = new Radio( {id:"carbonRadio", name:"productLevel", value:"carbon", parent:this.containerProductLevel, className:"radioProductLevel", text:'<spring:message code="label.access.level.carbon"/>', onClick:jQuery.proxy( this.onClickRadio, [this, '<spring:message code="label.access.level.carbon.comment"/>'] )} ); 
     54    }, 
     55 
     56    createMap: function() 
     57    { 
     58 
     59        var map = new OpenLayers.Map( 'map', {controls: [ 
     60            new OpenLayers.Control.Navigation({documentDrag: true}), 
     61            new OpenLayers.Control.PanZoom(), 
     62            new OpenLayers.Control.ArgParser(), 
     63            new OpenLayers.Control.Attribution() 
     64        ]} ); 
     65        var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
     66                "http://vmap0.tiles.osgeo.org/wms/vmap0", 
     67        {layers: 'basic'} ); 
     68        var panel = new OpenLayers.Control.Panel({'displayClass': 'olControlEditingToolbar' 
     69                    }); 
     70        var navigate = new OpenLayers.Control.Navigation({  title: "Pan" }); 
     71        var pointLayer = new OpenLayers.Layer.Vector("Point Layer"); 
     72        var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); 
     73        var zbox = new OpenLayers.Control.ZoomBox({  title: "Zoom" 
     74            }) ; 
     75 
     76 
     77        map.addLayers([layer,pointLayer,polygonLayer]); 
     78        var point = new OpenLayers.Control.DrawFeature(pointLayer, 
     79                        OpenLayers.Handler.Point, 
     80 
     81                {title: "Select a point", 'displayClass': 'olControlDrawFeaturePoint'}); 
     82 
     83        var polyOptions = {sides: 4, irregular: 1, snapAngle: 0}; 
     84 
     85        var polygon =  new OpenLayers.Control.DrawFeature(polygonLayer, 
     86                OpenLayers.Handler.RegularPolygon,{title: "Select a region", 'displayClass': 'olControlDrawFeaturePolygon', 
     87            handlerOptions: polyOptions 
    17388        } 
    174  
    175     } ); 
     89                ); 
     90 
     91        map.addControl(new OpenLayers.Control.MousePosition()); 
     92        map.zoomToMaxExtent(); 
     93        panel.addControls([navigate,point,polygon,zbox]); 
     94 
     95 
     96        map.addControl(panel); 
     97        $("#latn").val("10.00"); 
     98    }, 
     99 
     100    createMap1: function() 
     101       { 
     102 
     103           var map = new OpenLayers.Map( 'map', {controls: [ 
     104               new OpenLayers.Control.Navigation({documentDrag: true}), 
     105               new OpenLayers.Control.PanZoom(), 
     106               new OpenLayers.Control.ArgParser(), 
     107               new OpenLayers.Control.Attribution() 
     108           ]} ); 
     109           var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
     110                   "http://vmap0.tiles.osgeo.org/wms/vmap0", 
     111           {layers: 'basic'} ); 
     112           var panel = new OpenLayers.Control.Panel({'displayClass': 'olControlEditingToolbar' 
     113                       }); 
     114           var navigate = new OpenLayers.Control.Navigation({  title: "Pan" }); 
     115           var pointLayer = new OpenLayers.Layer.Vector("Point Layer"); 
     116           var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); 
     117           var zbox = new OpenLayers.Control.ZoomBox({  title: "Zoom" 
     118               }) ; 
     119 
     120 
     121           map.addLayers([pointLayer,polygonLayer,layer]); 
     122           var point = new OpenLayers.Control.DrawFeature(pointLayer, 
     123                           OpenLayers.Handler.Point, 
     124 
     125                   {title: "Select a point", 'displayClass': 'olControlDrawFeaturePoint'}); 
     126 
     127           var polyOptions = {sides: 4, irregular: 1, snapAngle: 0}; 
     128 
     129           var polygon =  new OpenLayers.Control.DrawFeature(polygonLayer, 
     130                   OpenLayers.Handler.RegularPolygon,{title: "Select a region", 'displayClass': 'olControlDrawFeaturePolygon', 
     131               handlerOptions: polyOptions 
     132           } 
     133                   ); 
     134 
     135           map.addControl(new OpenLayers.Control.MousePosition({ 
     136                    prefix: '<a target="_blank" ' + 
     137                        'href="http://spatialreference.org/ref/epsg/4326/">' + 
     138                        'EPSG:4326</a> coordinates: ', 
     139                    separator: ' | ', 
     140                    numDigits: 2, 
     141                    emptyString: 'Mouse is not over map.'} 
     142                )); 
     143           map.zoomToMaxExtent(); 
     144           panel.addControls([navigate,point,polygon,zbox]); 
     145 
     146          map.events.register("mousemove", map , function(e){ 
     147                       var latlon = map.getLonLatFromViewPortPx(e.xy) ; 
     148                       var lat = Math.round(latlon.lat*100)/100; 
     149                       var lon = Math.round(latlon.lon*100)/100; 
     150 
     151                       document.getElementById("latn").value = lat; 
     152                       document.getElementById("lats").value = lat; 
     153                       document.getElementById("lone").value = lon; 
     154                       document.getElementById("lonw").value = lon; 
     155                       }); 
     156 
     157 
     158           map.addControl(panel); 
     159       }, 
     160 
     161    createTemporal : function() 
     162    { 
     163        // Calendar 
     164        this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } ); 
     165 
     166        AnyTime.picker( "beginDate", { format: this.calendarFormat, firstDOW: 1, 
     167            labelTitle: '<spring:message code="label.titlecalendar"/> :' , 
     168            labelYear:  '<spring:message code="label.yearcalendar"/> :' , 
     169            labelMonth:  '<spring:message code="label.monthcalendar"/> :', 
     170            labelDayOfMonth: '<spring:message code="label.daycalendar"/> :', 
     171            labelHour: '<spring:message code="label.hourcalendar"/> :', 
     172            labelMinute: '<spring:message code="label.minutecalendar"/> :', 
     173            earliest: new Date(2007,9,1,0,0,0), 
     174            methodToCall: jQuery.proxy( this.onClickBeginDate, this ) 
     175        } ); 
     176 
     177        AnyTime.picker( "endDate", { format: this.calendarFormat, firstDOW: 1, 
     178            labelTitle: '<spring:message code="label.titlecalendar"/> :' , 
     179            labelYear:  '<spring:message code="label.yearcalendar"/> :' , 
     180            labelMonth:  '<spring:message code="label.monthcalendar"/> :', 
     181            labelDayOfMonth: '<spring:message code="label.daycalendar"/> :', 
     182            labelHour: '<spring:message code="label.hourcalendar"/> :', 
     183            labelMinute: '<spring:message code="label.minutecalendar"/> :', 
     184            methodToCall: jQuery.proxy( this.onClickEndDate, this ), 
     185            idToUpdateEarliest: "beginDate" 
     186        } ); 
     187 
     188        $( "#beginDate" ).val( this.firstDate ); 
     189        $( "#endDate" ).val( this.lastDate ); 
     190        this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
     191        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
     192    }, 
     193 
     194    // REQUESTS ******************************************************** 
     195    requestDataAccessBySelectValues: function() 
     196    { 
     197        var radioValue = $( 'input[type=radio][name=productLevel]:checked' ).attr( 'value' ); 
     198        $.ajax( { 
     199            url: "project?methodName=getDataByValues&productLevel=" + radioValue + "&dateBegin=" + this.beginDate + "&dateEnd=" + this.endDate, 
     200            success:jQuery.proxy( this.handleDataAccessBySelectValues, this ), 
     201            error: jQuery.proxy( this.showErrors, this ) 
     202        } ); 
     203    }, 
     204 
     205 
     206    // HANDLES ******************************************************** 
     207    handleDataAccessBySelectValues: function( result ) 
     208    { 
     209        var resu = jQuery.parseJSON( result ).resultTest; 
     210        alert( resu ); 
     211    }, 
     212 
     213 
     214    // EVENTS ******************************************************** 
     215    onClickMetopA: function() 
     216    { 
     217        this.containerTitle.html( '<spring:message code="label.access.metopA.title"/>' ); 
     218        this.containterAccessContent.show(); 
     219        this.initFieldsAB(); 
     220    }, 
     221 
     222    onClickMetopB: function() 
     223    { 
     224        this.containerTitle.html( '<spring:message code="label.access.metopB.title"/>' ); 
     225        this.containterAccessContent.show(); 
     226        this.initFieldsAB(); 
     227    }, 
     228 
     229    onClickMetopBallon: function() 
     230    { 
     231        this.containerTitle.html( '<spring:message code="label.access.balloon.title"/>' ); 
     232        this.containterAccessContent.hide(); 
     233    }, 
     234 
     235    onClickRadio: function() 
     236    { 
     237        var context = this[0]; 
     238        var comment = this[1]; 
     239        context.containerProductLevelComment.html( comment ); 
     240    }, 
     241 
     242    onClickBeginDate: function() 
     243    { 
     244        var oneHour = 60 * 60 * 1000; 
     245        var beginDateTime = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
     246        var endDateTime = null; 
     247 
     248        if( "" != $( "#endDate" ).val() ) 
     249            endDateTime = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
     250        this.beginDateWithAnHourLater = new Date( beginDateTime + oneHour ); 
     251 
     252        if( null == endDateTime || endDateTime < beginDateTime ) 
     253            $( "#endDate" ).val( this.calendarConverter.format( this.beginDateWithAnHourLater ) ); 
     254 
     255        this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
     256        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
     257    }, 
     258 
     259    onClickEndDate: function() 
     260    { 
     261        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
     262    }, 
     263 
     264    onClickData : function() 
     265    { 
     266        this.requestDataAccessBySelectValues(); 
     267    }, 
     268 
     269    // OTHERS ******************************************************** 
     270    showErrors: function( result ) 
     271    { 
     272        this.containerErrors.show(); 
     273        this.containerErrors.html( result ); 
     274    }, 
     275 
     276    initFieldsAB: function() 
     277    { 
     278        this.radioBalloon.check(); 
     279        $( "#beginDate" ).val( this.firstDate ); 
     280        $( "#endDate" ).val( this.lastDate ); 
     281        this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 
     282        this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 
     283    }, 
     284 
     285    bindEvents: function() 
     286    { 
     287       $("#geoReset").bind("click",function(event){ 
     288           $("#latn").val("90.00"); 
     289           $("#lonw").val("-180.00"); 
     290           $("#lone").val("180.00"); 
     291           $("#lats").val("-90.00"); 
     292       }); 
     293    } 
     294 
     295} ); 
    176296 
    177297</script> 
  • ether_iasi/trunk/web/project/quicklook.jsp

    r754 r768  
    6868    </script> 
    6969</div> 
    70  
    7170</BODY> 
    7271</HTML> 
  • ether_iasi/trunk/web/project/quicklook_script.jsp

    r759 r768  
    3131            this.createSelectProjections(); 
    3232            this.createSelectSpecies(); 
     33//            this.createSelectLevel(); 
    3334            this.createCalendar(); 
    3435 
     
    8586            this.selectSpecies.add( "CO", 'CO', jQuery.proxy(this.getQuicklook, this )); 
    8687//            this.selectSpecies.add( "H2O", 'H2O', jQuery.proxy(this.getQuicklook, this )); 
    87             this.selectSpecies.add( "TS", '<spring:message code="label.surftemp"/>', jQuery.proxy(this.getQuicklook, this )); 
     88            this.selectSpecies.add( "SKT", '<spring:message code="label.surftemp"/>', jQuery.proxy(this.getQuicklook, this )); 
    8889            this.selectSpecies.selectFirst(); 
    8990        }, 
     91 
     92        <%--createSelectLevel: function()--%> 
     93        <%--{--%> 
     94            <%--var div = $( document.createElement( "div" ) );--%> 
     95            <%--div.html( '<spring:message code="label.level"/> :' );--%> 
     96            <%--div.addClass( "selectTools" );--%> 
     97            <%--this.containerSelect.append( div );--%> 
     98 
     99            <%--var paramSelect = new Object();--%> 
     100            <%--paramSelect.id = "selectLevel";--%> 
     101            <%--paramSelect.parent = div;--%> 
     102            <%--this.selectLevel = new Select( paramSelect );--%> 
     103            <%--this.selectLevel.add( "1000", '1000', jQuery.proxy(this.getQuicklook, this ));--%> 
     104            <%--this.selectLevel.add( "500", '500', jQuery.proxy(this.getQuicklook, this ));--%> 
     105            <%--this.selectLevel.add( "10", '10', jQuery.proxy(this.getQuicklook, this ));--%> 
     106            <%--this.selectLevel.selectFirst();--%> 
     107        <%--},--%> 
    90108 
    91109        createCalendar: function() 
     
    111129        { 
    112130            $.ajax( { 
     131//                url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&level=" + this.selectLevel.getValue() + "&date=" + this.beginDate, 
    113132                url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&date=" + this.beginDate, 
    114133                success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 
  • ether_iasi/trunk/web/resources/css/ether.css

    r760 r768  
    3838 
    3939.pageWrapper { 
    40     width: 890px; 
     40    width: 886px; 
    4141    text-align: left; 
    4242    margin: 10px auto; 
     
    8585.subTitle { 
    8686/*color: #3167AD;*/ 
    87     color: #051039; 
     87    color: #0066FF; 
    8888    font-family: Arial, Helvetica, sans-serif; 
    8989    font-size: 11pt; 
  • ether_iasi/trunk/web/resources/css/iasi.css

    r758 r768  
    7070    filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#EDEDED', endColorstr = 'white'); /*For IE7-8-9*/ 
    7171    float: right; 
    72     width: 960px; 
    7372    padding: 10px; 
     73    width: 868px; 
    7474} 
    7575 
     
    7777    margin-top: 30px; 
    7878    float: left; 
    79     width: 980px; 
     79    width: 880px; 
    8080} 
    8181 
     
    153153    color: #051039; 
    154154} 
     155 
     156/** ***************************************************** **/ 
     157/** ************************ MAP *********************** **/ 
     158/** ***************************************************** **/ 
     159div.olMap { 
     160    cursor: default; 
     161    margin: 0 !important; 
     162    padding: 0 !important; 
     163    z-index: 0; 
     164} 
     165 
     166.smallmap { 
     167    border: 1px solid #CCCCCC; 
     168    height: 256px; 
     169    width: 512px; 
     170    float:left; 
     171} 
     172.geoform { 
     173    float: right; 
     174    height:180px; 
     175    width:300px; 
     176    margin-top:78px; 
     177} 
     178.geoformlat { 
     179    position:relative; 
     180    margin-left: 80px; 
     181} 
     182.geoformlon { 
     183    position:relative; 
     184    margin-left: 45px; 
     185} 
     186.geoformreset { 
     187    position:relative; 
     188    margin-left: 58px; 
     189} 
     190 
     191/**.olControlNavToolbar { 
     192                          top: 150px !important; 
     193                        } 
     194*/ 
     195.olControlDrawFeaturePathItemInactive 
     196{ 
     197display: none !important; 
     198    } 
     199 
     200 
     201#AnyTime--endDate, #AnyTime--beginDate    { 
     202    z-index: 1000; 
     203} 
  • ether_iasi/trunk/web/src/com/ether/Controller.java

    r754 r768  
    6565                                            @Mandatory @ParamName("projection") final String projection, 
    6666                                            @Mandatory @ParamName("species") final String species, 
     67//                                            @Mandatory @ParamName("level") final String level, 
    6768                                            @Mandatory @ParamName("date") final String strDate ) 
    6869            throws WebException 
  • ether_iasi/trunk/web/src/messages_en.properties

    r759 r768  
    1717label.projection=Projection 
    1818label.species=Species 
     19label.level=Level 
    1920label.date=Date 
    2021label.titlecalendar=Select a date 
     
    2526label.minutecalendar=Minute 
    2627label.quicklook.button=Get quicklook 
    27 label.surftemp=TS 
     28label.surftemp=T_surf 
    2829label.error=No maps for these parameters 
    2930 
     
    3435label.access.metopB.title=ACCESS TO METOP-B IASI DATA 
    3536label.access.balloon.title=ACCESS TO BALLOON IASI DATA 
    36 label.access.level=Product Level 
    37 label.access.level.balloon=IASI balloon validation spectra 
    38 label.access.level.balloon.comment=Comment IASI balloon validation spectra 
    39 label.access.level.clouds=IASI clouds (L2 Eumetsat) 
    40 label.access.level.clouds.comment=Comment IASI clouds (L2 Eumetsat) 
    41 label.access.level.temp=IASI temperatures and humidity (L2 Eumetsat) 
    42 label.access.level.temp.comment=Comment IASI temperatures and humidity (L2 Eumetsat) 
    43 label.access.level.carbon=IASI carbon monoxide (L2 ULB-LATMOS) 
    44 label.access.level.carbon.comment=Comment IASI carbon monoxide (L2 ULB-LATMOS) 
    45 label.access.spatial=Spatial 
    46 label.access.temporal=Temporal 
     37label.access.level=- Products available 
     38label.access.level.balloon=balloon 
     39label.access.level.balloon.comment=IASI balloon validation spectra 
     40label.access.level.clouds=Clouds (L2 Eumetsat) 
     41label.access.level.clouds.comment=IASI clouds (L2 Eumetsat) 
     42label.access.level.temp=TWT (L2 Eumetsat) 
     43label.access.level.temp.comment=IASI temperature and humidity (L2 Eumetsat) 
     44label.access.level.carbon=CO (L2 ULB-LATMOS) 
     45label.access.level.carbon.comment=IASI carbon monoxide (L2 ULB-LATMOS) 
     46label.access.spatial=- Spatial coverage 
     47label.access.temporal=- Temporal coverage 
    4748label.access.date.begin=Start Date 
    4849label.access.date.end=End Date 
  • ether_iasi/trunk/web/src/messages_fr.properties

    r756 r768  
    1818label.projection=Projection 
    1919label.species=EspÚce 
     20label.level=Niveau 
    2021label.date=Date 
    2122label.titlecalendar=Choisissez une date 
     
    2627label.minutecalendar=Minute 
    2728label.quicklook.button=Go quicklook 
    28 label.surftemp=TS 
     29label.surftemp=T_surf 
    2930label.error=Pas de visualisation pour ces paramÚtres 
    3031 
     
    3637label.access.balloon.title=ACCES AUX DONNEES IASI BALLONS 
    3738label.access.level=Level product 
    38 label.access.level.balloon=IASI balloon validation spectra 
     39label.access.level.balloon=ballon 
    3940label.access.level.balloon.comment=Commentaire IASI balloon validation spectra 
    4041label.access.level.clouds=IASI clouds (L2 Eumetsat) 
Note: See TracChangeset for help on using the changeset viewer.