Changeset 786
- Timestamp:
- 05/13/14 17:44:28 (10 years ago)
- Location:
- ether_iasi/trunk
- Files:
-
- 1905 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_iasi/trunk/.idea/.name
r710 r786 1 GEISA 1 IASI -
ether_iasi/trunk/.idea/misc.xml
r710 r786 41 41 </value> 42 42 </entry> 43 <entry key="$PROJECT_DIR$/web"> 44 <value> 45 <SvnBranchConfiguration> 46 <option name="trunkUrl" value="" /> 47 </SvnBranchConfiguration> 48 </value> 49 </entry> 43 50 </map> 44 51 </option> -
ether_iasi/trunk/web/project/dataAccess.jsp
r768 r786 18 18 <ether:htmlCss cssFile="select"/> 19 19 <ether:htmlCss cssFile="calendar/anytime"/> 20 <ether:htmlCss cssFile="style"/>21 20 22 21 <ether:htmlJs jsFile="library/jquery-1.4.2.min"/> 22 <ether:htmlJs jsFile="library/jquery-1.8.2.min"/> 23 <ether:htmlJs jsFile="library/jquery-ui-1.9.0.custom/js/jquery-ui-1.9.0.custom"/> 23 24 <ether:htmlJs jsFile="library/jquery.class"/> 24 25 <ether:htmlJs jsFile="library/jquery.protify-0.3"/> 25 26 26 <ether:htmlJs jsFile="library/jquery-1.8.2.min"/>27 <ether:htmlJs jsFile="library/jquery-ui-1.9.0.custom"/>28 <ether:htmlJs jsFile="library/jquery.class"/>29 <ether:htmlJs jsFile="library/jquery.protify-0.3"/>30 27 <ether:htmlJs jsFile="classesForJQuery/etherHelper"/> 31 28 <ether:htmlJs jsFile="classesForJQuery/Button"/> … … 36 33 <ether:htmlJs jsFile="OpenLayers-2.12/OpenLayers"/> 37 34 35 <ether:htmlJs jsFile="OpenLayers-2.12/ClassNewToolbar"/> 36 <ether:htmlJs jsFile="OpenLayers-2.12/ClassDrawSelection"/> 38 37 <ether:htmlJsp jspFile="dataAccess_script"/> 39 38 </HEAD> … … 64 63 <div id='geo' class='geoform'> 65 64 <div id='geoLatn' class='geoformlat'> 66 <input type="text" id="latn" size="3" value="90.00"/>65 <input type="text" name="latn" id="nlat" size="3" value="90.00"/> 67 66 </div> 68 67 <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"/>68 <input type="text" name="lonw" id="wlon" size="4" value="-180.00"/> 69 <input type="text" name="lone" id="elon" size="4" value="180.00"/> 71 70 </div> 72 71 <div id='geoLats' class='geoformlat'> 73 <input type="text" id="lats" size="3" value="-90.00"/>72 <input type="text" name="lats" id="slat" size="3" value="-90.00"/> 74 73 </div> 75 74 <div id='geoReset' class='geoformreset'> … … 91 90 </div> 92 91 93 92 <div id="errors"></div> 94 93 </div> 95 94 <%-- ****************** TITLE & TOOLS ****************** --%> -
ether_iasi/trunk/web/project/dataAccess_script.jsp
r768 r786 19 19 20 20 /** *********** VARIABLES *********** **/ 21 this.calendarFormat = "%Y-%m-%d %H:%i"; 21 this.calendarFormat = "%Y-%m-%d %H:%i"; 22 22 23 this.beginDate = false; 23 24 this.endDate = false; … … 26 27 27 28 this.createProductLevels(); 28 this.createMap 1();29 this.createMap2(); 29 30 30 31 this.createTemporal(); … … 110 111 "http://vmap0.tiles.osgeo.org/wms/vmap0", 111 112 {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"); 113 114 116 115 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 116 117 map.addLayers([polygonLayer,layer]); 118 var selection = new OpenLayers.Layer.Vector("Search Criteria", 119 {displayInLayerSwitcher: false}); 120 map.addLayer(selection); 127 121 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 ); 122 OpenLayers.Control.CustomToolbar = OpenLayers.Class( 123 OpenLayers.Control.Panel, { 124 initialize: function(options) { 125 OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]); 126 this.addControls([ 127 new OpenLayers.Control.Navigation({ title: "Pan" }), 128 new OpenLayers.Control.DrawFeature(polygonLayer, 129 OpenLayers.Handler.RegularPolygon,{title: "Select a point or a region", 'displayClass': 'olControlDrawFeaturePolygon', 130 handlerOptions: polyOptions }), 131 new OpenLayers.Control.ZoomBox({ title: "Zoom", 'displayClass': 'olControlDragRectangle'}) 132 ]); 133 this.displayClass = 'olControlEditingToolbar' 134 135 }, 136 137 draw: function() { 138 var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments); 139 this.activateControl(this.controls[this.controls.length -1]); 140 return div; 141 } 142 }); 143 134 144 135 145 map.addControl(new OpenLayers.Control.MousePosition({ … … 142 152 )); 143 153 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 154 var panel = new OpenLayers.Control.CustomToolbar(); 158 155 map.addControl(panel); 156 157 158 159 160 161 162 // map.events.register("mouseover", map , jQuery.proxy(function(e){ 163 // var latlon = map.getLonLatFromViewPortPx(e.xy) ; 164 // var lat = Math.round(latlon.lat*100)/100; 165 // var lon = Math.round(latlon.lon*100)/100; 166 167 168 169 // document.getElementById("latn").value = lat; 170 // document.getElementById("lats").value = lat; 171 // document.getElementById("lone").value = lon; 172 // document.getElementById("lonw").value = lon; 173 // this.latNord=lat; 174 175 // }, this)); 176 177 178 159 179 }, 180 181 createMap2: function() 182 { 183 184 var map = new OpenLayers.Map( 'map', {controls: [ 185 new OpenLayers.Control.Navigation({documentDrag: true}), 186 new OpenLayers.Control.PanZoom(), 187 new OpenLayers.Control.ArgParser(), 188 new OpenLayers.Control.Attribution() 189 ]} ); 190 var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 191 "http://vmap0.tiles.osgeo.org/wms/vmap0", 192 {layers: 'basic'} ); 193 194 map.addLayer(layer); 195 map.addControl(new OpenLayers.Control.MousePosition({ 196 prefix: '<a target="_blank" ' + 197 'href="http://spatialreference.org/ref/epsg/4326/">' + 198 'EPSG:4326</a> coordinates: ', 199 separator: ' | ', 200 numDigits: 2, 201 emptyString: 'Mouse is not over map.'} 202 )); 203 // map.addControl(new OpenLayers.Control.MousePosition({numDigits: 2})); 204 205 var selection = new OpenLayers.Layer.Vector("Select criteria", {displayInLayerSwitcher: false}); 206 map.addLayer(selection); 207 208 var panelOptions = {'displayClass': 'olControlEditingToolbar'}; 209 var panel = new OpenLayers.Control.NewToolbar(selection, panelOptions); 210 map.addControl(panel); 211 map.maxResolution = map.getResolutionForZoom(map.getZoomForExtent(map.restrictedExtent ? map.restrictedExtent : map.maxExtent)); 212 map.layers[0].maxResolution = map.maxResolution; 213 //Run the layer's initResolutions since we changed the max 214 //map.layers[0].initResolutions(); 215 map.zoomToMaxExtent(); 216 updateMapFromForm(selection); 217 }, 160 218 161 219 createTemporal : function() … … 189 247 $( "#endDate" ).val( this.lastDate ); 190 248 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 249 191 250 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 192 251 }, … … 196 255 { 197 256 var radioValue = $( 'input[type=radio][name=productLevel]:checked' ).attr( 'value' ); 257 console.log( radioValue ); 258 var latitudeNord = $("#nlat").val(); 259 198 260 $.ajax( { 199 url: "project?methodName=getDataByValues&productLevel=" + radioValue + "&dateBegin=" + this.beginDate + "&dateEnd=" + this.endDate ,261 url: "project?methodName=getDataByValues&productLevel=" + radioValue + "&dateBegin=" + this.beginDate + "&dateEnd=" + this.endDate + "&nlat=" + latitudeNord, 200 262 success:jQuery.proxy( this.handleDataAccessBySelectValues, this ), 201 263 error: jQuery.proxy( this.showErrors, this ) … … 208 270 { 209 271 var resu = jQuery.parseJSON( result ).resultTest; 210 alert( resu );272 console.log( resu ); 211 273 }, 212 274 … … 254 316 255 317 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 318 256 319 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 257 320 }, … … 261 324 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 262 325 }, 326 327 263 328 264 329 onClickData : function() … … 285 350 bindEvents: function() 286 351 { 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");352 $("#geoReset").on("click",function(event){ 353 $("#nlat").val("90.00"); 354 $("#wlon").val("-180.00"); 355 $("#elon").val("180.00"); 356 $("#slat").val("-90.00"); 292 357 }); 293 358 } -
ether_iasi/trunk/web/project/quicklook.jsp
r768 r786 24 24 25 25 <ether:htmlJs jsFile="library/jquery-1.8.2.min"/> 26 <ether:htmlJs jsFile="library/jquery-ui-1.9.0.custom "/>26 <ether:htmlJs jsFile="library/jquery-ui-1.9.0.custom/js/jquery-ui-1.9.0.custom"/> 27 27 <ether:htmlJs jsFile="library/jquery.class"/> 28 28 <ether:htmlJs jsFile="library/jquery.protify-0.3"/> 29 30 29 31 <ether:htmlJs jsFile="classesForJQuery/etherHelper"/> 30 32 <ether:htmlJs jsFile="classesForJQuery/Button"/> … … 32 34 <ether:htmlJs jsFile="classesForJQuery/Select"/> 33 35 <ether:htmlJs jsFile="calendar/anytime"/> 36 <ether:htmlJs jsFile="classesForJQuery/TabButton"/> 34 37 35 38 <ether:htmlJsp jspFile="quicklook_script"/> … … 40 43 <div id="pageWrapper" class="pageWrapper"> 41 44 42 <div id="t itle" class="containerTitle"><spring:message code="label.quicklook"/></div>45 <div id="tabButton" class="containerTabButton"></div> 43 46 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"/> 47 <div class="containerQuickAccess"> 48 <div id="title" class="mainTitle"></div> 49 50 <div class="containerTools"> 51 <div id="containerSelect"> 52 <div id="containerSat" class="selectTools"></div> 53 <div id="containerProj" class="selectTools"></div> 54 <div id="containerSpec" class="selectTools"></div> 55 <div id="containerLevel" class="selectTools"></div> 56 </div> 57 <div id="containerCalendar" class="selectTools"> 58 <spring:message code="label.date"/> :<br/> 59 <input type="text" id="beginDate" size="10"/> 60 </div> 61 <div id="containerCalendarMens" class="selectTools"> 62 <spring:message code="label.date"/> :<br/> 63 <input type="text" id="beginDateMens" size="10"/> 64 </div> 65 49 66 </div> 50 </div>51 67 52 <div id="containerQuickLookA" class="containerQuickLooks"> 53 <div id="containerResultA" class="containerResult" ></div> 54 55 </div> 68 <div id="containerQuickLookA" class="containerQuickLooks"> 69 <div id="containerResultA" class="containerResult" ></div> 70 </div> 56 71 57 72 58 <div id="containerQuickLookB" class="containerQuickLooks"> 59 <div id="containerResultB" class="containerResult"></div> 73 <div id="containerQuickLookB" class="containerQuickLooks"> 74 <div id="containerResultB" class="containerResult"></div> 75 </div> 60 76 </div> 61 77 … … 63 79 <%-- ****************** TITLE & TOOLS ****************** --%> 64 80 <script type="text/javascript"> 65 var interfaceTexts = $A( "" );81 var interfaceTexts = $A( "" ); 66 82 67 new InterfaceIasi();83 new InterfaceIasi(); 68 84 </script> 69 85 </div> -
ether_iasi/trunk/web/project/quicklook_script.jsp
r768 r786 3 3 <script type="text/javascript"> 4 4 5 var InterfaceIasi = Class.create( { 6 initialize: function() 7 { 8 /** *********** CONTAINERS *********** **/ 9 this.parent = $( "#pageWrapper" ); 10 this.containerSelect = $( "#containerSelect" ); 11 this.containerCalendar = $( "#containerCalendar" ); 12 this.containerQuickLookA = $( "#containerQuickLookA" ); 13 this.containerQuickLookB = $( "#containerQuickLookB" ); 14 this.containerResultA = $( "#containerResultA" ); 15 this.containerResultB = $( "#containerResultB" ); 16 this.containerErrors = $( "#errors" ); 17 18 /** *********** VARIABLES *********** **/ 19 20 21 this.createTools(); 22 this.getQuicklook(); 23 24 }, 25 26 27 // CREATES AND BINDS ******************************************************** 28 createTools: function() 29 { 30 this.createSelectSatellites(); 31 this.createSelectProjections(); 32 this.createSelectSpecies(); 33 // this.createSelectLevel(); 34 this.createCalendar(); 35 36 37 <%--var quickLookButton = new Button( {id:"quickLookButton", value:"<spring:message code="label.quicklook.button"/>", parent:this.containerSelect, className: "small", onClick:jQuery.proxy( this.onClickQuicklook, this )} );--%> 38 }, 39 40 createSelectSatellites: function() 41 { 42 var div = $( document.createElement( "div" ) ); 43 div.html( '<spring:message code="label.satellite"/> :' ); 44 div.addClass( "selectTools" ); 45 this.containerSelect.append( div ); 46 47 var paramSelect = new Object(); 48 paramSelect.id = "selectSatellites"; 49 paramSelect.parent = div; 50 this.selectSatellites = new Select( paramSelect ); 51 this.selectSatellites.add( "metopa", "MetOp-A", jQuery.proxy(this.getQuicklook, this )); 52 this.selectSatellites.add( "metopb", "MetOp-B", jQuery.proxy(this.getQuicklook, this )); 53 this.selectSatellites.add( "metopab", '<spring:message code="label.either"/>', jQuery.proxy(this.getQuicklook, this )); 54 this.selectSatellites.selectFirst(); 55 }, 56 57 createSelectProjections: function() 58 { 59 var div = $( document.createElement( "div" ) ); 60 div.html( '<spring:message code="label.projection"/> :' ); 61 div.addClass( "selectTools" ); 62 this.containerSelect.append( div ); 63 64 var paramSelect = new Object(); 65 paramSelect.id = "selectProjections"; 66 paramSelect.parent = div; 67 this.selectProjections = new Select( paramSelect ); 68 this.selectProjections.add( "global", '<spring:message code="label.globe"/>', jQuery.proxy(this.getQuicklook, this )); 69 this.selectProjections.add( "europe", '<spring:message code="label.europe"/>', jQuery.proxy(this.getQuicklook, this )); 70 this.selectProjections.add( "pn", '<spring:message code="label.pole.north"/>', jQuery.proxy(this.getQuicklook, this )); 71 this.selectProjections.add( "ps", '<spring:message code="label.pole.south"/>', jQuery.proxy(this.getQuicklook, this )); 72 this.selectProjections.selectFirst(); 73 }, 74 75 createSelectSpecies: function() 76 { 77 var div = $( document.createElement( "div" ) ); 78 div.html( '<spring:message code="label.species"/> :' ); 79 div.addClass( "selectTools" ); 80 this.containerSelect.append( div ); 81 82 var paramSelect = new Object(); 83 paramSelect.id = "selectSpecies"; 84 paramSelect.parent = div; 85 this.selectSpecies = new Select( paramSelect ); 5 var InterfaceIasi = Class.create( { 6 initialize: function() 7 { 8 /** *********** CONTAINERS *********** **/ 9 this.parent = $( "#pageWrapper" ); 10 this.containerTabButton = $( "#tabButton" ); 11 this.containerQuickAccess = $( "#containerQuickAccess" ); 12 this.containerTitle = $( "#title" ); 13 this.containerSelect = $( "#containerSelect" ); 14 this.containerSat = $( "#containerSat"); 15 this.containerProj = $( "#containerProj"); 16 this.containerSpec = $( "#containerSpec"); 17 this.containerLevel = $( "#containerLevel"); 18 this.containerCalendar = $( "#containerCalendar" ); 19 this.containerCalendarMens = $( "#containerCalendarMens" ); 20 this.containerQuickLookA = $( "#containerQuickLookA" ); 21 this.containerQuickLookB = $( "#containerQuickLookB" ); 22 this.containerResultA = $( "#containerResultA" ); 23 this.containerResultB = $( "#containerResultB" ); 24 this.containerErrors = $( "#errors" ); 25 26 /** *********** VARIABLES *********** **/ 27 28 this.isDaily=true; 29 30 this.createTools(); 31 this.getQuicklook(); 32 this.createTabButton(); 33 this.containerLevel.hide(); 34 this.containerCalendarMens.hide(); 35 }, 36 37 // CREATES AND BINDS ******************************************************** 38 createTabButton: function() 39 { 40 41 var monthly = new TabButton( {id:"monthly", numTab:"2", parent:this.containerTabButton, value:"<spring:message code="label.access.monthly"/>", onClick:jQuery.proxy( this.onClickMonthly, this )} ); 42 var daily = new TabButton( {id:"daily", numTab:"1", parent:this.containerTabButton, value:"<spring:message code="label.access.daily"/>", onClick:jQuery.proxy( this.onClickDaily, this )} ); 43 daily.active(); 44 this.onClickDaily(); 45 }, 46 47 createTools: function() 48 { 49 this.createSelectSatellites(); 50 this.createSelectProjections(); 51 this.createSelectSpecies(); 52 this.createSelectLevel(); 53 this.createCalendar(); 54 }, 55 56 createSelectSatellites: function() 57 { 58 var divSatTitle = $( "<div id='containerSatTitle'></div>" ); 59 divSatTitle.html( '<spring:message code="label.satellite"/> :' ); 60 this.containerSat.append( divSatTitle ); 61 var div = $( "<div></div>" ); 62 div.addClass( "selectTools" ); 63 this.containerSat.append( div ); 64 65 var paramSelect = new Object(); 66 paramSelect.id = "selectSatellites"; 67 paramSelect.parent = div; 68 this.selectSatellites = new Select( paramSelect ); 69 this.selectSatellites.add( "metopa", "MetOp-A", jQuery.proxy(this.getQuicklook, this )); 70 this.selectSatellites.add( "metopb", "MetOp-B", jQuery.proxy(this.getQuicklook, this )); 71 this.selectSatellites.add( "metopab", '<spring:message code="label.either"/>', jQuery.proxy(this.getQuicklook, this )); 72 this.selectSatellites.selectFirst(); 73 }, 74 75 createSelectProjections: function() 76 { 77 var divProjTitle = $( "<div id='containerProjTitle'></div>" ); 78 divProjTitle.html( '<spring:message code="label.projection"/> :' ); 79 this.containerProj.append( divProjTitle ); 80 var div = $( document.createElement( "div" ) ); 81 div.addClass( "selectTools" ); 82 this.containerProj.append( div ); 83 84 var paramSelect = new Object(); 85 paramSelect.id = "selectProjections"; 86 paramSelect.parent = div; 87 this.selectProjections = new Select( paramSelect ); 88 this.selectProjections.add( "global", '<spring:message code="label.globe"/>', jQuery.proxy(this.getQuicklook, this )); 89 this.selectProjections.add( "europe", '<spring:message code="label.europe"/>', jQuery.proxy(this.getQuicklook, this )); 90 this.selectProjections.add( "pn", '<spring:message code="label.pole.north"/>', jQuery.proxy(this.getQuicklook, this )); 91 this.selectProjections.add( "ps", '<spring:message code="label.pole.south"/>', jQuery.proxy(this.getQuicklook, this )); 92 this.selectProjections.selectFirst(); 93 }, 94 95 96 createSelectSpecies: function() 97 { 98 var divSpecTitle = $( "<div id='containerSpecTitle'></div>" ); 99 divSpecTitle.html( '<spring:message code="label.species"/> :' ); 100 this.containerSpec.append( divSpecTitle ); 101 var div = $( document.createElement( "div" ) ); 102 103 div.addClass( "selectTools" ); 104 this.containerSpec.append( div ); 105 106 var paramSelect = new Object(); 107 paramSelect.id = "selectSpecies"; 108 paramSelect.parent = div; 109 this.selectSpecies = new Select( paramSelect ); 110 111 112 this.selectSpecies.add( "CO", 'CO', jQuery.proxy(this.getQuicklook, this )); 113 this.selectSpecies.add( "H2O", 'H2O', jQuery.proxy(this.getQuicklook, this )); 114 this.selectSpecies.add( "SKT", '<spring:message code="label.surftemp"/>', jQuery.proxy(this.getQuicklook, this )); 115 this.selectSpecies.selectFirst(); 116 }, 117 118 updateSpecies: function() 119 { 120 this.selectSpecies.remove("H2O"); 121 this.selectSpecies.remove("CO"); 122 this.selectSpecies.remove("SKT"); 123 this.selectSpecies.remove("O3"); 124 this.selectSpecies.remove("NH3"); 125 if (this.isDaily) 126 { 86 127 this.selectSpecies.add( "CO", 'CO', jQuery.proxy(this.getQuicklook, this )); 87 //this.selectSpecies.add( "H2O", 'H2O', jQuery.proxy(this.getQuicklook, this ));128 this.selectSpecies.add( "H2O", 'H2O', jQuery.proxy(this.getQuicklook, this )); 88 129 this.selectSpecies.add( "SKT", '<spring:message code="label.surftemp"/>', jQuery.proxy(this.getQuicklook, this )); 89 130 this.selectSpecies.selectFirst(); 90 }, 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 <%--},--%> 108 109 createCalendar: function() 110 { 111 this.calendarFormat = "%Y-%m-%d"; 112 this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } ); 113 114 AnyTime.picker( "beginDate", { format: this.calendarFormat, firstDOW: 1, 115 labelTitle: '<spring:message code="label.titlecalendar"/> :' , 116 labelYear: '<spring:message code="label.yearcalendar"/> :' , 117 labelMonth: '<spring:message code="label.monthcalendar"/> :', 118 labelDayOfMonth: '<spring:message code="label.daycalendar"/> :', 119 120 methodToCall: jQuery.proxy( this.onClickBeginDate, this ) 121 } ); 122 123 $( "#beginDate" ).val( formatDate( removeDaysToDate( new Date(), 1 ), "%Y-%m-%d" ) ); 124 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 125 }, 126 127 // REQUESTS ******************************************************** 128 requestQuickLooksBySelectValues: function() 129 { 130 $.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, 132 url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&date=" + this.beginDate, 133 success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 134 error: jQuery.proxy( this.showErrors, this ) 135 } ); 136 }, 137 138 139 // HANDLES ******************************************************** 140 handleQuickLooksBySelectValues: function( result ) 141 { 142 131 } 132 else 133 { 134 this.selectSpecies.add( "CO", 'CO', jQuery.proxy(this.getQuicklook, this )); 135 this.selectSpecies.add( "O3", 'O3', jQuery.proxy(this.getQuicklook, this )); 136 this.selectSpecies.add( "NH3", 'NH3', jQuery.proxy(this.getQuicklook, this )); 137 this.selectSpecies.selectFirst(); 138 } 139 140 }, 141 142 createSelectLevel: function() 143 { 144 var divLevelTitle = $( "<div id='containerLevelTitle'></div>" ); 145 divLevelTitle.html( '<spring:message code="label.level"/> :' ); 146 this.containerLevel.append( divLevelTitle ); 147 var div = $( "<div></div>" ); 148 div.addClass( "selectTools" ); 149 this.containerLevel.append( div ); 150 151 var paramSelect = new Object(); 152 paramSelect.id = "selectLevel"; 153 paramSelect.parent = div; 154 155 this.selectLevel = new Select( paramSelect ); 156 this.selectLevel.add( "1021_12", '1021.12', jQuery.proxy(this.getQuicklook, this )); 157 this.selectLevel.add( "899_69", '899.686', jQuery.proxy(this.getQuicklook, this )); 158 this.selectLevel.add( "792_18", '792.184', jQuery.proxy(this.getQuicklook, this )); 159 this.selectLevel.add( "696_97", '696.970', jQuery.proxy(this.getQuicklook, this )); 160 this.selectLevel.add( "587_64", '587.638', jQuery.proxy(this.getQuicklook, this )); 161 this.selectLevel.add( "499_54", '499.539', jQuery.proxy(this.getQuicklook, this )); 162 this.selectLevel.add( "396_81", '396.810', jQuery.proxy(this.getQuicklook, this )); 163 this.selectLevel.add( "303_55", '303.549', jQuery.proxy(this.getQuicklook, this )); 164 this.selectLevel.add( "194_36", '194.360', jQuery.proxy(this.getQuicklook, this )); 165 this.selectLevel.add( "102_05", '102.050', jQuery.proxy(this.getQuicklook, this )); 166 this.selectLevel.add( "77_2", '77.2013', jQuery.proxy(this.getQuicklook, this )); 167 this.selectLevel.add( "50_69", '50.6883', jQuery.proxy(this.getQuicklook, this )); 168 this.selectLevel.add( "40_1", '40.1030', jQuery.proxy(this.getQuicklook, this )); 169 this.selectLevel.add( "31_11", '31.1127', jQuery.proxy(this.getQuicklook, this )); 170 this.selectLevel.add( "20_4", '20.4000', jQuery.proxy(this.getQuicklook, this )); 171 this.selectLevel.add( "10_37", '10.3700', jQuery.proxy(this.getQuicklook, this )); 172 this.selectLevel.add( "5_66", '5.66180', jQuery.proxy(this.getQuicklook, this )); 173 this.selectLevel.add( "1_09", '1.08960', jQuery.proxy(this.getQuicklook, this )); 174 this.selectLevel.add( "0_56", '0.55880', jQuery.proxy(this.getQuicklook, this )); 175 this.selectLevel.add( "0_092", '0.09200', jQuery.proxy(this.getQuicklook, this )); 176 this.selectLevel.add( "0_0135", '0.01350', jQuery.proxy(this.getQuicklook, this )); 177 this.selectLevel.selectFirst(); 178 }, 179 180 181 createCalendar: function() 182 { 183 this.calendarFormat = "%Y-%m-%d"; 184 this.calendarFormatMens = "%Y-%m"; 185 this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } ); 186 this.calendarConverterMens = new AnyTime.Converter( { format: this.calendarFormatMens } ); 187 AnyTime.picker( "beginDate", 188 { format: this.calendarFormat, firstDOW: 1, 189 labelTitle: '<spring:message code="label.titlecalendar"/> :', 190 methodToCall: jQuery.proxy( this.onClickBeginDate, this )} ); 191 $( "#beginDate" ).val( formatDate( removeDaysToDate( new Date(), 1 ), this.calendarFormat ) ); 192 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 193 $("#beginDateMens").AnyTime_picker( 194 { format: this.calendarFormatMens , 195 labelTitle: '<spring:message code="label.titlecalendar"/> :', 196 methodToCall: jQuery.proxy( this.onClickBeginDateMens, this )} ); 197 198 var d = new Date(); 199 var month = d.getMonth()+1; 200 var day = d.getDate(); 201 var dayd= (day<10 ? '0' : '') + day; 202 var mensDate = removeDaysToDate( new Date(), dayd ) 203 var mensMonth = mensDate.getMonth()+1; 204 var mensDay = mensDate.getDate(); 205 206 var mensVal = mensDate.getFullYear() + '-' + 207 (mensMonth<10 ? '0' : '') + mensMonth ; 208 $("#beginDateMens").val(mensVal); 209 210 var mensValDate = mensDate.getFullYear() + '-' + 211 (mensMonth<10 ? '0' : '') + mensMonth + '-' + 212 (mensDay<10 ? '0' : '') + mensDay; 213 214 this.beginDateMens= this.calendarConverter.parse( mensValDate ).getTime(); 215 }, 216 217 218 // REQUESTS ******************************************************** 219 requestQuickLooksBySelectValues: function() 220 { 221 $.ajax( { 222 url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&level=" + this.selectLevel.getValue() + "&date=" + this.beginDate + "&isdaily=" + this.isDaily + "&datemens=" + this.beginDateMens, 223 success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 224 error: jQuery.proxy( this.showErrors, this ) 225 } ); 226 }, 227 228 229 // HANDLES ******************************************************** 230 handleQuickLooksBySelectValues: function( result ) 231 { 232 233 if (this.isDaily) 234 { 143 235 var plotNameA = jQuery.parseJSON( result ).plotNameResultA; 144 236 var plotNameB = jQuery.parseJSON( result ).plotNameResultB; 145 237 var plotNameC = jQuery.parseJSON( result ).plotNameResultC; 146 238 var plotNameD = jQuery.parseJSON( result ).plotNameResultD; 239 147 240 var repDate = jQuery.parseJSON( result ).plotRepResult; 241 148 242 149 243 … … 162 256 163 257 } 164 165 }, 166 167 168 // EVENTS ******************************************************** 169 onClickBeginDate: function() 170 { 171 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 172 this.getQuicklook(); 173 }, 174 175 176 177 // OTHERS ******************************************************** 178 showErrors: function( result ) 179 { 180 this.containerErrors.show(); 181 this.containerErrors.html( result ); 182 }, 183 184 getQuicklook: function() 185 { 186 this.containerResultA.empty(); 187 this.containerResultB.empty(); 188 this.requestQuickLooksBySelectValues(); 189 } 190 191 192 } ); 193 194 function displayNoImage() 195 { 196 $( "#containerResultA" ).html( '<spring:message code="label.error"/>' ); 258 console.log(result); 259 } 260 else 261 { 262 var plotNameE = jQuery.parseJSON( result ).plotNameResultE; 263 var plotNameF = jQuery.parseJSON( result ).plotNameResultF; 264 var repDateMens = jQuery.parseJSON( result ).plotRepResultMens; 265 this.containerResultA.html( "<center>MetOp-A</center><img src='resources/imgiasiA/" + repDateMens + "/00/" + plotNameE + "' width='430px' height='400px' onerror='javascript:displayNoImage()'><img src='resources/imgiasiA/" + repDateMens + "/00/" + plotNameF + "' width='430px' height='400px'>" ); 266 267 console.log(result); 268 } 269 }, 270 271 272 // EVENTS ******************************************************** 273 onClickDaily: function() 274 { 275 this.isDaily=true; 276 this.containerTitle.html( '<spring:message code="label.access.daily.title"/>' ); 277 this.updateSpecies(); 278 $( '#containerLevelTitle' ).show(); 279 $( '#selectLevel').show(); 280 this.containerCalendar.show(); 281 this.containerCalendarMens.hide(); 282 this.getQuicklook(); 283 this.getQuicklook(); 284 }, 285 286 onClickMonthly: function() 287 { 288 this.isDaily=false; 289 this.containerTitle.html( '<spring:message code="label.access.monthly.title"/>' ) 290 this.updateSpecies(); 291 $( '#containerLevelTitle' ).hide(); 292 $( '#selectLevel').hide(); 293 this.containerCalendar.hide(); 294 this.containerCalendarMens.show(); 295 this.getQuicklook(); 296 }, 297 298 onClickBeginDate: function() 299 { 300 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 301 this.getQuicklook(); 302 }, 303 304 onClickBeginDateMens: function() 305 { 306 var valDate = $( "#beginDateMens" ).val() + '-' + '01'; 307 var valDateAll = new Date(valDate) ; 308 var valMonth = valDateAll.getMonth()+1; 309 var valDay = valDateAll.getDate(); 310 311 var valDateMens = valDateAll.getFullYear() + '-' + 312 (valMonth<10 ? '0' : '') + valMonth + '-' + 313 (valDay<10 ? '0' : '') + valDay; 314 this.beginDateMens = this.calendarConverter.parse(valDateMens).getTime(); 315 this.getQuicklook(); 316 }, 317 318 // OTHERS ******************************************************** 319 showErrors: function( result ) 320 { 321 this.containerErrors.show(); 322 this.containerErrors.html( "ERROR : " + result ); 323 }, 324 325 326 327 getQuicklook: function( value ) 328 { 329 330 this.containerResultA.empty(); 331 this.containerResultB.empty(); 332 333 //si plusieurs courbes choisis pour les isotopes et ou molecules, les choix pour Y2 sont inactifs 334 335 if ('H2O' == value ) 336 { 337 this.containerLevel.show(); 338 //this.selectLevel.enable(); 339 } 340 if ('CO' == value || 'SKT' == value) 341 { 342 this.containerLevel.hide(); 343 // this.selectLevel.disable(); 344 } 345 346 this.requestQuickLooksBySelectValues(); 197 347 } 198 function displayNoImageB() 199 { 200 $( "#containerResultB" ).html( '<spring:message code="label.error"/>' ); 201 } 348 349 350 } ); 351 352 353 function displayNoImage() 354 { 355 $( "#containerResultA" ).html( '<spring:message code="label.error"/>' ); 356 } 357 function displayNoImageB() 358 { 359 $( "#containerResultB" ).html( '<spring:message code="label.error"/>' ); 360 } 202 361 </script> -
ether_iasi/trunk/web/resources/css/iasi.css
r768 r786 29 29 /** ********************** CONTAINER ******************** **/ 30 30 /** ***************************************************** **/ 31 .containerQuickAccess{ 32 margin: 0 0 20px 0; 33 } 31 34 .containerTitle { 32 35 color: #0066FF; … … 34 37 font-size: 16pt; 35 38 font-weight: bold; 36 margin: 00 20px 0;39 margin: 20px 0 20px 0; 37 40 } 38 41 39 42 .containerTools { 40 margin: 00 0 20px;43 margin: 20px 0 0 20px; 41 44 float: left; 42 45 width: 880px; … … 84 87 float: right; 85 88 margin-right: 9px; 89 86 90 } 87 91 … … 107 111 } 108 112 109 #beginDate, #endDate {113 #beginDate, #endDate, #beginDateMens { 110 114 background-image: url("../../resources/icons/calendrier-icone-16x16.png"); 115 background-position: right center; 116 background-repeat: no-repeat; 117 color: #000099; 118 } 119 120 #datePicker, #datePickerMens { 121 background-image: url("../../resources/icons/calendrier-icone-16x16.png"); 111 122 background-position: right center; 112 123 background-repeat: no-repeat; … … 145 156 margin-left: 11px; 146 157 margin-right: -10px; 147 margin-top: 3px;158 margin-top: 0px; 148 159 padding: 4px; 149 160 } … … 153 164 color: #051039; 154 165 } 166 167 .tabbutton_class { 168 background: none repeat scroll 0 0 #AAAAAA; 169 border-radius: 4px 4px 0 0; 170 -moz-border-radius: 4px 4px 4px 4px; 171 color: white; 172 cursor: pointer; 173 float: right; 174 height: 19px; 175 margin-left: 11px; 176 margin-right: 0px; 177 margin-top: 0px; 178 padding: 4px; 179 } 180 181 .tabbutton_class.activated { 182 background: none repeat scroll 0 0 #EDEDED; /*color: #3167AD;*/ 183 color: #0066FF; 184 } 185 155 186 156 187 /** ***************************************************** **/ -
ether_iasi/trunk/web/src/com/ether/Controller.java
r768 r786 65 65 @Mandatory @ParamName("projection") final String projection, 66 66 @Mandatory @ParamName("species") final String species, 67 // @Mandatory @ParamName("level") final String level, 68 @Mandatory @ParamName("date") final String strDate ) 67 @Mandatory @ParamName("level") final String level, 68 @Mandatory @ParamName("date") final String strDate, 69 @Mandatory @ParamName("isdaily") final Boolean isDaily, 70 @Mandatory @ParamName("datemens") final String strDateMens ) 69 71 throws WebException 70 72 { … … 72 74 calendar.setTimeInMillis( Long.valueOf( strDate ) ); 73 75 final Date date = calendar.getTime(); 76 calendar.setTimeInMillis( Long.valueOf( strDateMens ) ); 77 final Date dateMens = calendar.getTime(); 78 74 79 final String fmtDate = DateHelper.formatDate( date, "yyyyMMdd" ); 75 80 final String repDate = DateHelper.formatDate( date, "yyyy/MM/dd" ); 81 final String fmtDateMens = DateHelper.formatDate( dateMens, "yyyyMM" ); 82 final String repDateMens = DateHelper.formatDate( dateMens, "yyyy/MM" ); 83 84 76 85 String plotNameA = ""; 77 86 String plotNameB = ""; 78 87 String plotNameC = ""; 79 88 String plotNameD = ""; 80 if( satellite.equals( "metopa" ) || satellite.equals( "metopab" ) ) 89 String plotNameE = ""; 90 String plotNameF = ""; 91 92 if (isDaily) 81 93 { 82 plotNameA = "metopa_iasi_" + species + "_l2_" + fmtDate + "_day_" + projection + ".png"; 83 plotNameC = "metopa_iasi_" + species + "_l2_" + fmtDate + "_night_" + projection + ".png"; 94 95 if( satellite.equals( "metopa" ) || satellite.equals( "metopab" ) ) 96 { 97 if (species.equals( "CO" ) || species.equals( "SKT" )) 98 { 99 plotNameA = "metopa_iasi_" + species + "_l2_" + fmtDate + "_day_" + projection + ".png"; 100 plotNameC = "metopa_iasi_" + species + "_l2_" + fmtDate + "_night_" + projection + ".png"; 101 } 102 if (species.equals( "H2O" )) 103 { 104 plotNameA = "metopa_iasi_" + species + "_l2_" + level + "_" + fmtDate + "_day_" + projection + ".png"; 105 plotNameC = "metopa_iasi_" + species + "_l2_" + level + "_" + fmtDate + "_night_" + projection + ".png"; 106 } 107 } 108 if( satellite.equals( "metopb" ) || satellite.equals( "metopab" ) ) 109 { 110 if (species.equals( "CO" ) || species.equals( "SKT" )) 111 { 112 plotNameB = "metopb_iasi_" + species + "_l2_" + fmtDate + "_day_" + projection + ".png"; 113 plotNameD = "metopb_iasi_" + species + "_l2_" + fmtDate + "_night_" + projection + ".png"; 114 } 115 if (species.equals( "H2O" )) 116 { 117 plotNameB = "metopb_iasi_" + species + "_l2_" + level + "_" + fmtDate + "_day_" + projection + ".png"; 118 plotNameD = "metopb_iasi_" + species + "_l2_" + level + "_" + fmtDate + "_night_" + projection + ".png"; 119 } 120 } 121 final JSONObject result = new JSONObject(); 122 result.put( "plotNameResultA", plotNameA ); 123 result.put( "plotNameResultB", plotNameB ); 124 result.put( "plotNameResultC", plotNameC ); 125 result.put( "plotNameResultD", plotNameD ); 126 result.put( "plotRepResult", repDate); 127 return result; 84 128 } 85 if( satellite.equals( "metopb" ) || satellite.equals( "metopab" ) )129 else 86 130 { 87 plotNameB = "metopb_iasi_" + species + "_l2_" + fmtDate + "_day_" + projection + ".png"; 88 plotNameD = "metopb_iasi_" + species + "_l2_" + fmtDate + "_night_" + projection + ".png"; 131 132 if( satellite.equals( "metopa" ) ) 133 { 134 if (species.equals( "CO" )) 135 { 136 plotNameE = species + "CT_grid_" + fmtDateMens + "_day" + ".png"; 137 plotNameF = species + "CT_grid_" + fmtDateMens + "_night" + ".png"; 138 139 } 140 141 } 142 143 final JSONObject result = new JSONObject(); 144 result.put( "plotNameResultE", plotNameE ); 145 result.put( "plotNameResultF", plotNameF ); 146 result.put( "plotRepResultMens", repDateMens); 147 return result; 89 148 } 90 final JSONObject result = new JSONObject();91 result.put( "plotNameResultA", plotNameA );92 result.put( "plotNameResultB", plotNameB );93 result.put( "plotNameResultC", plotNameC );94 result.put( "plotNameResultD", plotNameD );95 result.put( "plotRepResult", repDate);96 return result;97 98 149 } 99 150 … … 110 161 public JSONObject getDataByValues( @Mandatory @ParamName("productLevel") final String productLevel, 111 162 @Mandatory @ParamName("dateBegin") final String dateBegin, 112 @Mandatory @ParamName("dateEnd") final String dateEnd ) 163 @Mandatory @ParamName("dateEnd") final String dateEnd, 164 @Mandatory @ParamName("nlat") final String latNord 165 ) 113 166 throws WebException 114 167 { … … 120 173 121 174 final JSONObject result = new JSONObject(); 122 result.put( "resultTest", productLevel + "_" + formatedDateBegin + "_" + formatedDateEnd ); 175 // result.put( "resultTest", productLevel + "_" + formatedDateBegin + "_" + formatedDateEnd + "_" + latNord ); 176 result.put( "resultTest", "bob"); 123 177 return result; 124 178 } -
ether_iasi/trunk/web/src/messages_en.properties
r768 r786 17 17 label.projection=Projection 18 18 label.species=Species 19 label.level=Level 19 label.level=Level (hPa) 20 20 label.date=Date 21 21 label.titlecalendar=Select a date … … 31 31 label.access.metopA=MetOp-A 32 32 label.access.metopB=MetOp-B 33 label.access.daily=Daily maps 34 label.access.monthly=Monthly maps 33 35 label.access.balloon=IASI Balloon 34 36 label.access.metopA.title=ACCESS TO METOP-A IASI DATA 35 37 label.access.metopB.title=ACCESS TO METOP-B IASI DATA 36 38 label.access.balloon.title=ACCESS TO BALLOON IASI DATA 39 label.access.daily.title=QUICKLOOKS 40 label.access.monthly.title=QUICKLOOKS 37 41 label.access.level=- Products available 38 42 label.access.level.balloon=balloon -
ether_iasi/trunk/web/src/messages_fr.properties
r768 r786 18 18 label.projection=Projection 19 19 label.species=EspÚce 20 label.level=Niveau 20 label.level=Niveau (hPa) 21 21 label.date=Date 22 22 label.titlecalendar=Choisissez une date
Note: See TracChangeset
for help on using the changeset viewer.