Changeset 728
- Timestamp:
- 01/18/13 15:45:15 (11 years ago)
- Location:
- ether_iasi/trunk/web
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_iasi/trunk/web/project/dataAccess.jsp
r727 r728 46 46 47 47 <div class="containerAccess"> 48 <div class="title1"><spring:message code="label.access.level"/></div> 48 <div class="title1"><spring:message code="label.access.level"/></div><BR/> 49 49 <div id="productLevel"></div> 50 50 <div id="productLevelComment"></div> … … 56 56 57 57 <div id="temporal" class="containerAccess"> 58 <div class="title1"><spring:message code="label.access.temporal"/></div> 58 <div class="title1"><spring:message code="label.access.temporal"/></div><BR/> 59 <spring:message code="label.access.date.begin"/> : <input type="text" id="beginDate" size="15"/> 60 <spring:message code="label.access.date.end"/> : <input type="text" id="endDate" size="15"/> 59 61 </div> 60 62 -
ether_iasi/trunk/web/project/dataAccess_script.jsp
r727 r728 17 17 18 18 /** *********** VARIABLES *********** **/ 19 19 this.calendarFormat = "%Y-%m-%d %H:%i"; 20 this.beginDate = false; 21 this.endDate = false; 22 this.firstDate = formatDate( new Date() ); 23 this.lastDate = formatDate( addHoursToDate( new Date(), 1 ) ); 20 24 21 25 this.createTabs(); 22 26 this.createProductLevels(); 27 this.createTemporal(); 23 28 }, 24 29 … … 66 71 }, 67 72 73 createTemporal: function() 74 { 75 // Calendar 76 this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } ); 77 78 AnyTime.picker( "beginDate", { format: this.calendarFormat, firstDOW: 1, 79 labelTitle: '<spring:message code="label.titlecalendar"/> :' , 80 labelYear: '<spring:message code="label.yearcalendar"/> :' , 81 labelMonth: '<spring:message code="label.monthcalendar"/> :', 82 labelDayOfMonth: '<spring:message code="label.daycalendar"/> :', 83 labelHour: '<spring:message code="label.hourcalendar"/> :', 84 labelMinute: '<spring:message code="label.minutecalendar"/> :', 85 methodToCall: jQuery.proxy( this.onClickBeginDate, this ) 86 } ); 87 88 AnyTime.picker( "endDate", { format: this.calendarFormat, firstDOW: 1, 89 labelTitle: '<spring:message code="label.titlecalendar"/> :' , 90 labelYear: '<spring:message code="label.yearcalendar"/> :' , 91 labelMonth: '<spring:message code="label.monthcalendar"/> :', 92 labelDayOfMonth: '<spring:message code="label.daycalendar"/> :', 93 labelHour: '<spring:message code="label.hourcalendar"/> :', 94 labelMinute: '<spring:message code="label.minutecalendar"/> :', 95 methodToCall: jQuery.proxy( this.onClickEndDate, this ), 96 idToUpdateEarliest: "beginDate" 97 } ); 98 99 $( "#beginDate" ).val( this.firstDate ); 100 $( "#endDate" ).val( this.lastDate ); 101 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 102 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 103 104 this.clearCalendarButton = new Button( {value:'<spring:message code="label.clear"/>', parent:this.containerTemporal, id:"button_clear_calendar", className:"small", onClick:jQuery.proxy( this.onClickClear, this )} ); 105 }, 106 68 107 // REQUESTS ******************************************************** 69 requestQuickLooksBySelectValues: function()70 {71 $.ajax( {72 url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&date=" + this.beginDate,73 success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ),74 error: jQuery.proxy( this.showErrors, this )75 } );76 },108 // requestQuickLooksBySelectValues: function() 109 // { 110 // $.ajax( { 111 // url: "project?methodName=getQuicklookByValues&satellite=" + this.selectSatellites.getValue() + "&projection=" + this.selectProjections.getValue() + "&species=" + this.selectSpecies.getValue() + "&date=" + this.beginDate, 112 // success:jQuery.proxy( this.handleQuickLooksBySelectValues, this ), 113 // error: jQuery.proxy( this.showErrors, this ) 114 // } ); 115 // }, 77 116 78 117 79 118 // HANDLES ******************************************************** 80 handleQuickLooksBySelectValues: function( result )81 {82 83 var plotName = jQuery.parseJSON( result ).plotNameResult;84 this.containerQuickLookA.html( plotName );85 },119 // handleQuickLooksBySelectValues: function( result ) 120 // { 121 // 122 // var plotName = jQuery.parseJSON( result ).plotNameResult; 123 // this.containerQuickLookA.html( plotName ); 124 // }, 86 125 87 126 … … 109 148 }, 110 149 150 onClickClear: function() 151 { 152 $( "#beginDate" ).val( "" ); 153 this.beginDate = false; 154 $( "#endDate" ).val( "" ); 155 this.endDate = false; 156 }, 157 158 onClickBeginDate: function() 159 { 160 var oneHour = 60 * 60 * 1000; 161 var beginDateTime = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 162 var endDateTime = null; 163 if( "" != $( "#endDate" ).val() ) 164 endDateTime = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 165 this.beginDateWithAnHourLater = new Date( beginDateTime + oneHour ); 166 167 if( null == endDateTime || endDateTime < beginDateTime ) 168 $( "#endDate" ).val( this.calendarConverter.format( this.beginDateWithAnHourLater ) ); 169 170 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 171 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 172 }, 173 174 onClickEndDate: function() 175 { 176 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 177 }, 178 111 179 // OTHERS ******************************************************** 112 180 showErrors: function( result ) -
ether_iasi/trunk/web/resources/css/iasi.css
r727 r728 89 89 } 90 90 91 #beginDate {91 #beginDate, #endDate { 92 92 background-image: url("../../resources/icons/calendrier-icone-16x16.png"); 93 93 background-position: right center; … … 100 100 } 101 101 102 #productLevel {103 margin-top: 10px;104 }105 106 102 #productLevelComment { 107 103 margin: 10px; … … 109 105 float: left; 110 106 -moz-border-radius: 4px; 111 -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);112 107 -webkit-border-radius: 4px; 113 -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); 114 box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); 115 background: #3E647E; 116 color: white; 108 border: solid 1px #3E647E; 109 color: #3E647E; 117 110 font-size: 11px; 118 111 } -
ether_iasi/trunk/web/resources/js/classesForJQuery/etherHelper.js
r710 r728 70 70 } 71 71 72 // This method add days to a date 73 function addDaysToDate( date, numberOfDays ) 74 { 75 var dayToMs = 24 * 60 * 60 * 1000; 76 var newDate = date.getTime() + numberOfDays * dayToMs; 77 return new Date( newDate ); 78 } 79 80 // This method add hours to a date 81 function addHoursToDate( date, numberOfHours ) 82 { 83 var hourToMs = 60 * 60 * 1000; 84 var newDate = date.getTime() + numberOfHours * hourToMs; 85 return new Date( newDate ); 86 } 87 72 88 // PAGINATION 73 89 function decrementPage( pageContainer, maxPageContainer ) -
ether_iasi/trunk/web/src/messages_en.properties
r724 r728 22 22 label.monthcalendar=Month 23 23 label.daycalendar=Day 24 label.hourcalendar=Hour 25 label.minutecalendar=Minute 24 26 label.quicklook.button=Get quicklook 25 27 label.clear=Clear -
ether_iasi/trunk/web/src/messages_fr.properties
r724 r728 23 23 label.monthcalendar=Mois 24 24 label.daycalendar=Jour 25 label.hourcalendar=Heure 26 label.minutecalendar=Minute 25 27 label.quicklook.button=Go quicklook 26 28 label.clear=Initialiser … … 43 45 label.access.satial=Spatiale 44 46 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) 47 label.access.date.begin=Date de Début (UTC) 48 label.access.date.end=Date de Fin (UTC) 49 49 label.access.get=GO DONNEES
Note: See TracChangeset
for help on using the changeset viewer.