Changeset 724
- Timestamp:
- 01/18/13 14:25:32 (11 years ago)
- 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 29 29 <ether:htmlJs jsFile="classesForJQuery/etherHelper"/> 30 30 <ether:htmlJs jsFile="classesForJQuery/Button"/> 31 <ether:htmlJs jsFile="classesForJQuery/DragSlide"/>32 31 <ether:htmlJs jsFile="classesForJQuery/Select"/> 32 <ether:htmlJs jsFile="classesForJQuery/Tab"/> 33 33 <ether:htmlJs jsFile="calendar/anytime"/> 34 34 35 <ether:htmlJsp jspFile=" quicklook_script"/>35 <ether:htmlJsp jspFile="dataAccess_script"/> 36 36 </HEAD> 37 37 … … 40 40 <div id="pageWrapper" class="pageWrapper"> 41 41 42 <div id="t itle" class="containerTitle"><spring:message code="label.quicklook"/></div>42 <div id="tab" class="containerTabs"></div> 43 43 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> 50 54 </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>57 55 <%-- ****************** TITLE & TOOLS ****************** --%> 58 56 <script type="text/javascript"> 59 57 var interfaceTexts = $A( "" ); 60 58 61 new Interface Iasi();59 new InterfaceAccess(); 62 60 </script> 63 61 -
ether_iasi/trunk/web/project/dataAccess_script.jsp
r723 r724 3 3 <script type="text/javascript"> 4 4 5 var Interface Iasi= Class.create( {5 var InterfaceAccess = Class.create( { 6 6 initialize: function() 7 7 { 8 8 /** *********** CONTAINERS *********** **/ 9 9 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" ); 14 15 this.containerErrors = $( "#errors" ); 15 16 … … 17 18 18 19 19 this.createT ools();20 this.createTab(); 20 21 }, 21 22 22 23 23 24 // 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 24 35 createTools: function() 25 36 { … … 80 91 this.selectSpecies = new Select( paramSelect ); 81 92 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.' ); 84 95 this.selectSpecies.selectFirst(); 85 96 }, … … 107 118 { 108 119 $.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, 110 121 success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 111 122 error: jQuery.proxy( this.showErrors, this ) … … 119 130 120 131 var plotName = jQuery.parseJSON( result ).plotNameResult; 121 this.containerQuickLookA.html( plotName);132 this.containerQuickLookA.html( plotName ); 122 133 }, 123 134 124 135 125 136 // EVENTS ******************************************************** 126 onClick Quicklook: function()137 onClickMetopA: function() 127 138 { 128 this. requestQuickLooksBySelectValues();139 this.containerTitle.html( '<spring:message code="label.access.metopA.title"/>' ); 129 140 }, 130 141 131 onClick BeginDate: function()142 onClickMetopB: function() 132 143 { 133 this. beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime();144 this.containerTitle.html( '<spring:message code="label.access.metopB.title"/>' ); 134 145 }, 135 146 136 onClick Clear: function()147 onClickMetopBallon: function() 137 148 { 138 $( "#beginDate" ).val( "" ); 139 this.beginDate = false; 149 this.containerTitle.html( '<spring:message code="label.access.balloon.title"/>' ); 140 150 }, 141 151 -
ether_iasi/trunk/web/resources/css/iasi.css
r720 r724 49 49 } 50 50 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 51 72 /** ***************************************************** **/ 52 73 /** ************************ OTHERS ********************* **/ … … 67 88 background-repeat: no-repeat; 68 89 } 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 7 7 8 8 var Tab = Class.create( { 9 10 11 12 13 14 15 16 17 this.className = param.className ? param.className : false;18 19 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; 20 20 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} ); 29 28 30 29 this.divContainer.html( this.value ); 31 30 32 33 31 if( this.parent ) 32 this.parent.append( this.divContainer ); 34 33 35 36 37 38 39 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 ); 40 39 41 40 42 41 }, 43 42 44 45 46 47 48 43 // Getter / Setter ******************************************************** 44 getContainer: function() 45 { 46 return this.divContainer; 47 }, 49 48 50 51 52 53 54 49 setValue : function( value ) 50 { 51 this.value = value; 52 this.divText.html( this.value ); 53 }, 55 54 56 57 58 59 55 setCallbackOnClick : function( value ) 56 { 57 this.callbackOnClick = value; 58 }, 60 59 61 62 63 64 65 60 // Actions ******************************************************** 61 active : function() 62 { 63 this.divContainer.addClass( "activated" ); 64 }, 66 65 67 68 69 70 66 inactive : function() 67 { 68 this.divContainer.removeClass( "activated" ); 69 }, 71 70 72 73 74 71 remove : function() 72 { 73 this.divContainer.remove(); 75 74 76 75 }, 77 76 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; 85 81 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 12 12 import javax.servlet.http.HttpServletRequest; 13 13 import javax.servlet.http.HttpServletResponse; 14 import java.text.ParseException;15 14 import java.util.Calendar; 16 15 import java.util.Date; … … 44 43 } 45 44 45 @ControllerMethod(view = VIEW_DATA_ACCESS) 46 public Map<String, Object> viewDataAccess() 47 throws ServiceException 48 { 49 return new HashMap<String, Object>(); 50 } 51 46 52 /** *********************************************************** **/ 47 53 /** *********************** CALLS ***************************** **/ 48 54 /** *********************************************************** **/ 49 55 /** 50 *51 56 * @param satellite 52 57 * @param projection … … 60 65 @Mandatory @ParamName("projection") final String projection, 61 66 @Mandatory @ParamName("species") final String species, 62 @Mandatory @ParamName("date") final String strDate )67 @Mandatory @ParamName("date") final String strDate ) 63 68 throws WebException 64 69 { 65 final Calendar calendar = Calendar.getInstance();70 final Calendar calendar = Calendar.getInstance(); 66 71 calendar.setTimeInMillis( Long.valueOf( strDate ) ); 67 72 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"; 70 75 final JSONObject result = new JSONObject(); 71 result.put( "plotNameResult",plotName );76 result.put( "plotNameResult", plotName ); 72 77 return result; 73 78 … … 86 91 private static final String VIEW_INIT = "init"; 87 92 private static final String VIEW_IASI = "project/quicklook"; 93 private static final String VIEW_DATA_ACCESS = "project/dataAccess"; 88 94 } -
ether_iasi/trunk/web/src/messages_en.properties
r722 r724 24 24 label.quicklook.button=Get quicklook 25 25 label.clear=Clear 26 27 label.access.metopA=MetOp-A 28 label.access.metopB=MetOp-B 29 label.access.balloon=IASI Balloon 30 label.access.metopA.title=ACCESS TO METOP-A IASI DATA 31 label.access.metopB.title=ACCESS TO METOP-B IASI DATA 32 label.access.balloon.title=ACCESS TO BALLOON IASI DATA 33 label.access.level=Product Level 34 label.access.level.balloon=IASI balloon validation spectra 35 label.access.level.balloon.comment=Comment IASI balloon validation spectra 36 label.access.level.clouds=IASI clouds (L2 Eumetsat) 37 label.access.level.clouds.comment=Comment IASI clouds (L2 Eumetsat) 38 label.access.level.temp=IASI temperatures and humidity (L2 Eumetsat) 39 label.access.level.temp.comment=Comment IASI temperatures and humidity (L2 Eumetsat) 40 label.access.level.carbon=IASI carbon monoxide (L2 ULB-LATMOS) 41 label.access.level.carbon.comment=Comment IASI carbon monoxide (L2 ULB-LATMOS) 42 label.access.spatial=Spatial 43 label.access.temporal=Temporal 44 label.access.date.begin=Start Date 45 label.access.date.end=End Date 46 label.access.time.begin=Start Time (UTC) 47 label.access.time.end=End Time (UTC) 48 label.access.get=GET DATA -
ether_iasi/trunk/web/src/messages_fr.properties
r722 r724 25 25 label.quicklook.button=Go quicklook 26 26 label.clear=Initialiser 27 28 label.access.metopA=MetOp-A 29 label.access.metopB=MetOp-B 30 label.access.balloon=IASI Ballons 31 label.access.metopA.title=ACCES AUX DONNEES IASI METOP-A 32 label.access.metopB.title=ACCES AUX DONNEES IASI METOP-B 33 label.access.balloon.title=ACCES AUX DONNEES IASI BALLONS 34 label.access.level=Level product 35 label.access.level.balloon=IASI balloon validation spectra 36 label.access.level.balloon.comment=Commentaire IASI balloon validation spectra 37 label.access.level.clouds=IASI clouds (L2 Eumetsat) 38 label.access.level.clouds.comment=Commentaire IASI clouds (L2 Eumetsat) 39 label.access.level.temp=IASI temperatures and humidity (L2 Eumetsat) 40 label.access.level.temp.comment=Commentaire IASI temperatures and humidity (L2 Eumetsat) 41 label.access.level.carbon=IASI carbon monoxide (L2 ULB-LATMOS) 42 label.access.level.carbon.comment=Commentaire IASI carbon monoxide (L2 ULB-LATMOS) 43 label.access.satial=Spatiale 44 label.access.temporal=Temporel 45 label.access.date.begin=Date de Début 46 label.access.date.end=Date de Fin 47 label.access.time.begin=Heure de Départ (UTC) 48 label.access.time.end=Heure de Fin (UTC) 49 label.access.get=GO DONNEES
Note: See TracChangeset
for help on using the changeset viewer.