Changeset 816


Ignore:
Timestamp:
03/12/15 12:28:06 (9 years ago)
Author:
rboipsl
Message:

copy date
One transmission
mise a jour sur champs
changement couleur en demi-deuil

Location:
tapas
Files:
1 added
24 edited
4 copied

Legend:

Unmodified
Added
Removed
  • tapas/common/Common.iml

    r433 r816  
    2121      </library> 
    2222    </orderEntry> 
    23     <orderEntry type="library" name="lib_common" level="project" /> 
     23    <orderEntry type="library" exported="" name="lib_common" level="project" /> 
    2424    <orderEntry type="library" name="lib_spring" level="project" /> 
    2525    <orderEntry type="library" name="lib_hibernate" level="project" /> 
  • tapas/domain/interface/com/ether/tapas/Location.java

    r809 r816  
    77 * @date 19 march 2012 
    88 */ 
    9 public class Observatory 
     9public class Location 
    1010{ 
    11     public Integer getId() 
    12     { 
    13         return _id; 
    14     } 
    15  
    16     public void setId( final Integer id ) 
    17     { 
    18         _id = id; 
    19     } 
    2011 
    2112    @NotNull 
     
    7667 
    7768 
    78     private Integer _id; 
    79     @NotNull 
    8069    private String _name; 
    8170    @NotNull 
  • tapas/domain/interface/com/ether/tapas/Observation.java

    r445 r816  
    22 
    33import org.jetbrains.annotations.NotNull; 
     4import org.jetbrains.annotations.Nullable; 
    45 
    56import java.util.Date; 
     
    2223    } 
    2324 
    24     @NotNull 
     25    @Nullable 
    2526    public Observatory getObservatory() 
    2627    { 
     
    2829    } 
    2930 
    30     public void setObservatory( @NotNull final Observatory observatory ) 
     31    public void setObservatory( @Nullable final Observatory observatory ) 
    3132    { 
    3233        _observatory = observatory; 
     
    5556    } 
    5657 
     58    @Nullable 
     59    public Location getLocation() 
     60    { 
     61        return _location; 
     62    } 
     63 
     64    public void setLocation( @Nullable final Location location ) 
     65    { 
     66        _location = location; 
     67    } 
     68 
    5769    @NotNull 
    5870    private String _date; 
    59     @NotNull 
     71    @Nullable 
    6072    private Observatory _observatory; 
    6173    @NotNull 
     
    6375    @NotNull 
    6476    private Instrument _instrument; 
     77    @Nullable 
     78    private Location _location; 
    6579} 
  • tapas/domain/interface/com/ether/tapas/Preference.java

    r779 r816  
    7272 
    7373    public void setCo2Extinction( @NotNull final Pair<String, String> co2Extinction ) 
    74     { 
     74    {                                    String V1="FALSE"; 
    7575        _co2Extinction = co2Extinction; 
    7676    } 
     
    8484    public void setCh4Extinction( @NotNull final Pair<String, String> ch4Extinction ) 
    8585    { 
    86         _ch4Extinction = ch4Extinction; 
     86        _ch4Extinction = ch4Extinction;  String V1="FALSE"; 
    8787    } 
    8888 
     
    110110 
    111111    @NotNull 
     112    public Pair<String, String> getOneTransmission() 
     113    { 
     114        return _oneTransmission; 
     115    } 
     116 
     117    public void setOneTransmission( @NotNull final Pair<String, String> oneTransmission ) 
     118    { 
     119        _oneTransmission = oneTransmission; 
     120    } 
     121 
     122    @NotNull 
    112123    private Pair<String, String> _format; 
    113124    @NotNull 
     
    127138    @NotNull 
    128139    private Pair<String, String> _bervCorrection; 
     140    @NotNull 
     141    private Pair<String, String> _oneTransmission; 
    129142} 
  • tapas/domain/interface/com/ether/tapas/Request.java

    r401 r816  
    5353    } 
    5454 
     55    public int getValid() 
     56    { 
     57        return _isValid; 
     58    } 
     59 
     60    public void setValid( final int valid ) 
     61    { 
     62        _isValid = valid; 
     63    } 
     64 
    5565    @NotNull 
    5666    private Long _id; 
     67    private int _isValid; 
    5768    @NotNull 
    5869    private Preference _preference; 
  • tapas/service/implementation/com/ether/TapasServiceImpl.java

    r783 r816  
    1 package com.ether; 
    2  
    3 import com.ether.dao.ObservatoryDAO; 
    4 import com.ether.dao.TapasRequestDAO; 
    5 import com.ether.tapas.Los; 
    6 import com.ether.tapas.Observatory; 
    7 import com.ether.tapas.Request; 
    8 import com.ether.tapas.Tapas; 
    9 import com.ether.tapas.TapasRequest; 
    10 import com.ether.user.User; 
    11 import org.apache.commons.logging.Log; 
    12 import org.apache.commons.logging.LogFactory; 
    13 import org.jdom.Attribute; 
    14 import org.jdom.Document; 
    15 import org.jdom.Element; 
    16 import org.jdom.output.Format; 
    17 import org.jdom.output.XMLOutputter; 
    18 import org.jetbrains.annotations.NotNull; 
    19 import org.jetbrains.annotations.Nullable; 
    20 import org.springframework.beans.factory.annotation.Required; 
    21 import org.springframework.transaction.annotation.Transactional; 
    22  
    23 import java.io.FileOutputStream; 
    24 import java.io.IOException; 
    25 import java.text.ParseException; 
    26 import java.text.SimpleDateFormat; 
    27 import java.util.ArrayList; 
    28 import java.util.Calendar; 
    29 import java.util.Date; 
    30 import java.util.List; 
    31 import java.util.Properties; 
    32  
    33 //import java.sql.Date; 
    34  
    35 /** 
    36  * @author rboipsl 
    37  * @date 2 mars 2012 
    38  */ 
    39 public class TapasServiceImpl 
    40         extends BackofficeServiceImpl 
    41         implements TapasService 
    42 { 
    43     @Transactional(readOnly = true) 
    44     public void createXMLRequest( @NotNull final Tapas fTapas, @NotNull final Properties prop ) 
    45             throws ServiceException 
    46    { 
    47  
    48         final String servicePath = prop.getProperty( "service_path" ); 
    49         //final String srcPath = prop.getProperty( "src_path" ); 
    50         final String dataPath = prop.getProperty( "data_path" ); 
    51  
    52         //final String fichier = servicePath + "/" + "request.xml"; 
    53         final Element tapas = new Element( "tapas" ); 
    54         final List<Element> listRequest = new ArrayList<Element>( fTapas.getRequests().size() ); 
    55  
    56         //On crée un nouveau Document JDOM basé sur la racine que l'on vient de créer 
    57         final Document document = new Document( tapas ); 
    58  
    59         //recuperation valeur id requete (bdd table tapas_request) 
    60         fTapas.setId( "Ether_TAPAS_" + String.valueOf( getNumRequest() ) ); 
    61  
    62         final Attribute id = new Attribute( "Id", fTapas.getId() ); 
    63         tapas.setAttribute( id ); 
    64  
    65         //a terme devient une boucle 
    66         final List<Request> requests = fTapas.getRequests(); 
    67  
    68         for( final Request iRequest : requests ) 
    69         { 
    70  
    71             final Element request = new Element( "request" ); 
    72             // Id de la request 
    73             final Attribute idR = new Attribute( "Id", iRequest.getId().toString() ); 
    74             request.setAttribute( idR ); 
    75  
    76             // PREFERENCES 
    77             final Element preferences = new Element( "preferences" ); 
    78  
    79  
    80             //format 
    81             final Element format = new Element( "format" ); 
    82             //final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() ); 
    83             final Attribute validF = new Attribute( "valid", "VO,ASCII,FITS,NETCDF" ); 
    84             format.setAttribute( validF ); 
    85             format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 
    86             preferences.addContent( format ); 
    87  
    88  
    89             //rayleighExtinction 
    90             final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 
    91             //final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() ); 
    92             Attribute validR = new Attribute( "valid", "YES,NO" ); 
    93             rayleighExtinction.setAttribute( validR ); 
    94             rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() ); 
    95             preferences.addContent( rayleighExtinction ); 
    96  
    97             //h2o 
    98             final Element h2oe = new Element( "h2o_extinction" ); 
    99             validR = new Attribute( "valid", "YES,NO" ); 
    100             h2oe.setAttribute( validR ); 
    101             h2oe.setText( iRequest.getPreference().getH2oExtinction().getSecondValue() ); 
    102             preferences.addContent( h2oe ); 
    103  
    104  
    105             //o3 
    106             final Element o3e = new Element( "o3_extinction" ); 
    107             validR = new Attribute( "valid", "YES,NO" ); 
    108             o3e.setAttribute( validR ); 
    109             o3e.setText( iRequest.getPreference().getO3Extinction().getSecondValue() ); 
    110             preferences.addContent( o3e ); 
    111  
    112             //o2 
    113             final Element o2e = new Element( "o2_extinction" ); 
    114             validR = new Attribute( "valid", "YES,NO" ); 
    115             o2e.setAttribute( validR ); 
    116             o2e.setText( iRequest.getPreference().getO2Extinction().getSecondValue() ); 
    117             preferences.addContent( o2e ); 
    118  
    119  
    120             //co2 
    121             final Element co2e = new Element( "co2_extinction" ); 
    122             validR = new Attribute( "valid", "YES,NO" ); 
    123             co2e.setAttribute( validR ); 
    124             co2e.setText( iRequest.getPreference().getCo2Extinction().getSecondValue() ); 
    125             preferences.addContent( co2e ); 
    126  
    127             //ch4 
    128             final Element ch4e = new Element( "ch4_extinction" ); 
    129             validR = new Attribute( "valid", "YES,NO" ); 
    130             ch4e.setAttribute( validR ); 
    131             ch4e.setText( iRequest.getPreference().getCh4Extinction().getSecondValue() ); 
    132             preferences.addContent( ch4e ); 
    133  
    134             //no2 
    135             final Element n2oe = new Element( "n2o_extinction" ); 
    136             validR = new Attribute( "valid", "YES,NO" ); 
    137             n2oe.setAttribute( validR ); 
    138             n2oe.setText( iRequest.getPreference().getN2oExtinction().getSecondValue() ); 
    139             preferences.addContent( n2oe ); 
    140  
    141  
    142             request.addContent( preferences ); 
    143  
    144             // OBSERVATORIES 
    145             final Element observation = new Element( "observation" ); 
    146  
    147             // date mesure 
    148             final Element mdate = new Element( "date" ); 
    149             final Calendar calendar = Calendar.getInstance(); 
    150  
    151             calendar.setTimeInMillis( Long.valueOf( iRequest.getObservation().getDate() ) ); 
    152             final String dateFormatFinal=DateHelper.formatDate( calendar.getTime(), DateHelper.DATE_UTC ); 
    153  
    154             mdate.setText( dateFormatFinal ); 
    155  
    156 //            mdate.setText( iRequest.getObservation().getDate() ); 
    157             observation.addContent( mdate ); 
    158  
    159             //observatoire 
    160             final Element observatory = new Element( "observatory" ); 
    161             observation.addContent( observatory ); 
    162  
    163             //recuperation des coordonnées de l'observatoire 
    164             final Observatory obs; 
    165             try 
    166             { 
    167                 //obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 
    168                 obs = _observatoryDAO.getObservatoryByName( iRequest.getObservation().getObservatory().getName() ); 
     1    package com.ether; 
     2 
     3    import com.ether.dao.ObservatoryDAO; 
     4    import com.ether.dao.TapasRequestDAO; 
     5    import com.ether.tapas.Los; 
     6    import com.ether.tapas.Location; 
     7    import com.ether.tapas.Observation; 
     8    import com.ether.tapas.Observatory; 
     9    import com.ether.tapas.Preference; 
     10    import com.ether.tapas.Request; 
     11    import com.ether.tapas.Tapas; 
     12    import com.ether.tapas.TapasRequest; 
     13    import com.ether.user.User; 
     14    import org.apache.commons.logging.Log; 
     15    import org.apache.commons.logging.LogFactory; 
     16    import org.jdom.Attribute; 
     17    import org.jdom.Document; 
     18    import org.jdom.Element; 
     19    import org.jdom.output.Format; 
     20    import org.jdom.output.XMLOutputter; 
     21    import org.jetbrains.annotations.NotNull; 
     22    import org.jetbrains.annotations.Nullable; 
     23    import org.springframework.beans.factory.annotation.Required; 
     24    import org.springframework.transaction.annotation.Transactional; 
     25 
     26    import java.io.FileOutputStream; 
     27    import java.io.IOException; 
     28    import java.text.ParseException; 
     29    import java.text.SimpleDateFormat; 
     30    import java.util.ArrayList; 
     31    import java.util.Calendar; 
     32    import java.util.Date; 
     33    import java.util.Iterator; 
     34    import java.util.List; 
     35    import java.util.Properties; 
     36    import java.util.StringTokenizer; 
     37 
     38    //import java.sql.Date; 
     39 
     40    /** 
     41     * @author rboipsl 
     42     * @date 2 mars 2012 
     43     */ 
     44    public class TapasServiceImpl 
     45            extends BackofficeServiceImpl 
     46            implements TapasService 
     47    { 
     48        @Transactional(readOnly = true) 
     49        public void createXMLRequest( @NotNull final Tapas fTapas, @NotNull final Properties prop ) 
     50                throws ServiceException 
     51        { 
     52            final String servicePath = prop.getProperty( "service_path" ); 
     53            //final String srcPath = prop.getProperty( "src_path" ); 
     54            final String dataPath = prop.getProperty( "data_path" ); 
     55 
     56            //final String fichier = servicePath + "/" + "request.xml"; 
     57            final Element tapas = new Element( "tapas" ); 
     58            final List<Element> listRequest = new ArrayList<Element>( fTapas.getRequests().size() ); 
     59 
     60            //On crée un nouveau Document JDOM basé sur la racine que l'on vient de créer 
     61            final Document document = new Document( tapas ); 
     62 
     63            //recuperation valeur id requete (bdd table tapas_request) 
     64            fTapas.setId( "Ether_TAPAS_" + String.valueOf( getNumRequest() ) ); 
     65 
     66            final Attribute id = new Attribute( "Id", fTapas.getId() ); 
     67            tapas.setAttribute( id ); 
     68 
     69            //a terme devient une boucle 
     70            final List<Request> requests = fTapas.getRequests(); 
     71            Request xRequest, nRequest; 
     72 
     73            String iname; 
     74 
     75            Iterator<Request> iter = requests.iterator(); 
     76 
     77            int iii = requests.size(); 
     78            int inr = 0; 
     79            int indice = 1; 
     80            //Request xRequest = iter.next(); 
     81            String oneTransmission; 
     82 
     83 
     84            while ( indice <= iii ) 
     85            { 
     86               nRequest = iter.next(); 
     87               nRequest.setValid( 1 ); 
     88 
     89               oneTransmission = nRequest.getPreference().getOneTransmission().getSecondValue(); 
     90 
     91               if( oneTransmission.equalsIgnoreCase( "NO" ) ) 
     92                { 
     93                    nRequest.setValid( -1 ); 
     94                    if( nRequest.getPreference().getH2oExtinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 
     95                    { 
     96                        requests.add( addNewRequest( nRequest, (iii+inr+1), "H2O") ); 
     97                        inr = inr + 1; 
     98                        iter = requests.iterator(); 
     99                        /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 
     100                        { 
     101                            nRequest = iter.next(); 
     102                        }*/ 
     103                    } 
     104 
     105 
     106                    if( nRequest.getPreference().getCh4Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 
     107                    { 
     108                        requests.add( addNewRequest( nRequest, (iii+inr+1), "CH4" ) ); 
     109                        inr = inr + 1; 
     110                        iter = requests.iterator(); 
     111                        /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 
     112                        { 
     113                            nRequest = iter.next(); 
     114                        }*/ 
     115                    } 
     116 
     117 
     118                    if( nRequest.getPreference().getCo2Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 
     119                    { 
     120                        requests.add( addNewRequest( nRequest, (iii+inr+1), "CO2" ) ); 
     121                        inr = inr + 1; 
     122                        iter = requests.iterator(); 
     123                        /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 
     124                        { 
     125                            nRequest = iter.next(); 
     126                        }*/ 
     127                    } 
     128 
     129 
     130                    if( nRequest.getPreference().getN2oExtinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 
     131                    { 
     132                        requests.add( addNewRequest( nRequest, (iii+inr+1), "N2O" ) ); 
     133                        inr = inr + 1; 
     134                        iter = requests.iterator(); 
     135                        /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 
     136                        { 
     137                            nRequest = iter.next(); 
     138                        }*/ 
     139                    } 
     140 
     141 
     142                    if( nRequest.getPreference().getO2Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 
     143                    { 
     144                        requests.add( addNewRequest( nRequest, (iii+inr+1), "O2" ) ); 
     145                        iter = requests.iterator(); 
     146                        inr = inr + 1; 
     147                        iter = requests.iterator(); 
     148                        /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 
     149                        { 
     150                            nRequest = iter.next(); 
     151                        }*/ 
     152                    } 
     153 
     154 
     155                    if( nRequest.getPreference().getO3Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 
     156                    { 
     157                        requests.add( addNewRequest( nRequest, (iii+inr+1), "O3" ) ); 
     158                        iter = requests.iterator(); 
     159                        inr = inr + 1; 
     160                        iter = requests.iterator(); 
     161                        /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 
     162                        { 
     163                            nRequest = iter.next(); 
     164                        }*/ 
     165                    } 
     166                } 
     167 
     168                iter = requests.iterator(); 
     169                indice=indice+1; 
     170                for (int i = 1 ; i < indice ; i++) 
     171                { 
     172                    nRequest = iter.next(); 
     173                } 
     174            } 
     175 
     176 
     177            indice=1; 
     178 
     179            //// 
     180            for( final Request iRequest : requests ) 
     181            { 
     182                if (iRequest.getValid() != -1) { 
     183 
     184                    final Element request = new Element( "request" ); 
     185                    // Id de la request 
     186                    //final Attribute idR = new Attribute( "Id", (Long) iRequest.getId().toString() ); 
     187                    final Attribute idR = new Attribute( "Id", String.valueOf(indice) ); 
     188                    request.setAttribute( idR ); 
     189 
     190                    // PREFERENCES 
     191                    final Element preferences = new Element( "preferences" ); 
     192 
     193 
     194                    //format 
     195                    final Element format = new Element( "format" ); 
     196                    //final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() ); 
     197                    final Attribute validF = new Attribute( "valid", "VO,ASCII,FITS,NETCDF" ); 
     198                    format.setAttribute( validF ); 
     199                    format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 
     200                    preferences.addContent( format ); 
     201 
     202 
     203                    //rayleighExtinction 
     204                    final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 
     205                    //final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() ); 
     206                    Attribute validR = new Attribute( "valid", "YES,NO" ); 
     207                    rayleighExtinction.setAttribute( validR ); 
     208                    rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() ); 
     209                    preferences.addContent( rayleighExtinction ); 
     210 
     211                    //h2o 
     212                    final Element h2oe = new Element( "h2o_extinction" ); 
     213                    validR = new Attribute( "valid", "YES,NO" ); 
     214                    h2oe.setAttribute( validR ); 
     215                    h2oe.setText( iRequest.getPreference().getH2oExtinction().getSecondValue() ); 
     216                    preferences.addContent( h2oe ); 
     217 
     218 
     219                    //o3 
     220                    final Element o3e = new Element( "o3_extinction" ); 
     221                    validR = new Attribute( "valid", "YES,NO" ); 
     222                    o3e.setAttribute( validR ); 
     223                    o3e.setText( iRequest.getPreference().getO3Extinction().getSecondValue() ); 
     224                    preferences.addContent( o3e ); 
     225 
     226                    //o2 
     227                    final Element o2e = new Element( "o2_extinction" ); 
     228                    validR = new Attribute( "valid", "YES,NO" ); 
     229                    o2e.setAttribute( validR ); 
     230                    o2e.setText( iRequest.getPreference().getO2Extinction().getSecondValue() ); 
     231                    preferences.addContent( o2e ); 
     232 
     233 
     234                    //co2 
     235                    final Element co2e = new Element( "co2_extinction" ); 
     236                    validR = new Attribute( "valid", "YES,NO" ); 
     237                    co2e.setAttribute( validR ); 
     238                    co2e.setText( iRequest.getPreference().getCo2Extinction().getSecondValue() ); 
     239                    preferences.addContent( co2e ); 
     240 
     241                    //ch4 
     242                    final Element ch4e = new Element( "ch4_extinction" ); 
     243                    validR = new Attribute( "valid", "YES,NO" ); 
     244                    ch4e.setAttribute( validR ); 
     245                    ch4e.setText( iRequest.getPreference().getCh4Extinction().getSecondValue() ); 
     246                    preferences.addContent( ch4e ); 
     247 
     248                    //no2 
     249                    final Element n2oe = new Element( "n2o_extinction" ); 
     250                    validR = new Attribute( "valid", "YES,NO" ); 
     251                    n2oe.setAttribute( validR ); 
     252                    n2oe.setText( iRequest.getPreference().getN2oExtinction().getSecondValue() ); 
     253                    preferences.addContent( n2oe ); 
     254 
     255 
     256                    request.addContent( preferences ); 
     257 
     258                    // OBSERVATORIES 
     259                    final Element observation = new Element( "observation" ); 
     260 
     261                    // date mesure 
     262                    final Element mdate = new Element( "date" ); 
     263                    final Calendar calendar = Calendar.getInstance(); 
     264 
     265                    calendar.setTimeInMillis( Long.valueOf( iRequest.getObservation().getDate() ) ); 
     266                    final String dateFormatFinal=DateHelper.formatDate( calendar.getTime(), DateHelper.DATE_UTC ); 
     267 
     268                    mdate.setText( dateFormatFinal ); 
     269 
     270                    //mdate.setText( iRequest.getObservation().getDate() ); 
     271                    observation.addContent( mdate ); 
     272 
     273                    //observatoire ou lieu libre en indiquant alt,lat,lon 
     274                    final Element observatory = new Element( "observatory" ); 
     275                    observation.addContent( observatory ); 
     276 
     277                    //recuperation des coordonnées de l'observatoire 
     278                    final Observatory obs; 
     279                    try 
     280                    { 
     281                        //obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 
     282                        obs = _observatoryDAO.getObservatoryByName( iRequest.getObservation().getObservatory().getName() ); 
     283                    } 
     284                    catch( PersistenceException e ) 
     285                    { 
     286                        throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
     287                    } 
     288 
     289                    ////// a tester //// 
     290 
     291                    final Element name = new Element( "name" ); 
     292 
     293                    final Element longitude = new Element( "longitude" ); 
     294                    validR = new Attribute( "min", "-180" ); 
     295                    longitude.setAttribute( validR ); 
     296                    validR = new Attribute( "max", "180" ); 
     297                    longitude.setAttribute( validR ); 
     298 
     299                    final Element latitude = new Element( "latitude" ); 
     300                    validR = new Attribute( "min", "-90" ); 
     301                    latitude.setAttribute( validR ); 
     302                    validR = new Attribute( "max", "90" ); 
     303                    latitude.setAttribute( validR ); 
     304 
     305                    final Element altitude = new Element( "altitude" ); 
     306                    validR = new Attribute( "min", "0" ); 
     307                    altitude.setAttribute( validR ); 
     308                    validR = new Attribute( "max", "10000" ); 
     309                    altitude.setAttribute( validR ); 
     310 
     311                    String shortName=""; 
     312 
     313                     if (null == obs) 
     314                    { 
     315                        //lieu libre 
     316                        name.setText(iRequest.getObservation().getLocation().getName()); 
     317                        altitude.setText( iRequest.getObservation().getLocation().getAltitude().toString() ); 
     318                        latitude.setText( iRequest.getObservation().getLocation().getLatitude().toString() ); 
     319                        longitude.setText( iRequest.getObservation().getLocation().getLongitude().toString() ); 
     320                        shortName = iRequest.getObservation().getLocation().getName(); 
     321                    } 
     322                    else { 
     323                        //observatoire connu de la bdd tapas 
     324                        name.setText( obs.getName() ); 
     325                        longitude.setText( obs.getLongitude().toString() ); 
     326                        latitude.setText( obs.getLatitude().toString() ); 
     327                        altitude.setText( obs.getAltitude().toString() ); 
     328                        shortName = obs.getShortName().toString(); 
     329                    } 
     330 
     331 
     332                    observatory.addContent( name ); 
     333                    observatory.addContent( latitude ); 
     334                    observatory.addContent( longitude ); 
     335                    observatory.addContent( altitude ); 
     336 
     337 
     338                    //los           addN 
     339                    final Element los = new Element( "los" ); 
     340                    observation.addContent( los ); 
     341 
     342                    Los temp = iRequest.getObservation().getLos(); 
     343                    if ( !temp.getRaJ2000().equals( "" )) { 
     344                        final Element ra_j2000 = new Element( "ra_j2000" ); 
     345                        ra_j2000.setText( iRequest.getObservation().getLos().getRaJ2000() ); 
     346                        los.addContent( ra_j2000 ); 
     347                    } 
     348 
     349                    if ( !temp.getDecJ2000().equals( "" )) { 
     350                        final Element dec_j2000 = new Element( "dec_j2000" ); 
     351                        dec_j2000.setText( iRequest.getObservation().getLos().getDecJ2000() ); 
     352                        los.addContent( dec_j2000 ); 
     353                    } 
     354 
     355 
     356                    if ( !temp.getZenithAngle().equals("") ) { 
     357                        final Element zenith_angle = new Element( "zenith_angle" ); 
     358 
     359                        Attribute a1 = new Attribute( "min", "0" ); 
     360                        Attribute a2 = new Attribute( "max", "90" ); 
     361 
     362                        zenith_angle.setAttribute( a1 ); 
     363                        zenith_angle.setAttribute( a2 ); 
     364                        zenith_angle.setText( temp.getZenithAngle() ); 
     365 
     366                        los.addContent( zenith_angle ); 
     367                    } 
     368 
     369 
     370                    //instrument 
     371                    final Element instrument = new Element( "instrument" ); 
     372                    observation.addContent( instrument ); 
     373 
     374                    final Element spectral_choice = new Element( "spectral_choice" ); 
     375 
     376 
     377                    final String[] tabMess = iRequest.getObservation().getInstrument().getSpectralChoice().getFirstValue().split( "," ); 
     378 
     379                    String chValid = ""; 
     380                    int i; 
     381 
     382                    for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 
     383                    { 
     384                        if( i == tabMess.length - 1 ) 
     385                            chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); 
     386                        else chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ) + ","; 
     387                    } 
     388 
     389 
     390                    Attribute a3 = new Attribute( "valid", chValid ); 
     391 
     392                    spectral_choice.setAttribute( a3 ); 
     393                    final String message = EtherHelper.getMessage( "label.spectralUnit." + iRequest.getObservation().getInstrument().getSpectralChoice().getSecondValue(), null ); 
     394                    spectral_choice.setText( message ); 
     395                    instrument.addContent( spectral_choice ); 
     396 
     397                    final Element spectral_range = new Element( "spectral_range" ); 
     398                    spectral_range.setText( iRequest.getObservation().getInstrument().getSpectralRange() ); 
     399                    instrument.addContent( spectral_range ); 
     400 
     401 
     402                    // 
     403                    final Element ilsfChoice = new Element( "ilsf_choice" ); 
     404                    validR = new Attribute( "valid", iRequest.getObservation().getInstrument().getIlsfChoice().getFirstValue() ); 
     405                    ilsfChoice.setAttribute( validR ); 
     406                    //selectInstrumentalFunctions 
     407                    ilsfChoice.setText( String.valueOf( iRequest.getObservation().getInstrument().getIlsfChoice().getSecondValue() ) ); 
     408                    instrument.addContent( ilsfChoice ); 
     409 
     410 
     411                    final Element resolvingPower = new Element( "resolving_power" ); 
     412                    validR = new Attribute( "min", "0" ); 
     413                    resolvingPower.setAttribute( validR ); 
     414                    resolvingPower.setText( String.valueOf( iRequest.getObservation().getInstrument().getResolvingPower().getSecondValue() ) ); 
     415                    instrument.addContent( resolvingPower ); 
     416 
     417                    final Element samplingRatio = new Element( "sampling_ratio" ); 
     418                    validR = new Attribute( "min", "0" ); 
     419                    samplingRatio.setAttribute( validR ); 
     420                    samplingRatio.setText( String.valueOf( iRequest.getObservation().getInstrument().getSamplingRatio().getSecondValue() ) ); 
     421                    instrument.addContent( samplingRatio ); 
     422 
     423                    //berv correction 
     424                    //final Element bervCorr = new Element( "berv_correction" ); 
     425                    final Element bervCorr = new Element( "apply_berv" ); 
     426                    validR = new Attribute( "valid", "YES,NO" ); 
     427                    bervCorr.setAttribute( validR ); 
     428                    bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 
     429                    instrument.addContent( bervCorr ); 
     430 
     431 
     432                    request.addContent( observation ); 
     433 
     434                    //atmosphere 
     435                    final Element atmosphere = new Element( "atmosphere" ); 
     436                    request.addContent( atmosphere ); 
     437 
     438                    //reference 
     439                    final Element reference = new Element( "reference" ); 
     440                    validR = new Attribute( "valid", "0,1,2,3,4,5,6" ); 
     441                    reference.setAttribute( validR ); 
     442                    reference.setText( String.valueOf( iRequest.getAtmosphere().getReference().getSecondValue() ) ); 
     443                    atmosphere.addContent( reference ); 
     444 
     445 
     446                    String fileArletty = "", fileECMWF = ""; 
     447 
     448 
     449                    fileArletty = dataPath + "/" + createFileName( dateFormatFinal , "arletty", shortName ); 
     450                    fileECMWF = dataPath + "/" + createFileName( dateFormatFinal, "ecmwf", shortName ); 
     451 
     452                    final Element arlettyFile = new Element( "arletty_file" ); 
     453                    arlettyFile.setText( fileArletty ); 
     454                    atmosphere.addContent( arlettyFile ); 
     455 
     456                    final Element ecmwfFile = new Element( "ecmwf_file" ); 
     457                    ecmwfFile.setText( fileECMWF ); 
     458                    atmosphere.addContent( ecmwfFile ); 
     459 
     460                    listRequest.add( request ); 
     461 
     462                    indice=indice+1; 
     463                } 
     464            } 
     465 
     466 
     467 
     468            ////////// 
     469            ///////// 
     470            /*for( final Request iRequest : requests ) 
     471            { 
     472                final Element request = new Element( "request" ); 
     473                // Id de la request 
     474                final Attribute idR = new Attribute( "Id", iRequest.getId().toString() ); 
     475                request.setAttribute( idR ); 
     476 
     477                // PREFERENCES 
     478                final Element preferences = new Element( "preferences" ); 
     479 
     480 
     481                //format 
     482                final Element format = new Element( "format" ); 
     483                //final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() ); 
     484                final Attribute validF = new Attribute( "valid", "VO,ASCII,FITS,NETCDF" ); 
     485                format.setAttribute( validF ); 
     486                format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 
     487                preferences.addContent( format ); 
     488 
     489 
     490                //rayleighExtinction 
     491                final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 
     492                //final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() ); 
     493                Attribute validR = new Attribute( "valid", "YES,NO" ); 
     494                rayleighExtinction.setAttribute( validR ); 
     495                rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() ); 
     496                preferences.addContent( rayleighExtinction ); 
     497 
     498                //h2o 
     499                final Element h2oe = new Element( "h2o_extinction" ); 
     500                validR = new Attribute( "valid", "YES,NO" ); 
     501                h2oe.setAttribute( validR ); 
     502                h2oe.setText( iRequest.getPreference().getH2oExtinction().getSecondValue() ); 
     503                preferences.addContent( h2oe ); 
     504 
     505 
     506                //o3 
     507                final Element o3e = new Element( "o3_extinction" ); 
     508                validR = new Attribute( "valid", "YES,NO" ); 
     509                o3e.setAttribute( validR ); 
     510                o3e.setText( iRequest.getPreference().getO3Extinction().getSecondValue() ); 
     511                preferences.addContent( o3e ); 
     512 
     513                //o2 
     514                final Element o2e = new Element( "o2_extinction" ); 
     515                validR = new Attribute( "valid", "YES,NO" ); 
     516                o2e.setAttribute( validR ); 
     517                o2e.setText( iRequest.getPreference().getO2Extinction().getSecondValue() ); 
     518                preferences.addContent( o2e ); 
     519 
     520 
     521                //co2 
     522                final Element co2e = new Element( "co2_extinction" ); 
     523                validR = new Attribute( "valid", "YES,NO" ); 
     524                co2e.setAttribute( validR ); 
     525                co2e.setText( iRequest.getPreference().getCo2Extinction().getSecondValue() ); 
     526                preferences.addContent( co2e ); 
     527 
     528                //ch4 
     529                final Element ch4e = new Element( "ch4_extinction" ); 
     530                validR = new Attribute( "valid", "YES,NO" ); 
     531                ch4e.setAttribute( validR ); 
     532                ch4e.setText( iRequest.getPreference().getCh4Extinction().getSecondValue() ); 
     533                preferences.addContent( ch4e ); 
     534 
     535                //no2 
     536                final Element n2oe = new Element( "n2o_extinction" ); 
     537                validR = new Attribute( "valid", "YES,NO" ); 
     538                n2oe.setAttribute( validR ); 
     539                n2oe.setText( iRequest.getPreference().getN2oExtinction().getSecondValue() ); 
     540                preferences.addContent( n2oe ); 
     541 
     542 
     543                request.addContent( preferences ); 
     544 
     545                // OBSERVATORIES 
     546                final Element observation = new Element( "observation" ); 
     547 
     548                // date mesure 
     549                final Element mdate = new Element( "date" ); 
     550                final Calendar calendar = Calendar.getInstance(); 
     551 
     552                calendar.setTimeInMillis( Long.valueOf( iRequest.getObservation().getDate() ) ); 
     553                final String dateFormatFinal=DateHelper.formatDate( calendar.getTime(), DateHelper.DATE_UTC ); 
     554 
     555                mdate.setText( dateFormatFinal ); 
     556 
     557    //            mdate.setText( iRequest.getObservation().getDate() ); 
     558                observation.addContent( mdate ); 
     559 
     560                //observatoire ou lieu libre en indiquant alt,lat,lon 
     561                final Element observatory = new Element( "observatory" ); 
     562                observation.addContent( observatory ); 
     563 
     564                //recuperation des coordonnées de l'observatoire 
     565                final Observatory obs; 
     566                try 
     567                { 
     568                    //obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 
     569                    obs = _observatoryDAO.getObservatoryByName( iRequest.getObservation().getObservatory().getName() ); 
     570                } 
     571                catch( PersistenceException e ) 
     572                { 
     573                    throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
     574                } 
     575 
     576                ////// a tester //// 
     577 
     578                final Element name = new Element( "name" ); 
     579 
     580                final Element longitude = new Element( "longitude" ); 
     581                validR = new Attribute( "min", "-180" ); 
     582                longitude.setAttribute( validR ); 
     583                validR = new Attribute( "max", "180" ); 
     584                longitude.setAttribute( validR ); 
     585 
     586                final Element latitude = new Element( "latitude" ); 
     587                validR = new Attribute( "min", "-90" ); 
     588                latitude.setAttribute( validR ); 
     589                validR = new Attribute( "max", "90" ); 
     590                latitude.setAttribute( validR ); 
     591 
     592                final Element altitude = new Element( "altitude" ); 
     593                validR = new Attribute( "min", "0" ); 
     594                altitude.setAttribute( validR ); 
     595                validR = new Attribute( "max", "10000" ); 
     596                altitude.setAttribute( validR ); 
     597 
     598                String shortName=""; 
     599 
     600                if (null == obs) 
     601                { 
     602                    //lieu libre 
     603                    name.setText(iRequest.getObservation().getLocation().getName()); 
     604                    altitude.setText( iRequest.getObservation().getLocation().getAltitude().toString() ); 
     605                    latitude.setText( iRequest.getObservation().getLocation().getLatitude().toString() ); 
     606                    longitude.setText( iRequest.getObservation().getLocation().getLongitude().toString() ); 
     607                    shortName = iRequest.getObservation().getLocation().getName(); 
     608                } 
     609                else { 
     610                    //observatoire connu de la bdd tapas 
     611                    name.setText( obs.getName() ); 
     612                    longitude.setText( obs.getLongitude().toString() ); 
     613                    latitude.setText( obs.getLatitude().toString() ); 
     614                    altitude.setText( obs.getAltitude().toString() ); 
     615                    shortName = obs.getShortName().toString(); 
     616                } 
     617 
     618 
     619                observatory.addContent( name ); 
     620                observatory.addContent( latitude ); 
     621                observatory.addContent( longitude ); 
     622                observatory.addContent( altitude ); 
     623 
     624 
     625                //los           addN 
     626                final Element los = new Element( "los" ); 
     627                observation.addContent( los ); 
     628 
     629                Los temp = iRequest.getObservation().getLos(); 
     630                if ( !temp.getRaJ2000().equals( "" )) { 
     631                    final Element ra_j2000 = new Element( "ra_j2000" ); 
     632                    ra_j2000.setText( iRequest.getObservation().getLos().getRaJ2000() ); 
     633                    los.addContent( ra_j2000 ); 
     634                } 
     635 
     636                if ( !temp.getDecJ2000().equals( "" )) { 
     637                    final Element dec_j2000 = new Element( "dec_j2000" ); 
     638                    dec_j2000.setText( iRequest.getObservation().getLos().getDecJ2000() ); 
     639                    los.addContent( dec_j2000 ); 
     640                } 
     641 
     642 
     643                if ( !temp.getZenithAngle().equals("") ) { 
     644                    final Element zenith_angle = new Element( "zenith_angle" ); 
     645 
     646                    Attribute a1 = new Attribute( "min", "0" ); 
     647                    Attribute a2 = new Attribute( "max", "90" ); 
     648 
     649                    zenith_angle.setAttribute( a1 ); 
     650                    zenith_angle.setAttribute( a2 ); 
     651                    zenith_angle.setText( temp.getZenithAngle() ); 
     652 
     653                    los.addContent( zenith_angle ); 
     654                } 
     655 
     656 
     657                //instrument 
     658                final Element instrument = new Element( "instrument" ); 
     659                observation.addContent( instrument ); 
     660 
     661                final Element spectral_choice = new Element( "spectral_choice" ); 
     662 
     663 
     664                final String[] tabMess = iRequest.getObservation().getInstrument().getSpectralChoice().getFirstValue().split( "," ); 
     665 
     666                String chValid = ""; 
     667                int i; 
     668 
     669                for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 
     670                { 
     671                    if( i == tabMess.length - 1 ) 
     672                        chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); 
     673                    else chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ) + ","; 
     674                } 
     675 
     676 
     677                Attribute a3 = new Attribute( "valid", chValid ); 
     678 
     679                spectral_choice.setAttribute( a3 ); 
     680                final String message = EtherHelper.getMessage( "label.spectralUnit." + iRequest.getObservation().getInstrument().getSpectralChoice().getSecondValue(), null ); 
     681                spectral_choice.setText( message ); 
     682                instrument.addContent( spectral_choice ); 
     683 
     684                final Element spectral_range = new Element( "spectral_range" ); 
     685                spectral_range.setText( iRequest.getObservation().getInstrument().getSpectralRange() ); 
     686                instrument.addContent( spectral_range ); 
     687 
     688 
     689                // 
     690                final Element ilsfChoice = new Element( "ilsf_choice" ); 
     691                validR = new Attribute( "valid", iRequest.getObservation().getInstrument().getIlsfChoice().getFirstValue() ); 
     692                ilsfChoice.setAttribute( validR ); 
     693                //selectInstrumentalFunctions 
     694                ilsfChoice.setText( String.valueOf( iRequest.getObservation().getInstrument().getIlsfChoice().getSecondValue() ) ); 
     695                instrument.addContent( ilsfChoice ); 
     696 
     697 
     698                final Element resolvingPower = new Element( "resolving_power" ); 
     699                validR = new Attribute( "min", "0" ); 
     700                resolvingPower.setAttribute( validR ); 
     701                resolvingPower.setText( String.valueOf( iRequest.getObservation().getInstrument().getResolvingPower().getSecondValue() ) ); 
     702                instrument.addContent( resolvingPower ); 
     703 
     704                final Element samplingRatio = new Element( "sampling_ratio" ); 
     705                validR = new Attribute( "min", "0" ); 
     706                samplingRatio.setAttribute( validR ); 
     707                samplingRatio.setText( String.valueOf( iRequest.getObservation().getInstrument().getSamplingRatio().getSecondValue() ) ); 
     708                instrument.addContent( samplingRatio ); 
     709 
     710                //berv correction 
     711                //final Element bervCorr = new Element( "berv_correction" ); 
     712                final Element bervCorr = new Element( "apply_berv" ); 
     713                validR = new Attribute( "valid", "YES,NO" ); 
     714                bervCorr.setAttribute( validR ); 
     715                bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 
     716                instrument.addContent( bervCorr ); 
     717 
     718 
     719                request.addContent( observation ); 
     720 
     721                //atmosphere 
     722                final Element atmosphere = new Element( "atmosphere" ); 
     723                request.addContent( atmosphere ); 
     724 
     725                //reference 
     726                final Element reference = new Element( "reference" ); 
     727                validR = new Attribute( "valid", "0,1,2,3,4,5,6" ); 
     728                reference.setAttribute( validR ); 
     729                reference.setText( String.valueOf( iRequest.getAtmosphere().getReference().getSecondValue() ) ); 
     730                atmosphere.addContent( reference ); 
     731 
     732 
     733                String fileArletty = "", fileECMWF = ""; 
     734 
     735 
     736                fileArletty = dataPath + "/" + createFileName( dateFormatFinal , "arletty", shortName ); 
     737                fileECMWF = dataPath + "/" + createFileName( dateFormatFinal, "ecmwf", shortName ); 
     738 
     739                final Element arlettyFile = new Element( "arletty_file" ); 
     740                arlettyFile.setText( fileArletty ); 
     741                atmosphere.addContent( arlettyFile ); 
     742 
     743                final Element ecmwfFile = new Element( "ecmwf_file" ); 
     744                ecmwfFile.setText( fileECMWF ); 
     745                atmosphere.addContent( ecmwfFile ); 
     746 
     747                listRequest.add( request ); 
     748            }*/ 
     749 
     750 
     751 
     752 
     753            ///// 
     754            /////// 
     755 
     756 
     757 
     758            tapas.addContent( listRequest ); 
     759 
     760            String commandePath = servicePath + "/" + fTapas.getId(); 
     761            createXMLFile( document, commandePath, prop ); 
     762        } 
     763 
     764        @Transactional(readOnly = true) 
     765        public void createUserFtpDir( @NotNull final User user, @NotNull final Properties prop ) 
     766                throws ServiceException 
     767        { 
     768            final String usersPath = prop.getProperty( "users_path" ); 
     769            String commande = "mkdir -p " + usersPath + "/" + user.getEmail(); 
     770 
     771            try 
     772            { 
     773                EtherHelper.execProcess( commande ); 
     774            } 
     775            catch( FormattedException e ) 
     776            { 
     777            } 
     778 
     779            EtherHelper.pause( 4000 ); 
     780 
     781            //commande = "chown -R "+prop.getProperty( "chown_user" )+" "+usersPath+"/"+user.getEmail(); 
     782            commande = "chmod 777 -R " + usersPath + "/" + user.getEmail(); 
     783 
     784            try 
     785            { 
     786                EtherHelper.execProcess( commande ); 
     787            } 
     788            catch( FormattedException e ) 
     789            { 
     790            } 
     791 
     792            EtherHelper.pause( 4000 ); 
     793        } 
     794 
     795        public void createXMLFile( final Document document, final String commandePath, final Properties prop ) 
     796        { 
     797            try 
     798            { 
     799                //creation repertoire commande 
     800                try 
     801                { 
     802                    EtherHelper.execProcess( "mkdir -p " + commandePath ); 
     803                } 
     804                catch( FormattedException e ) 
     805                { 
     806                } 
     807 
     808                EtherHelper.pause( 5000 ); 
     809 
     810 
     811                /*try 
     812                { 
     813                    EtherHelper.execProcess( "chown "+prop.getProperty( "chown_user" )+" "+commandePath); 
     814                } 
     815                catch( FormattedException e ) 
     816                { 
     817 
     818                } */ 
     819 
     820                final String fichier = commandePath + "/" + "request.xml"; 
     821 
     822                //On utilise ici un affichage classique avec getPrettyFormat() 
     823                final XMLOutputter sortie = new XMLOutputter( Format.getPrettyFormat() ); 
     824                //Remarquez qu'il suffit simplement de créer une instance de FileOutputStream 
     825                //avec en argument le nom du fichier pour effectuer la sérialisation. 
     826                sortie.output( document, new FileOutputStream( fichier ) ); 
     827 
     828                /*try 
     829                { 
     830                    EtherHelper.execProcess( "chmod 755 "+commandePath+"/"+"request.xml" ); 
     831                } 
     832                catch( FormattedException e ) 
     833                { 
     834 
     835                } 
     836 
     837                EtherHelper.pause(7000); 
     838                */ 
     839            } 
     840            catch( IOException ignored ) 
     841            { 
     842            } 
     843        } 
     844 
     845        // liste tous observatoires 
     846        @Nullable 
     847        @Transactional(readOnly = true) 
     848        public List<Observatory> getAllObservatories() 
     849                throws ServiceException 
     850        { 
     851            try 
     852            { 
     853                return _observatoryDAO.getAllObservatories(); 
    169854            } 
    170855            catch( PersistenceException e ) 
     
    172857                throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
    173858            } 
    174  
    175  
    176             final Element name = new Element( "name" ); 
    177             name.setText( obs.getName() ); 
    178             observatory.addContent( name ); 
    179  
    180             final Element longitude = new Element( "longitude" ); 
    181             validR = new Attribute( "min", "-180" ); 
    182             longitude.setAttribute( validR ); 
    183             validR = new Attribute( "max", "180" ); 
    184             longitude.setAttribute( validR ); 
    185             longitude.setText( obs.getLongitude().toString() ); 
    186             observatory.addContent( longitude ); 
    187  
    188             final Element latitude = new Element( "latitude" ); 
    189             validR = new Attribute( "min", "-90" ); 
    190             latitude.setAttribute( validR ); 
    191             validR = new Attribute( "max", "90" ); 
    192             latitude.setAttribute( validR ); 
    193             latitude.setText( obs.getLatitude().toString() ); 
    194             observatory.addContent( latitude ); 
    195  
    196             final Element altitude = new Element( "altitude" ); 
    197             validR = new Attribute( "min", "0" ); 
    198             altitude.setAttribute( validR ); 
    199             validR = new Attribute( "max", "10000" ); 
    200             altitude.setAttribute( validR ); 
    201             altitude.setText( obs.getAltitude().toString() ); 
    202             observatory.addContent( altitude ); 
    203  
    204  
    205             //los 
    206             final Element los = new Element( "los" ); 
    207             observation.addContent( los ); 
    208  
    209             Los temp = iRequest.getObservation().getLos(); 
    210             if ( !temp.getRaJ2000().equals( "" )) { 
    211                 final Element ra_j2000 = new Element( "ra_j2000" ); 
    212                 ra_j2000.setText( iRequest.getObservation().getLos().getRaJ2000() ); 
    213                 los.addContent( ra_j2000 ); 
    214             } 
    215  
    216             if ( !temp.getDecJ2000().equals( "" )) { 
    217                 final Element dec_j2000 = new Element( "dec_j2000" ); 
    218                 dec_j2000.setText( iRequest.getObservation().getLos().getDecJ2000() ); 
    219                 los.addContent( dec_j2000 ); 
    220             } 
    221  
    222  
    223             if ( !temp.getZenithAngle().equals("") ) { 
    224                 final Element zenith_angle = new Element( "zenith_angle" ); 
    225  
    226                 Attribute a1 = new Attribute( "min", "0" ); 
    227                 Attribute a2 = new Attribute( "max", "90" ); 
    228  
    229                 zenith_angle.setAttribute( a1 ); 
    230                 zenith_angle.setAttribute( a2 ); 
    231                 zenith_angle.setText( temp.getZenithAngle() ); 
    232  
    233                 los.addContent( zenith_angle ); 
    234             } 
    235  
    236  
    237             //instrument 
    238             final Element instrument = new Element( "instrument" ); 
    239             observation.addContent( instrument ); 
    240  
    241             final Element spectral_choice = new Element( "spectral_choice" ); 
    242  
    243  
    244             final String[] tabMess = iRequest.getObservation().getInstrument().getSpectralChoice().getFirstValue().split( "," ); 
    245  
    246             String chValid = ""; 
    247             int i; 
    248  
    249             for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 
    250             { 
    251                 if( i == tabMess.length - 1 ) 
    252                     chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); 
    253                 else chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ) + ","; 
    254             } 
    255  
    256  
    257             Attribute a3 = new Attribute( "valid", chValid ); 
    258  
    259             spectral_choice.setAttribute( a3 ); 
    260             final String message = EtherHelper.getMessage( "label.spectralUnit." + iRequest.getObservation().getInstrument().getSpectralChoice().getSecondValue(), null ); 
    261             spectral_choice.setText( message ); 
    262             instrument.addContent( spectral_choice ); 
    263  
    264             final Element spectral_range = new Element( "spectral_range" ); 
    265             spectral_range.setText( iRequest.getObservation().getInstrument().getSpectralRange() ); 
    266             instrument.addContent( spectral_range ); 
    267  
    268  
    269             // 
    270             final Element ilsfChoice = new Element( "ilsf_choice" ); 
    271             validR = new Attribute( "valid", iRequest.getObservation().getInstrument().getIlsfChoice().getFirstValue() ); 
    272             ilsfChoice.setAttribute( validR ); 
    273             //selectInstrumentalFunctions 
    274             ilsfChoice.setText( String.valueOf( iRequest.getObservation().getInstrument().getIlsfChoice().getSecondValue() ) ); 
    275             instrument.addContent( ilsfChoice ); 
    276  
    277  
    278             final Element resolvingPower = new Element( "resolving_power" ); 
    279             validR = new Attribute( "min", "0" ); 
    280             resolvingPower.setAttribute( validR ); 
    281             resolvingPower.setText( String.valueOf( iRequest.getObservation().getInstrument().getResolvingPower().getSecondValue() ) ); 
    282             instrument.addContent( resolvingPower ); 
    283  
    284             final Element samplingRatio = new Element( "sampling_ratio" ); 
    285             validR = new Attribute( "min", "0" ); 
    286             samplingRatio.setAttribute( validR ); 
    287             samplingRatio.setText( String.valueOf( iRequest.getObservation().getInstrument().getSamplingRatio().getSecondValue() ) ); 
    288             instrument.addContent( samplingRatio ); 
    289  
    290             //berv correction 
    291             //final Element bervCorr = new Element( "berv_correction" ); 
    292             final Element bervCorr = new Element( "apply_berv" ); 
    293             validR = new Attribute( "valid", "YES,NO" ); 
    294             bervCorr.setAttribute( validR ); 
    295             bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 
    296             instrument.addContent( bervCorr ); 
    297  
    298  
    299             request.addContent( observation ); 
    300  
    301             //atmosphere 
    302             final Element atmosphere = new Element( "atmosphere" ); 
    303             request.addContent( atmosphere ); 
    304  
    305             //reference 
    306             final Element reference = new Element( "reference" ); 
    307             validR = new Attribute( "valid", "0,1,2,3,4,5,6" ); 
    308             reference.setAttribute( validR ); 
    309             reference.setText( String.valueOf( iRequest.getAtmosphere().getReference().getSecondValue() ) ); 
    310             atmosphere.addContent( reference ); 
    311  
    312  
    313             String fileArletty = "", fileECMWF = "", shortName = ""; 
    314             //rajouter annee/mois 
    315  
    316             shortName = obs.getShortName(); 
    317  
    318  
    319             fileArletty = dataPath + "/" + createFileName( dateFormatFinal , "arletty", shortName ); 
    320             fileECMWF = dataPath + "/" + createFileName( dateFormatFinal, "ecmwf", shortName ); 
    321  
    322             final Element arlettyFile = new Element( "arletty_file" ); 
    323             arlettyFile.setText( fileArletty ); 
    324             atmosphere.addContent( arlettyFile ); 
    325  
    326             final Element ecmwfFile = new Element( "ecmwf_file" ); 
    327             ecmwfFile.setText( fileECMWF ); 
    328             atmosphere.addContent( ecmwfFile ); 
    329  
    330             listRequest.add( request ); 
    331         } 
    332  
    333         tapas.addContent( listRequest ); 
    334  
    335         String commandePath = servicePath + "/" + fTapas.getId(); 
    336         createXMLFile( document, commandePath, prop ); 
    337  
    338  
     859        } 
     860 
     861        // recuperation infos observatoire avec l'id 
     862        @Nullable 
     863        @Transactional(readOnly = true) 
     864        public Observatory getObservatoryById( @NotNull final long id ) 
     865                throws ServiceException 
     866        { 
     867            try 
     868            { 
     869                return _observatoryDAO.getObservatoryById( id ); 
     870            } 
     871            catch( PersistenceException e ) 
     872            { 
     873                throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
     874            } 
     875        } 
     876 
     877        // recuperation infos observatoire avec le nom 
     878        @Nullable 
     879        @Transactional(readOnly = true) 
     880        public Observatory getObservatoryByName( @NotNull final String name ) 
     881                throws ServiceException 
     882        { 
     883            try 
     884            { 
     885                return _observatoryDAO.getObservatoryByName( name ); 
     886            } 
     887            catch( PersistenceException e ) 
     888            { 
     889                throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
     890            } 
     891        } 
     892 
     893        // recuperation infos observatoire avec le nom 
     894        @Nullable 
     895        @Transactional(readOnly = true) 
     896        public Long getNumRequest() 
     897                throws ServiceException 
     898        { 
     899            try 
     900            { 
     901                return _tapasRequestDAO.getNumRequest() + 1; 
     902            } 
     903            catch( PersistenceException e ) 
     904            { 
     905                throw new ServiceException( ServiceException.ServiceCode.REQUEST_NOT_FOUND, e ); 
     906            } 
     907        } 
     908 
     909        /*   public String findMeasureHour( String date ) 
     910    { 
     911    String heure; 
     912    int val; 
     913 
     914 
     915    val = Math.abs( Integer.parseInt( heure ) ); 
     916 
     917    return heure; 
     918    }                    */ 
     919 
     920        public String createFileName( String date, String type, String nomCourt ) 
     921        { 
     922            String fileName = ""; 
     923 
     924            String annee = date.substring( 0, 4 ); 
     925            //String mois = String.valueOf( Integer.parseInt(date.substring(5,7))-1); 
     926            String mois = date.substring( 5, 7 ); 
     927            String heure = date.substring( 11, 13 ); 
     928            String jour = date.substring( 8, 10 ); 
     929            String ind = ""; 
     930 
     931            Calendar cal = Calendar.getInstance(); 
     932 
     933            try 
     934            { 
     935                Date dd = new SimpleDateFormat( "dd/MM/yyyy HH:mm:ss" ).parse( jour + "/" + mois + "/" + annee + " " + heure + ":00:00" ); 
     936                cal.setTime( dd ); 
     937            } 
     938            catch( ParseException e ) 
     939            { 
     940            } 
     941 
     942            int iheure = cal.get( Calendar.HOUR_OF_DAY );// + 2; 
     943 
     944            if( iheure < 3 ) ind = "00"; 
     945            else if( iheure >= 21 ) 
     946            { 
     947                ind = "00"; 
     948                cal.add( Calendar.DAY_OF_MONTH, +1 ); 
     949            } 
     950            else if( Math.abs( 6 - iheure ) < 3 || iheure == 3 ) ind = "06"; 
     951            else if( Math.abs( 12 - iheure ) < 3 || iheure == 9 ) ind = "12"; 
     952            else if( Math.abs( 18 - iheure ) < 3 || iheure == 15 ) ind = "18"; 
     953 
     954            //+1 sur le mois pour recuperer le numero correct du mois considere 
     955            if( cal.get( Calendar.MONTH ) + 1 < 10 ) mois = "0" + String.valueOf( cal.get( Calendar.MONTH ) + 1 ); 
     956            else mois = "" + String.valueOf( cal.get( Calendar.MONTH ) + 1 ); 
     957 
     958            if( cal.get( Calendar.DAY_OF_MONTH ) < 10 ) jour = "0" + cal.get( Calendar.DAY_OF_MONTH ); 
     959            else jour = "" + cal.get( Calendar.DAY_OF_MONTH ); 
     960 
     961            annee = "" + cal.get( Calendar.YEAR ); 
     962 
     963            //fileName = "/" + annee + "/" + mois + "/" + jour + "/" + nomCourt + "_" + annee + mois + jour + ind; 
     964            fileName="/"+type+"/" + nomCourt + "_" + annee + mois + jour + ind; 
     965 
     966            if( type == "arletty" ) fileName = fileName + ".arl"; 
     967            else if( type == "ecmwf" ) fileName = fileName + "_qo3.txt"; 
     968 
     969            return fileName; 
     970        } 
     971 
     972        public boolean execAppelQSub( final String repCommande, User user, Properties prop ) 
     973                throws ServiceException 
     974        { 
     975            String commande = ""; 
     976            String commandePath = prop.getProperty( "service_path" ) + "/" + repCommande + "/"; 
     977 
     978            //copie run qsub dans repertoire commande 
     979            commande = "cp " + prop.getProperty( "src_path" ) + "/" + prop.getProperty( "process_name" ) + " " + commandePath; 
     980 
     981            try 
     982            { 
     983                EtherHelper.execProcess( commande ); 
     984            } 
     985            catch( FormattedException e ) 
     986            { 
     987            } 
     988 
     989            EtherHelper.pause( 7000 ); 
     990 
     991            //final String fichier = commandePath+"commande.txt"; 
     992 
     993            /*commande="chown -R www:www "+commandePath; 
     994 
     995            try 
     996            { 
     997                EtherHelper.execProcess( commande ); 
     998            } 
     999            catch( FormattedException e ) 
     1000            { 
     1001 
     1002            }*/ 
     1003 
     1004            EtherHelper.pause( 7000 ); 
     1005 
     1006            commande = "chmod 777 -R " + commandePath; 
     1007 
     1008            try 
     1009            { 
     1010                EtherHelper.execProcess( commande ); 
     1011            } 
     1012            catch( FormattedException e ) 
     1013            { 
     1014            } 
     1015 
     1016            EtherHelper.pause( 7000 ); 
     1017 
     1018            //execution qsub pour la commande en cours 
     1019            commande = commandePath + "/" + prop.getProperty( "process_name" ) + " -f request.xml" + " -m " + user.getEmail(); 
     1020 
     1021            /*PrintWriter out  = null; 
     1022            try 
     1023            { 
     1024                out = new PrintWriter(new FileWriter(fichier)); 
     1025                out.println(commande); 
     1026                out.close(); 
     1027            } 
     1028            catch( IOException e ) 
     1029            { 
     1030                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates. 
     1031            } */ 
     1032 
     1033 
     1034            /*commande = commandePath+"/"+prop.getProperty( "process_name" ); 
     1035            commande = "cd "+commandePath;*/ 
     1036 
     1037            try 
     1038            { 
     1039                EtherHelper.execProcess( commande ); 
     1040            } 
     1041            catch( FormattedException e ) 
     1042            { 
     1043                throw new ServiceException( ServiceException.ServiceCode.ERROR_PROCESS, e ); 
     1044            } 
     1045 
     1046            EtherHelper.pause( 7000 ); 
     1047 
     1048            return true; 
     1049        } 
     1050 
     1051        @NotNull 
     1052        @Transactional(rollbackFor = Exception.class) 
     1053        public Long insertTapasRequest( @NotNull final User user ) 
     1054                throws ServiceException 
     1055        { 
     1056            try 
     1057            { 
     1058                String dd = "1"; 
     1059 
     1060                final TapasRequest ntp = new TapasRequest( user.getFirstName(), user.getLastName(), dd, _tapasRequestDAO.getNumRequest() + 1 ); 
     1061                return _tapasRequestDAO.insert( ntp ); 
     1062            } 
     1063            catch( PersistenceException e ) 
     1064            { 
     1065                throw new ServiceException( ServiceException.ServiceCode.PERSISTENCE, e ); 
     1066            } 
     1067        } 
     1068 
     1069        @Transactional(readOnly = true) 
     1070        public void updateRequestGasTrace(Request iRequest, Pair<String, String> oldValuesCO2, Pair<String, String> oldValuesO2, Pair<String, String> oldValuesO3, Pair<String, String> oldValuesCH4, Pair<String, String> oldValuesN2O, Pair<String, String> oldValuesH20) 
     1071                throws ServiceException 
     1072        { 
     1073            iRequest.getPreference().setCo2Extinction(oldValuesCO2); 
     1074            iRequest.getPreference().setO2Extinction(oldValuesO2); 
     1075            iRequest.getPreference().setO3Extinction(oldValuesO3); 
     1076            iRequest.getPreference().setCh4Extinction(oldValuesCH4); 
     1077            iRequest.getPreference().setN2oExtinction(oldValuesN2O); 
     1078            iRequest.getPreference().setH2oExtinction(oldValuesH20); 
     1079        } 
     1080 
     1081        @Transactional(readOnly = true) 
     1082        public Request addNewRequest( @NotNull Request iRequest, @NotNull int id, String specie) 
     1083                throws ServiceException 
     1084        { 
     1085            Request cpRequest = new Request(); 
     1086            cpRequest.setId( new Long(id) ); 
     1087 
     1088            cpRequest.setPreference( new Preference() ); 
     1089 
     1090            cpRequest.getPreference().setCo2Extinction( new Pair<String, String>("YES,NO","NO") ); 
     1091            cpRequest.getPreference().setO2Extinction( new Pair<String, String>( "YES,NO", "NO" ) ); 
     1092            cpRequest.getPreference().setO3Extinction( new Pair<String, String>( "YES,NO", "NO" ) ); 
     1093            cpRequest.getPreference().setCh4Extinction( new Pair<String, String>( "YES,NO", "NO" ) ); 
     1094            cpRequest.getPreference().setN2oExtinction( new Pair<String, String>( "YES,NO", "NO" ) ); 
     1095            cpRequest.getPreference().setH2oExtinction( new Pair<String, String>( "YES,NO", "NO" ) ); 
     1096 
     1097 
     1098            cpRequest.getPreference().setBervCorrection( iRequest.getPreference().getBervCorrection() ); 
     1099            cpRequest.getPreference().setFormat( iRequest.getPreference().getFormat() ); 
     1100            cpRequest.getPreference().setRayleighExtinction( iRequest.getPreference().getRayleighExtinction() ); 
     1101 
     1102 
     1103            cpRequest.setAtmosphere( iRequest.getAtmosphere() ); 
     1104            cpRequest.setObservation( iRequest.getObservation() ); 
     1105 
     1106            if ( specie.equalsIgnoreCase("CO2") ) cpRequest.getPreference().setCo2Extinction( new Pair<String, String>( "YES,NO","YES" ) ); 
     1107            if ( specie.equalsIgnoreCase("O2") ) cpRequest.getPreference().setO2Extinction( new Pair<String, String>( "YES,NO","YES" ) ); 
     1108            if ( specie.equalsIgnoreCase("O3") ) cpRequest.getPreference().setO3Extinction( new Pair<String, String>( "YES,NO","YES" ) ); 
     1109            if ( specie.equalsIgnoreCase("CH4") ) cpRequest.getPreference().setCh4Extinction( new Pair<String, String>( "YES,NO","YES" ) ); 
     1110            if ( specie.equalsIgnoreCase("N2O") ) cpRequest.getPreference().setN2oExtinction( new Pair<String, String>( "YES,NO","YES" ) ); 
     1111            if ( specie.equalsIgnoreCase("H2O") ) { 
     1112                cpRequest.getPreference().setH2oExtinction( new Pair<String, String>( "YES,NO","YES" ) ); 
     1113            } 
     1114 
     1115            return cpRequest; 
     1116        } 
     1117 
     1118        @Required 
     1119        public void setObservatoryDAO( final ObservatoryDAO observatoryDAO ) 
     1120        { 
     1121            _observatoryDAO = observatoryDAO; 
     1122        } 
     1123 
     1124        @Required 
     1125        public void setTapasRequestDAO( final TapasRequestDAO tapasRequestDAO ) 
     1126        { 
     1127            _tapasRequestDAO = tapasRequestDAO; 
     1128        } 
     1129 
     1130        private static final Log LOGGER = LogFactory.getLog( TapasServiceImpl.class ); 
     1131 
     1132        private ObservatoryDAO _observatoryDAO; 
     1133 
     1134        private TapasRequestDAO _tapasRequestDAO; 
    3391135    } 
    340  
    341  
    342     @Transactional(readOnly = true) 
    343     public void createUserFtpDir( @NotNull final User user, @NotNull final Properties prop ) 
    344             throws ServiceException 
    345     { 
    346  
    347         final String usersPath = prop.getProperty( "users_path" ); 
    348         String commande = "mkdir -p " + usersPath + "/" + user.getEmail(); 
    349  
    350         try 
    351         { 
    352             EtherHelper.execProcess( commande ); 
    353         } 
    354         catch( FormattedException e ) 
    355         { 
    356  
    357         } 
    358  
    359         EtherHelper.pause( 4000 ); 
    360  
    361         //commande = "chown -R "+prop.getProperty( "chown_user" )+" "+usersPath+"/"+user.getEmail(); 
    362         commande = "chmod 777 -R " + usersPath + "/" + user.getEmail(); 
    363  
    364         try 
    365         { 
    366             EtherHelper.execProcess( commande ); 
    367         } 
    368         catch( FormattedException e ) 
    369         { 
    370  
    371         } 
    372  
    373         EtherHelper.pause( 4000 ); 
    374  
    375     } 
    376  
    377  
    378     public boolean execAppelQSub( final String repCommande, User user, Properties prop ) 
    379             throws ServiceException 
    380     { 
    381         String commande = ""; 
    382         String commandePath = prop.getProperty( "service_path" ) + "/" + repCommande + "/"; 
    383  
    384         //copie run qsub dans repertoire commande 
    385         commande = "cp " + prop.getProperty( "src_path" ) + "/" + prop.getProperty( "process_name" ) + " " + commandePath; 
    386  
    387         try 
    388         { 
    389             EtherHelper.execProcess( commande ); 
    390         } 
    391         catch( FormattedException e ) 
    392         { 
    393  
    394         } 
    395  
    396         EtherHelper.pause( 7000 ); 
    397  
    398         //final String fichier = commandePath+"commande.txt"; 
    399  
    400         /*commande="chown -R www:www "+commandePath; 
    401  
    402         try 
    403         { 
    404             EtherHelper.execProcess( commande ); 
    405         } 
    406         catch( FormattedException e ) 
    407         { 
    408  
    409         }*/ 
    410  
    411         EtherHelper.pause( 7000 ); 
    412  
    413         commande = "chmod 777 -R " + commandePath; 
    414  
    415         try 
    416         { 
    417             EtherHelper.execProcess( commande ); 
    418         } 
    419         catch( FormattedException e ) 
    420         { 
    421  
    422         } 
    423  
    424         EtherHelper.pause( 7000 ); 
    425  
    426         //execution qsub pour la commande en cours 
    427         commande = commandePath + "/" + prop.getProperty( "process_name" ) + " -f request.xml" + " -m " + user.getEmail(); 
    428  
    429         /*PrintWriter out  = null; 
    430         try 
    431         { 
    432             out = new PrintWriter(new FileWriter(fichier)); 
    433             out.println(commande); 
    434             out.close(); 
    435         } 
    436         catch( IOException e ) 
    437         { 
    438             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates. 
    439         } */ 
    440  
    441  
    442         /*commande = commandePath+"/"+prop.getProperty( "process_name" ); 
    443         commande = "cd "+commandePath;*/ 
    444  
    445         try 
    446         { 
    447             EtherHelper.execProcess( commande ); 
    448         } 
    449         catch( FormattedException e ) 
    450         { 
    451             throw new ServiceException( ServiceException.ServiceCode.ERROR_PROCESS, e ); 
    452         } 
    453  
    454         EtherHelper.pause( 7000 ); 
    455  
    456         return true; 
    457     } 
    458  
    459  
    460     /*   public String findMeasureHour( String date ) 
    461 { 
    462 String heure; 
    463 int val; 
    464  
    465  
    466 val = Math.abs( Integer.parseInt( heure ) ); 
    467  
    468 return heure; 
    469 }                    */ 
    470  
    471     public String createFileName( String date, String type, String nomCourt ) 
    472     { 
    473         String fileName = ""; 
    474  
    475         String annee = date.substring( 0, 4 ); 
    476         //String mois = String.valueOf( Integer.parseInt(date.substring(5,7))-1); 
    477         String mois = date.substring( 5, 7 ); 
    478         String heure = date.substring( 11, 13 ); 
    479         String jour = date.substring( 8, 10 ); 
    480         String ind = ""; 
    481  
    482         Calendar cal = Calendar.getInstance(); 
    483  
    484         try 
    485         { 
    486             Date dd = new SimpleDateFormat( "dd/MM/yyyy HH:mm:ss" ).parse( jour + "/" + mois + "/" + annee + " " + heure + ":00:00" ); 
    487             cal.setTime( dd ); 
    488         } 
    489         catch( ParseException e ) 
    490         { 
    491  
    492         } 
    493  
    494         int iheure = cal.get( Calendar.HOUR_OF_DAY );// + 2; 
    495  
    496         if( iheure < 3 ) ind = "00"; 
    497         else if( iheure >= 21 ) 
    498         { 
    499             ind = "00"; 
    500             cal.add( Calendar.DAY_OF_MONTH, +1 ); 
    501         } 
    502         else if( Math.abs( 6 - iheure ) < 3 || iheure == 3 ) ind = "06"; 
    503         else if( Math.abs( 12 - iheure ) < 3 || iheure == 9 ) ind = "12"; 
    504         else if( Math.abs( 18 - iheure ) < 3 || iheure == 15 ) ind = "18"; 
    505  
    506         //+1 sur le mois pour recuperer le numero correct du mois considere 
    507         if( cal.get( Calendar.MONTH ) + 1 < 10 ) mois = "0" + String.valueOf( cal.get( Calendar.MONTH ) + 1 ); 
    508         else mois = "" + String.valueOf( cal.get( Calendar.MONTH ) + 1 ); 
    509  
    510         if( cal.get( Calendar.DAY_OF_MONTH ) < 10 ) jour = "0" + cal.get( Calendar.DAY_OF_MONTH ); 
    511         else jour = "" + cal.get( Calendar.DAY_OF_MONTH ); 
    512  
    513         annee = "" + cal.get( Calendar.YEAR ); 
    514  
    515         //fileName = "/" + annee + "/" + mois + "/" + jour + "/" + nomCourt + "_" + annee + mois + jour + ind; 
    516         fileName="/"+type+"/" + nomCourt + "_" + annee + mois + jour + ind; 
    517  
    518         if( type == "arletty" ) fileName = fileName + ".arl"; 
    519         else if( type == "ecmwf" ) fileName = fileName + "_qo3.txt"; 
    520  
    521         return fileName; 
    522     } 
    523  
    524  
    525  
    526     public void createXMLFile( final Document document, final String commandePath, final Properties prop ) 
    527     { 
    528         try 
    529         { 
    530             //creation repertoire commande 
    531             try 
    532             { 
    533                 EtherHelper.execProcess( "mkdir -p " + commandePath ); 
    534             } 
    535             catch( FormattedException e ) 
    536             { 
    537  
    538             } 
    539  
    540             EtherHelper.pause( 5000 ); 
    541  
    542  
    543             /*try 
    544             { 
    545                 EtherHelper.execProcess( "chown "+prop.getProperty( "chown_user" )+" "+commandePath); 
    546             } 
    547             catch( FormattedException e ) 
    548             { 
    549  
    550             } */ 
    551  
    552             final String fichier = commandePath + "/" + "request.xml"; 
    553  
    554             //On utilise ici un affichage classique avec getPrettyFormat() 
    555             final XMLOutputter sortie = new XMLOutputter( Format.getPrettyFormat() ); 
    556             //Remarquez qu'il suffit simplement de créer une instance de FileOutputStream 
    557             //avec en argument le nom du fichier pour effectuer la sérialisation. 
    558             sortie.output( document, new FileOutputStream( fichier ) ); 
    559  
    560             /*try 
    561             { 
    562                 EtherHelper.execProcess( "chmod 755 "+commandePath+"/"+"request.xml" ); 
    563             } 
    564             catch( FormattedException e ) 
    565             { 
    566  
    567             } 
    568  
    569             EtherHelper.pause(7000); 
    570             */ 
    571  
    572         } 
    573         catch( IOException ignored ) 
    574         { 
    575         } 
    576     } 
    577  
    578     // liste tous observatoires 
    579     @Nullable 
    580     @Transactional(readOnly = true) 
    581     public List<Observatory> getAllObservatories() 
    582             throws ServiceException 
    583     { 
    584         try 
    585         { 
    586             return _observatoryDAO.getAllObservatories(); 
    587         } 
    588         catch( PersistenceException e ) 
    589         { 
    590             throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
    591         } 
    592     } 
    593  
    594     // recuperation infos observatoire avec le nom 
    595     @Nullable 
    596     @Transactional(readOnly = true) 
    597     public Long getNumRequest() 
    598             throws ServiceException 
    599     { 
    600         try 
    601         { 
    602             return _tapasRequestDAO.getNumRequest() + 1; 
    603         } 
    604         catch( PersistenceException e ) 
    605         { 
    606             throw new ServiceException( ServiceException.ServiceCode.REQUEST_NOT_FOUND, e ); 
    607         } 
    608     } 
    609  
    610  
    611     @NotNull 
    612     @Transactional(rollbackFor = Exception.class) 
    613     public Long insertTapasRequest( @NotNull final User user ) 
    614             throws ServiceException 
    615     { 
    616  
    617         try 
    618         { 
    619             String dd = "1"; 
    620  
    621             final TapasRequest ntp = new TapasRequest( user.getFirstName(), user.getLastName(), dd, _tapasRequestDAO.getNumRequest() + 1 ); 
    622             return _tapasRequestDAO.insert( ntp ); 
    623         } 
    624         catch( PersistenceException e ) 
    625         { 
    626             throw new ServiceException( ServiceException.ServiceCode.PERSISTENCE, e ); 
    627         } 
    628     } 
    629  
    630  
    631     // recuperation infos observatoire avec l'id 
    632     @Nullable 
    633     @Transactional(readOnly = true) 
    634     public Observatory getObservatoryById( @NotNull final long id ) 
    635             throws ServiceException 
    636     { 
    637         try 
    638         { 
    639             return _observatoryDAO.getObservatoryById( id ); 
    640         } 
    641         catch( PersistenceException e ) 
    642         { 
    643             throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
    644         } 
    645     } 
    646  
    647  
    648     // recuperation infos observatoire avec le nom 
    649     @Nullable 
    650     @Transactional(readOnly = true) 
    651     public Observatory getObservatoryByName( @NotNull final String name ) 
    652             throws ServiceException 
    653     { 
    654         try 
    655         { 
    656             return _observatoryDAO.getObservatoryByName( name ); 
    657         } 
    658         catch( PersistenceException e ) 
    659         { 
    660             throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 
    661         } 
    662     } 
    663  
    664  
    665     @Required 
    666     public void setObservatoryDAO( final ObservatoryDAO observatoryDAO ) 
    667     { 
    668         _observatoryDAO = observatoryDAO; 
    669     } 
    670  
    671     @Required 
    672     public void setTapasRequestDAO( final TapasRequestDAO tapasRequestDAO ) 
    673     { 
    674         _tapasRequestDAO = tapasRequestDAO; 
    675     } 
    676  
    677     private static final Log LOGGER = LogFactory.getLog( TapasServiceImpl.class ); 
    678  
    679     private ObservatoryDAO _observatoryDAO; 
    680  
    681     private TapasRequestDAO _tapasRequestDAO; 
    682 } 
  • tapas/web/init_en.jsp

    r783 r816  
    2626 
    2727TAPAS is a free on-line service for the astronomical community, allowing the user to access a simulated atmospheric transmission for the specific observing conditions 
    28 (description available in <a href="resources/doc/Bertaux_tapas_2014_aa.pdf" target="_blankk"><u>Bertaux <i> et al.</i>, 2014</u></a>). It can be accessed through the ETHER data base makes use of:<br> 
     28(description available in <a class="containerLabel3" href="resources/doc/Bertaux_tapas_2014_aa.pdf" target="_blank"><i>Bertaux et al., 2014</i></a>). It can be accessed through the ETHER data base makes use of:<br> 
    2929<ul type=circle> 
    3030<li>the latest available version of spectroscopic HITRAN data base 
     
    118118 
    119119                            <br><br> 
    120          <table cellpadding=4 cellspacing=6 align="center" bgcolor="white" width="700" height="60"> 
     120         <table cellpadding=4 cellspacing=2 align="center" bgcolor="white" width="700" height="60" class="logos"> 
    121121 
    122122         <tr> 
    123             <td><a target="_blank" href="http://www.cnes.fr"><img border="1" width=70 src="resources/images/logo_cnes.png"></a></td> 
     123            <td><a target="_blank" href="http://www.cnes.fr"><img border="1" width=60 src="resources/images/logo_cnes.png"></a></td> 
    124124            <td><a target="_blank" href="http://www.cnrs.fr"><img border="1" width=70 src="resources/images/logo_cnrs.jpg"></a></td> 
    125125            <td><a target="_blank" href="http://www.ipsl.fr"><img width=100 src="resources/images/logo_ipsl.png"></a></td> 
  • tapas/web/init_fr.jsp

    r783 r816  
    118118 
    119119                            <br> 
    120          <table cellpadding=4 cellspacing=6 align="center" bgcolor="white" width="700" height="60"> 
    121  
     120        <table cellpadding=4 cellspacing=2 align="center" bgcolor="white" width="700" height="60" class="logos"> 
    122121         <tr> 
    123             <td><a target="_blank" href="http://www.cnes.fr"><img border="1" width=70 src="resources/images/logo_cnes.png"></a></td> 
     122            <td><a target="_blank" href="http://www.cnes.fr"><img border="1" width=60 src="resources/images/logo_cnes.png"></a></td> 
    124123            <td><a target="_blank" href="http://www.cnrs.fr"><img border="1" width=70 src="resources/images/logo_cnrs.jpg"></a></td> 
    125124            <td><a target="_blank" href="http://www.ipsl.fr"><img width=100 src="resources/images/logo_ipsl.png"></a></td> 
  • tapas/web/project/formTapas.jsp

    r784 r816  
    8080            tapasTexts["label.spectralUnit"] = "<spring:message code="label.spectralUnit"/>"; 
    8181            tapasTexts["label.spectralRange"] = "<spring:message code="label.spectralRange"/>"; 
     82            tapasTexts["label.locality"] = "<spring:message code="label.locality"/>"; 
     83            tapasTexts["label.altitude"] = "<spring:message code="label.altitude"/>"; 
     84            tapasTexts["label.latitude"] = "<spring:message code="label.latitude"/>"; 
     85            tapasTexts["label.longitude"] = "<spring:message code="label.longitude"/>"; 
    8286            tapasTexts["label.to"] = "<spring:message code="label.to"/>"; 
    8387            tapasTexts["label.observatory"] = "<spring:message code="label.observatory"/>"; 
     
    8892            tapasTexts["label.climato"] = "<spring:message code="label.climato"/>"; 
    8993            tapasTexts["label.datemesure"] = "<spring:message code="label.datemesure"/>"; 
     94            tapasTexts["label.cpydatemesure"] = "<spring:message code="label.cpydatemesure"/>"; 
    9095            tapasTexts["label.berv"] = "<spring:message code="label.berv"/>"; 
     96            tapasTexts["label.onetransmission"] = "<spring:message code="label.onetransmission"/>"; 
    9197 
    9298            tapasTexts["label.format"] = "<spring:message code="label.format"/>"; 
     
    104110            tapasTexts["label.datemesure"] = "<spring:message code="label.datemesure"/>"; 
    105111 
     112            tapasTexts["label.locality"] = "<spring:message code="label.locality"/>"; 
     113            tapasTexts["label.altitude"] = "<spring:message code="label.altitude"/>"; 
     114            tapasTexts["label.latitude"] = "<spring:message code="label.latitude"/>"; 
     115            tapasTexts["label.longitude"] = "<spring:message code="label.longitude"/>"; 
     116 
    106117            tapasTexts["text.validnum"] = "<spring:message code="text.validnum"/>"; 
    107118            tapasTexts["text.badvalue"] = "<spring:message code="text.badvalue"/>"; 
     
    117128            tapasTexts["language"] = "<spring:message code="language"/>"; 
    118129 
     130            tapasTexts["text.errcpydate"] = "<spring:message code="text.errcpydate"/>"; 
     131 
     132            tapasTexts["text.selectlocation"] = "<spring:message code="text.selectlocation"/>"; 
     133 
    119134            var interfaceTapas = new InterfaceTapas( ${jSonFileFormats}, ${jSonYesNos}, ${jSonObservatories}, ${jSonSpectralUnits}, ${jSonInstrumentalFunctions}, ${jSonClimatoReferences} ); 
    120135 
  • tapas/web/project/formTapas_script.jsp

    r784 r816  
    33 
    44 
    5 var InterfaceTapas = Class.create( { 
     5var InterfaceTapas; 
     6InterfaceTapas = Class.create( { 
    67    initialize: function( jsonFileFormats, jsonYesNos, jsonObservatories, jsonSpectralUnits, jsonInstrumentalFunctions, jsonClimatoReferences ) 
    78    { 
     
    2627        this.select_irextinctionList = new Object(); 
    2728        this.select_ibervCList = new Object(); 
     29        this.select_iOneTransmissionList = new Object(); 
    2830 
    2931        this.jSonObservatories = jsonObservatories || false; 
     
    3537        this.jSonClimatoReferences = jsonClimatoReferences || null; 
    3638        this.selectClimatoReferencesList = new Object(); 
     39        this.dateTemp = "zz"; 
    3740        this.nbRequest = 1; 
    3841        this.tabActive = false; 
    3942        this.numRequest = 1; 
    4043 
    41         this.language = tapasTexts["language"] ; 
    42         this.browser="Firefox"; 
    43  
    44         if (navigator.userAgent.indexOf('Firefox') != -1 && parseFloat(navigator.userAgent.substring(navigator.userAgent.indexOf('Firefox') + 8)) >= 3.6){ 
    45             this.browser="Firefox"; 
    46         } 
    47         else if (navigator.userAgent.indexOf('Chrome') != -1 && parseFloat(navigator.userAgent.substring(navigator.userAgent.indexOf('Chrome') + 7).split(' ')[0]) >= 15){ 
    48             this.browser="Chrome"; 
    49         } 
    50         else if(navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Version') != -1 && parseFloat(navigator.userAgent.substring(navigator.userAgent.indexOf('Version') + 8).split(' ')[0]) >= 5){ 
    51             this.browser="Safari"; 
     44 
     45        this.language = tapasTexts["language"]; 
     46        this.browser = "Firefox"; 
     47 
     48        if( navigator.userAgent.indexOf( 'Firefox' ) != -1 && parseFloat( navigator.userAgent.substring( navigator.userAgent.indexOf( 'Firefox' ) + 8 ) ) >= 3.6 ) 
     49        { 
     50            this.browser = "Firefox"; 
     51        } 
     52        else if( navigator.userAgent.indexOf( 'Chrome' ) != -1 && parseFloat( navigator.userAgent.substring( navigator.userAgent.indexOf( 'Chrome' ) + 7 ).split( ' ' )[0] ) >= 15 ) 
     53        { 
     54            this.browser = "Chrome"; 
     55        } 
     56        else if( navigator.userAgent.indexOf( 'Safari' ) != -1 && navigator.userAgent.indexOf( 'Version' ) != -1 && parseFloat( navigator.userAgent.substring( navigator.userAgent.indexOf( 'Version' ) + 8 ).split( ' ' )[0] ) >= 5 ) 
     57        { 
     58            this.browser = "Safari"; 
    5259        } 
    5360 
    5461        // Buttons 
    55         var submitButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerCenter, id:"button_submit", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 
     62        var submitButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerCenter, id:"button_submit", className: "tapas1", classNameText:"tapas1_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 
    5663        this.addRequestButton = new Button( {title:tapasTexts["label.title.add"],value:tapasTexts["label.addButton"], parent:this.containerCenter, id:"button_add", className: "positive", onClick:jQuery.proxy( this.onClickAdd, this )} ); 
    5764        this.delRequestButton = new Button( {title:tapasTexts["label.title.del"],value:tapasTexts["label.delButton"], parent:this.containerCenter, id:"button_del", className: "negative", onClick:jQuery.proxy( this.onClickDel, this )} ); 
     
    5966 
    6067        this.createForm(); 
     68 
    6169        this.tabActive = this.createTab(); 
    6270        this.divE = $( document.createElement( "div" ) ); 
     
    7684        param.className = "loading-classic"; 
    7785        this.loadingRequest = new Loading( param ); 
     86 
     87        var nbr=1; 
     88 
     89        $( '#select_iobservatory_'+this.nbRequest ).bind( 'focus', ["1"], jQuery.proxy(this.locationChoice,this)); 
     90 
    7891        //this.loadingRequest.display(); 
    7992    }, 
     
    89102 
    90103 
    91     createCalendar: function( containerCalendar, texte, inputDateId, currentDate, isTrToCreate ) 
     104    createCalendar: function( containerCalendar, texte, texte2, inputDateId, inputDateId2, currentDate, isTrToCreate ) 
    92105    { 
    93106        if( isTrToCreate ) 
     
    97110            var td1 = $( document.createElement( "td" ) ); 
    98111            var td2 = $( document.createElement( "td" ) ); 
     112            var td3 = $( document.createElement( "td" ) ); 
     113            var td4 = $( document.createElement( "td" ) ); 
    99114            var inputDate = $( document.createElement( "input" ) ); 
    100115            inputDate.attr( {id:inputDateId, size:"17"} ); 
     116 
     117            var inputDate2 = $( document.createElement( "input" ) ); 
     118            inputDate2.attr( {id:inputDateId2, size:"17"} ); 
    101119 
    102120            td1.html( texte ); 
     
    104122            tr.append( td1 ); 
    105123 
    106             td2.attr( {colspan:4} ); 
     124            td2.attr( {colspan:3} ); 
    107125            td2.append( inputDate ); 
    108126            tr.append( td2 ); 
    109127            containerCalendar.append( tr ); 
     128 
     129            td3.html( texte2 ); 
     130            td3.attr( { class:"containerLabel" } ); 
     131            td3.attr( {colspan:2} ); 
     132            tr.append( td3 ); 
     133 
     134            td4.attr( {colspan:5} ); 
     135            td4.append( inputDate2 ); 
     136            inputDate2.bind( "change", jQuery.proxy(this.checkDate,this)); 
     137            inputDate.bind( "focusin", jQuery.proxy(this.tempDate,this)); 
     138            inputDate.bind( "focusout", jQuery.proxy(this.emptyCpyDate,this)); 
     139            tr.append( td4 ); 
     140            containerCalendar.append( tr ); 
     141 
    110142        } 
    111143 
     
    178210    createTr: function( texte, inputId, container, textesup, event, champ, ctnb, info ) 
    179211    { 
    180  
    181212        var tr = $( document.createElement( "tr" ) ); 
    182213        var td1 = $( document.createElement( "td" ) ); 
     
    185216        var input = $( document.createElement( "input" ) ); 
    186217 
    187         input.attr( {id: inputId, class:"containerText"+ctnb, size:11} ); 
    188  
    189  
    190         if (event.length > 0) input.bind( event, [this, champ], this.angleChoice ); 
     218        input.attr( {id: inputId, class:"containerText" + ctnb, size:11} ); 
     219 
     220 
     221        if( event.length > 0 ) input.bind( event, [this, champ], this.angleChoice ); 
    191222 
    192223 
     
    198229        td2.append( input ); 
    199230 
     231        td2.attr( {colspan:2} ); 
     232 
    200233        tr.append( td2 ); 
    201234        tr.append( td3 ); 
    202235        container.append( tr ); 
    203236 
    204         var re1 = new RegExp("isr_"); 
    205         var re2 = new RegExp("irp_"); 
    206  
    207         if (info && (inputId.match(re1) || inputId.match(re2))) { 
     237 
     238 
     239        var re1 = new RegExp( "isr_" ); 
     240        var re2 = new RegExp( "irp_" ); 
     241 
     242        if( info && (inputId.match( re1 ) || inputId.match( re2 )) ) 
     243        { 
    208244 
    209245            var img = $( document.createElement( "img" ) ); 
    210246            var a = $( document.createElement( "a" ) ); 
    211247            var div = $( document.createElement( "div" ) ); 
    212             img.attr("src","resources/images/info.png"); 
    213             img.attr("width","19"); 
    214             a.attr("style","cursor:pointer"); 
    215  
    216             img.bind("click",[inputId,450,100,this],this.onClickInfos); 
    217             a.append(img); 
    218             div.append(a); 
    219  
     248            img.attr( "src", "resources/images/info.png" ); 
     249            img.attr( "width", "19" ); 
     250            a.attr( "style", "cursor:pointer" ); 
     251 
     252            img.bind( "click", [inputId,450,100,this], this.onClickInfos ); 
     253            a.append( img ); 
     254            div.append( a ); 
    220255 
    221256            td1.append( a ); 
     
    223258            tr.append( div ); 
    224259 
    225         } 
    226         else if (info) { 
     260            if (inputId.match( re2 )) { 
     261                input.css("backgroundColor", "#bfafd6"); 
     262                input.attr('disabled','disabled'); 
     263            } 
     264 
     265        } 
     266        else if( info ) 
     267        { 
    227268            var img = $( document.createElement( "img" ) ); 
    228269            var a = $( document.createElement( "a" ) ); 
    229             img.attr("src","resources/images/info.png"); 
    230             img.attr("width","19"); 
    231             a.attr("style","cursor:pointer"); 
    232             img.bind("click",[inputId,450,100,this],this.onClickInfos); 
    233             a.append(img); 
    234             td1.append(a); 
     270            img.attr( "src", "resources/images/info.png" ); 
     271            img.attr( "width", "19" ); 
     272            a.attr( "style", "cursor:pointer" ); 
     273            img.bind( "click", [inputId,450,100,this], this.onClickInfos ); 
     274            a.append( img ); 
     275            td1.append( a ); 
    235276            td1.append( texte ); 
    236277 
    237278        } 
     279 
     280 
    238281    }, 
    239282 
     
    241284    createTrTxt: function( texte, container ) 
    242285    { 
    243             var tr = $( document.createElement( "tr" ) ); 
    244             var td1 = $( document.createElement( "td" ) ); 
    245  
    246             td1.html( texte ); 
    247             td1.attr( {class:"containerLabelT", colspan:4} ); 
    248  
    249             tr.append( td1 ); 
    250             container.append( tr ); 
    251  
    252  
    253     }, 
    254  
     286 
     287        var tr = $( document.createElement( "tr" ) ); 
     288        var td1 = $( document.createElement( "td" ) ); 
     289 
     290        td1.html( texte ); 
     291        td1.attr( {class:"containerLabelT", colspan:4} ); 
     292 
     293        tr.append( td1 ); 
     294        container.append( tr ); 
     295 
     296    }, 
    255297 
    256298 
     
    267309        var input2 = $( document.createElement( "input" ) ); 
    268310 
    269  
    270311        input1.attr( {id: inputId1,class:"containerText",size:11} ); 
    271312        input2.attr( {id: inputId2,class:"containerText",size:11} ); 
    272  
    273313 
    274314        td3.html( texte2 ); 
     
    276316        var img = $( document.createElement( "img" ) ); 
    277317        var a = $( document.createElement( "a" ) ); 
    278         img.attr("src","resources/images/info.png"); 
    279         img.attr("width","19"); 
    280         a.attr("style","cursor:pointer"); 
    281         img.bind("click",["spectral_range",450,100,this],this.onClickInfos); 
    282         a.append(img); 
    283         td1.append(a); 
    284          td1.append( texte1 ); 
     318        img.attr( "src", "resources/images/info.png" ); 
     319        img.attr( "width", "19" ); 
     320        a.attr( "style", "cursor:pointer" ); 
     321        img.bind( "click", ["spectral_range",450,100,this], this.onClickInfos ); 
     322        a.append( img ); 
     323        td1.append( a ); 
     324        td1.append( texte1 ); 
    285325 
    286326        //img.onclick(this.onClickInfos("spectral_range",1200,440)); 
    287327 
    288328        td1.attr( {class:"containerLabel"} ); 
    289         td3.attr( {class:"containerLabel3"} ); 
     329        td3.attr( {class:"containerLabel4"} ); 
    290330        td5.attr( {class:"containerLabel2"} ); 
    291331 
     
    293333        //td2.html( texte2 ); 
    294334        td4.append( input2 ); 
     335        td4.attr( {colspan:2} ); 
     336        td5.attr( {colspan:2} ); 
    295337 
    296338        tr.append( td1 ); 
     
    304346 
    305347 
    306  
    307     createTrList: function( texte, inputId, index, container, type, info ) 
     348    createTr3Input: function( texte1, texte2, texte3, texte4, inputId1, inputId2, inputId3, inputId4, container, textesup, textesup2 ) 
     349    { 
     350        var tr = $( document.createElement( "tr" ) ); 
     351        var td1 = $( document.createElement( "td" ) ); 
     352        var td2 = $( document.createElement( "td" ) ); 
     353        var td3 = $( document.createElement( "td" ) ); 
     354        var td4 = $( document.createElement( "td" ) ); 
     355        var td5 = $( document.createElement( "td" ) ); 
     356        var td6 = $( document.createElement( "td" ) ); 
     357        var td7 = $( document.createElement( "td" ) ); 
     358        var td8 = $( document.createElement( "td" ) ); 
     359        var td9 = $( document.createElement( "td" ) ); 
     360 
     361 
     362        var input1 = $( document.createElement( "input" ) ); 
     363        var input2 = $( document.createElement( "input" ) ); 
     364        var input3 = $( document.createElement( "input" ) ); 
     365        var input4 = $( document.createElement( "input" ) ); 
     366 
     367 
     368        input1.attr( {id: inputId1,class:"containerText",size:14} ); 
     369        input2.attr( {id: inputId2,class:"containerText",size:4} ); 
     370        input3.attr( {id: inputId3,class:"containerText",size:4} ); 
     371        input4.attr( {id: inputId4,class:"containerText",size:4} ); 
     372 
     373        input1.bind( "change", ["2"], jQuery.proxy(this.locationChoice,this)); 
     374        input2.bind( "change", ["2"], jQuery.proxy(this.locationChoice,this)); 
     375        input3.bind( "change", ["2"], jQuery.proxy(this.locationChoice,this)); 
     376        input4.bind( "change", ["2"], jQuery.proxy(this.locationChoice,this)); 
     377 
     378        td3.html( texte2 ); 
     379        td5.html( texte3 ); 
     380        td7.html( texte4 ); 
     381        td9.html( textesup ); 
     382 
     383 
     384 
     385        var img = $( document.createElement( "img" ) ); 
     386        var a = $( document.createElement( "a" ) ); 
     387        img.attr( "src", "resources/images/info.png" ); 
     388        img.attr( "width", "19" ); 
     389        a.attr( "style", "cursor:pointer" ); 
     390        img.bind( "click", ["spectral_range",450,100,this], this.onClickInfos ); 
     391        a.append( img ); 
     392        td1.append( a ); 
     393        td1.append( texte1 ); 
     394 
     395        //img.onclick(this.onClickInfos("spectral_range",1200,440)); 
     396 
     397        td1.attr( {class:"containerLabel"} ); 
     398        td3.attr( {class:"containerLabel4"} ); 
     399        td5.attr( {class:"containerLabel2"} ); 
     400        td7.attr( {class:"containerLabel2"} ); 
     401        td9.attr( {class:"containerLabel2"} ); 
     402 
     403 
     404 
     405        td2.append( input1 ); 
     406        td4.append( input2 ); 
     407        td6.append( input3 ); 
     408        td8.append( input4 ); 
     409        td4.append( textesup2 ); 
     410 
     411        td2.attr( {colspan:2} ); 
     412 
     413        tr.append( td1 ); 
     414        tr.append( td2 ); 
     415        tr.append( td3 ); 
     416        tr.append( td4 ); 
     417        tr.append( td5 ); 
     418        tr.append( td6 ); 
     419        tr.append( td7 ); 
     420        tr.append( td8 ); 
     421        tr.append( td9 ); 
     422 
     423        container.append( tr ); 
     424    }, 
     425 
     426 
     427    createTrList: function( texte, inputId, index, container, type, info, event ) 
    308428    { 
    309429        var tr = $( document.createElement( "tr" ) ); 
     
    312432        var td3 = $( document.createElement( "td" ) ); 
    313433        var input = $( document.createElement( "input" ) ); 
    314         var champ=""; 
     434        var champ = ""; 
    315435 
    316436        var div = $( document.createElement( "div" ) ); 
    317437 
    318  
    319438        input.attr( {id: inputId} ); 
    320439 
    321         // alert(inputId); 
    322         if( 'format' == type ) { 
     440        if( 'format' == type ) 
     441        { 
    323442            this.displaySelect( td2, inputId, index, this.jSonFileFormats, this.selectFileFormatsList, false, null ); 
    324443            info = true; 
    325444            champ = "iformat_"; 
    326  
    327445        } 
    328446        else 
     
    338456                this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_ico2eList, false, "yesNos" ); 
    339457            else if( (/^(ich4e_[1-9]+)$/.test( inputId )  ) ) 
    340                 this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_ich4eList, false, "yesNos" ); 
     458                    this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_ich4eList, false, "yesNos" ); 
    341459            else if( (/^(in2oe_[1-9]+)$/.test( inputId )  ) ) 
    342460                this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_in2oeList, false, "yesNos" ); 
    343             else if( (/^(irextinction_[1-9]+)$/.test( inputId )  ) ) { 
     461            else if( (/^(iOneTransmission_[1-9]+)$/.test( inputId )  ) ) 
     462                this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_iOneTransmissionList, false, "yesNos" ); 
     463            else if( (/^(irextinction_[1-9]+)$/.test( inputId )  ) ) 
     464            { 
    344465 
    345466                this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_irextinctionList, false, "yesNos" ); 
    346467                info = true; 
    347                 champ=inputId; 
    348             } 
    349             else if( (/^(ibervC_[1-9]+)$/.test( inputId )  ) ) { 
     468                champ = inputId; 
     469            } 
     470            else if( (/^(ibervC_[1-9]+)$/.test( inputId )  ) ) 
     471            { 
    350472                this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_ibervCList, false, "yesNos" ); 
    351473                info = true; 
    352                 champ=inputId; 
    353             } 
    354         } 
    355         else if( 'observatories' == type ) { 
    356  
     474                champ = inputId; 
     475 
     476            } 
     477        } 
     478        else if( 'observatories' == type ) 
     479        { 
    357480            this.displaySelect1( td2, inputId, index, this.jSonObservatories, this.selectObservatoriesList, true, "observatories" ); 
    358481            //this.displaySelect( td2, inputId, index, this.jSonObservatories, this.selectObservatoriesList, true, "observatories" ); 
    359  
    360             champ="iobservatory_"; 
    361         } 
    362         else if( 'spectralUnit' == type ) { 
     482            champ = "iobservatory_"; 
     483            //input.bind( 'click', [this, 'select_iobservatory_1'], this.locationChoice ); 
     484        } 
     485        else if( 'spectralUnit' == type ) 
     486        { 
    363487            this.displaySelect( td2, inputId, index, this.jSonSpectralUnits, this.selectSpectralUnitsList, true, "spectralUnits" ); 
    364488            info = true; 
     
    366490            champ = "ispectral_choice_"; 
    367491        } 
    368         else if( 'ilsf' == type ) { 
     492        else if( 'ilsf' == type ) 
     493        { 
    369494            this.displaySelect( td2, inputId, index, this.jSonInstrumentalFunctions, this.selectInstrumentalFunctionsList, false, "instrumentalFunctions" ); 
    370495            info = true; 
    371496            champ = "ifunction_"; 
    372497        } 
    373         else if( 'climatoReference' == type ) { 
     498        else if( 'climatoReference' == type ) 
     499        { 
    374500            this.displaySelect( td2, inputId, index, this.jSonClimatoReferences, this.selectClimatoReferencesList, false, "climatoReferences" ); 
    375501            info = true; 
     
    377503        } 
    378504 
     505 
     506 
    379507        td1.attr( {class:"containerLabel"} ); 
    380508        tr.append( td1 ); 
    381509 
    382510 
    383         if (info) { 
     511 
     512 
     513        if( info ) 
     514        { 
    384515            var img = $( document.createElement( "img" ) ); 
    385516            var a = $( document.createElement( "a" ) ); 
    386             img.attr("src","resources/images/info.png"); 
    387             img.attr("width","19"); 
    388             a.attr("style","cursor:pointer"); 
    389  
    390             img.bind("click",[champ,450,100,this],this.onClickInfos); 
    391             a.append(img); 
    392             div.append(a); 
    393  
    394  
    395             td2.attr( {colspan:5} ); 
     517            img.attr( "src", "resources/images/info.png" ); 
     518            img.attr( "width", "19" ); 
     519            a.attr( "style", "cursor:pointer" ); 
     520            img.bind( "click", [champ,450,100,this], this.onClickInfos ); 
     521            a.append( img ); 
     522            div.append( a ); 
     523 
     524 
     525            td2.attr( {colspan:10} ); 
    396526            td1.append( a ); 
    397527            td1.append( texte ); 
     
    400530 
    401531        } 
    402         else { 
     532        else 
     533        { 
    403534            td1.append( texte ); 
    404535            td2.attr( {colspan:3} ); 
     
    406537        } 
    407538        container.append( tr ); 
     539 
    408540    }, 
    409541 
     
    439571 
    440572    // EVENTS ******************************************************** 
    441     onClickInfos: function(param) 
    442     { 
    443  
    444         var parametre=param.data[0]; 
    445         var width=param.data[1]; 
    446         var height=param.data[2]; 
    447         var context=param.data[3]; 
    448  
    449         if ("spectral_range" == parametre) { 
    450             width=600; 
    451             height=120; 
     573    onClickInfos: function( param ) 
     574    { 
     575 
     576        var parametre = param.data[0]; 
     577        var width = param.data[1]; 
     578        var height = param.data[2]; 
     579        var context = param.data[3]; 
     580 
     581        if( "spectral_range" == parametre ) 
     582        { 
     583            width = 600; 
     584            height = 120; 
    452585            var titre = "D&eacute;finition de l'intervalle spectral pour le calcul."; 
    453586            var pageInfo = "resources/doc/infosSpectralRange_fr.txt"; 
    454587 
    455             if( "fr" != context.language ) { 
     588            if( "fr" != context.language ) 
     589            { 
    456590                titre = "Definition of spectral interval for the computation."; 
    457591                pageInfo = "resources/doc/infosSpectralRange_en.txt"; 
    458                 width=600; 
    459                 height=100; 
    460             } 
    461  
    462         } 
    463  
    464         if ("ispectral_choice_" == parametre) { 
     592                width = 600; 
     593                height = 100; 
     594            } 
     595 
     596        } 
     597 
     598        if( "ispectral_choice_" == parametre ) 
     599        { 
    465600            var titre = "Unit&eacute; spectrale"; 
    466601            var pageInfo = "resources/doc/infosSpectralUnit_fr.txt"; 
    467             width=600; 
    468             height=450; 
    469             if( "fr" != context.language ) { 
     602            width = 600; 
     603            height = 450; 
     604            if( "fr" != context.language ) 
     605            { 
    470606                titre = "Spectral unit"; 
    471607                pageInfo = "resources/doc/infosSpectralUnit_en.txt"; 
    472                 width=500; 
    473                 height=450; 
    474             } 
    475         } 
    476  
    477         var re = new RegExp("irp_"); 
    478         if (parametre.match(re)) { 
     608                width = 500; 
     609                height = 450; 
     610            } 
     611        } 
     612 
     613        var re = new RegExp( "irp_" ); 
     614        if( parametre.match( re ) ) 
     615        { 
    479616            var titre = "R&eacute;solution"; 
    480617            var pageInfo = "resources/doc/infosResolution_fr.txt"; 
    481             width=600; 
    482             height=200; 
    483             if( "fr" != context.language ) { 
     618            width = 600; 
     619            height = 200; 
     620            if( "fr" != context.language ) 
     621            { 
    484622                titre = "Resolution power"; 
    485623                pageInfo = "resources/doc/infosResolution_en.txt"; 
    486                 width=500; 
    487                 height=200; 
    488             } 
    489         } 
    490  
    491         var re = new RegExp("isr_"); 
    492         if (parametre.match(re)) { 
     624                width = 500; 
     625                height = 200; 
     626            } 
     627        } 
     628 
     629        var re = new RegExp( "isr_" ); 
     630        if( parametre.match( re ) ) 
     631        { 
    493632            var titre = "Taux d'&eacute;chantillonnage"; 
    494633            var pageInfo = "resources/doc/infosSamplingRatio_fr.txt"; 
    495             width=600; 
    496             height=100; 
    497             if( "fr" != context.language ) { 
     634            width = 600; 
     635            height = 100; 
     636            if( "fr" != context.language ) 
     637            { 
    498638                titre = "Sampling ratio"; 
    499639                pageInfo = "resources/doc/infosSamplingRatio_en.txt"; 
    500                 width=500; 
    501                 height=100; 
    502             } 
    503         } 
    504  
    505        var re = new RegExp("ibervC_"); 
    506         if (parametre.match(re)) { 
     640                width = 500; 
     641                height = 100; 
     642            } 
     643        } 
     644 
     645        var re = new RegExp( "ibervC_" ); 
     646        if( parametre.match( re ) ) 
     647        { 
    507648            var titre = "Correction BERV"; 
    508649            var pageInfo = "resources/doc/infosBERV_fr.txt"; 
    509             width=950; 
    510             height=700; 
    511             if( "fr" != context.language ) { 
     650            width = 950; 
     651            height = 700; 
     652            if( "fr" != context.language ) 
     653            { 
    512654                titre = "BERV correction"; 
    513655                pageInfo = "resources/doc/infosBERV_en.txt"; 
    514                 width=950; 
    515                 height=680; 
    516             } 
    517         } 
    518  
    519         var re = new RegExp("ira_"); 
    520         if (parametre.match(re)) { 
     656                width = 950; 
     657                height = 680; 
     658            } 
     659        } 
     660 
     661        var re = new RegExp( "ira_" ); 
     662        if( parametre.match( re ) ) 
     663        { 
    521664            var titre = "LOS Ascension Droite"; 
    522665            var pageInfo = "resources/doc/infosLOSRA_fr.txt"; 
    523             width=600; 
    524             height=150; 
    525             if( "fr" != context.language ) { 
     666            width = 600; 
     667            height = 150; 
     668            if( "fr" != context.language ) 
     669            { 
    526670                titre = "LOS Right Ascension"; 
    527671                pageInfo = "resources/doc/infosLOSRA_en.txt"; 
    528                 width=500; 
    529                 height=150; 
    530             } 
    531         } 
    532  
    533         var re = new RegExp("ide_"); 
    534         if (parametre.match(re)) { 
     672                width = 500; 
     673                height = 150; 
     674            } 
     675        } 
     676 
     677        var re = new RegExp( "ide_" ); 
     678        if( parametre.match( re ) ) 
     679        { 
    535680            var titre = "LOS D&eacute;clinaison"; 
    536681            var pageInfo = "resources/doc/infosLOSD_fr.txt"; 
    537             width=600; 
    538             height=100; 
    539             if( "fr" != context.language ) { 
     682            width = 600; 
     683            height = 100; 
     684            if( "fr" != context.language ) 
     685            { 
    540686                titre = "LOS Declination"; 
    541687                pageInfo = "resources/doc/infosLOSD_en.txt"; 
    542                 width=600; 
    543                 height=100; 
    544             } 
    545         } 
    546  
    547         var re = new RegExp("iza_"); 
    548         if (parametre.match(re)) { 
     688                width = 600; 
     689                height = 100; 
     690            } 
     691        } 
     692 
     693        var re = new RegExp( "iza_" ); 
     694        if( parametre.match( re ) ) 
     695        { 
    549696            var titre = "Angle z&eacute;nithal"; 
    550697            var pageInfo = "resources/doc/infosZenithalAngle_fr.txt"; 
    551             width=600; 
    552             height=100; 
    553             if( "fr" != context.language ) { 
     698            width = 600; 
     699            height = 100; 
     700            if( "fr" != context.language ) 
     701            { 
    554702                titre = "Zenithal angle"; 
    555703                pageInfo = "resources/doc/infosZenithalAngle_en.txt"; 
    556                 width=600; 
    557                 height=100; 
    558             } 
    559         } 
    560  
    561         var re = new RegExp("isr_"); 
    562         if (parametre.match(re)) { 
     704                width = 600; 
     705                height = 100; 
     706            } 
     707        } 
     708 
     709        var re = new RegExp( "isr_" ); 
     710        if( parametre.match( re ) ) 
     711        { 
    563712            var titre = "Taux d'&eacute;chantillonnage"; 
    564713            var pageInfo = "resources/doc/infosSamplingRatio_fr.txt"; 
    565             width=600; 
    566             height=150; 
    567             if( "fr" != context.language ) { 
     714            width = 600; 
     715            height = 150; 
     716            if( "fr" != context.language ) 
     717            { 
    568718                titre = "Sampling Ratio"; 
    569719                pageInfo = "resources/doc/infosSamplingRatio_en.txt"; 
    570                 width=500; 
    571                 height=150; 
    572             } 
    573         } 
    574  
    575         var re = new RegExp("irextinction_"); 
    576         if (parametre.match(re)) { 
     720                width = 500; 
     721                height = 150; 
     722            } 
     723        } 
     724 
     725        var re = new RegExp( "irextinction_" ); 
     726        if( parametre.match( re ) ) 
     727        { 
    577728            var titre = "S&eacute;lection des composants atmosph&eacute;riques"; 
    578729            var pageInfo = "resources/doc/infosSpecies_fr.txt"; 
    579             width=600; 
    580             height=350; 
    581             if( "fr" != context.language ) { 
     730            width = 600; 
     731            height = 350; 
     732            if( "fr" != context.language ) 
     733            { 
    582734                titre = "Selection of atmospheric constituents"; 
    583735                pageInfo = "resources/doc/infosSpecies_en.txt"; 
    584                 width=600; 
    585                 height=360; 
    586             } 
    587         } 
    588  
    589         if ("icr_" == parametre) { 
     736                width = 600; 
     737                height = 360; 
     738            } 
     739        } 
     740 
     741        if( "icr_" == parametre ) 
     742        { 
    590743            var titre = "Mod&egrave;le atmosph&eacute;rique"; 
    591744            var pageInfo = "resources/doc/infosAtmosphericModel_fr.txt"; 
    592             width=600; 
    593             height=400; 
    594             if( "fr" != context.language ) { 
     745            width = 600; 
     746            height = 400; 
     747            if( "fr" != context.language ) 
     748            { 
    595749                titre = "Atmospheric model"; 
    596750                pageInfo = "resources/doc/infosAtmosphericModel_en.txt"; 
    597                 width=500; 
    598                 height=400; 
    599             } 
    600         } 
    601  
    602         if ("iobservatory_" == parametre) { 
     751                width = 500; 
     752                height = 400; 
     753            } 
     754        } 
     755 
     756        if( "iobservatory_" == parametre ) 
     757        { 
    603758            var titre = "Observatoire"; 
    604759            var pageInfo = "resources/doc/infosObservatory_fr.txt"; 
    605             width=600; 
    606             height=100; 
    607             if( "fr" != context.language ) { 
     760            width = 600; 
     761            height = 100; 
     762            if( "fr" != context.language ) 
     763            { 
    608764                titre = "Observatory"; 
    609765                pageInfo = "resources/doc/infosObservatory_en.txt"; 
    610                 width=500; 
    611                 height=100; 
    612             } 
    613         } 
    614  
    615         if ("iformat_" == parametre) { 
     766                width = 500; 
     767                height = 100; 
     768            } 
     769        } 
     770 
     771        if( "iformat_" == parametre ) 
     772        { 
    616773            var titre = "Format fichier"; 
    617774            var pageInfo = "resources/doc/infosFileFomat_fr.txt"; 
    618             width=600; 
    619             height=100; 
    620             if( "fr" != context.language ) { 
     775            width = 600; 
     776            height = 100; 
     777            if( "fr" != context.language ) 
     778            { 
    621779                titre = "File format"; 
    622780                pageInfo = "resources/doc/infosFileFomat_en.txt"; 
    623                 width=500; 
    624                 height=80; 
    625             } 
    626         } 
    627  
    628         if ("ifunction_" == parametre) { 
     781                width = 500; 
     782                height = 80; 
     783            } 
     784        } 
     785 
     786        if( "ifunction_" == parametre ) 
     787        { 
    629788            var titre = "Fonction instrumentale"; 
    630789            var pageInfo = "resources/doc/infosInstrumentalFunction_fr.txt"; 
    631             width=600; 
    632             height=230; 
    633             if( "fr" != context.language ) { 
     790            width = 600; 
     791            height = 230; 
     792            if( "fr" != context.language ) 
     793            { 
    634794                titre = "Instrumental function"; 
    635795                pageInfo = "resources/doc/infosInstrumentalFunction_en.txt"; 
    636                 width=500; 
    637                 height=240; 
     796                width = 500; 
     797                height = 240; 
    638798            } 
    639799        } 
     
    642802        var $dialog = $( '<div></div>' ) 
    643803                .load( pageInfo ) 
    644                     .dialog( { 
    645                             autoOpen: false, 
    646                             title:titre, 
    647                             height:height, 
    648                             width:width 
    649                 } ); 
     804                .dialog( { 
     805                             autoOpen: false, 
     806                             title:titre, 
     807                             height:height, 
     808                             width:width 
     809                         } ); 
    650810 
    651811        $dialog.dialog( 'open' ); 
     
    697857            $( "#tab_request" + numCurrent ).remove(); 
    698858            AnyTime.noPicker( "iobservation_date_" + numCurrent ); 
     859            AnyTime.noPicker( "iobservation_cpydate_" + numCurrent ); 
    699860            AnyTime.noPicker( "ira_" + numCurrent ); 
    700861 
     
    760921                    this.select_in2oeList[i] = null; 
    761922 
     923                    this.select_iOneTransmissionList[z] = this.select_iOneTransmissionList[i]; 
     924                    this.select_iOneTransmissionList[i] = null; 
     925 
    762926                    this.select_ibervCList[z] = this.select_ibervCList[i]; 
    763927                    this.select_ibervCList[i] = null; 
     
    765929                    // Supression du calendrier puis re-création en insérant l'ancienne date 
    766930                    var oldDate = this.calendarConverter.parse( $( "#iobservation_date_" + i ).val() ); 
    767                     //var oldDate = $( "#iobservation_date_" + i ).val(); 
    768  
    769931                    AnyTime.noPicker( "iobservation_date_" + i ); 
     932 
     933                    if (!isEmpty($( "#iobservation_cpydate_" + i ).val())) { 
     934                        var oldDate2 = this.calendarConverter.parse( $( "#iobservation_cpydate_" + i ).val() ); 
     935                        AnyTime.noPicker( "iobservation_cpydate_" + i ); 
     936                    } 
     937 
    770938                    //this.createCalendar( $( "#tabObservation_" + z ), tapasTexts["label.datemesure"], "iobservation_date_" + z, oldDate, false ); 
    771939 
    772940                    $( "#iobservation_date_" + i ).attr( {id:"iobservation_date_" + z} ); 
    773                     this.createCalendar( $( "#tabObservation_" + z ), tapasTexts["label.datemesure"], "iobservation_date_" + z, oldDate, false ); 
    774                     //this.createCalendar( $( "#tabObservation_" + z ), tapasTexts["label.datemesure"], "iobservation_date_" + z, false, false ); 
     941                    $( "#iobservation_cpydate_" + i ).attr( {id:"iobservation_cpydate_" + z} ); 
     942                    this.createCalendar( $( "#tabObservation_" + z ), tapasTexts["label.datemesure"], tapasTexts["label.cpydatemesure"], "iobservation_date_" + z, "iobservation_cpydate_" + z, oldDate, false ); 
     943 
     944 
    775945 
    776946                    // Idem pour les heures !!! 
     
    778948//                    var oldTime = this.timeConverter.parse( $( "#ira_" + i ).val() ); 
    779949                    /*var oldTime = $( "#ira_" + i ).val(); 
    780                     AnyTime.noPicker( "ira_" + i ); 
    781                     this.createTime( $( "#tabObservation_" + z ), tapasTexts["label.ira"], "ira_" + z, oldTime, false,"j2000" ); 
    782                     $( "#ira_" + i ).attr( {id:"ira_" + z} );*/ 
     950                     AnyTime.noPicker( "ira_" + i ); 
     951                     this.createTime( $( "#tabObservation_" + z ), tapasTexts["label.ira"], "ira_" + z, oldTime, false,"j2000" ); 
     952                     $( "#ira_" + i ).attr( {id:"ira_" + z} );*/ 
    783953                } 
    784954            } 
     
    828998        paramSelect.parent = container; 
    829999        var select = new Select( paramSelect ); 
     1000 
     1001 
     1002        //select.add( "tt", "bob " + tapasTexts["text.select"] + " --",this.ifunctionChoice); 
     1003 
    8301004        if( nullValueIsNeeded ) 
    8311005            select.add( "-1", "-- " + tapasTexts["text.select"] + " --" ); 
     
    8411015                    break; 
    8421016                case "instrumentalFunctions" : 
     1017                    select.add( jsonElement.value, tapasTexts[jsonElement.text],jQuery.proxy(this.ifunctionChoice,this) );     // passe le gros this 
     1018                    break; 
    8431019                case "climatoReferences" : 
    8441020                case "yesNos" : 
     
    8471023                default: 
    8481024                    select.add( jsonElement.value, jsonElement.text ); 
     1025 
    8491026                    break; 
    8501027            } 
     
    8571034    { 
    8581035 
    859         $( "#select_iobservatory_"+this.nbRequest ).autocomplete( { 
     1036        $( "#select_iobservatory_" + this.nbRequest ).autocomplete( { 
    8601037            source: this.listObs, 
    861             appendTo: "#regionContent"+this.nbRequest, 
     1038            appendTo: "#regionContent" + this.nbRequest, 
    8621039            minLength: 0, 
    8631040            autoFocus: true, 
     
    8801057    displaySelect1: function( container, id, index, jsonList, selectList, nullValueIsNeeded, contentManage ) 
    8811058    { 
    882         //alert("ok"); 
    8831059        var iselect = $( document.createElement( "select" ) ); 
    884         var option = document.createElement("option"); 
     1060        var option = document.createElement( "option" ); 
    8851061 
    8861062        var paramSelect = new Object(); 
     
    8881064        paramSelect.parent = container; 
    8891065 
    890         var observatoryArray=new Array(); 
    891         this.listObs=new Array(); 
     1066        var observatoryArray = new Array(); 
     1067        this.listObs = new Array(); 
    8921068 
    8931069 
    8941070        //var bob =$('<div id="region" class="containerField"><div class="containerTitle"><div class="containerTitleText">Region</div><div class="containerTitleClose"><img src="img/close.png"></div></div><div class="containerRegion"><input id="regionTags" size="23"/></div><div id="regionContent"></div></div> '); 
    895         var bob =$('<div class="containerField"><input id="select_'+id+'" size="42"/></div><div id="regionContent'+this.nbRequest+'" class="regionContent"></div> '); 
    896  
    897         //alert('<div class=containerField><input id=select_'+id+' size=23/></div><div id=regionContent></div> '); 
    898  
    899         //var select = new Select( paramSelect ); 
    900         //iselect.options.add("1","1"); 
    901         //if( nullValueIsNeeded )                          Select1 
     1071        var bob = $( '<div class="containerField"><input id="select_' + id + '" size="42"/></div><div id="regionContent' + this.nbRequest + '" class="regionContent"></div> ' ); 
    9021072 
    9031073        var option = new Option(); 
    9041074        option.text = "-- " + tapasTexts["text.select"] + " --"; 
    9051075        option.value = "-1"; 
    906         iselect.append( option ); 
     1076 
    9071077 
    9081078        jQuery.each( jsonList, jQuery.proxy( function ( i, jsonElement ) 
    9091079        { 
    910                 //ajouter fonction 
    911  
    912                 /*var option = new Option(); 
    913                 option.text = jsonElement.name; 
    914                 option.value = jsonElement.id;*/ 
    915                 //observatoryArray.push(jsonElement.name); 
    916                 this.listObs.push(jsonElement.name); 
    917                 //console.log(option.value+"-"+option.text); 
    918                 //iselect.append(option); 
    919  
     1080            //ajouter fonction 
     1081 
     1082            /*var option = new Option(); 
     1083             option.text = jsonElement.name; 
     1084             option.value = jsonElement.id;*/ 
     1085            //observatoryArray.push(jsonElement.name); 
     1086            this.listObs.push( jsonElement.name ); 
     1087            //console.log(option.value+"-"+option.text); 
     1088            //iselect.append(option); 
    9201089 
    9211090        }, this ) ); 
     
    9231092        /*selectList[index] = select;*/ 
    9241093        //container.append(iselect); 
    925         container.append(bob); 
    926         selectList[index]="select_"+id; 
     1094 
     1095        container.append( bob ); 
     1096        selectList[index] = "select_" + id; 
     1097 
    9271098 
    9281099    }, 
     
    9371108    createForm: function() 
    9381109    { 
    939  
    940  
    9411110 
    9421111        var divAll = $( document.createElement( "div" ) ); 
     
    9811150        divAll.append( divObservation ); 
    9821151 
    983  
    9841152        divAtmosphere.append( tabAtmosphere ); 
    9851153        //divAtmosphere.addClass("divAtmosphere"); 
     
    9951163        //this.tabInput = new Array(3); 
    9961164 
    997         this.createTrList( tapasTexts["label.format"], "iformat_" + this.nbRequest, this.nbRequest, tabPreference, 'format' ); 
    998         this.createTrList( tapasTexts["label.era"], "irextinction_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    999         this.createTrList( tapasTexts["label.eh2o"], "ih2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1000         this.createTrList( tapasTexts["label.eo3"], "io3e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1001         this.createTrList( tapasTexts["label.eo2"], "io2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1002         this.createTrList( tapasTexts["label.eco2"], "ico2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1003         this.createTrList( tapasTexts["label.ech4"], "ich4e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1004         this.createTrList( tapasTexts["label.en2o"], "in2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1005         this.createTrList( tapasTexts["label.berv"], "ibervC_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1006  
    1007         this.createTrList( tapasTexts["label.observatory"], "iobservatory_" + this.nbRequest, this.nbRequest, tabObservation, 'observatories',true ); 
    1008         this.createCalendar( tabObservation, tapasTexts["label.datemesure"], "iobservation_date_" + this.nbRequest, false, true ); 
     1165        this.createTrList( tapasTexts["label.format"], "iformat_" + this.nbRequest, this.nbRequest, tabPreference, 'format',false,"" ); 
     1166        this.createTrList( tapasTexts["label.berv"], "ibervC_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1167        this.createTrList( tapasTexts["label.era"], "irextinction_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1168        this.createTrList( tapasTexts["label.eh2o"], "ih2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1169        this.createTrList( tapasTexts["label.eo3"], "io3e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1170        this.createTrList( tapasTexts["label.eo2"], "io2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1171        this.createTrList( tapasTexts["label.eco2"], "ico2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1172        this.createTrList( tapasTexts["label.ech4"], "ich4e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1173        this.createTrList( tapasTexts["label.en2o"], "in2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1174        this.createTrList( tapasTexts["label.onetransmission"], "iOneTransmission_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 
     1175 
     1176 
     1177 
     1178        this.createTrList( tapasTexts["label.observatory"], "iobservatory_" + this.nbRequest, this.nbRequest, tabObservation, 'observatories', true, "" ); 
     1179        this.createTrTxt( tapasTexts["label.or"], tabObservation ); 
     1180        this.createTr3Input( tapasTexts["label.locality"], tapasTexts["label.altitude"], tapasTexts["label.latitude"],tapasTexts["label.longitude"],"ilocality_" + this.nbRequest, "ialtitude_" + this.nbRequest, "ilatitude_" + this.nbRequest, "ilongitude_" + this.nbRequest , tabObservation, "[decimal]"," m" ); 
     1181 
     1182        this.createCalendar( tabObservation, tapasTexts["label.datemesure"], tapasTexts["label.cpydatemesure"], "iobservation_date_" + this.nbRequest, "iobservation_cpydate_" + this.nbRequest, false, true ); 
     1183 
    10091184 
    10101185        //unite 
    1011         this.createTrList( tapasTexts["label.spectralUnit"], "ispectral_choice_" + this.nbRequest, this.nbRequest, tabObservation, 'spectralUnit' ); 
     1186        this.createTrList( tapasTexts["label.spectralUnit"], "ispectral_choice_" + this.nbRequest, this.nbRequest, tabObservation, 'spectralUnit', false, "" ); 
    10121187        this.createTr2Input( tapasTexts["label.spectralRange"], tapasTexts["label.to"], "iminspectral_ranger_" + this.nbRequest, "imaxspectral_ranger_" + this.nbRequest, tabObservation, "[350,2500] nm" ); 
    10131188 
    10141189        //fonction instrumentale 
    1015         this.createTrList( tapasTexts["label.ifunction"], "ifunction_" + this.nbRequest, this.nbRequest, tabObservation, "ilsf" ); 
     1190        this.createTrList( tapasTexts["label.ifunction"], "ifunction_" + this.nbRequest, this.nbRequest, tabObservation, "ilsf", false, "select"); 
    10161191        //reference climato 
    10171192        //this.createTrList( tapasTexts["label.climato"], "icr", tabAtmosphere, "climatoReference" ); 
    1018         this.createTrList( tapasTexts["label.climato"], "icr_" + this.nbRequest, this.nbRequest, tabObservation, "climatoReference" ); 
    1019  
    1020  
    1021         this.createTr( tapasTexts["label.resolution"], "irp_" + this.nbRequest, tabObservation, "", "", "","",true ); 
    1022         this.createTr( tapasTexts["label.ratio"], "isr_" + this.nbRequest, tabObservation, "", "","","",true ); 
    1023  
    1024  
    1025         this.createTr( tapasTexts["label.ira"], "ira_" + this.nbRequest,tabObservation,"hh:mm:ss (J2000)","keypress","ra","2",true ); 
     1193        this.createTrList( tapasTexts["label.climato"], "icr_" + this.nbRequest, this.nbRequest, tabObservation, "climatoReference", false, ""); 
     1194 
     1195        this.createTr( tapasTexts["label.resolution"], "irp_" + this.nbRequest, tabObservation, "", "", "", "", true ); 
     1196        this.createTr( tapasTexts["label.ratio"], "isr_" + this.nbRequest, tabObservation, "", "", "", "", true ); 
     1197 
     1198        this.createTr( tapasTexts["label.ira"], "ira_" + this.nbRequest, tabObservation, "hh:mm:ss (J2000)", "keypress", "ra", "2", true ); 
    10261199        //this.createTime( tabObservation, tapasTexts["label.ira"], "ira_" + this.nbRequest, false, true,"hh:mm:ss (J2000)" ); 
    1027         this.createTr( tapasTexts["label.ide"], "ide_" + this.nbRequest, tabObservation, "deg:':''","keypress","de","2",true ); 
     1200        this.createTr( tapasTexts["label.ide"], "ide_" + this.nbRequest, tabObservation, "deg:':''", "keypress", "de", "2", true ); 
    10281201        this.createTrTxt( tapasTexts["label.or"], tabObservation ); 
    1029         this.createTr( tapasTexts["label.iza"], "iza_" + this.nbRequest, tabObservation, "[0,90] &deg;","keypress","za","2",true ); 
     1202        this.createTr( tapasTexts["label.iza"], "iza_" + this.nbRequest, tabObservation, "[0,90] &deg;", "keypress", "za", "2", true ); 
    10301203 
    10311204        this.createAutoCompleteMenuForRegions(); 
    10321205 
    10331206        this.initRequestFields(); 
     1207 
     1208 
     1209 
     1210 
    10341211        //jQuery.proxy permet d'envoyer le contexte this courant 
    10351212 
     
    10371214 
    10381215 
     1216 
    10391217    createTapasObject: function() 
    10401218    { 
    10411219 
    10421220        var requests = new Array(); 
     1221        var i = 1; 
     1222 
     1223 
    10431224 
    10441225        for( var i = 1; i <= this.nbRequest; i++ ) 
     
    10851266            preference.bervCorrection.secondValue = this.select_ibervCList[i].getValue(); 
    10861267 
     1268            preference.oneTransmission = new Object(); 
     1269            preference.oneTransmission.firstValue = this.select_iOneTransmissionList[i].getValuesInString(); 
     1270            preference.oneTransmission.secondValue = this.select_iOneTransmissionList[i].getValue(); 
     1271 
    10871272 
    10881273            // OBSERVATION 
     
    10911276            //observatory.id = this.selectObservatoriesList[i].getValue(); 
    10921277            //observatory.id = 2; 
    1093             observatory.name = $("#select_iobservatory_"+i).val(); 
     1278            observatory.name = $( "#select_iobservatory_" + i ).val(); 
     1279 
     1280 
     1281            var location = new Object(); 
     1282            location.name = $( "#ilocality_" + i ).val(); 
     1283            location.longitude = $( "#ilongitude_" + i ).val(); 
     1284            location.latitude = $( "#ilatitude_" + i ).val(); 
     1285            location.altitude = $( "#ialtitude_" + i ).val(); 
     1286            location.shortName = $( "#ilocality_" + i ).val(); 
    10941287 
    10951288            // Los 
     
    10971290 
    10981291            //if ($( "#iza_" + i ).val().toString() != null) 
    1099                 los.zenithAngle = $( "#iza_" + i ).val(); 
     1292            los.zenithAngle = $( "#iza_" + i ).val(); 
    11001293            //else { 
    1101                 los.raJ2000 = $( "#ira_" + i ).val(); 
    1102                 los.decJ2000 = $( "#ide_" + i ).val(); 
     1294            los.raJ2000 = $( "#ira_" + i ).val(); 
     1295            los.decJ2000 = $( "#ide_" + i ).val(); 
    11031296            //} 
    11041297 
     
    11311324 
    11321325            var observation = new Object(); 
    1133             observation.date = this.calendarConverter.parse( $( "#iobservation_date_" + i ).val() ).getTime(); 
     1326 
     1327            if (!isEmpty($( "#iobservation_cpydate_" + i ).val()) && isDate($("#iobservation_cpydate_" + i ).val()) ) 
     1328            { 
     1329                observation.date = this.calendarConverter.parse( $( "#iobservation_cpydate_" + i ).val() ).getTime(); 
     1330            } 
     1331            else 
     1332            { 
     1333                observation.date = this.calendarConverter.parse( $( "#iobservation_date_" + i ).val() ).getTime(); 
     1334            } 
    11341335 
    11351336 
    11361337            observation.observatory = observatory; 
     1338 
     1339            observation.location = location; 
    11371340 
    11381341            observation.los = los; 
     
    11651368    validFields: function() 
    11661369    { 
     1370 
    11671371        for( var i = 1; i <= this.nbRequest; i++ ) 
    11681372        { 
    11691373 
    11701374            var chaine = tapasTexts["text.erreur.saisie"] + " " + i + "<br>"; 
    1171             var testOk1=false; 
    1172             var testOk2=false; 
    1173             var testOk3=false; 
     1375            var testOk1 = false; 
     1376            var testOk2 = false; 
     1377            var testOk3 = false; 
     1378 
     1379            testOk1 = isDate( $( "#iobservation_cpydate_" + this.nbRequest ).val() ) || isEmpty( $( "#iobservation_cpydate_" + this.nbRequest ).val() ); 
     1380            if( !testOk1 ) 
     1381            { 
     1382                this.divE.hide(); 
     1383                this.divE.html( chaine + " : " + tapasTexts["text.errcpydate"] ); 
     1384                this.divE.show(); 
     1385                return false; 
     1386            } 
     1387 
     1388 
    11741389            //var testOk = isSup( this.selectObservatoriesList[i].getValue(), 0 ); 
    1175             var testOk = isEmpty($( "#select_iobservatory_" + i ).val()) || this.listObs.indexOf($( "#select_iobservatory_" + i ).val())<0; 
    1176             //alert(testOk); 
    1177             if( testOk ) 
    1178             { 
    1179                 this.divE.html( chaine + tapasTexts["label.observatory"] + " : " + tapasTexts["text.toselect"] ); 
     1390            var testOk = isEmpty( $( "#select_iobservatory_" + i ).val() ) || this.listObs.indexOf( $( "#select_iobservatory_" + i ).val() ) < 0; 
     1391            testOk2 = !isEmpty( $( "#ilocality_" + i ).val() ) && isValidNum( $( "#ialtitude_" + i ).val() ) && isValidNum( $( "#ilatitude_" + i ).val() ) && isValidNum( $( "#ilongitude_" + i ).val() ) 
     1392 
     1393            if( testOk && !testOk2) 
     1394            { 
     1395                this.divE.hide(); 
     1396                this.divE.html( chaine + " " + tapasTexts["text.selectlocation"] ); 
    11801397                this.divE.show(); 
    11811398                return false; 
     
    11991416 
    12001417            /*testOk = isDeg( $( "#ide_" + i ).val() ); 
    1201             if( !testOk ) 
    1202             { 
    1203                 this.divE.html( chaine + tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 
    1204                 this.divE.show(); 
    1205                 return false; 
    1206             } */ 
     1418             if( !testOk ) 
     1419             { 
     1420             this.divE.html( chaine + tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 
     1421             this.divE.show(); 
     1422             return false; 
     1423             } */ 
    12071424 
    12081425 
    12091426            testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 
    1210             testOk1 = isValidNum( $( "#iza_" + i ).val()); 
    1211             testOk2 = isDeg( $( "#ide_" + i ).val()); 
    1212             testOk3 = isHourDeg( $( "#ira_" + i ).val()); 
     1427            testOk1 = isValidNum( $( "#iza_" + i ).val() ); 
     1428            testOk2 = isDeg( $( "#ide_" + i ).val() ); 
     1429            testOk3 = isHourDeg( $( "#ira_" + i ).val() ); 
    12131430            if( !((testOk && testOk1) || (testOk2 && testOk3)) ) 
    12141431            { 
    1215                 if ( !(testOk && testOk1) ) 
     1432                if( !(testOk && testOk1) ) 
    12161433                    this.divE.html( chaine + "LOS : " + tapasTexts["text.badvalue"] ); 
    12171434                else 
     
    12221439 
    12231440            /*testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 
    1224             if( !testOk ) 
    1225             { 
    1226                 this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 
    1227                 this.divE.show(); 
    1228                 return false; 
    1229             } */ 
     1441             if( !testOk ) 
     1442             { 
     1443             this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 
     1444             this.divE.show(); 
     1445             return false; 
     1446             } */ 
     1447 
    12301448 
    12311449            testOk = isValidNum( $( "#irp_" + i ).val() ); 
    1232             if( !testOk ) 
    1233             { 
    1234                 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
    1235                 this.divE.show(); 
    1236                 return false; 
    1237             } 
    1238  
    1239             testOk = isSup( $( "#irp_" + i ).val(), 1 ); 
    1240             if( !testOk ) 
    1241             { 
    1242                 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
    1243                 this.divE.show(); 
    1244                 return false; 
    1245             } 
     1450            testOk2 = isSupS( this.selectInstrumentalFunctionsList[i].getValue() , -1 ); 
     1451 
     1452 
     1453            if (testOk2) 
     1454            { 
     1455                if( !testOk ) 
     1456                { 
     1457                    this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
     1458                    this.divE.show(); 
     1459                    return false; 
     1460                } 
     1461 
     1462                testOk = isSup( $( "#irp_" + i ).val(), 1 ); 
     1463                if( !testOk ) 
     1464                { 
     1465                    this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
     1466                    this.divE.show(); 
     1467                    return false; 
     1468                } 
     1469            } 
     1470 
    12461471 
    12471472            testOk = isValidNum( $( "#isr_" + i ).val() ); 
     
    12641489        return true; 
    12651490    }, 
     1491 
     1492 
    12661493 
    12671494    updateButtons: function() 
     
    12791506 
    12801507 
    1281     angleChoice: function(params) 
    1282     { 
     1508 
     1509    angleChoice: function( params ) 
     1510    { 
     1511 
    12831512        var context = params.data[0]; 
    12841513        var champ = params.data[1]; 
    1285         //alert(context.nbRequest); 
    12861514        var indice = context.nbRequest; 
    1287         if (champ == "za") { 
    1288             //$( "#iza_"+indice ).val($( "#iza_"+indice ).val().replace(/^\s+|\s+$/g,"")); 
    1289             //alert($( "#iza_"+indice ).val($( "#iza_"+indice ).val().replace(/^\s+|\s+$/g,"")).length); 
    1290             //if ($( "#iza_"+indice ).val($( "#iza_"+indice ).val().replace(/^\s+|\s+$/g,"")).length >0 ) { 
    1291                 $( "#ira_"+indice ).val(""); 
    1292                 $( "#ide_"+indice ).val(""); 
     1515        if( champ == "za" ) 
     1516        { 
     1517            $( "#ira_" + indice ).val( "" ); 
     1518            $( "#ide_" + indice ).val( "" ); 
    12931519            //} 
    12941520        } 
     1521        else 
     1522        { 
     1523            $( "#iza_" + indice ).val( "" ); 
     1524        } 
     1525 
     1526    }, 
     1527 
     1528 
     1529    ifunctionChoice: function() 
     1530    { 
     1531        //this.selectInstrumentalFunctionsList[indice].select(this.selectInstrumentalFunctionsList[indice-1].getValue(),false); 
     1532        //var context = params.data[0]; 
     1533        //var champ = params.data[1]; 
     1534        var valeur = this.selectInstrumentalFunctionsList[this.nbRequest].getValue(); 
     1535 
     1536        if ( valeur == -1 ) { 
     1537            $( "#irp_" + this.nbRequest ).val(""); 
     1538            $( "#irp_" + this.nbRequest ).css("backgroundColor", "#bfafd6"); 
     1539            $( "#irp_" + this.nbRequest ).attr('disabled','disabled'); 
     1540        } 
    12951541        else { 
    1296             $( "#iza_"+indice ).val(""); 
    1297         } 
    1298  
    1299  
    1300     }, 
    1301  
    1302  
    1303  
    1304 /*this.createTrList( tapasTexts["label.format"], "iformat_" + this.nbRequest, this.nbRequest, tabPreference, 'format' ); 
    1305       this.createTrList( tapasTexts["label.era"], "irextinction_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1306       this.createTrList( tapasTexts["label.eh2o"], "ih2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1307       this.createTrList( tapasTexts["label.eo3"], "io3e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1308       this.createTrList( tapasTexts["label.eo2"], "io2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1309       this.createTrList( tapasTexts["label.eco2"], "ico2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
    1310  
    1311       this.createTrList( tapasTexts["label.observatory"], "iobservatory_" + this.nbRequest, this.nbRequest, tabObservation, 'observatories' ); 
    1312       this.createCalendar( tabObservation, tapasTexts["label.datemesure"], "iobservation_date_" + this.nbRequest, false, true ); 
    1313  
    1314       //unite 
    1315       this.createTrList( tapasTexts["label.spectralUnit"], "ispectral_choice_" + this.nbRequest, this.nbRequest, tabObservation, 'spectralUnit' ); 
    1316       this.createTr2Input( tapasTexts["label.spectralRange"], tapasTexts["label.to"], "iminspectral_ranger_" + this.nbRequest, "imaxspectral_ranger_" + this.nbRequest, tabObservation, "[350,2500] nm" ); 
    1317  
    1318       //fonction instrumentale 
    1319       this.createTrList( tapasTexts["label.ifunction"], "ifunction_" + this.nbRequest, this.nbRequest, tabObservation, "ilsf" ); 
    1320       //reference climato 
    1321       //this.createTrList( tapasTexts["label.climato"], "icr", tabAtmosphere, "climatoReference" ); 
    1322       this.createTrList( tapasTexts["label.climato"], "icr_" + this.nbRequest, this.nbRequest, tabObservation, "climatoReference" ); 
    1323  
    1324  
    1325       this.createTr( tapasTexts["label.ira"], "ira_" + this.nbRequest,tabObservation,"hh:mm:ss (J2000)","keypress","ra","2" ); 
    1326       //this.createTime( tabObservation, tapasTexts["label.ira"], "ira_" + this.nbRequest, false, true,"hh:mm:ss (J2000)" ); 
    1327       this.createTr( tapasTexts["label.ide"], "ide_" + this.nbRequest, tabObservation, "deg:':''","keypress","de","2" ); 
    1328  
    1329       this.createTrTxt( "or", tabObservation ); 
    1330       this.createTr( tapasTexts["label.iza"], "iza_" + this.nbRequest, tabObservation, "[0,90] &deg;","keypress","za","2" ); 
    1331  
    1332       this.createTr( tapasTexts["label.resolution"], "irp_" + this.nbRequest, tabObservation, "", "", "","" ); 
    1333       this.createTr( tapasTexts["label.ratio"], "isr_" + this.nbRequest, tabObservation, "", "","","" ); 
    1334       */ 
     1542            $( "#irp_" + this.nbRequest ).css("backgroundColor", "#FFFFFF"); 
     1543            $( "#irp_" + this.nbRequest ).removeAttr('disabled'); 
     1544        } 
     1545 
     1546 
     1547        //var indice = context.nbRequest; 
     1548 
     1549    }, 
     1550 
     1551 
     1552    locationChoice: function(ind) 
     1553    { 
     1554        var option = ind.data[0].toString(); 
     1555 
     1556        if ("1" == option) 
     1557        { 
     1558            $( '#ilocality_' + this.nbRequest).val(""); 
     1559            $( '#ialtitude_' + this.nbRequest).val(""); 
     1560            $( '#ilatitude_' + this.nbRequest).val(""); 
     1561            $( '#ilongitude_' + this.nbRequest).val(""); 
     1562        } 
     1563        else 
     1564        { 
     1565            $( '#select_iobservatory_' + this.nbRequest).val(""); 
     1566        } 
     1567    }, 
     1568 
     1569 
     1570 
     1571    checkDate: function() 
     1572    { 
     1573        var testOk1 = isDate( $( "#iobservation_cpydate_" + this.nbRequest ).val() ) || isEmpty( $( "#iobservation_cpydate_" + this.nbRequest ).val()) ; 
     1574        if( !testOk1 ) 
     1575        { 
     1576            alert( tapasTexts["text.errcpydate"] ); 
     1577            return false; 
     1578        } 
     1579        return true; 
     1580    }, 
     1581 
     1582 
     1583 
     1584    emptyCpyDate: function() 
     1585    { 
     1586        if ( this.dateTemp != $( "#iobservation_cpydate_" + this.nbRequest ).val("") ) { 
     1587            $( "#iobservation_cpydate_" + this.nbRequest ).val(""); 
     1588        } 
     1589        return true; 
     1590    }, 
     1591 
     1592 
     1593    tempDate: function() 
     1594    { 
     1595        this.dateTemp = "1234"; 
     1596        return true; 
     1597    }, 
     1598 
     1599    /*this.createTrList( tapasTexts["label.format"], "iformat_" + this.nbRequest, this.nbRequest, tabPreference, 'format' ); 
     1600     this.createTrList( tapasTexts["label.era"], "irextinction_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
     1601     this.createTrList( tapasTexts["label.eh2o"], "ih2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
     1602     this.createTrList( tapasTexts["label.eo3"], "io3e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
     1603     this.createTrList( tapasTexts["label.eo2"], "io2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
     1604     this.createTrList( tapasTexts["label.eco2"], "ico2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno' ); 
     1605 
     1606     this.createTrList( tapasTexts["label.observatory"], "iobservatory_" + this.nbRequest, this.nbRequest, tabObservation, 'observatories' ); 
     1607     this.createCalendar( tabObservation, tapasTexts["label.datemesure"], "iobservation_date_" + this.nbRequest, false, true ); 
     1608 
     1609     //unite 
     1610     this.createTrList( tapasTexts["label.spectralUnit"], "ispectral_choice_" + this.nbRequest, this.nbRequest, tabObservation, 'spectralUnit' ); 
     1611     this.createTr2Input( tapasTexts["label.spectralRange"], tapasTexts["label.to"], "iminspectral_ranger_" + this.nbRequest, "imaxspectral_ranger_" + this.nbRequest, tabObservation, "[350,2500] nm" ); 
     1612 
     1613     //fonction instrumentale 
     1614     this.createTrList( tapasTexts["label.ifunction"], "ifunction_" + this.nbRequest, this.nbRequest, tabObservation, "ilsf" ); 
     1615     //reference climato 
     1616     //this.createTrList( tapasTexts["label.climato"], "icr", tabAtmosphere, "climatoReference" ); 
     1617     this.createTrList( tapasTexts["label.climato"], "icr_" + this.nbRequest, this.nbRequest, tabObservation, "climatoReference" ); 
     1618 
     1619 
     1620     this.createTr( tapasTexts["label.ira"], "ira_" + this.nbRequest,tabObservation,"hh:mm:ss (J2000)","keypress","ra","2" ); 
     1621     //this.createTime( tabObservation, tapasTexts["label.ira"], "ira_" + this.nbRequest, false, true,"hh:mm:ss (J2000)" ); 
     1622     this.createTr( tapasTexts["label.ide"], "ide_" + this.nbRequest, tabObservation, "deg:':''","keypress","de","2" ); 
     1623 
     1624     this.createTrTxt( "or", tabObservation ); 
     1625     this.createTr( tapasTexts["label.iza"], "iza_" + this.nbRequest, tabObservation, "[0,90] &deg;","keypress","za","2" ); 
     1626 
     1627     this.createTr( tapasTexts["label.resolution"], "irp_" + this.nbRequest, tabObservation, "", "", "","" ); 
     1628     this.createTr( tapasTexts["label.ratio"], "isr_" + this.nbRequest, tabObservation, "", "","","" ); 
     1629     */ 
    13351630 
    13361631 
    13371632    initRequestFields: function() 
    13381633    { 
    1339         if (this.nbRequest > 1 && this.nbRequest <=9) { 
     1634        if( this.nbRequest > 1 && this.nbRequest <= 9 ) 
     1635        { 
    13401636            var indice = this.nbRequest; 
    13411637            var indice0 = indice - 1; 
    13421638 
    1343             this.selectObservatoriesList[indice].select(this.selectObservatoriesList[indice-1].getValue(),false); 
    1344             $( "#iobservation_date_" + indice ).val( $( "#iobservation_date_" + indice0).val() ); 
    1345             this.selectSpectralUnitsList[indice].select(this.selectSpectralUnitsList[indice-1].getValue(),false); 
    1346  
    1347  
    1348             this.selectInstrumentalFunctionsList[indice].select(this.selectInstrumentalFunctionsList[indice-1].getValue(),false); 
    1349             this.selectClimatoReferencesList[indice].select(this.selectClimatoReferencesList[indice-1].getValue(),false); 
    1350  
    1351             this.selectFileFormatsList[indice].select(this.selectFileFormatsList[indice-1].getValue(),false); 
    1352             this.select_irextinctionList[indice].select(this.select_irextinctionList[indice-1].getValue(),false); 
    1353             this.select_ih2oeList[indice].select(this.select_ih2oeList[indice-1].getValue(),false); 
    1354             this.select_io3eList[indice].select(this.select_io3eList[indice-1].getValue(),false); 
    1355             this.select_io2eList[indice].select(this.select_io2eList[indice-1].getValue(),false); 
    1356             this.select_ico2eList[indice].select(this.select_ico2eList[indice-1].getValue(),false); 
    1357             this.select_ich4eList[indice].select(this.select_ich4eList[indice-1].getValue(),false); 
    1358             this.select_in2oeList[indice].select(this.select_in2oeList[indice-1].getValue(),false); 
    1359             this.select_ibervCList[indice].select(this.select_ibervCList[indice-1].getValue(),false); 
    1360  
    1361             $( "#iminspectral_ranger_" + indice ).val($( "#iminspectral_ranger_" + indice0 ).val() ); 
    1362             $( "#imaxspectral_ranger_" + indice ).val($( "#imaxspectral_ranger_" + indice0 ).val() ); 
    1363  
    1364             $( "#irp_" + indice ).val($( "#irp_" + indice0 ).val() ); 
    1365             $( "#isr_" + indice ).val($( "#isr_" + indice0 ).val() ); 
    1366             $( "#ira_" + indice ).val($( "#ira_" + indice0 ).val() ); 
    1367             $( "#ide_" + indice ).val($( "#ide_" + indice0 ).val() ); 
    1368             $( "#iza_" + indice ).val($( "#iza_" + indice0 ).val() ); 
    1369  
    1370  
    1371  
    1372       //      $( "#iobservatory_date_" + indice ).val( $( "#iobservatory_date_" + indice0 ).val() ); 
    1373     //        $( "#iobservatory_date_" + indice ).val( this.calendarConverter.format( currentDate ) ); 
     1639            //this.selectObservatoriesList[indice].select( this.selectObservatoriesList[indice - 1].getValue(), false ); 
     1640            $( "#iobservation_date_" + indice ).val( $( "#iobservation_date_" + indice0 ).val() ); 
     1641            $( "#iobservation_cpydate_" + indice ).val( $( "#iobservation_cpydate_" + indice0 ).val() ); 
     1642            this.selectSpectralUnitsList[indice].select( this.selectSpectralUnitsList[indice - 1].getValue(), false ); 
     1643 
     1644            this.selectInstrumentalFunctionsList[indice].select( this.selectInstrumentalFunctionsList[indice - 1].getValue(), false ); 
     1645            this.selectClimatoReferencesList[indice].select( this.selectClimatoReferencesList[indice - 1].getValue(), false ); 
     1646 
     1647            this.selectFileFormatsList[indice].select( this.selectFileFormatsList[indice - 1].getValue(), false ); 
     1648            this.select_irextinctionList[indice].select( this.select_irextinctionList[indice - 1].getValue(), false ); 
     1649            this.select_ih2oeList[indice].select( this.select_ih2oeList[indice - 1].getValue(), false ); 
     1650            this.select_io3eList[indice].select( this.select_io3eList[indice - 1].getValue(), false ); 
     1651            this.select_io2eList[indice].select( this.select_io2eList[indice - 1].getValue(), false ); 
     1652            this.select_ico2eList[indice].select( this.select_ico2eList[indice - 1].getValue(), false ); 
     1653            this.select_ich4eList[indice].select( this.select_ich4eList[indice - 1].getValue(), false ); 
     1654            this.select_in2oeList[indice].select( this.select_in2oeList[indice - 1].getValue(), false ); 
     1655            this.select_iOneTransmissionList[indice].select( this.select_iOneTransmissionList[indice - 1].getValue(), false ); 
     1656            this.select_ibervCList[indice].select( this.select_ibervCList[indice - 1].getValue(), false ); 
     1657 
     1658            $( "#iminspectral_ranger_" + indice ).val( $( "#iminspectral_ranger_" + indice0 ).val() ); 
     1659            $( "#imaxspectral_ranger_" + indice ).val( $( "#imaxspectral_ranger_" + indice0 ).val() ); 
     1660 
     1661            $( "#irp_" + indice ).val( $( "#irp_" + indice0 ).val() ); 
     1662            $( "#isr_" + indice ).val( $( "#isr_" + indice0 ).val() ); 
     1663            $( "#ira_" + indice ).val( $( "#ira_" + indice0 ).val() ); 
     1664            $( "#ide_" + indice ).val( $( "#ide_" + indice0 ).val() ); 
     1665            $( "#iza_" + indice ).val( $( "#iza_" + indice0 ).val() ); 
     1666 
     1667 
     1668            //      $( "#iobservatory_date_" + indice ).val( $( "#iobservatory_date_" + indice0 ).val() ); 
     1669            //        $( "#iobservatory_date_" + indice ).val( this.calendarConverter.format( currentDate ) ); 
    13741670 
    13751671            //$( "#iobservatory_date_" + indice ).val( this.calendarConverter.format( this.calendarConverter.parse( $( "#iobservation_date_" + indice0 ).val() ).getTime() ) ); 
    13761672            //      this.selectSpectralUnitsList[z] = this.selectSpectralUnitsList[i]; 
    13771673            /*this.selectSpectralUnitsList[i] = null; 
    1378             $( "#iminspectral_ranger_" + i ).attr( {id:"iminspectral_ranger_" + z} ); 
    1379             $( "#imaxspectral_ranger_" + i ).attr( {id:"imaxspectral_ranger_" + z} );*/ 
     1674             $( "#iminspectral_ranger_" + i ).attr( {id:"iminspectral_ranger_" + z} ); 
     1675             $( "#imaxspectral_ranger_" + i ).attr( {id:"imaxspectral_ranger_" + z} );*/ 
    13801676 
    13811677            //$( "#irp_"+indice ).val($( "#irp_"+(indice-1)).val() ); 
  • tapas/web/resources/css/TwitterLogin/front.css

    r529 r816  
    1818 
    1919#topnav { 
    20 /*padding: 10px 0px 12px;*/ 
     20    /*padding: 10px 0px 12px;*/ 
    2121    font-size: 11px; 
    2222    line-height: 23px; 
     
    4444#topnav a.signin, #topnav a.signin:hover { 
    4545    *background-position: 0 3px !important; 
    46     //color: #bfafd6; 
     46    color: #bfafd6; 
    4747} 
    4848 
     
    6262    -moz-border-radius-topleft: 4px; 
    6363    -moz-border-radius-topright: 4px; 
    64     background: #ff7c25 !important; 
     64    background: #59427b !important; 
    6565    color: black !important; 
    6666    outline: none; 
     
    7777a.signin.menu-open span { 
    7878    background-image: url("images/toggle_up_dark.png"); 
    79     color: black ; 
     79    color: white ; 
    8080} 
    8181 
     
    8686    -webkit-border-bottom-right-radius: 4px; 
    8787    display: none; 
    88     background-color: #ff7c25; 
     88    background-color: #59427b; 
    8989    position: absolute; 
    9090    width: 210px; 
    9191    z-index: 100; 
    92     border: 0 transparent; 
     92    border: 1 ; 
    9393    text-align: left; 
    9494    padding: 16px; 
     
    9898    margin-right: 0px; 
    9999    margin-right: -1px; 
    100     color: black; 
     100    color: white; 
    101101    font-size: 11px; 
    102102} 
     
    106106    -moz-border-radius: 4px; 
    107107    -webkit-border-radius: 4px; 
    108     border: 1px solid #d45400; 
     108    border: 1px solid #825fb7; 
    109109    font-size: 13px; 
    110110    margin: 0 0 5px; 
     
    138138} */ 
    139139 
     140#signin_menu a{ 
     141    color:#c0afd6; 
     142} 
     143 
    140144#signin_menu a:hover{ 
    141145    color:white; 
     
    145149    -moz-border-radius: 4px; 
    146150    -webkit-border-radius: 4px; 
    147     background: #d45400 url('images/bg-btn-blue.png') repeat-x scroll 0 0; 
    148     border: 1px solid #d45400; 
     151    background: #825fb7 url('images/bg-btn-blue.png') repeat-x scroll 0 0; 
     152    border: 1px solid #825fb7; 
    149153    color: #ffffff; 
    150     //text-shadow: 0 -1px 0 #39d; 
    151154    padding: 4px 10px 5px; 
    152155    font-size: 11px; 
    153156    margin: 0 5px 0 0; 
    154157    font-weight: bold; 
     158    border-radius:8px; 
    155159} 
    156160 
     
    163167    background-position: 0 -5px; 
    164168    cursor: pointer; 
    165     color: #d45400; 
     169    color: #59427b; 
     170    border-radius:8px; 
    166171} 
    167172 
     
    188193    -webkit-border-radius: 4px; 
    189194    border-radius: 4px; 
    190     background-color: #d45400; 
     195    background-color: black; 
    191196    color: white; 
    192197    text-align: left; 
  • tapas/web/resources/css/apycom.com-4-blue-violet/menu.css

    r492 r816  
    3737} 
    3838div#menu ul.menu { 
    39     padding-right: 10px; 
     39    padding-right: 461px; 
    4040    background: url(images/right.png) no-repeat right 0; 
    4141    _background-image: url(images/right.gif); 
  • tapas/web/resources/css/apycom.com-8-orange-red/menu.css

    r767 r816  
    2323div#menu { 
    2424    height: 50px; 
    25     padding-left: 425px; 
    26     margin-right: 0px; 
     25    padding-left: 427px; 
     26    margin-right: -39px; 
    2727    margin-top:10px; 
    2828    background:url(images/nav-bg.png) repeat-x; 
  • tapas/web/resources/css/button.css

    r529 r816  
    6262    background-color: #F0FFF0; 
    6363    color: #529214; 
     64    border-radius:8px; 
    6465} 
    6566 
     
    8384/* DISABLE */ 
    8485button.disable, button.disable:hover { 
     86    border-radius:8px; 
    8587    background-color: #CCCCCC; 
    8688    border: 1px solid #dedede; 
     
    139141/* RED BUTTON */ 
    140142button.red_button { 
    141     background-color: #d45400; 
     143    background-color: #8a68bb; 
    142144    height: 40px; 
    143145    float: right; 
     
    146148} 
    147149 
     150 
     151 
    148152.red_button_text { 
    149     color: black; 
     153    color: white; 
    150154    font-size: 11px; 
    151155    font-weight: bold; 
     156 
    152157} 
    153158 
    154159.red_button_text:hover { 
    155     color : #d45400; 
     160    color : #bfafd6; 
    156161    font-size: 11px; 
    157162    font-weight: bold; 
     
    159164 
    160165button.red_button:hover { 
    161     background-color: #ff7c25; 
     166    background-color: #bfafd6; 
    162167 
    163168} 
     169 
     170/*  */ 
     171button.tapas1 { 
     172    background-color: #bfafd6; 
     173    height: 40px; 
     174    float: right; 
     175    margin-right: 0; 
     176    border: 0; 
     177    border-radius:8px; 
     178} 
     179 
     180 
     181 
     182.tapas1_text { 
     183    color: white; 
     184    font-size: 11px; 
     185    font-weight: bold; 
     186} 
     187 
     188.tapas1:hover { 
     189    color : #bfafd6; 
     190    font-size: 11px; 
     191    font-weight: bold; 
     192} 
     193 
     194button.tapas1:hover { 
     195    background-color: #bfafd6; 
     196 
     197} 
     198 
     199 
  • tapas/web/resources/css/complexButton.css

    r383 r816  
    99 
    1010.complexButton_left { 
    11     background-image: url("../images/elements/button_left_3.png"); 
     11    background-image: url("../images/elements/button_left_violet.png"); 
    1212    background-repeat: no-repeat; 
    1313    background-position: top left; 
     
    3232 
    3333.complexButton_middle, .complexButton_middle_gray { 
    34     background-image: url("../images/elements/button_middle_3.png"); /*background-image: url("../images/elements/button_middle.png");*/ 
     34    background-image: url("../images/elements/button_middle_violet.png"); /*background-image: url("../images/elements/button_middle.png");*/ 
    3535    background-repeat: repeat-x; 
    3636    height: 39px; 
     
    4444.complexButton_lonely_middle { 
    4545    -moz-border-radius: 6px; 
    46     background-image: url("../images/elements/button_middle_3.png"); 
     46    background-image: url("../images/elements/button_middle_violet.png"); 
    4747    background-repeat: repeat-x; 
    4848    height: 40px; 
     
    6262 
    6363.complexButton_right { 
    64     background-image: url("../images/elements/button_right_3.png"); 
     64    background-image: url("../images/elements/button_right_violet.png"); 
    6565    background-repeat: no-repeat; 
    6666    background-position: top right; 
     
    7676    -webkit-border-radius: 0 4px 4px 0; 
    7777 
    78     background-image: url("../images/elements/button_middle_gray.png"); /*background-image: url("../images/elements/button_middle.png");*/ 
     78    background-image: url("../images/elements/button_middle_violet.png"); /*background-image: url("../images/elements/button_middle.png");*/ 
    7979    background-repeat: repeat-x; 
    8080    height: 39px; 
  • tapas/web/resources/css/mainEther.css

    r529 r816  
    88    font-size: 13px; 
    99    line-height: 1.7em; /*color: #333333;*/ 
    10     color: black; 
     10    color: #e7e6eb; 
    1111    font-family: Trebuchet MS, Arial, san-serif; 
    1212} 
     
    2020a img { 
    2121    border-width: 0; 
     22    text-decoration:none; 
    2223} 
    2324 
    2425a { 
    2526    text-decoration:none; 
    26     color: black; 
     27    color: #574176 ; 
    2728    text-align:center; 
    28      //line-height: 35px; 
    2929} 
    3030 
     
    3333    color: black; 
    3434    text-align:center; 
    35      //line-height: 35px; 
    3635} 
    3736 
     
    4039    color: black; 
    4140    text-align:center; 
    42      line-height: 35px; 
    4341} 
    4442 
  • tapas/web/resources/css/tapas.css

    r779 r816  
    2525.tab_class { 
    2626    float: right; 
    27     background: #ff7c25; 
    28     //color: #d45400; 
    29     color: white; 
     27    background: #bfafd6; 
     28    color: #e7e6eb; 
    3029    margin-left: 11px; 
    3130    margin-right: -10px; 
     
    3534    margin-top: 3px; 
    3635    height: 19px; 
    37 / / -moz-box-shadow : 0 0 5 px rgba ( 0, 0, 0, 0.3 ); 
    38 / / -webkit-box-shadow : 0 0 5 px rgba ( 0, 0, 0, 0.3 ); 
    39 / / box-shadow : 0 0 4 px rgba ( 0, 0, 0, 0.3 ); 
     36    border-radius: 8px 8px 0px 0px; 
    4037} 
    4138 
    4239.tab_class.activated { 
    43     background: #d45400; 
    44     color: black; 
     40    background: #8260b1; 
     41    color: white; 
    4542 
    4643} 
     
    5148 
    5249.cfs1 { 
    53     border: 2px solid black; 
     50    border: 2px solid #e7e6eb; 
    5451    -moz-border-radius: 8px; 
    5552    -webkit-border-radius: 8px; 
    5653    border-radius: 8px; 
    5754    padding-right: 40px; 
    58     padding-left: 30px; 
    59     margin-left: -10px; 
    60     padding-bottom: 11px; 
    61     width:650px; 
     55    padding-left: 21px; 
     56    height: 467px; 
     57    margin-left: -26px; 
     58    margin-top: -23px; 
     59    padding-bottom: 13px; 
     60    width:676px; 
    6261} 
    6362 
    6463.cfs2 { 
    65     border: 2px solid black; 
     64    border: 2px solid #e7e6eb; 
    6665    -moz-border-radius: 8px; 
    6766    -webkit-border-radius: 8px; 
     
    7069    padding-bottom: 30px; 
    7170    margin-right: 0px;*/ 
    72     margin-left: -67px; 
     71    margin-left: -72px; 
     72    height: 327px; 
     73    margin-top: -23px; 
    7374    /*padding-left: 20px;*/ 
    7475    width : 249px; 
     
    7778 
    7879.cfs3 { 
    79     border: 2px solid black; 
     80    border: 2px solid #bfafd6; 
    8081    -moz-border-radius: 8px; 
    8182    -webkit-border-radius: 8px; 
    8283    border-radius: 8px; 
    8384    padding-right: 45px; 
    84     padding-left: 30px; 
    85     margin-left: 18px; 
    86     margin-top: 11px; 
     85    padding-left: 60px; 
     86    margin-left: 10px; 
     87    margin-top: 2px; 
    8788    padding-bottom: 30px; 
    8889    width:900px; 
     
    9394    float: left; 
    9495    width: 1070px; 
    95     height: 400px; 
     96    height: 467px; 
    9697 
    9798} 
     
    168169.containerLabel { 
    169170    font-size: 12px; 
    170     color: black; 
     171    color: #e7e6eb; 
    171172    font-weight: bold; 
    172173/ / margin-bottom : 10 px; 
     
    177178.containerLabelT { 
    178179    font-size: 12px; 
    179     color: black; 
     180    color: #e7e6eb; 
    180181    font-weight: bold; 
    181182/ / margin-bottom : 10 px; 
     
    186187.containerLabel2 { 
    187188    font-size: 12px; 
    188     color: black; 
     189    color: #e7e6eb; 
    189190    font-weight: bold; 
    190191/ / margin-bottom : 10 px; 
     
    192193} 
    193194 
     195 
    194196.containerLabel3 { 
    195197    font-size: 12px; 
    196     color: black; 
    197     font-weight: bold; 
    198     text-align: center; 
    199 } 
    200  
    201 .containerLabel3 { 
    202     font-size: 12px; 
    203     color: black; 
     198    color: white; 
    204199    font-weight: bold; 
    205200    text-align: justify; 
     201} 
     202 
     203.containerLabel3 a { 
     204    font-size: 12px; 
     205    color: white; 
     206    font-weight: bold; 
     207    text-align: justify; 
     208    text-decoration:underline; 
     209} 
     210 
     211.containerLabel4 { 
     212    font-size: 12px; 
     213    color: white; 
     214    font-weight: bold; 
     215    text-align: right; 
     216} 
     217 
     218.containerLabel4 a { 
     219    font-size: 12px; 
     220    color: white; 
     221    font-weight: bold; 
     222    text-align: right; 
     223    text-decoration:underline; 
    206224} 
    207225 
     
    218236 
    219237.containerTitle { 
    220     font-size: 16px; 
    221     color: #d45400; 
     238    font-size: 14px; 
     239    color: #59427b; 
    222240    font-weight: bold; 
    223241    float: left; 
    224242    margin-top: 9px; 
    225     padding-left: 80px; 
     243    padding-left: 19px; 
     244    font-family: Comic Sans MS; 
     245} 
     246 
     247.containerTitle2 { 
     248    font-size: 18px; 
     249    color: #59427b; 
     250    font-weight: bold; 
     251    float: left; 
     252    margin-top: 0px; 
     253    padding-left: 40px; 
    226254} 
    227255 
     
    231259    float: left; 
    232260    margin-bottom: 10px; 
    233     margin-right: 20px; 
    234     //padding-left: 30px; 
     261    margin-left: 31px; 
    235262    width: 120px; 
    236     top: -22px; 
    237     position: relative; 
     263    top: 54px; 
     264    position: absolute; 
    238265} 
    239266 
    240267.containerUserLogout { 
    241     float: left; 
     268    float: left;                                                               bottom 
    242269    margin-right: 5px; 
    243270} 
     
    290317    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); 
    291318    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); 
    292     background: -moz-linear-gradient(#d45400, #d45400) repeat scroll 0 0 transparent; 
    293     background: -ms-linear-gradient(#d45400, #d45400) repeat scroll 0 0 transparent; /*For IE10*/ 
    294     background: -webkit-linear-gradient(#d45400, #d45400) repeat scroll 0 0 transparent; /*For IE10*/ 
    295     filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#d45400', endColorstr = 'black'); /*For IE7-8-9*/ 
    296     float: left; 
    297     position: relative; 
    298     width: 141px; 
    299     height: 26px; 
    300     color: black; 
     319    background: -moz-linear-gradient(#8A68BB, #8A68BB) repeat scroll 0 0 transparent; 
     320    background: -ms-linear-gradient(#8A68BB, #8A68BB) repeat scroll 0 0 transparent; /*For IE10*/ 
     321    background: -webkit-linear-gradient(#8260b1, #8260b1) repeat scroll 0 0 transparent; /*For IE10*/ 
     322    filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#59427b', endColorstr = 'white'); /*For IE7-8-9*/ 
     323    float: left; 
     324    position: relative; 
     325    width: 98px; 
     326    height: 32px; 
     327    color: white; 
    301328    font-weight: bold; 
    302329    padding-left: 10px; 
    303330    padding-top: 4px; 
    304     top: 18px; 
     331    top: 9px; 
    305332    margin-right: 600px; 
    306333    text-decoration: underline; 
    307  
    308 } 
     334    text-align:justify; 
     335    margin-bottom:-8px; 
     336    border-radius: 8px 8px 8px 8px ; 
     337 
     338} 
     339 
    309340 
    310341.containerField { 
     342    color: #e7e6eb; 
     343    font-weight: bold; 
     344    font-size: 14px; 
     345 
     346 
     347} 
     348 
     349.containerField2 { 
    311350    color: black; 
    312351    font-weight: bold; 
     
    316355.containerFieldO { 
    317356    font-size: 32px; 
    318         color: #999999; 
     357        color: white; 
    319358        padding-left: 0px; 
    320359        font-weight: bold; 
     
    325364    -moz-border-radius-topright: 0; 
    326365    -webkit-border-radius: 0; /*#E8EFF3*//* #618EAC*/ 
    327     background: -moz-linear-gradient(#d45400, #ff7c25); 
    328     background: -webkit-linear-gradient(#d45400, #ff7c25); 
    329     background: -ms-linear-gradient(#d45400, #ff7c25) repeat scroll 0 0 transparent; /*For IE10*/ 
    330     filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#333333', endColorstr = '#d45400'); /*For IE7-8-9*/ 
     366    border-radius: 8px 0px 8px 8px; 
     367    background: -moz-linear-gradient(#8a68bb, #8a68bb); 
     368    background: -webkit-linear-gradient(#8a68bb, #8a68bb); 
     369    background: -ms-linear-gradient(#8a68bb, #8a68bb) repeat scroll 0 0 transparent; /*For IE10*/ 
     370    filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#333333', endColorstr = '#59427b'); /*For IE7-8-9*/ 
    331371    min-height: 400px; 
    332372    text-align: justify; 
    333373    position: relative; 
    334     top: -32px; 
     374    top: 6px; 
    335375    padding: 10px; 
    336376    width: 1028px; 
     377    color:white; 
    337378} 
    338379 
    339380.containerBottom { 
    340     background: #d45400; 
    341     background: -moz-linear-gradient(left center, #FF7C25, #d45400); /*background: -webkit-linear-gradient(#333333, #d45400);*/ 
    342     background: -ms-linear-gradient(#333333, #d45400) repeat scroll 0 0 transparent; /*For IE10*/ 
    343     filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#333333', endColorstr = '#d45400'); /*For IE7-8-9*/ 
     381    background: -moz-linear-gradient(left center, #c0afd6, #8A68BB); /*background: -webkit-linear-gradient(#333333, #d45400);*/ 
     382    background: -ms-linear-gradient(#c0afd6, #8A68BB) repeat scroll 0 0 transparent; /*For IE10*/ 
     383    filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#8a68bb', endColorstr = '#59427b'); /*For IE7-8-9*/ 
    344384    color: #FFFFFF; 
    345385    height: 26px; 
    346386    padding-right: 10px; 
    347387    position: relative; 
    348     top: -32px; 
    349     width: 1040px; 
     388    top: 0px; 
     389    width: 1039px; 
     390    border-radius: 8px 8px 8px 8px; 
    350391} 
    351392 
     
    355396 
    356397.containerErrors, #errors { 
    357     background: black; 
     398    background: white; 
    358399    -moz-border-radius: 4px 4px 4px 4px; 
    359400    -webkit-border-radius: 4px 4px 4px 4px; 
    360     border: 1px solid #d45400; 
    361     color: #d45400; 
     401    border: 1px solid #cc0000; 
     402    color: #cc0000; 
    362403    padding: 10px; 
    363404    margin: 10px; 
     405    border-radius: 8px 8px 8px 8px ; 
    364406} 
    365407 
     
    370412    border: 2px solid #cc0000 ; 
    371413    color: #cc0000; 
    372     //padding-right: 284px; 
    373     //padding-bottom:60px; 
     414    border-radius: 8px 8px 8px 8px ; 
    374415    padding:10px; 
    375     margin-left: 776px; 
    376     //margin-right: 0px; 
    377     margin-top: -121px; 
     416    margin-left: 727px; 
     417    margin-top: -137px; 
    378418    text-align: left; 
    379419    font-weight: bold; 
    380420    float: left; 
    381     background: black; 
     421    background: #e7e6eb; 
    382422} 
    383423Spectral unit : must be selected 
     
    416456    -moz-border-radius: 4px 4px 4px 4px; 
    417457    -webkit-border-radius: 4px 4px 4px 4px; 
    418     border: 1px solid #d45400; 
    419     color: #d45400; 
     458    border: 1px solid #59427b; 
     459    color: white; 
    420460    padding: 10px; 
    421461    margin: 10px; 
     
    490530    margin: 18px auto 12px; 
    491531    position: relative; 
     532    border-radius: 8px 8px 8px 8px; 
    492533} 
    493534 
     
    553594 
    554595} 
     596 
     597 
     598.logos { 
     599    border-radius: 8px 8px 8px 8px; 
     600} 
  • tapas/web/resources/js/classesForJQuery/LoginButton.js

    r779 r816  
    122122        if( this.jSONUser ) 
    123123        { 
    124             var textLogin = this.jSONUser.name + " " + this.jSONUser.firstName + " (" + loginTexts[this.jSONUser.role] + ")"; 
     124            //var textLogin = this.jSONUser.name + " " + this.jSONUser.firstName + " (" + loginTexts[this.jSONUser.role] + ")"; 
     125            var textLogin = this.jSONUser.name + " " + this.jSONUser.firstName ; 
    125126 
    126127            var loginButton = new ComplexButton( {value:textLogin, parent:this.parent, id:"button_login", classNameToAdd: this.classNameToAdd} ); 
  • tapas/web/resources/js/tools/controls.js

    r529 r816  
    4444} 
    4545 
     46 
     47 
     48function isDate( val ) 
     49{ 
     50    //return (/^(([0-2]*[0-9][0-9])\.([0-2]*[0-9][0-9])\.([0-2]*[0-9][0-9])\.([0-2]*[0-9][0-9]))$/.test(val)); 
     51    //if( !(/^([0-2]?[0-9]):([0-5]+[0-9]+):([0-5]+[0-9]+)*$/.test( val )) || isEmpty( val.toString() ) ) 
     52 
     53    if( !(/^([1-2]+[0-9]+[0-9]+[0-9]+)-([0-1]+[1-9]+)-([0-3]+[0-9]+) ([0-2]?[0-9]):([0-5]+[0-9]+):([0-5]+[0-9]+)*$/.test( val )) ) 
     54        return false; 
     55    else 
     56    { 
     57 
     58        var tab = val.split( " " ); 
     59        var tab2 = tab[0].split( "-" ); 
     60 
     61        if( tab2[1] > 12 ) return false; 
     62 
     63        if( tab2[1] == 2 && tab2[2] > 29 ) return false; 
     64 
     65        if( tab2[2] > 31 ) return false; 
     66 
     67 
     68        tab = val.split( ":" ); 
     69 
     70        if( tab[0] > 24 ) return false; 
     71 
     72        return true; 
     73    } 
     74 
     75    //return (/^(([0-9]*[0-9]+):([0-9]+[0-9]+):([0-9]+[0-9]+))$/.test(val)); 
     76} 
    4677 
    4778 
     
    99130} 
    100131 
     132function isSupS( number, limit ) 
     133{ 
     134    return ( number > limit ); 
     135} 
     136 
    101137function isDiff( val, badvalue ) 
    102138{ 
  • tapas/web/resources/tapas.properties

    r809 r816  
    55src_path=/home_local/workspaces/tapas/ 
    66data_path=/home_local/workspaces/ 
     7 
  • tapas/web/resources/templates/templateBackoffice.jsp

    r767 r816  
    6767    <%-- ****************** LOGO ****************** --%> 
    6868    <div id="logo" class="containerLogo"> 
    69         <a href="#"><img src="resources/images/logo_tapas.gif" height="110px" width="110px"></a> 
     69        <a href="#"><img src="resources/images/logo_tapas.gif" height="60px" width="60px"></a> 
    7070    </div> 
    7171 
  • tapas/web/resources/templates/templateEther.jsp

    r784 r816  
    1616    <link rel="shortcut icon" type="image/x-icon" href="resources/images/logo_tapas.gif"/> 
    1717 
    18     <ether:htmlCss cssFile="apycom.com-8-orange-red/menu"/> 
     18    <ether:htmlCss cssFile="apycom.com-4-blue-violet/menu"/> 
    1919    <ether:htmlCss cssFile="jquery-ui-1.8.16.custom/jquery-ui-1.8.16.custom"/> 
    2020    <ether:htmlCss cssFile="button"/> 
     
    5555    <div id="title_tools" class="containerTapas"> 
    5656        <div id="title" class="containerTitle"> <spring:message code="app.fulltitle"/></div> 
     57        <div id="title" class="containerTitle2"><a href="http://www.pole-ether.fr" target="_blank"><img src="resources/images/logo_ether.jpg" height="40px" width="40px"></a></div> 
    5758 
    5859        <div id="tools" align="right"> 
     
    6465    <%-- ****************** LOGO ****************** --%> 
    6566    <div id="logo" class="containerLogo"> 
    66         <a href="#"><img src="resources/images/logo_tapas.gif" height="130px" width="130px"></a> 
     67        <a href="#"><img src="resources/images/logo_tapas.gif" height="70px" width="70px"></a> 
    6768    </div> 
    6869 
     
    7475 
    7576        <ul class="menu"> 
    76             <li><a href="http://ether.ipsl.jussieu.fr" class="parent" target="_blank"><img width=50 height="50" src="resources/images/logo_ether.jpg"></a></li> 
     77            <!--<li><a href="http://ether.ipsl.jussieu.fr" class="parent" target="_blank"><img width=25 height="25" src="resources/images/logo_ether.jpg"></a></li>--> 
    7778 
    78             <li><a href="#" onClick="openHome();" class="parent"><span><spring:message code="title.home"/></span></a> 
     79            <li><a href="#" onClick="openHome();" class="parent"><span><spring:message code="title.home"/></span></a></li> 
    7980 
    80             </li> 
    81             <li id="liamenu"><a href="data?methodName=viewForm" id="amenu" class="parent"><span><spring:message code="title.form"/></span></a> 
     81            <li id="liamenu"><a href="data?methodName=viewForm" id="amenu" class="parent"><span><spring:message code="title.form"/></span></a></li> 
    8282 
    83  
    84             </li> 
    8583            <li><a href="#" onclick="openLegals();"><span><spring:message code="title.legals"/></span></a></li> 
    8684 
     
    8987 
    9088    <%-- ****************** TITLE CONTENT ****************** --%> 
     89 
    9190    <div id="titleContent" class="containerTitleContent"><tiles:insert attribute="bodytitle"/> 
    9291 
  • tapas/web/src/json/json-context.xml

    r767 r816  
    3434                    <map> 
    3535                        <entry key="observatory" value="com.ether.tapas.Observatory"/> 
     36                        <entry key="location" value="com.ether.tapas.Location"/> 
    3637                        <entry key="los" value="com.ether.tapas.Los"/> 
    3738                        <entry key="instrument" value="com.ether.tapas.Instrument"/> 
  • tapas/web/src/messages_en.properties

    r783 r816  
    2020label.climato=Atmospheric model 
    2121label.datemesure=Date measurement 
     22label.cpydatemesure=or Copy date 
    2223label.berv=BERV correction 
     24label.onetransmission=In one transmission 
    2325 
    2426label.format=File format 
     
    3234 
    3335text.validnum=shoud be numeric 
    34 text.select=Select 
    3536text.NONE=None 
    3637text.badvalue=bad value 
     
    3839text.erreur.saisie=Error form request 
    3940 
     41text.selectlocation=Enter a location correclty (an observatory or a locality with altitude, latitude and longitude) 
    4042 
    41  
     43text.errcpydate=Wrong date format 
    4244 
    4345app.title=Tapas 
     
    8991label.climatoReference.SUBARCTIC_WINTER=Subarctic winter 
    9092label.climatoReference.US_STANDARD_1976=Standard US 1976 
     93 
     94label.locality=Locality 
     95label.altitude=Alt 
     96label.latitude=Lat 
     97label.longitude=Lon 
     98 
    9199 
    92100################################################################ 
  • tapas/web/src/messages_fr.properties

    r783 r816  
    1818label.climato=ModÚle atmosphérique 
    1919label.datemesure=Date de mesure 
     20label.cpydatemesure=ou Copy date 
    2021label.berv=Correction BERV 
    21  
     22label.onetransmission=En une transmission 
    2223 
    2324label.format=Format fichier 
     
    3637 
    3738 
     39 
    3840text.validnum=doit être numérique 
    3941text.select=Sélectionnez 
     
    4345text.erreur.saisie=Erreur saisie requête 
    4446 
     47text.selectlocation=Indiquer un lieu correctement (observatoire ou lieu en indiquant altitude,latitude et longitude) 
     48 
     49text.errcpydate=Mauvais format de date 
    4550 
    4651app.title=Tapas 
     
    9297label.climatoReference.US_STANDARD_1976=Standard US 1976 
    9398 
     99label.locality=Lieu 
     100label.altitude=Alt 
     101label.latitude=Lat 
     102label.longitude=Lon 
    94103 
    95104################################################################ 
     
    151160#bo.user.waitinglist.help=(an email will be sent to the user with your choice (accept or refuse)) 
    152161bo.user.list=List of users 
    153 bo.noUser=No user 
     162bo.noUser=No usertext.selectlocation=Enter a location 
    154163bo.user.lastName=Lastname 
    155164bo.user.firstName=Firstname 
Note: See TracChangeset for help on using the changeset viewer.