Changeset 234
- Timestamp:
- 10/26/11 17:22:50 (13 years ago)
- Location:
- ether_megapoli/trunk/web
- Files:
-
- 2 added
- 2 deleted
- 10 edited
- 3 copied
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/web/resources/css/etherApple.css
r228 r234 106 106 /** ************************************ **/ 107 107 .loading-classic { 108 background-image: url(../../resources/icons/ loading.gif);109 height: 35px;110 width: 35px;108 background-image: url(../../resources/icons/transparent_loading.gif); 109 height: 16px; 110 width: 16px; 111 111 } -
ether_megapoli/trunk/web/resources/css/select.css
r131 r234 7 7 8 8 .select_selectLeft { 9 background: url(../images/ select_left.gif) no-repeat top left;9 background: url(../images/elements/select_left.gif) no-repeat top left; 10 10 height: 20px; 11 11 width: 6px; … … 14 14 15 15 .select_selectMiddle { 16 background: transparent url(../images/ select_middle.gif) repeat-x;16 background: transparent url(../images/elements/select_middle.gif) repeat-x; 17 17 height: 20px; 18 18 float: left; … … 28 28 29 29 .select_selectRight { 30 background: url(../images/ select_right.gif) no-repeat top right;30 background: url(../images/elements/select_right.gif) no-repeat top right; 31 31 height: 20px; 32 32 width: 20px; -
ether_megapoli/trunk/web/resources/css/visu_parameter_by_pf.css
r228 r234 38 38 #loadingForPlateforms, #loadingForParameters { 39 39 position: relative; 40 top: 10 2px;41 left: 100px;40 top: 105px; 41 left: 91px; 42 42 } 43 43 -
ether_megapoli/trunk/web/resources/js/classesForJQuery/Button.js
r227 r234 3 3 // Display a button 4 4 // 5 // use JQuery 5 6 // str value: Value to display in the button 6 7 // dom parent: in which dom element to draw the button … … 31 32 if( this.className ) 32 33 this.divContainer.className = this.className; 33 this.divContainer.atMe = this; 34 this.divContainer.id = this.id; 34 this.divContainer.attr( {id:this.id} ); 35 35 if( this.parent ) 36 this.parent.append Child( this.divContainer );36 this.parent.append( this.divContainer ); 37 37 38 38 this.divText = $( document.createElement( "div" ) ); 39 39 if( this.classNameText ) 40 40 this.divText.className = "button_text"; 41 this.divText. innerHTML = this.value;42 this.divContainer.append Child( this.divText );41 this.divText.html( this.value ); 42 this.divContainer.append( this.divText ); 43 43 44 44 // Define button events 45 Event.observe( this.divContainer, 'click', this.onClick.bindAsEventListener( this ));46 Event.observe( this.divContainer, 'mouseover', this.onHover.bindAsEventListener( this ));47 Event.observe( this.divContainer, 'mouseout', this.onOut.bindAsEventListener( this ));45 this.divContainer.bind( 'click', this, this.onClick ); 46 this.divContainer.bind( 'mouseover', this, this.onHover ); 47 this.divContainer.bind( 'mouseout', this, this.onOut ); 48 48 }, 49 49 … … 68 68 { 69 69 this.value = value; 70 this.divText. innerHTML = this.value;70 this.divText.html( this.value ); 71 71 }, 72 72 … … 77 77 78 78 // Actions ******************************************************** 79 80 79 disable : function() 81 80 { 82 81 this.boolDisabled = true; 83 this.divContainer.addClass Name( "disable" );82 this.divContainer.addClass( "disable" ); 84 83 }, 85 84 … … 87 86 { 88 87 this.boolDisabled = false; 89 this.divContainer.removeClass Name( "disable" );88 this.divContainer.removeClass( "disable" ); 90 89 }, 91 90 … … 94 93 this.boolSelected = value; 95 94 if( this.boolSelected ) 96 this.divContainer.addClass Name( "selected" );95 this.divContainer.addClass( "selected" ); 97 96 else 98 this.divContainer.removeClass Name( "selected" );97 this.divContainer.removeClass( "selected" ); 99 98 }, 100 99 … … 102 101 { 103 102 this.boolDisplayed = true; 104 this.divContainer.s tyle.display = "";103 this.divContainer.show(); 105 104 }, 106 105 … … 108 107 { 109 108 this.boolDisplayed = false; 110 this.divContainer. style.display = "none";109 this.divContainer.hide(); 111 110 }, 112 111 113 112 // Events ******************************************************** 114 115 113 onClick : function( event ) 116 114 { 117 if( !this.isDisable() && (undefined == event.detail || 1 == event.detail) ) 118 { 119 if( this.callbackOnClick ) 120 this.callbackOnClick(); 121 } 122 Event.stop( event ); 115 var contextButton = event.data; 116 if( !contextButton.isDisable() && (undefined == event.detail || 1 == event.detail) && contextButton.callbackOnClick ) 117 contextButton.callbackOnClick(); 123 118 }, 124 119 125 120 onHover : function( event ) 126 121 { 127 if( !this.isDisable() && this.callbackOnMouseOver ) 128 this.callbackOnMouseOver(); 129 130 Event.stop( event ); 122 var contextButton = event.data; 123 if( !contextButton.isDisable() && contextButton.callbackOnMouseOver ) 124 contextButton.callbackOnMouseOver(); 131 125 }, 132 126 133 onOut: function( )127 onOut: function( event ) 134 128 { 135 if( !this.isDisable() && this.callbackOnMouseOut ) 136 this.callbackOnMouseOut(); 129 var contextButton = event.data; 130 if( !contextButton.isDisable() && contextButton.callbackOnMouseOut ) 131 contextButton.callbackOnMouseOut(); 137 132 } 138 133 } ); -
ether_megapoli/trunk/web/resources/js/classesForJQuery/ComplexButton.js
r228 r234 152 152 onClick : function( event ) 153 153 { 154 var context Button= event.data;155 if( !context Button.getDisable() && (undefined == event.detail || 1 == event.detail) && contextButton.callbackOnClick )156 context Button.callbackOnClick();154 var contextEvent = event.data; 155 if( !contextEvent.getDisable() && (undefined == event.detail || 1 == event.detail) && contextButton.callbackOnClick ) 156 contextEvent.callbackOnClick(); 157 157 } 158 158 } ); -
ether_megapoli/trunk/web/resources/js/classesForJQuery/Loading.js
r160 r234 1 1 //****************************************************************************** 2 2 // Loading interface 3 // 4 // use JQuery 3 5 // parameters : 4 6 // parent : specify the parent of loading component … … 6 8 //****************************************************************************** 7 9 8 var Loading = Class.create( {10 var Loading = Class.create( { 9 11 10 12 initialize:function( parameters ) … … 15 17 16 18 //Create loading component 17 this.loadingDiv = document.createElement("div"); 18 this.loadingDiv.id = this.id; 19 this.loadingDiv.className = "loading-classic"; 20 this.parent.appendChild(this.loadingDiv); 19 this.loadingDiv = $( document.createElement( "div" ) ); 20 this.loadingDiv.attr( {id:this.id, class:"loading-classic"} ); 21 this.parent.append( this.loadingDiv ); 21 22 this.hide(); 22 23 } , … … 24 25 display:function() 25 26 { 26 this.loadingDiv.s tyle.display = "";27 this.loadingDiv.show(); 27 28 }, 28 29 29 30 hide:function() 30 31 { 31 this.loadingDiv. style.display = "none";32 this.loadingDiv.hide(); 32 33 } 33 } );34 } ); -
ether_megapoli/trunk/web/resources/js/classesForJQuery/etherClasses.js
r172 r234 6 6 initialize: function( plateforms, objectParameter ) 7 7 { 8 this.array = $A(); 9 $A( plateforms ).each( function( jsonObject ) 10 { 11 this.addItem( jsonObject, objectParameter ); 12 }.bind( this ) ); 8 this.array = []; 9 jQuery.each( plateforms, 10 jQuery.proxy( function( i, jsonObject ) 11 { 12 this.addItem( jsonObject, objectParameter ); 13 }, this ) ); 13 14 }, 14 15 … … 31 32 addOpenListener : function( func ) 32 33 { 33 this.array.each( function(objectItem )34 jQuery.each( this.array, function( i, objectItem ) 34 35 { 35 36 objectItem.divItem.addOpenListener( func ); … … 44 45 divNoItem.id = idIfNoItem; 45 46 divNoItem.textContent = textIfNoItem; 46 parentNode.append Child( divNoItem );47 parentNode.append( divNoItem ); 47 48 } 48 49 else 49 this.array.each(function( item )50 jQuery.each( this.array, function( item ) 50 51 { 51 52 item.divItem.display( parentNode ); … … 55 56 displayWithPairImpair : function( parentNode, idIfNoItem, textIfNoItem ) 56 57 { 57 Dom.clearContainer( parentNode ); 58 if( 0 >= this.array.size() ) 58 parentNode.empty(); 59 // Dom.clearContainer( parentNode ); 60 if( 0 >= this.array.length ) 59 61 { 60 62 var divNoItem = $( document.createElement( "div" ) ); 61 63 divNoItem.id = idIfNoItem; 62 64 divNoItem.textContent = textIfNoItem; 63 parentNode.append Child( divNoItem );65 parentNode.append( divNoItem ); 64 66 } 65 67 else 66 68 { 67 69 var rowNumber = 0; 68 this.array.each( function(item )70 jQuery.each( this.array, function( i, item ) 69 71 { 70 72 if( rowNumber % 2 == 0 ) … … 80 82 { 81 83 var returnObj = false; 82 this.array.each( function(objItem )84 jQuery.each( this.array, jQuery.proxy( function( i, objItem ) 83 85 { 84 86 if( objItem.jsonElement.id == itemId ) 85 87 returnObj = objItem; 86 } .bind(this ) );88 }, this ) ); 87 89 88 90 return returnObj; … … 98 100 initialize: function( jsonElement, objectParameter ) 99 101 { 100 this.jsonElement = Object.clone( jsonElement ); // Warning: This is only a shallow copy 101 this.listeners = $A(); 102 103 // HACK: No deep copy in Javascript 102 this.jsonElement = jsonElement; 103 this.listeners = []; 104 104 105 if( objectParameter ) 105 106 { 106 107 this.language = objectParameter.language || "fr"; 107 if( objectParameter.currentTitleId )108 this.currentTitleId = objectParameter.currentTitleId;109 if( objectParameter.isExpiredTitle )110 this.isExpiredTitle = objectParameter.isExpiredTitle;111 108 this.onMouseOverContainer = objectParameter.onMouseOverContainer ? objectParameter.onMouseOverContainer : false; 112 109 this.onMouseOutContainer = objectParameter.onMouseOutContainer ? objectParameter.onMouseOutContainer : false; … … 129 126 this.divContainer.item = this; 130 127 if( classNameValue ) 131 this.divContainer. className = classNameValue;132 this.divContainer. id = containerName + "_" + this.jsonElement.id;128 this.divContainer.addClass( classNameValue ); 129 this.divContainer.attr( {id:containerName + "_" + this.jsonElement.id} ); 133 130 }, 134 131 … … 136 133 { 137 134 this.parentNode = parentNode; 138 parentNode.append Child( this.divContainer );135 parentNode.append( this.divContainer ); 139 136 }, 140 137 141 138 onHoverContainer: function( event ) 142 139 { 140 var contextEvent = event.data; 143 141 if( !event || (event.detail == undefined || 1 == event.detail) ) 144 this.executeListenersFunction();142 contextEvent.executeListenersFunction(); 145 143 }, 146 144 147 145 onClickContainer: function( event ) 148 146 { 147 var contextEvent = event.data; 149 148 if( !event || (event.detail == undefined || 1 == event.detail) ) 150 this.executeListenersFunction();149 contextEvent.executeListenersFunction(); 151 150 }, 152 151 … … 154 153 { 155 154 if( classNameValue ) 156 this.divContainer.addClass Name( classNameValue );155 this.divContainer.addClass( classNameValue ); 157 156 }, 158 157 … … 160 159 { 161 160 if( classNameValue ) 162 this.divContainer.removeClass Name( classNameValue );161 this.divContainer.removeClass( classNameValue ); 163 162 }, 164 163 165 164 executeListenersFunction: function() 166 165 { 167 this.listeners.each( function (func )166 jQuery.each( this.listeners, jQuery.proxy( function ( i, func ) 168 167 { 169 168 func( this ); 170 } .bind(this ) );169 }, this ) ); 171 170 }, 172 171 … … 174 173 { 175 174 if( this.divContainer ) 176 Event.observe( this.divContainer, 'click', this.onClickContainer.bindAsEventListener( this ));175 this.divContainer.bind( 'click', this, this.onClickContainer ); 177 176 if( this.divContainer && this.onMouseOverContainer ) 178 Event.observe( this.divContainer, 'mouseover', this.onMouseOverContainer.bindAsEventListener( this ));177 this.divContainer.bind( 'mouseover', this, this.onMouseOverContainer ); 179 178 if( this.divContainer && this.onMouseOutContainer ) 180 Event.observe( this.divContainer, 'mouseout', this.onMouseOutContainer.bindAsEventListener( this ));179 this.divContainer.bind( 'mouseout', this, this.onMouseOutContainer ); 181 180 }, 182 181 … … 192 191 193 192 this.divName = $( document.createElement( "div" ) ); 194 this.divName. className = classNameValue;195 this.divName. innerHTML = this.jsonElement.name;196 197 this.divContainer.append Child( this.divName );193 this.divName.addClass( classNameValue ); 194 this.divName.html( this.jsonElement.name ); 195 196 this.divContainer.append( this.divName ); 198 197 }, 199 198 -
ether_megapoli/trunk/web/resources/js/classesForPrototype/etherClasses.js
r172 r234 6 6 initialize: function( plateforms, objectParameter ) 7 7 { 8 this.array = $A( );8 this.array = $A(""); 9 9 $A( plateforms ).each( function( jsonObject ) 10 10 { … … 99 99 { 100 100 this.jsonElement = Object.clone( jsonElement ); // Warning: This is only a shallow copy 101 this.listeners = $A( );101 this.listeners = $A(""); 102 102 103 103 // HACK: No deep copy in Javascript -
ether_megapoli/trunk/web/resources/jsp/apple_etherHead.jsp
r233 r234 28 28 { 29 29 this.containerTitle.addClass( "containerTitle" ); 30 this.containerTitle.html( interfaceTexts["app.fulltitle"] );30 this.containerTitle.html( templateTexts["app.fulltitle"] ); 31 31 32 32 this.createLogin(); 33 var mailButton = new ComplexButton( {value: interfaceTexts["data.upload.metadata.contact.mail"], parent:this.containerTools, id:"button_mail", onClick:jQuery.proxy( this.onClickMail, this )} );33 var mailButton = new ComplexButton( {value:templateTexts["data.upload.metadata.contact.mail"], parent:this.containerTools, id:"button_mail", onClick:jQuery.proxy( this.onClickMail, this )} ); 34 34 35 var valueLanguage = interfaceTexts["app.fr"];35 var valueLanguage = templateTexts["app.fr"]; 36 36 if( this.isLanguageFr ) 37 valueLanguage = interfaceTexts["app.en"];37 valueLanguage = templateTexts["app.en"]; 38 38 39 39 var languageButton = new ComplexButton( {value:valueLanguage, parent:this.containerTools, id:"button_language", onClick:jQuery.proxy( this.onClickLanguage, this )} ); 40 var homeButton = new ComplexButton( {value: interfaceTexts["app.home"], parent:this.containerTools, id:"button_home", onClick:this.onClickHome} );40 var homeButton = new ComplexButton( {value:templateTexts["app.home"], parent:this.containerTools, id:"button_home", onClick:this.onClickHome} ); 41 41 42 42 var divSmallLogoEther = $( document.createElement( "div" ) ); … … 54 54 var textLogin = this.jSONUser.name + " " + this.jSONUser.firstName; 55 55 if( this.jSONUser.role && this.jSONUser.role == "coordinateur" ) 56 textLogin += " (" + interfaceTexts["app.admin"] + ")";56 textLogin += " (" + templateTexts["app.admin"] + ")"; 57 57 58 58 var loginButton = new ComplexButton( {value:textLogin, parent:this.containerTools, id:"button_login"} ); … … 69 69 else 70 70 { 71 var loginButton = new ComplexButton( {value: interfaceTexts["app.connexion"], parent:this.containerTools, id:"button_login"} );71 var loginButton = new ComplexButton( {value:templateTexts["app.connexion"], parent:this.containerTools, id:"button_login"} ); 72 72 73 73 var loginMiddle = $( "#button_login #button_middle" ); … … 76 76 var aLogin = $( document.createElement( "a" ) ); 77 77 aLogin.attr( {href:"login", class:"signin"} ); 78 aLogin.html( "<span>" + interfaceTexts["app.connexion"] + "</span>" );78 aLogin.html( "<span>" + templateTexts["app.connexion"] + "</span>" ); 79 79 loginMiddle.append( aLogin ); 80 80 -
ether_megapoli/trunk/web/resources/templates/appleTemplate.jsp
r233 r234 25 25 <ether:htmlJs jsFile="library/jquery.class"/> 26 26 <ether:htmlJs jsFile="library/jquery.protify-0.3"/> 27 <ether:htmlJs jsFile="Request"/> 28 <ether:htmlJs jsFile="etherHelper"/> 27 <ether:htmlJs jsFile="classesForJQuery/etherHelper"/> 29 28 <ether:htmlJs jsFile="classesForJQuery/ComplexButton"/> 30 29 <ether:htmlJs jsFile="classesForJQuery/Slide"/> … … 145 144 <ul> 146 145 <li><html:link page="/visualization?methodName=viewParametersByPlateform"><span><bean:message key="data.visualization"/></span></html:link></li> 147 <li><html:link page="/visualization /inWork.jsp"><span><bean:message key="simulation.visualization"/></span></html:link></li>146 <li><html:link page="/visualization?methodName=viewInWork"><span><bean:message key="simulation.visualization"/></span></html:link></li> 148 147 </ul> 149 148 </div> … … 180 179 181 180 <script type="text/javascript"> 182 var interfaceTexts = $A( "" );183 interfaceTexts["app.home"] = '<bean:message key="app.home"/>';184 interfaceTexts["app.fulltitle"] = '<bean:message key="app.fulltitle"/>';185 interfaceTexts["app.en"] = '<bean:message key="app.en"/>';186 interfaceTexts["app.fr"] = '<bean:message key="app.fr"/>';187 interfaceTexts["app.connexion"] = '<bean:message key="app.connexion"/>';188 interfaceTexts["data.upload.metadata.contact.mail"] = '<bean:message key="data.upload.metadata.contact.mail"/>';189 interfaceTexts["app.admin"] = '<bean:message key="app.admin"/>';181 var templateTexts = $A( "" ); 182 templateTexts["app.home"] = '<bean:message key="app.home"/>'; 183 templateTexts["app.fulltitle"] = '<bean:message key="app.fulltitle"/>'; 184 templateTexts["app.en"] = '<bean:message key="app.en"/>'; 185 templateTexts["app.fr"] = '<bean:message key="app.fr"/>'; 186 templateTexts["app.connexion"] = '<bean:message key="app.connexion"/>'; 187 templateTexts["data.upload.metadata.contact.mail"] = '<bean:message key="data.upload.metadata.contact.mail"/>'; 188 templateTexts["app.admin"] = '<bean:message key="app.admin"/>'; 190 189 191 190 var interfaceTemplate = new InterfaceTemplate(); -
ether_megapoli/trunk/web/src/com/ether/Controller.java
r220 r234 44 44 /** *********************************************************** **/ 45 45 /** *********************** VIEWS ***************************** **/ 46 /** 47 * ********************************************************** * 48 */ 46 /** *********************************************************** **/ 49 47 // Default view if methodName is unknown 50 48 public ModelAndView home( final HttpServletRequest request, final HttpServletResponse response ) … … 52 50 { 53 51 return new ModelAndView( "index" ); 52 } 53 54 @ControllerMethod(view = VIEW_WORK) 55 public Map<String, Object> viewInWork() 56 throws ServiceException 57 { 58 return new HashMap<String, Object>(); 54 59 } 55 60 … … 80 85 /** *********************************************************** **/ 81 86 /** *********************** CALLS ***************************** **/ 82 /** 83 * ********************************************************** * 84 */ 87 /** *********************************************************** **/ 85 88 @ControllerMethod(jsonResult = true) 86 89 public JSONObject searchParametersByPlateform( @Mandatory @ParamName(ParameterConstants.PARAMETER_ID) final Integer plateformId ) … … 252 255 private static final Log LOGGER = LogFactory.getLog( Controller.class ); 253 256 257 private static final String VIEW_WORK = "visualization/inWork"; 254 258 private static final String VIEW_VISUALIZATION = "visualization/visu"; 255 259 private static final String VIEW_VISUALIZATION_PARAMETER_BY_PLATEFORM = "visualization/visu_parameter_by_pf"; -
ether_megapoli/trunk/web/visualization/inWork.jsp
r170 r234 1 <%@ page import="com.medias.Context" %>2 1 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 3 2 <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> … … 5 4 <%@ taglib prefix="ether" tagdir="/WEB-INF/tags" %> 6 5 7 <tiles:insert page="/resources/templates/ template.jsp" flush="true">6 <tiles:insert page="/resources/templates/appleTemplate.jsp" flush="true"> 8 7 9 <tiles:put name="nav" value=''/> 8 <tiles:put name="insertCss" type="string"></tiles:put> 9 <tiles:put name="insertJsOrJsp" type="string"></tiles:put> 10 10 11 <tiles:put name="title" type="string"> 12 <bean:message key="app.title"/> - <bean:message key="app.welcome"/> 13 </tiles:put> 11 <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="app.welcome"/></tiles:put> 12 <tiles:put name="nav" type="string"></tiles:put> 14 13 14 15 <%--****************** CONTENT ****************** --%> 15 16 <tiles:put name="bodytitle" type="string"> 16 17 <bean:message key="inWork"/> -
ether_megapoli/trunk/web/visualization/visu_parameter_by_pf-script.jsp
r220 r234 7 7 { 8 8 // Values 9 this.parent = $( " txt" );10 this.superParent = $( " pageContent" ); // need to resize in function of containerParameters11 this.generalContainerPlateforms = $( " generalContainerPlateforms" );12 this.generalContainerParameters = $( " generalContainerParameters" );13 this.generalContainerOptions = $( " generalContainerOptions" );9 this.parent = $( "#txt" ); 10 this.superParent = $( "#pageContent" ); // need to resize in function of containerParameters 11 this.generalContainerPlateforms = $( "#generalContainerPlateforms" ); 12 this.generalContainerParameters = $( "#generalContainerParameters" ); 13 this.generalContainerOptions = $( "#generalContainerOptions" ); 14 14 this.jsonPlateforms = jsonPlateforms || null; 15 15 this.jsonAxeTypesForFixedPlateforms = axeTypesForFixedPlateforms || null; … … 24 24 25 25 /** *********** CONTAINERS *********** **/ 26 this.containerPlateforms = $( " containerPlateforms" );27 this.containerParameters = $( " containerParameters" );28 this.containerButtons = $( " containerButtons" );29 this.containerOptionCalendar = $( " containerOptionCalendar" );30 this.containerOptionType = $( " containerOptionType" );31 this.containerOptionPlotsSelect = $( " containerOptionPlotsSelect" );32 this.containerOptionPlotsButtons = $( " containerOptionPlotsButtons" );26 this.containerPlateforms = $( "#containerPlateforms" ); 27 this.containerParameters = $( "#containerParameters" ); 28 this.containerButtons = $( "#containerButtons" ); 29 this.containerOptionCalendar = $( "#containerOptionCalendar" ); 30 this.containerOptionType = $( "#containerOptionType" ); 31 this.containerOptionPlotsSelect = $( "#containerOptionPlotsSelect" ); 32 this.containerOptionPlotsButtons = $( "#containerOptionPlotsButtons" ); 33 33 34 34 /** *********** LOADING *********** **/ … … 48 48 49 49 /** *********** WINDOW FOR THE PLOT *********** **/ 50 this.plotWindow = new Window( {className: "dialog", zIndex: 100,51 resizable: true, draggable:true, wiredDrag: true,52 showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff } );53 this.plotWindow.setTitle( interfaceTexts["app.title"] + "-" + interfaceTexts["data.visualization.quicklook"] );50 // this.plotWindow = new Window( {className: "dialog", zIndex: 100, 51 // resizable: true, draggable:true, wiredDrag: true, 52 // showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff } ); 53 // this.plotWindow.setTitle( interfaceTexts["app.title"] + "-" + interfaceTexts["data.visualization.quicklook"] ); 54 54 55 55 this.createOptions(); … … 62 62 // Calendar 63 63 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;81 this.clearCalendarButton = new Button( {value:interfaceTexts["data.visualization.button.clear"], parent:this.containerOptionCalendar, id:"button_clear_calendar", className:"small", onClick: this.onClickClear.bind(this )} );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; 81 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 82 83 83 // Buttons and axe's types … … 89 89 createButtons: function() 90 90 { 91 this.visualizeButton = new Button( {value:interfaceTexts["data.visualization.button.visualize"], parent:this.containerButtons, id:"button_visualize", onClick: this.onClickVisualize.bind(this )} );91 this.visualizeButton = new Button( {value:interfaceTexts["data.visualization.button.visualize"], parent:this.containerButtons, id:"button_visualize", onClick:jQuery.proxy( this.onClickVisualize, this )} ); 92 92 this.visualizeButton.disable(); 93 this.downloadButton = new Button( {value:interfaceTexts["data.visualization.button.download"], parent:this.containerButtons, id:"button_download", onClick: this.onClickDownload.bind(this )} );93 this.downloadButton = new Button( {value:interfaceTexts["data.visualization.button.download"], parent:this.containerButtons, id:"button_download", onClick:jQuery.proxy( this.onClickDownload, this )} ); 94 94 this.downloadButton.disable(); 95 95 }, … … 110 110 paramSelect.classNameOption = "select_plot_option"; 111 111 this.selectPlots = new Select( paramSelect ); 112 this.selectParameters = $ A();112 this.selectParameters = $(); 113 113 this.selectPlots.add( null, interfaceTexts["data.visualization.graph.noPlot"] ); 114 114 this.selectPlots.selectFirst( false ); … … 116 116 this.selectPlotsPlateformType = false; 117 117 118 this.addPlotButton = new Button( {value:interfaceTexts["data.visualization.add"], parent:this.containerOptionPlotsButtons, id:"button_add_plot", className:"small", onClick: this.onClickAddPlot.bind(this )} );118 this.addPlotButton = new Button( {value:interfaceTexts["data.visualization.add"], parent:this.containerOptionPlotsButtons, id:"button_add_plot", className:"small", onClick:jQuery.proxy( this.onClickAddPlot, this )} ); 119 119 this.addPlotButton.disable(); 120 this.initPlotButton = new Button( {value:interfaceTexts["data.visualization.button.init"], parent:this.containerOptionPlotsButtons, id:"button_init_plot", className:"small", onClick: this.onClickInitPlot.bind(this )} );120 this.initPlotButton = new Button( {value:interfaceTexts["data.visualization.button.init"], parent:this.containerOptionPlotsButtons, id:"button_init_plot", className:"small", onClick:jQuery.proxy( this.onClickInitPlot, this )} ); 121 121 }, 122 122 … … 125 125 { 126 126 if( this.selectedPlateform ) 127 new Ajax.Request( "visualization?methodName=searchParametersByPlateform&id=" + this.selectedPlateform.getId(),128 {129 onSuccess:this.handleParametersBySelectedPlateform.bind(this )127 $.ajax( { 128 url: "visualization?methodName=searchParametersByPlateform&id=" + this.selectedPlateform.getId(), 129 success:jQuery.proxy( this.handleParametersBySelectedPlateform, this ) 130 130 } ); 131 131 }, … … 143 143 handleParametersBySelectedPlateform: function( result ) 144 144 { 145 this.jsonParameters = result.responseText.evalJSON().parameters;145 this.jsonParameters = jQuery.parseJSON( result ).parameters; 146 146 this.displayParameters(); 147 147 }, … … 171 171 this.plateforms = new ListPlatforms( this.jsonPlateforms, new Object() ); 172 172 173 this.plateforms.addOpenListener( this.onSelectPlateform.bind(this ) );173 this.plateforms.addOpenListener( jQuery.proxy( this.onSelectPlateform, this ) ); 174 174 this.loadingPlateforms.hide(); 175 175 this.plateforms.displayWithPairImpair( this.containerPlateforms, "NoPlateform", interfaceTexts["data.visualization.noPlateform"] ); … … 187 187 { 188 188 var objectParameter = new Object(); 189 objectParameter.onMouseOverContainer = this.onMouseOverParameter;190 objectParameter.onMouseOutContainer = this.onMouseOutParameter;191 189 this.parameters = new ListParameters( this.jsonParameters, objectParameter ); 192 190 193 this.parameters.addOpenListener( this.onSelectParameter.bind(this ) );191 this.parameters.addOpenListener( jQuery.proxy( this.onSelectParameter, this ) ); 194 192 this.loadingParameters.hide(); 195 193 this.parameters.displayWithPairImpair( this.containerParameters, "NoParameter", interfaceTexts["data.visualization.noParameter"] ); 196 197 this.resizeContainers();198 194 }, 199 195 … … 220 216 this.addPlotButton.disable(); 221 217 222 $( " textareaTitle" ).value = this.selectedPlateform.getName();218 $( "#textareaTitle" ).html( this.selectedPlateform.getName() ); 223 219 224 220 // Init number and list of parameter to display … … 246 242 247 243 // Change title 248 $( "textareaTitle" ). value = this.selectedPlateform.getName() + " - " + this.selectedParameter.getName();244 $( "textareaTitle" ).html( this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() ); 249 245 250 246 // Update number and list of parameter to display … … 258 254 259 255 this.testAllFields(); 260 },261 262 onMouseOverParameter: function()263 {264 this.divContainer.innerHTML = this.jsonElement.name + " (" + this.jsonElement.code + ")";265 },266 267 onMouseOutParameter: function()268 {269 this.divContainer.innerHTML = this.jsonElement.name;270 256 }, 271 257 … … 346 332 347 333 // OTHERS ******************************************************** 348 resizeContainers: function()349 {350 var titleSize = document.getElementById( "nav" ).offsetHeight + document.getElementById( "title" ).offsetHeight + 30;351 var parentHeight = this.superParent.offsetHeight - titleSize;352 var containerPlateformsHeight = this.generalContainerParameters.offsetHeight;353 var containerParametersHeight = this.generalContainerParameters.offsetHeight;354 355 var containerPlateforms = this.containerPlateforms.offsetHeight;356 var containerParameters = this.containerParameters.offsetHeight;357 var containerOptionsHeight = this.generalContainerOptions.offsetHeight;358 359 var maxHeight = Math.max( containerPlateforms, containerParameters, containerOptionsHeight );360 361 this.superParent.style.height = maxHeight + titleSize + 35 + "px";362 this.generalContainerPlateforms.style.height = maxHeight + 20 + "px";363 this.generalContainerParameters.style.height = maxHeight + 20 + "px";364 },365 366 334 testAllFields: function() 367 335 { … … 387 355 jsonAxeTypes = this.jsonAxeTypesForFixedPlateforms; 388 356 389 j sonAxeTypes.each( function (axeType )357 jQuery.each( jsonAxeTypes, jQuery.proxy( function ( i, axeType ) 390 358 { 391 359 this.selectAxes.add( axeType.value, interfaceTexts[axeType.text] ); 392 } .bind(this ) );360 }, this ) ); 393 361 394 362 this.selectAxes.selectFirst( false ); … … 407 375 // INIT 408 376 this.selectPlots.clear(); 409 this.selectParameters. clear();377 this.selectParameters.empty(); 410 378 this.selectPlotsPlateformType = false; 411 379 … … 415 383 416 384 this.numberParameterToDisplay = 1; 417 $( " messages_number_parameters" ).innerHTML = this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"];385 $( "#messages_number_parameters" ).html( this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"] ); 418 386 } 419 387 else … … 423 391 424 392 this.numberParameterToDisplay = 0; 425 $( " messages_number_parameters" ).innerHTML = "";393 $( "#messages_number_parameters" ).html( "" ); 426 394 } 427 395 break; … … 432 400 { 433 401 this.selectPlots.clear(); 434 this.selectParameters. clear();402 this.selectParameters.empty(); 435 403 this.numberParameterToDisplay = 1; 436 404 } 437 405 438 406 this.selectPlots.changeSelectMiddle( this.selectedPlateform.getId() + "-" + this.selectedParameter.getId(), this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() ); 439 $( " messages_number_parameters" ).innerHTML = this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"];407 $( "#messages_number_parameters" ).html( this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"] ); 440 408 break; 441 409 … … 449 417 this.selectPlots.select( plotValue, false ); 450 418 this.selectPlotsPlateformType = this.selectedPlateform.jsonElement.type; 451 if( !isParameterAlreadySelected )452 this.selectParameters [this.selectParameters.size()] = this.selectedParameter.getId();419 // if( !isParameterAlreadySelected ) 420 this.selectParameters.push( this.selectedParameter.getId() ); 453 421 454 422 this.numberParameterToDisplay = this.selectPlots.getSize(); 455 423 } 456 424 457 $( " messages_number_parameters" ).innerHTML = this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"];425 $( "#messages_number_parameters" ).html( this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"] ); 458 426 break; 459 427 } -
ether_megapoli/trunk/web/visualization/visu_parameter_by_pf.jsp
r228 r234 1 1 <%@ page import="com.ether.AxeTypeForFixedPlateform" %> 2 2 <%@ page import="com.ether.AxeTypeForMobilePlateform" %> 3 <%@ page import="com.medias.Context" %>4 5 3 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 6 4 <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> … … 9 7 <%@ taglib prefix="ether" tagdir="/WEB-INF/tags" %> 10 8 11 <tiles:insert page="/resources/templates/templateEther.jsp" flush="true"> 12 13 <tiles:put name="title" type="string"> 14 <bean:message key="app.title"/> - <bean:message key="app.welcome"/> 15 </tiles:put> 9 <tiles:insert page="/resources/templates/appleTemplate.jsp" flush="true"> 16 10 17 11 <tiles:put name="insertCss" type="string"> 18 <ether:htmlCss cssFile="ether"/>19 12 <ether:htmlCss cssFile="button"/> 20 13 <ether:htmlCss cssFile="blueprint-css/blueprint/src/grid"/> 21 22 14 <ether:htmlCss cssFile="visu_parameter_by_pf"/> 23 15 <ether:htmlCss cssFile="select"/> 24 25 16 <%-- Calendar --%> 26 17 <ether:htmlCss cssFile="calendar/anytime"/> 27 18 <ether:htmlCss cssFile="windows_js_1.3/themes/default"/> 28 19 <ether:htmlCss cssFile="windows_js_1.3/themes/mac_os_x"/> 29 30 20 </tiles:put> 31 21 32 22 <tiles:put name="insertJsOrJsp" type="string"> 33 <ether:htmlResourceJsp jspFile="etherHead"/> 34 <ether:htmlJs jsFile="etherClasses"/> 23 <ether:htmlJs jsFile="classesForJQuery/etherClasses"/> 35 24 <ether:htmlJsp jspFile="visu_parameter_by_pf-script"/> 36 25 <ether:htmlJsp jspFile="visu_parameter_by_pf-classes"/> 37 <ether:htmlJs jsFile="Button"/> 38 <ether:htmlJs jsFile="Select"/> 39 <ether:htmlJs jsFile="Loading"/> 40 41 <ether:htmlJs jsFile="library/jquery-1.4.2.min"/> 42 <ether:htmlJs jsFile="library/prototype"/> 43 26 <ether:htmlJs jsFile="classesForJQuery/Button"/> 27 <ether:htmlJs jsFile="classesForJQuery/Select"/> 28 <ether:htmlJs jsFile="classesForJQuery/Loading"/> 44 29 <%-- Calendar --%> 45 <ether:htmlJs jsFile="calendar/anytime"/> 46 <ether:htmlJs jsFile="windows_js_1.3/javascripts/debug"/> 47 <ether:htmlJs jsFile="windows_js_1.3/javascripts/effects"/> 48 <ether:htmlJs jsFile="windows_js_1.3/javascripts/window"/> 49 <ether:htmlJs jsFile="windows_js_1.3/javascripts/window_ext"/> 50 30 <%--<ether:htmlJs jsFile="calendar/anytime"/>--%> 31 <%--<ether:htmlJs jsFile="windows_js_1.3/javascripts/debug"/>--%> 32 <%--<ether:htmlJs jsFile="windows_js_1.3/javascripts/effects"/>--%> 33 <%--<ether:htmlJs jsFile="windows_js_1.3/javascripts/window"/>--%> 34 <%--<ether:htmlJs jsFile="windows_js_1.3/javascripts/window_ext"/>--%> 51 35 </tiles:put> 52 36 53 <bean:define type="java.lang.String" id="relativePath" value="<%=Context.getRelativePath(request)%>"/> 54 <tiles:put name="nav" value='<%=relativePath+"/nav_visu_parameter.jsp"%>'/> 55 56 57 <tiles:put name="bodytitle" type="string"> 58 <bean:message key="data.visualization.title"/> 37 <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="data.visualization.title"/></tiles:put> 38 <tiles:put name="nav" type="string"> 39 <html:link page="/index.jsp"><bean:message key="app.home"/></html:link> > 40 <html:link page="/visualization?methodName=view"><bean:message key="all.visualization"/></html:link> > 41 <html:link page="/visualization?methodName=viewParametersByPlateform"><bean:message key="data.visualization"/></html:link> 59 42 </tiles:put> 60 43 61 44 45 <%--****************** CONTENT ****************** --%> 46 <tiles:put name="bodytitle" type="string"><bean:message key="data.visualization.title"/></tiles:put> 47 62 48 <tiles:put name="body" type="string"> 63 49 64 <div class="span-25"> 65 <div id="generalContainerPlateforms" class="span-6 colborder"> 50 <div id="generalContainerPlateforms" class="span-5 colborder"> 66 51 <div id="messages"><bean:message key="data.visualization.selectPf"/></div> 67 52 … … 69 54 </div> 70 55 71 <div id="generalContainerParameters" class="span- 7colborder">56 <div id="generalContainerParameters" class="span-6 colborder"> 72 57 <div id="messages"><bean:message key="data.visualization.selectParameter"/></div> 73 58 … … 104 89 </div> 105 90 </div> 106 </div>107 91 108 92 <script type="text/javascript"> 109 var interfaceTexts = $A( );93 var interfaceTexts = $A( "" ); 110 94 interfaceTexts["app.title"] = '<bean:message key="app.title"/>'; 111 95 interfaceTexts["data.visualization.noPlateform"] = '<bean:message key="data.visualization.noPf"/>'; … … 150 134 151 135 </tiles:put> 152 153 136 </tiles:insert> 154 155 <!-- /*** ****************** FIN VISU ******************** **/ -->
Note: See TracChangeset
for help on using the changeset viewer.