- Timestamp:
- 11/07/11 15:50:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/web/visualization/visu_parameter_by_pf-script.jsp
r234 r236 1 <%@ page import="com.ether.EtherPlotServiceImpl" %>2 3 1 <script type="text/javascript"> 4 2 var InterfaceVisualization = Class.create( { … … 62 60 // Calendar 63 61 this.calendarFormat = "%Y-%m-%d %H:%i"; 64 //this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } );65 66 //AnyTime.picker( "beginDate", { format: this.calendarFormat, firstDOW: 1,67 //labelTitle: interfaceTexts["data.visualization.selectDate"], labelYear: interfaceTexts["data.visualization.selectYear"], labelMonth: interfaceTexts["data.visualization.selectMonth"], labelDayOfMonth: interfaceTexts["data.visualization.selectDay"],68 //labelHour: interfaceTexts["data.visualization.selectHour"], labelMinute: interfaceTexts["data.visualization.selectMinute"],69 // methodToCall: this.onClickBeginDate.bindAsEventListener(this )70 //} );71 // 72 //AnyTime.picker( "endDate", { format: this.calendarFormat, firstDOW: 1,73 //labelTitle: interfaceTexts["data.visualization.selectDate"], labelYear: interfaceTexts["data.visualization.selectYear"], labelMonth: interfaceTexts["data.visualization.selectMonth"], labelDayOfMonth: interfaceTexts["data.visualization.selectDay"],74 //labelHour: interfaceTexts["data.visualization.selectHour"], labelMinute: interfaceTexts["data.visualization.selectMinute"],75 // methodToCall: this.onClickEndDate.bindAsEventListener(this ),76 //idToUpdateEarliest: "beginDate"77 //} );78 // 79 // $( "beginDate" ).value = this.firstDate;80 // $( "endDate" ).value = this.lastDate;62 this.calendarConverter = new AnyTime.Converter( { format: this.calendarFormat } ); 63 64 AnyTime.picker( "beginDate", { format: this.calendarFormat, firstDOW: 1, 65 labelTitle: interfaceTexts["data.visualization.selectDate"], labelYear: interfaceTexts["data.visualization.selectYear"], labelMonth: interfaceTexts["data.visualization.selectMonth"], labelDayOfMonth: interfaceTexts["data.visualization.selectDay"], 66 labelHour: interfaceTexts["data.visualization.selectHour"], labelMinute: interfaceTexts["data.visualization.selectMinute"], 67 methodToCall: jQuery.proxy( this.onClickBeginDate, this ) 68 } ); 69 70 AnyTime.picker( "endDate", { format: this.calendarFormat, firstDOW: 1, 71 labelTitle: interfaceTexts["data.visualization.selectDate"], labelYear: interfaceTexts["data.visualization.selectYear"], labelMonth: interfaceTexts["data.visualization.selectMonth"], labelDayOfMonth: interfaceTexts["data.visualization.selectDay"], 72 labelHour: interfaceTexts["data.visualization.selectHour"], labelMinute: interfaceTexts["data.visualization.selectMinute"], 73 methodToCall: jQuery.proxy( this.onClickEndDate, this ), 74 idToUpdateEarliest: "beginDate" 75 } ); 76 77 $( "#beginDate" ).val( this.firstDate ); 78 $( "#endDate" ).val( this.lastDate ); 81 79 this.clearCalendarButton = new Button( {value:interfaceTexts["data.visualization.button.clear"], parent:this.containerOptionCalendar, id:"button_clear_calendar", className:"small", onClick:jQuery.proxy( this.onClickClear, this )} ); 82 80 … … 90 88 { 91 89 this.visualizeButton = new Button( {value:interfaceTexts["data.visualization.button.visualize"], parent:this.containerButtons, id:"button_visualize", onClick:jQuery.proxy( this.onClickVisualize, this )} ); 92 this.visualizeButton.disable();90 // this.visualizeButton.disable(); 93 91 this.downloadButton = new Button( {value:interfaceTexts["data.visualization.button.download"], parent:this.containerButtons, id:"button_download", onClick:jQuery.proxy( this.onClickDownload, this )} ); 94 92 this.downloadButton.disable(); … … 259 257 { 260 258 var oneHour = 60 * 60 * 1000; 261 var beginDateTime = this.calendarConverter.parse( $( " beginDate" ).value).getTime();259 var beginDateTime = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 262 260 var endDateTime = null; 263 if( "" != $( " endDate" ).value)264 endDateTime = this.calendarConverter.parse( $( " endDate" ).value).getTime();261 if( "" != $( "#endDate" ).val() ) 262 endDateTime = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 265 263 this.beginDateWithAnHourLater = new Date( beginDateTime + oneHour ); 266 264 267 265 if( null == endDateTime || endDateTime < beginDateTime ) 268 $( " endDate" ).value = this.calendarConverter.format( this.beginDateWithAnHourLater);269 270 this.beginDate = this.calendarConverter.parse( $( " beginDate" ).value).getTime();271 this.endDate = this.calendarConverter.parse( $( " endDate" ).value).getTime();266 $( "#endDate" ).val( this.calendarConverter.format( this.beginDateWithAnHourLater ) ); 267 268 this.beginDate = this.calendarConverter.parse( $( "#beginDate" ).val() ).getTime(); 269 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 272 270 273 271 this.testAllFields(); … … 276 274 onClickEndDate: function() 277 275 { 278 this.endDate = this.calendarConverter.parse( $( " endDate" ).value).getTime();276 this.endDate = this.calendarConverter.parse( $( "#endDate" ).val() ).getTime(); 279 277 }, 280 278 281 279 onClickClear: function() 282 280 { 283 $( " beginDate" ).value = "";281 $( "#beginDate" ).val( "" ); 284 282 this.beginDate = false; 285 $( " endDate" ).value = "";283 $( "#endDate" ).val( "" ); 286 284 this.endDate = false; 287 285 }, … … 304 302 { 305 303 var url = "visualization/plotEther?" + urlObject.parameters; 306 307 this.plotWindow.getContent().innerHTML = '<img src=' + url + ' />'; 308 this.plotWindow.setSize( <%=EtherPlotServiceImpl.getMaxWidth()%>, <%=EtherPlotServiceImpl.getMaxHeight()%> ); 309 this.plotWindow.show(); 310 } 311 else 312 { 313 this.plotWindow.getContent().innerHTML = '<BR/><center>' + interfaceTexts["data.visualization.graph.noPlot"] + '</center>'; 314 this.plotWindow.setSize( 400, 50 ); 315 this.plotWindow.show(); 316 } 304 var $dialog = $( '<div></div>' ) 305 .html( '<img src=' + url + ' />' ) 306 .dialog( { 307 autoOpen: false, 308 title: interfaceTexts["app.title"] + "-" + interfaceTexts["data.visualization.quicklook"] 309 } ); 310 } 311 else 312 { 313 var $dialog = $( '<div></div>' ) 314 .html( '<BR/><center>' + interfaceTexts["data.visualization.graph.noPlot"] + '</center>' ) 315 .dialog( { 316 autoOpen: false, 317 title: interfaceTexts["app.title"] + "-" + interfaceTexts["data.visualization.quicklook"] 318 } ); 319 // this.plotWindow.setSize( 400, 50 ); 320 } 321 322 $dialog.dialog( 'open' ); 323 // prevent the default action, e.g., following a link 324 return false; 317 325 }, 318 326 … … 336 344 if( (!this.selectedPlateform || !this.selectedParameter) && 0 == this.numberParameterToDisplay ) 337 345 { 338 this.visualizeButton.disable();346 // this.visualizeButton.disable(); 339 347 this.downloadButton.disable(); 340 348 return; … … 418 426 this.selectPlotsPlateformType = this.selectedPlateform.jsonElement.type; 419 427 // if( !isParameterAlreadySelected ) 420 428 this.selectParameters.push( this.selectedParameter.getId() ); 421 429 422 430 this.numberParameterToDisplay = this.selectPlots.getSize();
Note: See TracChangeset
for help on using the changeset viewer.