Changeset 246


Ignore:
Timestamp:
11/10/11 17:23:05 (13 years ago)
Author:
vmipsl
Message:

Modif pages medias

Location:
ether_megapoli/trunk/web
Files:
4 deleted
18 edited
1 copied
6 moved

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/web/WEB-INF/servlet-context.xml

    r155 r246  
    3131                <property name="mappings"> 
    3232                        <props> 
    33                                 <prop key="/visualization">controller</prop> 
     33                                <prop key="/visualization">controllerVisualization</prop> 
     34                                <prop key="/data">controllerData</prop> 
    3435                        </props> 
    3536                </property> 
     
    5253    </bean> 
    5354 
    54         <bean id="controller" class="com.ether.Controller" parent="controllerEther"> 
     55        <bean id="controllerVisualization" class="com.ether.ControllerVisualization" parent="controllerEther"> 
    5556                <property name="etherService" ref="etherService" /> 
    5657        </bean> 
    5758 
     59    <bean id="controllerData" class="com.ether.ControllerData" parent="controllerEther"> 
     60    </bean> 
     61 
    5862</beans> 
  • ether_megapoli/trunk/web/WEB-INF/struts-config.xml

    r170 r246  
    160160                        name="metadataForm" 
    161161                        validate="false" 
    162                         input="/data/access/jeux.jsp"> 
     162                        input="/data/jeux.jsp"> 
    163163                        <forward name="success" path="/data/access/metadataInfo.jsp"/> 
    164164                </action> 
     
    250250                        path="/PrepareTreeAccess" 
    251251                        type="com.medias.megapoli.struts.actions.PrepareTreeAccessAction"> 
    252                         <forward name="success" path="/data/access/jeux.jsp"/> 
     252                        <forward name="success" path="/data/jeux.jsp"/> 
    253253                </action>                
    254254                <action 
     
    293293                        type="com.medias.megapoli.struts.actions.ParametresAccessAction" 
    294294                        name="parametresForm"> 
    295                         <forward name="success" path="/data/access/param.jsp"/> 
     295                        <forward name="success" path="/data?methodName=viewParameters"/> 
    296296                </action> 
    297297                <action 
     
    299299                        type="com.medias.megapoli.struts.actions.CapteursAccessAction" 
    300300                        name="capteursForm"> 
    301                         <forward name="success" path="/data/access/capt.jsp"/> 
     301                        <forward name="success" path="/data?methodName=viewSensors"/> 
    302302                </action> 
    303303                <action 
     
    305305                        type="com.medias.megapoli.struts.actions.JeuxAccessAction" 
    306306                        name="jeuxForm"> 
    307                         <forward name="success" path="/data/access/jeux.jsp"/> 
     307                        <forward name="success" path="/data?methodName=viewSets"/> 
    308308                </action> 
    309309                <action 
     
    317317                        type="com.medias.megapoli.struts.actions.PlateformesAccessAction" 
    318318                        name="plateformesForm"> 
    319                         <forward name="success" path="/data/access/plat.jsp"/> 
     319                        <forward name="success" path="/data?methodName=viewPlateforms"/> 
    320320                </action> 
    321321                <action 
     
    332332                        name="datasForm" 
    333333                        validate="true"> 
    334                         <forward name="cancel" path="/data/access/access.jsp"/> 
     334                        <forward name="cancel" path="/data/access.jsp"/> 
    335335                        <forward name="reset" path="/data/access/extract.jsp"/> 
    336336                        <forward name="success" path="/data/access/extract2.jsp"/> 
  • ether_megapoli/trunk/web/WEB-INF/web.xml

    r199 r246  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 
     2<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" 
     3         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 
    34 
    45    <display-name>Megapoli</display-name> 
     
    910 
    1011    <!--<context-param>--> 
    11         <!--<param-name>contextConfigLocation</param-name>--> 
    12         <!--<param-value>--> 
    13             <!--classpath:hibernate.cfg.xml,--> 
    14             <!--classpath:dao-context.xml,--> 
    15             <!--classpath:service-context.xml,--> 
    16 <!----> 
    17             <!--classpath:json/json-context.xml--> 
    18         <!--</param-value>--> 
     12    <!--<param-name>contextConfigLocation</param-name>--> 
     13    <!--<param-value>--> 
     14    <!--classpath:hibernate.cfg.xml,--> 
     15    <!--classpath:dao-context.xml,--> 
     16    <!--classpath:service-context.xml,--> 
     17    <!----> 
     18    <!--classpath:json/json-context.xml--> 
     19    <!--</param-value>--> 
    1920    <!--</context-param>--> 
    2021 
     
    102103 
    103104    <servlet> 
    104                 <servlet-name>MegapoliInitialisation</servlet-name> 
    105                 <servlet-class>com.medias.megapoli.utils.MegapoliInitialisation</servlet-class> 
    106         <load-on-startup>0</load-on-startup> 
     105        <servlet-name>MegapoliInitialisation</servlet-name> 
     106        <servlet-class>com.medias.megapoli.utils.MegapoliInitialisation</servlet-class> 
     107        <load-on-startup>0</load-on-startup> 
    107108    </servlet> 
     109 
     110    <servlet> 
     111        <servlet-name>data</servlet-name> 
     112        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 
     113        <init-param> 
     114            <param-name>contextConfigLocation</param-name> 
     115            <param-value> 
     116                /WEB-INF/servlet-context.xml 
     117            </param-value> 
     118        </init-param> 
     119    </servlet> 
     120 
     121    <servlet-mapping> 
     122        <servlet-name>data</servlet-name> 
     123        <url-pattern>/data</url-pattern> 
     124    </servlet-mapping> 
    108125 
    109126    <!-- taglib> 
     
    111128        <taglib-location>/tlds/struts-logic.tld</taglib-location> 
    112129    </taglib> 
    113         <taglib> 
     130    <taglib> 
    114131        <taglib-uri>/tlds/struts-html.tld</taglib-uri> 
    115132        <taglib-location>/tlds/struts-html.tld</taglib-location> 
  • ether_megapoli/trunk/web/data/access.jsp

    r161 r246  
    1 <%@ page import="com.medias.Context" contentType="text/html; charset=UTF-8"%> 
    21<%@ page language="java" contentType="text/html; charset=UTF-8"%> 
    32<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles"%> 
    43<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%> 
    54<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%> 
    6 <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"%> 
    75 
    8 <tiles:insert page="/resources/templates/template.jsp" flush="true"> 
     6<tiles:insert page="/resources/templates/templateEther.jsp" flush="true"> 
    97 
    10         <bean:define type="java.lang.String" id="relativePath" value="<%=Context.getRelativePath(request)%>"/> 
     8    <tiles:put name="insertCss" type="string"></tiles:put> 
     9    <tiles:put name="insertJsOrJsp" type="string"></tiles:put> 
    1110 
    12         <tiles:put name="nav" value='<%=relativePath+"/nav.jsp"%>'/> 
     11    <tiles:put name="title" type="string"><bean:message key="app.title"/> -  <bean:message key="data.access"/></tiles:put> 
     12    <tiles:put name="nav" type="string"> 
     13        <html:link page="/index.jsp"><bean:message key="app.home"/></html:link>&nbsp;&gt; 
     14        <html:link page="/data?methodName=viewCatalog"><bean:message key="data.access"/></html:link> 
     15    </tiles:put> 
    1316 
    14         <tiles:put name="title" type="string"> 
    15                 <bean:message key="app.title"/> - <bean:message key="data.access"/> 
    16         </tiles:put> 
    17  
    18         <tiles:put name="bodytitle" type="string"> 
    19                 <bean:message key="data.access"/> 
    20         </tiles:put> 
     17    <%--****************** CONTENT ****************** --%> 
     18        <tiles:put name="bodytitle" type="string"><bean:message key="data.access"/></tiles:put> 
    2119 
    2220        <tiles:put name="body" type="string"> 
    2321                <bean:message key="data.access.intro3"/> 
    2422                <bean:define id="access" value="access"/> 
     23 
    2524                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
    26                 <html:link page="/JeuxAccess.do"> 
    27                         <bean:message key="data.access.jeux"/> 
    28                 </html:link> 
    29                 <br> 
    30                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
    31                 <html:link page="/ParametresAccess.do"> 
    32                         <bean:message key="data.access.param"/> 
    33                 </html:link> 
    34                 <br> 
    35                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
    36                 <html:link page="/CapteursAccess.do"> 
    37                         <bean:message key="data.access.capt"/> 
    38                 </html:link> 
    39                 <br> 
    40                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
    41                 <html:link page="/PlateformesAccess.do"> 
    42                         <bean:message key="data.access.plat"/> 
    43                 </html:link> 
    44                 <%--br> 
    45                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
    46                 <html:link page="/DataAccess.do"> 
    47                         <bean:message key="data.access.extract"/> 
    48                 </html:link--%> 
     25                <html:link page="/data?methodName=viewSets"><bean:message key="data.access.jeux"/></html:link> 
     26 
     27        <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
     28                <html:link page="/data?methodName=viewParameters"><bean:message key="data.access.param"/></html:link> 
     29 
     30        <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
     31                <html:link page="/CapteursAccess.do"><bean:message key="data.access.capt"/></html:link> 
     32 
     33        <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; 
     34                <html:link page="/PlateformesAccess.do"><bean:message key="data.access.plat"/></html:link> 
    4935        </tiles:put> 
    5036</tiles:insert> 
  • ether_megapoli/trunk/web/data/access/navCapt.jsp

    r161 r246  
    88<li><html:link page="/index.jsp"><bean:message key="app.home"/></html:link></li> 
    99<%--li><html:link page="/data/data.jsp"><bean:message key="data"/></html:link></li--%> 
    10 <li><html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link></li> 
     10<li><html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link></li> 
    1111<li><html:link page="/CapteursAccess.do"><bean:message key="data.access.capt"/></html:link></li> 
    1212<li><html:link page="/data/access/desc_capt.jsp"><bean:message key="data.access.capt4"/></html:link></li> 
  • ether_megapoli/trunk/web/data/access/navCapts.jsp

    r161 r246  
    88<li><html:link page="/index.jsp"><bean:message key="app.home"/></html:link></li> 
    99<%--li><html:link page="/data/data.jsp"><bean:message key="data"/></html:link></li--%> 
    10 <li><html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link></li> 
    11 <li><html:link page="/data/access/capt.jsp"><bean:message key="data.access.capt"/></html:link></li> 
     10<li><html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link></li> 
     11<li><html:link page="/data/capt.jsp"><bean:message key="data.access.capt"/></html:link></li> 
    1212</ul> 
  • ether_megapoli/trunk/web/data/access/navFiles.jsp

    r161 r246  
    88<li><html:link page="/index.jsp"><bean:message key="app.home"/></html:link></li> 
    99<%--li><html:link page="/data/data.jsp"><bean:message key="data"/></html:link></li--%> 
    10 <li><html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link></li> 
    11 <li><html:link page="/data/access/jeux.jsp"><bean:message key="data.access.jeux"/></html:link></li> 
     10<li><html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link></li> 
     11<li><html:link page="/data/jeux.jsp"><bean:message key="data.access.jeux"/></html:link></li> 
    1212<li><html:link page="/data/access/files.jsp"><bean:message key="data.access.files"/></html:link></li> 
    1313</ul> 
  • ether_megapoli/trunk/web/data/access/navParam.jsp

    r161 r246  
    88<li><html:link page="/index.jsp"><bean:message key="app.home"/></html:link></li> 
    99<%--li><html:link page="/data/data.jsp"><bean:message key="data"/></html:link></li--%> 
    10 <li><html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link></li> 
     10<li><html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link></li> 
    1111<li><html:link page="/ParametresAccess.do"><bean:message key="data.access.param"/></html:link></li> 
    1212<li><html:link page="/data/access/desc_param.jsp"><bean:message key="data.access.param4"/></html:link></li> 
  • ether_megapoli/trunk/web/data/access/navPlat.jsp

    r161 r246  
    88<li><html:link page="/index.jsp"><bean:message key="app.home"/></html:link></li> 
    99<%--li><html:link page="/data/data.jsp"><bean:message key="data"/></html:link></li--%> 
    10 <li><html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link></li> 
     10<li><html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link></li> 
    1111<li><html:link page="/PlateformesAccess.do"><bean:message key="data.access.plat"/></html:link></li> 
    1212<li><html:link page="/data/access/desc_plat.jsp"><bean:message key="data.access.plat4"/></html:link></li> 
  • ether_megapoli/trunk/web/data/access/navPlats.jsp

    r161 r246  
    88<li><html:link page="/index.jsp"><bean:message key="app.home"/></html:link></li> 
    99<%--li><html:link page="/data/data.jsp"><bean:message key="data"/></html:link></li--%> 
    10 <li><html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link></li> 
    11 <li><html:link page="/data/access/plat.jsp"><bean:message key="data.access.plat"/></html:link></li> 
     10<li><html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link></li> 
     11<li><html:link page="/data/plat.jsp"><bean:message key="data.access.plat"/></html:link></li> 
    1212</ul> 
  • ether_megapoli/trunk/web/data/capt.jsp

    r200 r246  
    9595         
    9696                <div class="hdp" align="right"> 
    97                         <html:link page="/data/access/capt.jsp" anchor="top" titleKey="app.hdp"> 
     97                        <html:link page="/data/capt.jsp" anchor="top" titleKey="app.hdp"> 
    9898                                <html:img page="/resources/images/utils/hdp1.png"/> 
    9999                        </html:link> 
  • ether_megapoli/trunk/web/data/data.jsp

    r161 r246  
    3838                        </li> 
    3939                        <li> 
    40                                 <html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link> 
     40                                <html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link> 
    4141                                 : <bean:message key="data.access.intro"/> 
    4242                        </li> 
  • ether_megapoli/trunk/web/data/jeux.jsp

    r200 r246  
    1 <%@ page import="com.medias.Context" contentType="text/html; charset=UTF-8"%> 
    21<%@ page language="java" contentType="text/html; charset=UTF-8"%> 
    32<%@ page import="com.medias.Calcul"%> 
     
    87<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested"%> 
    98 
    10 <tiles:insert page="/resources/templates/template.jsp" flush="true"> 
    11  
    12         <bean:define type="java.lang.String" id="relativePath" value="<%=Context.getRelativePath(request)%>"/> 
    13  
    14         <tiles:put name="nav" value='<%=relativePath+"/navJeux.jsp"%>'/> 
    15  
    16         <tiles:put name="title" type="string"> 
    17                 <bean:message key="app.title"/> - <bean:message key="data.access.jeux"/> 
    18         </tiles:put> 
    19  
    20         <tiles:put name="bodytitle" type="string"> 
    21                 <bean:message key="data.access.jeux"/> 
    22         </tiles:put> 
     9<tiles:insert page="/resources/templates/templateEther.jsp" flush="true"> 
     10 
     11    <tiles:put name="insertCss" type="string"></tiles:put> 
     12    <tiles:put name="insertJsOrJsp" type="string"></tiles:put> 
     13 
     14 
     15    <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="data.access.jeux"/></tiles:put> 
     16    <tiles:put name="nav" type="string"> 
     17        <html:link page="/index.jsp"><bean:message key="app.home"/></html:link>&nbsp;&gt; 
     18        <html:link page="/data?methodName=viewCatalog"><bean:message key="data.access"/></html:link>&nbsp;&gt; 
     19        <html:link page="/data?methodName=viewSets"><bean:message key="data.access.jeux"/></html:link> 
     20    </tiles:put> 
     21 
     22    <%--****************** CONTENT ****************** --%> 
     23        <tiles:put name="bodytitle" type="string"><bean:message key="data.access.jeux"/></tiles:put> 
    2324 
    2425        <tiles:put name="body" type="string"> 
     
    238239                 
    239240                <div class="hdp" align="right"> 
    240                         <html:link page="/data/access/jeux.jsp" anchor="top" titleKey="app.hdp"> 
     241                        <html:link page="/data/jeux.jsp" anchor="top" titleKey="app.hdp"> 
    241242                                <html:img page="/resources/images/utils/hdp1.png"/> 
    242243                        </html:link> 
  • ether_megapoli/trunk/web/data/param.jsp

    r200 r246  
    1 <%@ page import="com.medias.Context" contentType="text/html; charset=UTF-8"%> 
    21<%@ page import="com.medias.Calcul"%> 
    3 <%@ page import="java.util.ArrayList"%> 
    42<%@ page language="java" contentType="text/html; charset=UTF-8"%> 
    53<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles"%> 
     
    97<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested"%> 
    108 
    11 <tiles:insert page="/resources/templates/template.jsp" flush="true"> 
     9<tiles:insert page="/resources/templates/templateEther.jsp" flush="true"> 
    1210 
    13         <bean:define type="java.lang.String" id="relativePath" value="<%=Context.getRelativePath(request)%>"/> 
     11    <tiles:put name="insertCss" type="string"></tiles:put> 
     12    <tiles:put name="insertJsOrJsp" type="string"></tiles:put> 
    1413 
    15         <tiles:put name="nav" value='<%=relativePath+"/navParams.jsp"%>'/> 
    1614 
    17         <tiles:put name="title" type="string"> 
    18                 <bean:message key="app.title"/> - <bean:message key="data.access.param"/> 
    19         </tiles:put> 
     15    <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="data.access.param"/></tiles:put> 
     16    <tiles:put name="nav" type="string"> 
     17        <html:link page="/index.jsp"><bean:message key="app.home"/></html:link>&nbsp;&gt; 
     18        <html:link page="/data?methodName=viewCatalog"><bean:message key="data.access"/></html:link>&nbsp;&gt; 
     19        <html:link page="/data?methodName=viewParameters"><bean:message key="data.access.param"/></html:link> 
     20    </tiles:put> 
    2021 
    21         <tiles:put name="bodytitle" type="string"> 
    22                 <bean:message key="data.access.param"/> 
    23         </tiles:put> 
     22    <%--****************** CONTENT ****************** --%> 
     23        <tiles:put name="bodytitle" type="string"><bean:message key="data.access.param"/></tiles:put> 
    2424 
    2525        <tiles:put name="body" type="string"> 
     
    7979 
    8080                <div class="hdp" align="right"> 
    81                         <html:link page="/data/access/param.jsp" anchor="top" titleKey="app.hdp"> 
     81                        <html:link page="/data/param.jsp" anchor="top" titleKey="app.hdp"> 
    8282                                <html:img page="/resources/images/utils/hdp1.png"/> 
    8383                        </html:link> 
  • ether_megapoli/trunk/web/data/plat.jsp

    r200 r246  
    113113 
    114114                <div class="hdp" align="right"> 
    115                         <html:link page="/data/access/plat.jsp" anchor="top" titleKey="app.hdp"> 
     115                        <html:link page="/data/plat.jsp" anchor="top" titleKey="app.hdp"> 
    116116                                <html:img page="/resources/images/utils/hdp1.png"/> 
    117117                        </html:link> 
  • ether_megapoli/trunk/web/index.jsp

    r239 r246  
    2828        <ul> 
    2929            <li> 
    30                 <html:link page="/data/access/access.jsp"><bean:message key="data.access"/></html:link>: <bean:message 
     30                <html:link page="/data/access.jsp"><bean:message key="data.access"/></html:link>: <bean:message 
    3131                    key="data.access.intro"/> 
    3232            </li> 
  • ether_megapoli/trunk/web/resources/js/classesForJQuery/etherClasses.js

    r243 r246  
    99        jQuery.each( jsonElements, jQuery.proxy( function( i, jsonElement ) 
    1010        { 
    11             this.addItem( jsonElement, objectParameter ); 
     11//            if( jQuery.isArray( jsonElement ) && 1 < jsonElement.length ) 
     12//                var subItems = new ListItem( jsonElement, new Object() ); 
     13//            else 
     14                this.addItem( jsonElement, objectParameter ); 
    1215        }, this ) ); 
    1316    }, 
     
    216219            var divMenu_arrow = $( document.createElement( "div" ) ); 
    217220            divMenu_arrow.attr( {id:"divMenu_arrow_" + this.getId(), class:"divMenu_arrow" } ); 
    218 //            divNameMenu_arrow.bind( 'click', this, this.onClickMenu ); 
    219221            this.divContainer.append( divMenu_arrow ); 
    220222 
     
    225227            { 
    226228                var divSubMenu_name = $( document.createElement( "div" ) ); 
    227                 divSubMenu_name.addClass( classNameValue+"_subMenu" ); 
     229                divSubMenu_name.addClass( classNameValue + "_subMenu" ); 
    228230                divSubMenu_name.addClass( "parameter_menu_" + element.id ); 
    229231                divSubMenu_name.html( element.code ); 
     232                divSubMenu_name.bind( 'click', {divContainer:this.divContainer, jsonElement:element}, this.onClickMenu ); 
    230233                this.divHiddenElements.append( divSubMenu_name ); 
    231234            }, this ) ); 
     
    261264        else 
    262265            this.addName( classNameValue ); 
     266    }, 
     267 
     268    onClickMenu: function( event ) 
     269    { 
     270        var jsonElement = event.data.jsonElement; 
     271        event.data = event.data.divContainer.item; 
     272        event.data.jsonElement = jsonElement; 
    263273    } 
    264274 
    265 //    onClickMenu: function( event ) 
    266 //    { 
    267 //        var contextEvent = event.data; 
    268 //        contextEvent.divNameMenu_up.animate( {width:"toggle"} ); 
    269 //        contextEvent.divNameMenu_down.animate( {width:"toggle"} ); 
    270 //    } 
    271  
    272275} ); 
  • ether_megapoli/trunk/web/resources/jsp/etherHead.jsp

    r240 r246  
    1414            this.path = "<%=request.getContextPath()%>"; 
    1515            this.webmaster = "<%=Context.getWebmaster(request)%>"; 
    16             this.relativePageUri = "<%=Context.getRelativePath( request )%>?<%=request.getQueryString()%>"; 
     16            this.relativePageUri = <%=request.getQueryString() != null%> ? "<%=Context.getRelativePath( request )%>?<%=request.getQueryString()%>" : "<%=Context.getRelativePageURI(request)%>"; 
    1717            this.jSONUser = <%=Context.getUser( request )%> ? <%=Context.getUser( request )%> : false; 
    1818            this.screenWidthLimit = 1336; 
  • ether_megapoli/trunk/web/resources/templates/mainTemplate.jsp

    r222 r246  
    9191 
    9292            <div id="menuMetaData" class="span-5"> 
    93                 <html:link page="/data/access/access.jsp" paramName="access" paramId="source"> 
     93                <html:link page="/data/access.jsp" paramName="access" paramId="source"> 
    9494                    <h2><bean:message key="data.access"/></h2> 
    9595                </html:link> 
  • ether_megapoli/trunk/web/resources/templates/template.jsp

    r222 r246  
    142142            <bean:define id="access" value="access"/> 
    143143            <ul> 
    144                 <li><html:link page="/data/access/access.jsp" paramName="access" paramId="source"> 
     144                <li><html:link page="/data/access.jsp" paramName="access" paramId="source"> 
    145145                    <bean:message key="data.access"/> 
    146146                </html:link> 
  • ether_megapoli/trunk/web/resources/templates/template2.jsp

    r222 r246  
    143143                                        <bean:define id="access" value="access"/> 
    144144                                        <ul> 
    145                                                 <li><html:link page="/data/access/access.jsp" paramName="access" paramId="source"> 
     145                                                <li><html:link page="/data/access.jsp" paramName="access" paramId="source"> 
    146146                                                        <bean:message key="data.access"/> 
    147147                                                        </html:link> 
  • ether_megapoli/trunk/web/resources/templates/templateEther.jsp

    r240 r246  
    105105        <ul class="menu"> 
    106106            <li> 
    107                 <html:link page="/data/access/access.jsp" paramName="access" paramId="source"> 
     107                <html:link page="/data?methodName=viewCatalog" paramName="access" paramId="source"> 
    108108                    <span><bean:message key="data.access"/></span> 
    109109                </html:link> 
     
    111111                    <ul> 
    112112                        <li><html:link page="/JeuxAccess.do"><span><bean:message key="data.access.jeux"/></span></html:link></li> 
    113                         <li><html:link page="/ParametresAccess.do"><span><bean:message key="data.access.param"/></span></html:link> 
    114                         </li> 
     113                        <li><html:link page="/ParametresAccess.do"><span><bean:message key="data.access.param"/></span></html:link></li> 
    115114                        <li><html:link page="/CapteursAccess.do"><span><bean:message key="data.access.capt"/></span></html:link></li> 
    116                         <li><html:link page="/PlateformesAccess.do"><span><bean:message key="data.access.plat"/></span></html:link> 
    117                         </li> 
     115                        <li><html:link page="/PlateformesAccess.do"><span><bean:message key="data.access.plat"/></span></html:link></li> 
    118116                    </ul> 
    119117                </div> 
     
    121119 
    122120            <li> 
    123                 <html:link page="/data/access/access.jsp" paramName="access" paramId="source"> 
     121                <html:link page="/data/access.jsp" paramName="access" paramId="source"> 
    124122                    <span><bean:message key="app.data"/></span> 
    125123                </html:link> 
     
    127125                    <ul> 
    128126                        <logic:notPresent name="SES_USER" scope="session"> 
    129                             <li><html:link page="/InitLogonAccess.do" paramName="access" paramId="source"><span><bean:message key="data.access.extract.short"/></span></html:link> 
    130                             </li> 
     127                            <li><html:link page="/InitLogonAccess.do" paramName="access" paramId="source"><span><bean:message key="data.access.extract.short"/></span></html:link></li> 
    131128                            <li><html:link page="/InitLogon.do" paramName="upload" paramId="source"><span><bean:message key="data.upload.short"/></span></html:link></li> 
    132129                        </logic:notPresent> 
     
    140137 
    141138            <li class="last"> 
    142                 <html:link page="/visualization?methodName=view"> 
    143                     <span><bean:message key="all.visualization"/></span> 
    144                 </html:link> 
     139                <html:link page="/visualization?methodName=view"><span><bean:message key="all.visualization"/></span></html:link> 
    145140                <div> 
    146141                    <ul> 
  • ether_megapoli/trunk/web/src/com/ether/ControllerData.java

    r244 r246  
    22 
    33import com.ether.annotation.ControllerMethod; 
    4 import com.ether.annotation.Mandatory; 
    5 import com.ether.annotation.ParamName; 
    6 import com.medias.annuaire.Personne; 
    7 import com.medias.database.objects.Parametre; 
    8 import com.medias.database.objects.Plateforme; 
    9 import com.medias.megapoli.struts.forms.DatasForm; 
    10 import com.medias.megapoli.trade.MesureAdapter; 
    11 import com.medias.megapoli.trade.ValeurAdapter; 
    12 import com.medias.megapoli.utils.Requete; 
    13 import net.sf.json.JSONObject; 
    144import org.apache.commons.logging.Log; 
    155import org.apache.commons.logging.LogFactory; 
    16 import org.jdom.Document; 
    17 import org.jdom.output.XMLOutputter; 
    18 import org.jetbrains.annotations.NotNull; 
    19 import org.springframework.beans.factory.annotation.Required; 
    20 import org.springframework.web.servlet.ModelAndView; 
    216 
    22 import javax.servlet.http.HttpServletRequest; 
    23 import javax.servlet.http.HttpServletResponse; 
    24 import java.io.BufferedReader; 
    25 import java.io.DataOutputStream; 
    26 import java.io.InputStreamReader; 
    27 import java.net.URL; 
    28 import java.net.URLConnection; 
    29 import java.net.URLEncoder; 
    30 import java.util.ArrayList; 
    31 import java.util.Calendar; 
    32 import java.util.Date; 
    337import java.util.HashMap; 
    34 import java.util.List; 
    358import java.util.Map; 
    369 
    3710/** 
    3811 * @author vmipsl 
    39  * @date 17 feb 2011 
     12 * @date 10 nov 2011 
    4013 */ 
    41 public class Controller 
     14public class ControllerData 
    4215        extends ControllerEther 
    4316{ 
     
    4518    /** *********************** VIEWS ***************************** **/ 
    4619    /** *********************************************************** **/ 
    47     // Default view if methodName is unknown 
    48     public ModelAndView home( final HttpServletRequest request, final HttpServletResponse response ) 
    49             throws EtherException 
    50     { 
    51         return new ModelAndView( "index" ); 
    52     } 
    53  
    54     @ControllerMethod(view = VIEW_WORK) 
    55     public Map<String, Object> viewInWork() 
     20    @ControllerMethod(view = VIEW_CATALOG) 
     21    public Map<String, Object> viewCatalog() 
    5622            throws ServiceException 
    5723    { 
     
    5925    } 
    6026 
    61     @ControllerMethod(view = VIEW_VISUALIZATION) 
    62     public Map<String, Object> view() 
     27    @ControllerMethod(view = VIEW_SETS) 
     28    public Map<String, Object> viewSets() 
    6329            throws ServiceException 
    6430    { 
     
    6632    } 
    6733 
    68     @ControllerMethod(view = VIEW_VISUALIZATION_PARAMETER_BY_PLATEFORM) 
    69     public Map<String, Object> viewParametersByPlateform() 
     34    @ControllerMethod(view = VIEW_PARAMETERS) 
     35    public Map<String, Object> viewParameters() 
    7036            throws ServiceException 
    7137    { 
    72         final List<Plateforme> plateforms = _etherService.getAllPlateforms(); 
    73         final Date firstDate = _etherService.getFirstDate(); 
    74         final Date endDate = _etherService.getLastDate(); 
     38        return new HashMap<String, Object>(); 
     39    } 
    7540 
    76         final Map<String, Object> model = new HashMap<String, Object>(); 
    77         model.put( "plateforms", getJsonHelper().toJSON( plateforms ) ); 
    78         model.put( "axeTypesForFixedPlateforms", getJSONAxeTypesForFixedPlateforms() ); 
    79         model.put( "axeTypesForMobilePlateforms", getJSONAxeTypesForMobilePlateforms() ); 
    80         model.put( "firstDate", DateHelper.formatDate( firstDate, DateHelper.ENGLISH_DATE_PATTERN ) ); 
    81         model.put( "lastDate", DateHelper.formatDate( endDate, DateHelper.ENGLISH_DATE_PATTERN ) ); 
    82         return model; 
     41    @ControllerMethod(view = VIEW_SENSORS) 
     42    public Map<String, Object> viewSensors() 
     43            throws ServiceException 
     44    { 
     45        return new HashMap<String, Object>(); 
     46    } 
     47 
     48    @ControllerMethod(view = VIEW_PLATEFORMS) 
     49    public Map<String, Object> viewPlateforms() 
     50            throws ServiceException 
     51    { 
     52        return new HashMap<String, Object>(); 
    8353    } 
    8454 
     
    8656    /** *********************** CALLS ***************************** **/ 
    8757    /** *********************************************************** **/ 
    88     @ControllerMethod(jsonResult = true) 
    89     public JSONObject searchParametersByPlateform( @Mandatory @ParamName(ParameterConstants.PARAMETER_ID) final Integer plateformId ) 
    90             throws ServiceException, EtherException 
    91     { 
    92         final List<Parametre> fullParametersByPlateform = _etherService.getParametersByPlateformId( plateformId ); 
    93         final List<List<Parametre>> parametersByPlateform = manageMenusForParameterList( fullParametersByPlateform ); 
    9458 
    95         final JSONObject result = new JSONObject(); 
    96         result.put( ParameterConstants.PARAMETER_PARAMETERS, getJsonHelper().toJSON( parametersByPlateform ) ); 
    97         return result; 
    98     } 
     59    private static final Log LOGGER = LogFactory.getLog( ControllerData.class ); 
    9960 
    100     /** 
    101      * This method manage the sub-menus for the list of parameters (to avoid multiple "Particle Concentration" by example) 
    102      * The fullParameters must be ordered with parameterName ascendant 
    103      * 
    104      * @param fullParameters 
    105      * @return 
    106      */ 
    107     @NotNull 
    108     private List<List<Parametre>> manageMenusForParameterList( @NotNull final List<Parametre> fullParameters ) 
    109     { 
    110         final List<List<Parametre>> parameterListWithMenu = new ArrayList<List<Parametre>>(); 
    111  
    112         int i = 0; 
    113         while( i < fullParameters.size() ) 
    114         { 
    115             final Parametre fullParameter = fullParameters.get( i ); 
    116             final int firstIndex = fullParameters.indexOf( fullParameter ); 
    117             final int lastIndex = fullParameters.lastIndexOf( fullParameter ); 
    118             final List<Parametre> parameters = fullParameters.subList( firstIndex, lastIndex + 1 ); 
    119             parameterListWithMenu.add( parameters ); 
    120             i += parameters.size(); 
    121         } 
    122  
    123         return parameterListWithMenu; 
    124     } 
    125  
    126  
    127     @ControllerMethod(jsonResult = true, loginMandatory = true) 
    128     public JSONObject downloadData( @ParamName(ParameterConstants.PARAMETER_DATE_BEGIN) final String dateBegin, 
    129                                     @ParamName(ParameterConstants.PARAMETER_DATE_END) final String dateEnd, 
    130                                     @ParamName(ParameterConstants.PARAMETER_PFID_PID_LIST) final String pIdPIdArrayString, 
    131                                     @NotNull final Personne personne ) 
    132             throws ServiceException, WebException 
    133     { 
    134         final JSONObject result = new JSONObject(); 
    135  
    136         final List<Pair<String, String>> pfIdPIdList = EtherHelper.extractpfIdPIdListFromString( pIdPIdArrayString, String.class, String.class ); 
    137         if( null == pfIdPIdList ) 
    138             throw new WebException( WebException.WebCode.PLATEFORM_OR_PARAMETER_IS_NULL, null ); 
    139  
    140         final DatasForm dataForm = createDataForm( dateBegin, dateEnd, pfIdPIdList ); 
    141  
    142         final XMLOutputter outXml = new XMLOutputter(); 
    143         final Document docXml = Requete.toXml( dataForm, personne ); 
    144         final String requete = outXml.outputString( docXml ); 
    145         try 
    146         { 
    147             final String encoded = "requete=" + URLEncoder.encode( requete, "UTF-8" ); 
    148             // Configuration de l'URL 
    149             final String urlCGIStr = (String) this.getServletContext().getAttribute( "APP_CGI" ); 
    150             final URL urlCGI = new URL( urlCGIStr ); 
    151             final URLConnection conn = urlCGI.openConnection(); 
    152             conn.setDoOutput( true ); 
    153             conn.setUseCaches( false ); 
    154             conn.setRequestProperty( "content-type", "application/x-www-form-urlencoded" ); 
    155  
    156             // Envoi de la requête 
    157             final DataOutputStream out = new DataOutputStream( conn.getOutputStream() ); 
    158             out.writeBytes( encoded ); 
    159             out.flush(); 
    160             out.close(); 
    161  
    162             // Réponse du CGI 
    163             final BufferedReader in = new BufferedReader( new InputStreamReader( conn.getInputStream() ) ); 
    164             String aLine; 
    165             while( ( aLine = in.readLine() ) != null ) 
    166             { 
    167                 if( aLine.length() == 0 ) continue; 
    168                 if( aLine.startsWith( "1" ) ) 
    169                 { 
    170                     System.err.println( "ERROR :" + aLine ); 
    171                 } 
    172                 else System.out.println( "REPONSE :" + aLine ); 
    173             } 
    174         } 
    175         catch( Exception e ) 
    176         { 
    177             result.put( ParameterConstants.PARAMETER_RESULT, ParameterConstants.PARAMETER_NOT_OK ); 
    178             return result; 
    179         } 
    180  
    181         result.put( ParameterConstants.PARAMETER_RESULT, ParameterConstants.PARAMETER_OK ); 
    182         return result; 
    183     } 
    184  
    185     /** 
    186      * This method create a dataForms to simulate and use the struts actions "DataAccessAction" and "DataSubmitAction" 
    187      * 
    188      * @param dateBegin 
    189      * @param dateEnd 
    190      * @param pfIdPIdList 
    191      * @return 
    192      * @throws WebException 
    193      */ 
    194     @NotNull 
    195     private DatasForm createDataForm( final String dateBegin, final String dateEnd, final List<Pair<String, String>> pfIdPIdList ) 
    196             throws WebException 
    197     { 
    198         final DatasForm dataForm = new DatasForm(); 
    199  
    200         // Plateforms and parameters 
    201         final List<String> plateformIds = EtherHelper.getFirstValues( pfIdPIdList ); 
    202         final List<String> parameterIds = EtherHelper.getSecondValues( pfIdPIdList ); 
    203         dataForm.setSelectPlats( plateformIds.toArray( new String[plateformIds.size()] ) ); 
    204         dataForm.setSelectParams( parameterIds.toArray( new String[parameterIds.size()] ) ); 
    205  
    206         // Localisations 
    207         final MesureAdapter mAdapter = new MesureAdapter(); 
    208         mAdapter.loadLocsFromDatabase( dataForm ); 
    209  
    210         // Dates 
    211         final Calendar calendar = Calendar.getInstance(); 
    212         String formatedDateBegin = null; 
    213         String formatedDateEnd = null; 
    214         if( null != dateBegin && null != dateEnd && !"false".equals( dateBegin ) && !"false".equals( dateEnd ) ) 
    215         { 
    216             try 
    217             { 
    218                 calendar.setTimeInMillis( Long.valueOf( dateBegin ) ); 
    219                 formatedDateBegin = DateHelper.formatDate( calendar.getTime(), DateHelper.FRENCH_DATE_PATTERN ); 
    220                 calendar.setTimeInMillis( Long.valueOf( dateEnd ) ); 
    221                 formatedDateEnd = DateHelper.formatDate( calendar.getTime(), DateHelper.FRENCH_DATE_PATTERN ); 
    222                 dataForm.setDateDeb( formatedDateBegin ); 
    223                 dataForm.setDateFin( formatedDateEnd ); 
    224             } 
    225             catch( Exception e ) 
    226             { 
    227                 throw new WebException( WebException.WebCode.INVALID_DATE, e ); 
    228             } 
    229         } 
    230         else 
    231             mAdapter.loadDatesFromDatabase( dataForm ); 
    232  
    233         // Fill dataForm 
    234         final ValeurAdapter vAdapter = new ValeurAdapter(); 
    235         vAdapter.loadCountFromDatabase( dataForm ); 
    236         dataForm.setListeCoords( dataForm.getLatMin() + "," + dataForm.getLatMax() + "," + dataForm.getLonMin() + "," + dataForm.getLonMax() ); 
    237         dataForm.setListeDates( dataForm.getDateDeb() + "," + dataForm.getDateFin() ); 
    238         dataForm.setOutput( FORMAT_DEFAULT ); 
    239         dataForm.setCompression( COMPRESSION_DEFAULT ); 
    240  
    241         return dataForm; 
    242     } 
    243  
    244     private List<JSONObject> getJSONAxeTypesForFixedPlateforms() 
    245     { 
    246         final AxeTypeForFixedPlateform[] axeTypes = AxeTypeForFixedPlateform.values(); 
    247  
    248         final List<JSONObject> jsonAxeTypes = new ArrayList<JSONObject>( axeTypes.length ); 
    249  
    250         for( final AxeTypeForFixedPlateform axeType : axeTypes ) 
    251         { 
    252             final JSONObject jsonAxeType = new JSONObject(); 
    253             jsonAxeType.put( "text", axeType.name() ); 
    254             jsonAxeType.put( "value", axeType.name() ); 
    255             jsonAxeTypes.add( jsonAxeType ); 
    256         } 
    257         return jsonAxeTypes; 
    258     } 
    259  
    260     private List<JSONObject> getJSONAxeTypesForMobilePlateforms() 
    261     { 
    262         final AxeTypeForMobilePlateform[] axeTypes = AxeTypeForMobilePlateform.values(); 
    263  
    264         final List<JSONObject> jsonAxeTypes = new ArrayList<JSONObject>( axeTypes.length ); 
    265  
    266         for( final AxeTypeForMobilePlateform axeType : axeTypes ) 
    267         { 
    268             final JSONObject jsonAxeType = new JSONObject(); 
    269             jsonAxeType.put( "text", axeType.name() ); 
    270             jsonAxeType.put( "value", axeType.name() ); 
    271             jsonAxeTypes.add( jsonAxeType ); 
    272         } 
    273         return jsonAxeTypes; 
    274     } 
    275  
    276     @Required 
    277     public void setEtherService( @NotNull final EtherService etherService ) 
    278     { 
    279         _etherService = etherService; 
    280     } 
    281  
    282     private static final Log LOGGER = LogFactory.getLog( Controller.class ); 
    283  
    284     private static final String VIEW_WORK = "visualization/inWork"; 
    285     private static final String VIEW_VISUALIZATION = "visualization/visu"; 
    286     private static final String VIEW_VISUALIZATION_PARAMETER_BY_PLATEFORM = "visualization/visu_parameter_by_pf"; 
    287     private static final String VIEW_DOWNLOAD_OK = "data/access/extract3"; 
    288  
    289     private static final String FORMAT_DEFAULT = "NASA-AMES"; 
    290     private static final String COMPRESSION_DEFAULT = "None"; 
    291     private EtherService _etherService; 
     61    private static final String VIEW_CATALOG = "data/access"; 
     62    private static final String VIEW_SETS = "data/jeux"; 
     63    private static final String VIEW_PARAMETERS = "data/param"; 
     64    private static final String VIEW_SENSORS = "data/capt"; 
     65    private static final String VIEW_PLATEFORMS = "data/plat"; 
    29266} 
  • ether_megapoli/trunk/web/src/com/ether/ControllerVisualization.java

    r244 r246  
    3939 * @date 17 feb 2011 
    4040 */ 
    41 public class Controller 
     41public class ControllerVisualization 
    4242        extends ControllerEther 
    4343{ 
     
    280280    } 
    281281 
    282     private static final Log LOGGER = LogFactory.getLog( Controller.class ); 
     282    private static final Log LOGGER = LogFactory.getLog( ControllerVisualization.class ); 
    283283 
    284284    private static final String VIEW_WORK = "visualization/inWork"; 
  • ether_megapoli/trunk/web/visualization/visu_parameter_by_pf-classes.jsp

    r241 r246  
    5151            this.createContainer( "containerParameter", "containerParameter " + className ); 
    5252            this.addNameWithMenus( "parameter_name" ); 
    53 //            this.addCode( "parameter_code" ); 
    5453            this.appendContainer( parentNode ); 
    5554            this.addObservers(); 
     
    6564            this.unselectWithParameter( "parameter_selected" ); 
    6665        } 
    67  
    68 //        addCode: function ( classNameValue ) 
    69 //        { 
    70 //            if( !this.divContainer ) 
    71 //                return; 
    72 // 
    73 //            this.divName = $( document.createElement( "div" ) ); 
    74 //            this.divName.className = classNameValue; 
    75 //            this.divName.innerHTML = " (" + this.jsonElement.code + ")"; 
    76 // 
    77 //            this.divContainer.appendChild( this.divName ); 
    78 //        } 
    7966    } ); 
    8067</script> 
Note: See TracChangeset for help on using the changeset viewer.