Changeset 404


Ignore:
Timestamp:
03/08/12 17:40:01 (12 years ago)
Author:
vmipsl
Message:

clean

Location:
tapas
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tapas/common/implementation/com/ether/Context.java

    r384 r404  
    5656     * Désigne l'adresse mail du webmaster 
    5757     */ 
    58     public static String getWebmaster( HttpServletRequest request ) 
     58    public static String getWebmaster( final HttpServletRequest request ) 
    5959    { 
    60         String webmaster = (String) request.getSession().getServletContext().getAttribute( "APP_WEBMASTER" ); 
    61         return webmaster; 
     60        return (String) request.getSession().getServletContext().getAttribute( "APP_WEBMASTER" ); 
    6261    } 
    6362 
     
    6766     * @return le nom de la racine. 
    6867     */ 
    69     public static String getWebroot( HttpServletRequest request ) 
     68    public static String getWebroot( final HttpServletRequest request ) 
    7069    { 
    71         String path = request.getSession().getServletContext().getRealPath( "" ); 
     70        final String path = request.getSession().getServletContext().getRealPath( "" ); 
    7271        return path.substring( path.lastIndexOf( "/" ) + 1 ); 
    7372    } 
     
    7978     * @return l'uri de la page courante 
    8079     */ 
    81     public static String getPageURI( HttpServletRequest request ) 
     80    public static String getPageURI( final HttpServletRequest request ) 
    8281    { 
    8382        return request.getRequestURI().substring( request.getRequestURI().indexOf( '/' ) + 1 ); 
     
    9291     * @return 
    9392     */ 
    94     public static String getRelativePageURI( HttpServletRequest request ) 
     93    public static String getRelativePageURI( final HttpServletRequest request ) 
    9594    { 
    9695        String pageUri = getPageURI( request ); 
     
    103102 
    104103 
    105     public static String getRelativePath( HttpServletRequest request ) 
     104    public static String getRelativePath( final HttpServletRequest request ) 
    106105    { 
    107106        String uri = getPageURI( request ); 
     
    119118     * @return la langue courante. 
    120119     */ 
    121     public static String getLangue( HttpServletRequest request ) 
     120    public static String getLangue( final HttpServletRequest request ) 
    122121    { 
    123122        String lang = (String) request.getSession().getAttribute( "lang" ); 
  • tapas/web/resources/templates/templateEther.jsp

    r400 r404  
    1 <%@ page import="com.ether.Context" %> 
    21<%@ page contentType="text/html;charset=UTF-8" language="java" %> 
    32<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> 
     
    1615 
    1716    <ether:htmlCss cssFile="apycom.com-5-red/menu"/> 
    18     <%--<ether:htmlCss cssFile="TwitterLogin/front"/>--%> 
    1917    <ether:htmlCss cssFile="jquery-ui-1.8.16.custom/jquery-ui-1.8.16.custom"/> 
    2018    <ether:htmlCss cssFile="button"/> 
    21     <%--<ether:htmlCss cssFile="complexButton"/>--%> 
    2219    <ether:htmlCss cssFile="mainEther"/> 
    2320    <ether:htmlCss cssFile="tapas"/> 
     
    2825    <ether:htmlJs jsFile="classesForJQuery/etherHelper"/> 
    2926    <ether:htmlJs jsFile="classesForJQuery/Button"/> 
    30     <ether:htmlJs jsFile="classesForJQuery/LoginButton"/> 
    3127    <ether:htmlJs jsFile="apycom.com-5-red/menu"/> 
    32     <%--<ether:htmlJs jsFile="TwitterLogin/javascripts/jquery.tipsy"/>--%> 
    33     <%--<ether:htmlJs jsFile="jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min"/>--%> 
    3428 
    3529    <jsp:include page="templateEther_script.jsp"/> 
     
    120114    <%-- ****************** BOTTOM ****************** --%> 
    121115    <div id="containerBottom" class="containerTapas containerBottom" align="right"> 
    122         &copy; 2010-2011 <a href="http://ether.ipsl.jussieu.fr" target="help">ETHER&nbsp;</a>/ CNRS 
     116        &copy; 2012 <a href="http://ether.ipsl.jussieu.fr" target="help">ETHER&nbsp;</a>/ CNRS 
    123117    </div> 
    124118</div> 
     
    134128    templateTexts["label.mail"] = '<spring:message code="label.mail"/>'; 
    135129    templateTexts["label.map"] = '<spring:message code="label.map"/>'; 
    136     templateTexts["label.atmosphere.chemistry"] = '<spring:message code="label.atmosphere.chemistry"/>'; 
    137     templateTexts["label.activities"] = '<spring:message code="label.activities"/>'; 
    138     templateTexts["label.data.services"] = '<spring:message code="label.data.services"/>'; 
    139     templateTexts["label.community"] = '<spring:message code="label.community"/>'; 
    140     templateTexts["label.pole.presentation"] = '<spring:message code="label.pole.presentation"/>'; 
    141     templateTexts["label.users.committee"] = '<spring:message code="label.users.committee"/>'; 
    142     templateTexts["label.laboratories"] = '<spring:message code="label.laboratories"/>'; 
    143     templateTexts["label.workshops"] = '<spring:message code="label.workshops"/>'; 
    144     templateTexts["label.ether.letter"] = '<spring:message code="label.ether.letters"/>'; 
    145     templateTexts["label.informations"] = '<spring:message code="label.informations"/>'; 
    146130 
    147     //    templateTexts["app.en"] = '<bean:message key="app.en"/>'; 
    148     //    templateTexts["app.fr"] = '<bean:message key="app.fr"/>'; 
    149     <%--templateTexts["data.upload.metadata.contact.mail"] = '<bean:message key="data.upload.metadata.contact.mail"/>';--%> 
    150     <%--templateTexts["data.access.extract.short"] = '<bean:message key="data.access.extract.short"/>';--%> 
    151     <%--templateTexts["data.upload.short"] = '<bean:message key="data.upload.short"/>';--%> 
    152     <%--templateTexts["app.backoffice"] = '<bean:message key="app.backoffice"/>';--%> 
    153     <%--templateTexts["app.backoffice.help"] = '<bean:message key="app.backoffice.help"/>';--%> 
    154  
    155     <%--templateTexts["app.credits"] = '<bean:message key="app.credits"/>';--%> 
    156     <%--templateTexts["app.mentions"] = '<bean:message key="app.mentions"/>';--%> 
    157     <%--templateTexts["app.infos"] = '<bean:message key="app.infos"/>';--%> 
    158     <%--templateTexts["login.dataProtocolAccept"] = "<bean:message key="login.dataProtocolAccept"/>";--%> 
    159     <%--templateTexts["login.dataProtocolFields"] = "<bean:message key="login.dataProtocolFields"/>";--%> 
    160     <%--templateTexts["login.dataProtocol.account"] = "<bean:message key="login.dataProtocol.account"/>";--%> 
    161     <%--templateTexts["<%=WebException.WebCode.USER_ALREADY_EXISTS%>"] = "<bean:message key="login.dataProtocol.alreadyExist"/>";--%> 
    162  
    163     <%--// Needed texts if you use the library LoginButton.js--%> 
    164     <%--var loginTexts = $A( "" );--%> 
    165     <%--loginTexts["app.connexion"] = '<bean:message key="app.connexion"/>';--%> 
    166     <%--loginTexts["login"] = '<bean:message key="login"/>';--%> 
    167     <%--loginTexts["login.password"] = '<bean:message key="login.password"/>';--%> 
    168     <%--loginTexts["login.sign"] = '<bean:message key="login.sign"/>';--%> 
    169     <%--loginTexts["login.pwdForget"] = '<bean:message key="login.pwdForget"/>';--%> 
    170     <%--loginTexts["login.loginForget"] = '<bean:message key="login.loginForget"/>';--%> 
    171     <%--loginTexts["login.loginForget.help"] = '<bean:message key="login.loginForget.help"/>';--%> 
    172     <%--loginTexts["login.inscription"] = '<bean:message key="login.inscription"/>';--%> 
    173     <%--loginTexts["login.error.notFound"] = "<bean:message key='login.error.notFound'/>";--%> 
    174     <%--loginTexts["login.error.wrongPassword"] = "<bean:message key='login.error.wrongPassword'/>";--%> 
    175     <%--loginTexts["login.error.failed"] = "<bean:message key='login.error.failed' arg0="<%=Context.getWebmaster( request )%>"/>";--%> 
    176     <%--loginTexts["login.error.notAccepted"] = "<bean:message key='login.error.notAccepted'/>";--%> 
    177     <%--loginTexts["login.text"] = "<bean:message key="login.text"/>";--%> 
    178131 
    179132    var interfaceTemplate = new InterfaceTemplate(); 
  • tapas/web/resources/templates/templateEther_script.jsp

    r396 r404  
    1313            /** *********** VARIABLES *********** **/ 
    1414            this.isLanguageFr = <%=Context.getLangue(request).equals( "fr" )%>; 
    15             this.webmaster = "<%=Context.getWebmaster(request)%>"; 
    16             <%--this.jSONUser = <%=Context.getJSONUser( request )%> ? <%=Context.getJSONUser( request )%> : false;--%> 
     15            // TODO : vérifier cette adresse de webmaster !!!! 
     16            this.webmaster = "rboipsl@ipsl.jussieu.fr"; 
    1717 
    1818            /** ************ CREATE ************ **/ 
    19 //        this.createLogin(); 
    2019            this.createTools(); 
    21             this.updateLoginOrLogout(); 
    2220        }, 
    2321 
     
    3634        }, 
    3735 
    38         createLogin: function() 
    39         { 
    40             this.loginModule = new LoginButton( {parent:this.containerLogin, urlLogin:"project?methodName=login", urlLogout:"project?methodName=logout", isNeededInscription:true, callbackInscription:jQuery.proxy( this.onClickInscription, this ), anotherOnClickLogin:this.updateLoginOrLogout, anotherOnClickLogout:this.updateLoginOrLogout } ); 
    41             this.loginModule.setJSONUser( this.jSONUser ); 
    42             this.loginModule.display(); 
    43             setLoginModule( this.loginModule ); 
    44         }, 
    45  
    4636        // REQUESTS ******************************************************** 
    4737 
     
    5747            this.webmaster = "<%=Context.getWebmaster(request)%>"; 
    5848 
    59             alert("<%=request.getQueryString()%>||<%=Context.getRelativePath( request )%>||<%=Context.getRelativePageURI(request)%>"); 
     49            alert( "<%=request.getQueryString()%>||<%=Context.getRelativePath( request )%>||<%=Context.getRelativePageURI(request)%>" ); 
    6050 
    6151            this.relativePageUri = <%=request.getQueryString() != null%> ? "<%=Context.getRelativePath( request )%>?<%=request.getQueryString()%>" : "<%=Context.getRelativePageURI(request)%>"; 
     
    7161        { 
    7262            document.location.href = "mailto:" + this.webmaster + "?subject=[TAPAS]"; 
    73         }, 
    74  
    75         onClickInscription: function() 
    76         { 
    77             var dataProtocol = "resources/jsp/dataProtocol_fr.jsp"; 
    78             if( !this.isLanguageFr ) 
    79                 dataProtocol = "resources/jsp/dataProtocol_en.jsp"; 
    80  
    81             var $dialog = $( '<div></div>' ) 
    82                     .load( dataProtocol ) 
    83                     .dialog( { 
    84                                  autoOpen: false, 
    85                                  title: loginTexts["login.inscription"], 
    86                                  height: 800, 
    87                                  width: 750 
    88                              } ); 
    89             $dialog.dialog( 'open' ); 
    90  
    91             // TODO : see with $dialog.ready() to manage buttons 
    92         }, 
    93  
    94         updateLoginOrLogout: function() 
    95         { 
    96             <%--if( "<%=UserRole.ADMINISTRATOR%>" == getJSONUserRole() )--%> 
    97             <%--$( "#button_bo" ).show();--%> 
    98             <%--else--%> 
    99             <%--$( "#button_bo" ).hide();--%> 
    10063        } 
    10164 
    10265    } ); 
    10366 
    104     /** ******************************* **/ 
    105     /** *********** ACCOUNT *********** **/ 
    106     /** ******************************* **/ 
    107     function onClickAcceptDataProtocol() 
    108     { 
    109         if( '' == $( "#lastName" ).val() || '' == $( "#email" ).val() || '' == $( "#password" ).val() ) 
    110         { 
    111             showErrorAccount( null, templateTexts["login.dataProtocolFields"] ); 
    112             return; 
    113         } 
    114  
    115         if( $( "#checkboxUser" ).attr( 'checked' ) ) 
    116             createAccount(); 
    117         else 
    118             showErrorAccount( null, templateTexts["login.dataProtocolAccept"] ); 
    119     } 
    120  
    121     function createAccount() 
    122     { 
    123         var parametersUrl = "name=" + $( "#lastName" ).val() + "&firstName=" + $( "#firstName" ).val() + "&email=" + $( "#email" ).val() + "&pwd=" + $( "#password" ).val(); 
    124         var request = $.ajax( { 
    125             url: "project?methodName=createAccount&" + parametersUrl, 
    126             success:handleCreateAccount, 
    127             error: showErrorAccount 
    128         } ); 
    129     } 
    130  
    131     function handleCreateAccount() 
    132     { 
    133         $( "#infosAccount" ).hide(); 
    134         $( "#infosAccount" ).removeClass( "containerErrors" ); 
    135         $( "#infosAccount" ).addClass( "containerInfos" ); 
    136         $( "#infosAccount" ).html( templateTexts["login.dataProtocol.account"] ); 
    137         $( "#infosAccount" ).show(); 
    138     } 
    139  
    140     function showErrorAccount( result, text ) 
    141     { 
    142         $( "#infosAccount" ).hide(); 
    143         $( "#infosAccount" ).removeClass( "containerInfos" ); 
    144         $( "#infosAccount" ).addClass( "containerErrors" ); 
    145         if( null != result ) 
    146             $( "#infosAccount" ).html( templateTexts[result.responseText] ); 
    147         else 
    148             $( "#infosAccount" ).html( text ); 
    149  
    150         $( "#infosAccount" ).show(); 
    151     } 
    15267</script> 
  • tapas/web/src/messages_en.properties

    r402 r404  
    1616error.ERROR_JSON_TAPAS_IS_NULL=Error to create the form 
    1717 
    18 label.atmosphere.chemistry=Atmosphere chemistry 
    19 label.activities=Activities 
    20 label.data.services=Data/Services 
    21 label.community=Community 
    22 label.pole.presentation=Pole presentation 
    23 label.users.committee=Users committee 
    24 label.laboratories=Laboratories 
    25 label.workshops=Workshops 
    26 label.ether.letters=Ether letters 
    27 label.informations=Informations 
    28  
    29 label.balloons=Balloons 
    30 label.satellites=Satellites 
    31 label.campaigns=Campaigns 
    32 label.models=Models 
    33 label.meteo=Meteo 
    34 label.links=Links 
    35  
    36 home.title.part1=Centre for Atmospheric Chemistry 
    37 home.title.part2=Products and Services 
    38 home.news=N E W S 
    39 home.main.activities=ETHER MAIN ACTIVITIES 
    40 home.data=DATA 
    41 home.databases=DATABASES 
    42 home.services=SERVICES 
    43  
    44 logo.mimosa.alt=Potential vorticity, temperature analysis and forecasts 
    45 logo.reprobus.alt=Chemistry Transport Model in Polar Winters 
    46 logo.iasi.alt=Infrared Atmospheric Sounding Interferometer 
    47 logo.tropico.alt=TRO-pico campaign 
    48 logo.geisa.alt=Spectroscopic data 
    49 logo.mozaic.alt=Measurements of OZone, water vapour, carbon monoxide and nitrogen oxides by in-services AIrbus airCraft 
    50 logo.eccad.alt=Emissions data and ancillary data for emissions calculation 
    51 logo.megapoli.alt=Megacities: Emissions, urban, regional and Global Atmospheric POLlution and climate effects, and Integrated tools for assessment and mitigation 
    52 logo.balloons.alt=Balloon experiments 
    53 logo.satellites.alt=Available data in ETHER 
    54 logo.campaigns.alt=Campaigns 
    55 logo.models.alt=Models 
    56 logo.meteo.alt=Meteo 
    57 logo.ramces.alt=Atmospheric Network for the Measurement of Greenhouse Compounds 
    58 logo.kinetics.alt=Chemical Kinetics Database 
    59 logo.links.alt=Links 
    60  
    61  
    6218label.submitButton=RUN 
  • tapas/web/src/messages_fr.properties

    r402 r404  
    1616error.ERROR_JSON_TAPAS_IS_NULL=Erreur de création du formulaire Tapas 
    1717 
    18 label.atmosphere.chemistry=Chimie de l&apos;atmosphÚre 
    19 label.activities=Activités 
    20 label.data.services=Données/Services 
    21 label.community=Communauté 
    22 label.pole.presentation=Présentation du pÃŽle 
    23 label.users.committee=Comité utilisateurs 
    24 label.laboratories=Laboratoires 
    25 label.workshops=Colloques/Ateliers 
    26 label.ether.letters=Lettres Ether 
    27 label.informations=Informations 
    28  
    29 label.balloons=Ballons 
    30 label.satellites=Satellites 
    31 label.campaigns=Campagnes 
    32 label.models=ModÚles 
    33 label.meteo=Météo 
    34 label.links=Liens 
    35  
    36 home.title.part1=Centre de Produits et Services 
    37 home.title.part2=de la Chimie de l&apos;AtmosphÚre 
    38 home.news=A C T U A L I T E S 
    39 home.main.activities=PRINCIPALES ACTIVITES D&apos;ETHER 
    40 home.data=DONNEES 
    41 home.databases=BASES DE DONNEES 
    42 home.services=SERVICES 
    43  
    44 logo.mimosa.alt=Potential vorticity, temperature analysis and forecasts 
    45 logo.reprobus.alt=Chemistry Transport Model in Polar Winters 
    46 logo.iasi.alt=Infrared Atmospheric Sounding Interferometer 
    47 logo.tropico.alt=TRO-pico campaign 
    48 logo.geisa.alt=Spectroscopic data 
    49 logo.mozaic.alt=Measurements of OZone, water vapour, carbon monoxide and nitrogen oxides by in-services AIrbus airCraft 
    50 logo.eccad.alt=Emissions data and ancillary data for emissions calculation 
    51 logo.megapoli.alt=Megacities: Emissions, urban, regional and Global Atmospheric POLlution and climate effects, and Integrated tools for assessment and mitigation 
    52 logo.balloons.alt=Ballons 
    53 logo.satellites.alt=Données disponibles dans ETHER 
    54 logo.campaigns.alt=Campagnes 
    55 logo.models.alt=ModÚles 
    56 logo.meteo.alt=Météo 
    57 logo.ramces.alt=Réseau atmosphérique de Mesure des Composés à Effet de Serre 
    58 logo.kinetics.alt=Chemical Kinetics Database 
    59 logo.links.alt=Liens 
    60  
    61  
    6218label.submitButton=COURIR 
    63  
Note: See TracChangeset for help on using the changeset viewer.