Changeset 504


Ignore:
Timestamp:
05/11/12 12:34:56 (12 years ago)
Author:
rboipsl
Message:

ajout champs shortName dans table Observatory
gestion nomenclature fichier donnees arletty et ecmwf
modif width interface

Location:
tapas
Files:
14 edited

Legend:

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

    r446 r504  
    245245    } 
    246246 
     247 
     248    public static void pause( long millisecondes ) 
     249    { 
     250        try 
     251        { 
     252            Thread.sleep( millisecondes ); 
     253        } 
     254        catch( InterruptedException e ) 
     255        { 
     256 
     257        } 
     258    } 
     259 
    247260} 
  • tapas/domain/interface/com/ether/tapas/Observatory.java

    r422 r504  
    6363    } 
    6464 
     65    @NotNull 
     66    public String getShortName() 
     67    { 
     68        return _shortName; 
     69 
     70    } 
     71 
     72    public void setShortName( @NotNull final String shortName ) 
     73    { 
     74        _shortName = shortName; 
     75    } 
     76 
     77 
    6578    private Integer _id; 
    6679    @NotNull 
     
    7285    @NotNull 
    7386    private Double _altitude; 
     87    @NotNull 
     88    private String _shortName; 
     89 
     90 
    7491} 
  • tapas/persistence/implementation/com/ether/dao/Observatory.hbm.xml

    r420 r504  
    3131        </property> 
    3232 
     33        <property name="shortName"> 
     34              <column name="observatory_court"/> 
     35        </property> 
     36 
    3337        </class> 
    3438 
  • tapas/service/implementation/com/ether/TapasServiceImpl.java

    r490 r504  
    2626import java.io.IOException; 
    2727import java.lang.reflect.Array; 
     28//import java.sql.Date; 
     29import java.text.ParseException; 
     30import java.text.SimpleDateFormat; 
     31import java.util.Date; 
     32 
     33import java.util.ArrayList; 
     34import java.util.Calendar; 
    2835import java.util.List; 
    2936import java.util.Properties; 
     
    4754        final String dataPath = prop.getProperty( "data_path" ); 
    4855 
    49  
    5056        final String userPath = ""; 
    51  
    5257        final String fichier = servicePath+"/"+user.getLastName()+"/"+"request.xml"; 
    53  
    5458        final Element tapas = new Element( "tapas" ); 
    55         final Element request = new Element( "request" ); 
     59        final List<Element> listRequest = new ArrayList<Element>(fTapas.getRequests().size()); 
    5660 
    5761        //On crée un nouveau Document JDOM basé sur la racine que l'on vient de créer 
     
    6973        for( final Request iRequest : requests ) 
    7074        { 
     75 
     76            final Element request = new Element( "request" ); 
    7177            // Id de la request 
    7278            final Attribute idR = new Attribute( "Id", iRequest.getId().toString() ); 
     
    7581            // PREFERENCES 
    7682            final Element preferences = new Element( "preferences" ); 
     83 
    7784 
    7885            //format 
     
    8390            format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 
    8491            preferences.addContent( format ); 
     92 
    8593 
    8694            //rayleighExtinction 
     
    204212            for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 
    205213            { 
    206  
    207214                if( i == tabMess.length - 1 ) 
    208215                    chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); 
     
    258265 
    259266 
    260  
    261             String fileArletty = "", fileECMWF = ""; 
    262             fileArletty = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "arletty" ); 
    263             fileECMWF = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "ecmwf" ); 
     267            String fileArletty = "", fileECMWF = "", shortName=""; 
     268            //rajouter annee/mois 
     269 
     270            shortName = obs.getShortName(); 
     271 
     272            fileArletty = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "arletty",shortName ); 
     273            fileECMWF = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "ecmwf", shortName ); 
    264274 
    265275            final Element arlettyFile = new Element( "arletty_file" ); 
     
    271281            atmosphere.addContent( ecmwfFile ); 
    272282 
    273             tapas.addContent( request ); 
    274         } 
     283            listRequest.add( request ); 
     284        } 
     285 
     286        tapas.addContent( listRequest ); 
    275287 
    276288        String commandePath = servicePath+"/"+user.getLastName()+"/"+fTapas.getId(); 
     
    282294 
    283295 
    284     public boolean execAppelQSub( final String commandePath, User user, Properties prop ) 
     296    public boolean execAppelQSub( final String repCommande, User user, Properties prop ) 
    285297            throws ServiceException 
    286298    { 
    287299        String commande=""; 
     300        String commandePath=prop.getProperty( "service_path" )+"/"+user.getLastName()+"/"+repCommande+"/"; 
     301 
    288302        //copie run qsub dans repertoire commande 
    289303        commande = "cp "+prop.getProperty( "src_path" )+"/"+prop.getProperty( "process_name" )+" "+commandePath; 
     
    298312        } 
    299313 
     314        EtherHelper.pause(7000); 
     315 
    300316        //execution qsub pour la commande en cours 
    301317        commande = commandePath+"/"+prop.getProperty( "process_name" )+" -f request.xml"+" -m "+user.getEmail(); 
     
    310326        } 
    311327 
    312         return true; 
     328       //EtherHelper.pause(7000); 
     329 
     330       return true; 
    313331    } 
    314332 
     
    325343    }                    */ 
    326344 
    327     public String createFileName( String date, String type ) 
    328     { 
    329  
    330         String fileName = "test_"+type+"_"+date+".txt"; 
    331  
    332  
    333         /*String heure = date.substring( 4, 6 ); 
    334  
    335         int iheure = Math.abs( Integer.parseInt( heure ) ); 
    336  
     345    public String createFileName( String date, String type, String nomCourt ) 
     346    { 
     347        String fileName = ""; 
     348 
     349        String annee = date.substring( 0, 4 ); 
     350        //String mois = String.valueOf( Integer.parseInt(date.substring(5,7))-1); 
     351        String mois = date.substring(5,7); 
     352        String heure = date.substring(11,13); 
     353        String jour = date.substring(8,10); 
     354        String ind=""; 
     355 
     356        Calendar cal = Calendar.getInstance(); 
     357 
     358        try { 
     359            Date dd = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").parse(jour+"/"+mois+"/"+annee+" "+heure+":00:00"); 
     360            cal.setTime(dd); 
     361        } 
     362        catch( ParseException e ) { 
     363 
     364        } 
     365 
     366        int iheure = cal.get(Calendar.HOUR_OF_DAY); 
    337367 
    338368        if( iheure < 3) ind = "00"; 
    339369        else if ( iheure >= 21) { 
    340370            ind = "00"; 
     371            cal.add(Calendar.DAY_OF_MONTH, +1); 
    341372        } 
    342373        else if( Math.abs(6-iheure) < 3) ind = "06"; 
     
    344375        else if( Math.abs(18 - iheure) < 3 ) ind = "18"; 
    345376 
    346  
    347         if( type == "arletty" ) fileName = "arletty_" + date + ".txt"; 
    348         else if( type == "ecmwf" ) fileName = "ecmwf_" + date + ".txt"; 
    349         */ 
    350  
     377        //+1 sur le mois pour recuperer le numero correct du mois considere 
     378        if (cal.get(Calendar.MONTH)+1 <10) mois="0"+String.valueOf(cal.get(Calendar.MONTH)+1); 
     379        else mois=""+String.valueOf(cal.get(Calendar.MONTH)+1); 
     380 
     381        if (cal.get(Calendar.DAY_OF_MONTH) <10) jour="0"+ cal.get(Calendar.DAY_OF_MONTH); 
     382        else jour=""+cal.get(Calendar.DAY_OF_MONTH); 
     383 
     384        annee=""+cal.get(Calendar.YEAR); 
     385 
     386        fileName = "/"+annee+"/"+mois+"/"+jour+"/"+nomCourt+"_"+annee+mois+jour+ind; 
     387 
     388        if( type == "arletty" ) fileName = fileName+".arl"; 
     389        else if ( type == "ecmwf" ) fileName = fileName+"_qo3.txt"; 
    351390 
    352391        return fileName; 
     
    368407            } 
    369408 
     409            EtherHelper.pause(7000); 
     410 
    370411            final String fichier = commandePath+"/"+"request.xml"; 
    371412 
     
    375416            //avec en argument le nom du fichier pour effectuer la sérialisation. 
    376417            sortie.output( document, new FileOutputStream( fichier ) ); 
     418 
     419            //EtherHelper.pause(7000); 
     420 
    377421        } 
    378422        catch( java.io.IOException ignored ) 
     
    434478 
    435479 
    436     // recuperation infos observatoire avec le nom 
     480    // recuperation infos observatoire avec l'id 
    437481    @Nullable 
    438482    @Transactional(readOnly = true) 
  • tapas/service/interface/com/ether/TapasService.java

    r490 r504  
    3131    public Long getNumRequest() throws ServiceException; 
    3232 
    33     public String createFileName(String date, String type) throws ServiceException; 
     33    public String createFileName(String date, String type, String shortName) throws ServiceException; 
    3434 
    3535    public boolean execAppelQSub( final String commandePath, @NotNull final User user, @NotNull final Properties prop ) throws ServiceException; 
  • tapas/web/project/formTapas.jsp

    r500 r504  
    4040        <div class="containerForm" id="formulaire"></div> 
    4141 
    42         <div id="errForm" class="errorsForm"></div> 
    4342 
    4443        <script type="text/javascript"> 
     
    9998 
    10099            tapasTexts["label.delButton"] = "<spring:message code="label.delButton"/>"; 
     100            tapasTexts["label.confirm.del"] = "<spring:message code="label.confirm.del"/>"; 
     101            tapasTexts["text.erreur.saisie"] = "<spring:message code="text.erreur.saisie"/>"; 
     102            tapasTexts["label.title.add"] = "<spring:message code="label.title.add"/>"; 
     103            tapasTexts["label.title.del"] = "<spring:message code="label.title.del"/>"; 
    101104 
    102105            var interfaceTapas = new InterfaceTapas( ${jSonFileFormats}, ${jSonYesNos}, ${jSonObservatories}, ${jSonSpectralUnits}, ${jSonInstrumentalFunctions}, ${jSonClimatoReferences} ); 
  • tapas/web/project/formTapas_script.jsp

    r503 r504  
    77        /** *********** CONTAINERS *********** **/ 
    88        this.containerForm = $( "#formulaire" ); 
    9         this.containerErrors = $( "#errForm" ); 
     9        //this.containerErrors = $( "#errForm" ); 
     10        //this.divE= $( "#divErreurs"); 
    1011        this.containerCenter = $( "#containerCenter" ); 
    1112        this.containerTabs = $( "#tab" ); 
     
    3637        // Buttons 
    3738        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 )} ); 
    38         this.addRequestButton = new Button( {value:tapasTexts["label.addButton"], parent:this.containerCenter, id:"button_add", className: "positive", onClick:jQuery.proxy( this.onClickAdd, this )} ); 
    39         this.delRequestButton = new Button( {value:tapasTexts["label.delButton"], parent:this.containerCenter, id:"button_del", className: "negative", onClick:jQuery.proxy( this.onClickDel, this )} ); 
     39        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 )} ); 
     40        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 )} ); 
    4041        this.delRequestButton.disable(); 
    4142 
    4243        this.createForm(); 
    4344        this.tabActive = this.createTab(); 
    44  
    45         this.containerErrors.hide(); 
    46     }, 
    47  
     45        this.divE = $( document.createElement( "div" ) ); 
     46        this.divE.attr( {id:"divErrors", class:"errorsForm"} ); 
     47        /*var fieldSetE = $( document.createElement( "fieldset" ) ); 
     48         fieldSetE.addClass( "cfs3" ); 
     49         this.divE.append( fieldSetE );*/ 
     50 
     51        this.containerForm.append( this.divE ); 
     52        //this.containerErrors.hide(); 
     53        this.divE.hide(); 
     54 
     55 
     56    }, 
    4857 
    4958 
     
    9099        if( !currentDate ) 
    91100            currentDate = new Date(); 
     101 
    92102        $( "#" + inputDateId ).val( this.calendarConverter.format( currentDate ) ); 
    93103        $( "#" + inputDateId ).addClass( "calendar" ); 
     
    254264                error: jQuery.proxy( this.showErrors, this ) 
    255265            } ); 
     266 
    256267    }, 
    257268 
     
    260271    handleCreateXML: function( result ) 
    261272    { 
    262         // TODO : gérer le bob ?? 
    263         var bob = jQuery.parseJSON( result ).result; 
    264         alert( bob ); 
     273        var res = jQuery.parseJSON( result ).result; 
     274        alert( res ); 
    265275    }, 
    266276 
     
    269279    onClickSubmit: function() 
    270280    { 
    271 //        if( this.validFields() ) 
    272 //        { 
    273 //            if( confirm( tapasTexts["confirm"] ) ) 
    274 //            { 
    275 //                this.containerErrors.hide(); 
    276         this.requestCreateXML(); 
    277 //            } 
    278 //        } 
     281        if( this.validFields() ) 
     282        { 
     283            this.divE.hide(); 
     284            if( confirm( tapasTexts["confirm"] ) ) 
     285                this.requestCreateXML(); 
     286        } 
    279287    }, 
    280288 
     
    282290    onClickAdd: function() 
    283291    { 
    284         this.containerErrors.hide(); 
     292        this.divE.hide(); 
    285293        this.nbRequest++; 
    286294 
     
    300308    onClickDel: function() 
    301309    { 
    302         // TODO : enlever le pouet 
    303         if( confirm( "pouet" ) ) 
     310        if( confirm( tapasTexts["label.confirm.del"] ) ) 
    304311        { 
    305312            var numCurrent = this.numRequest; 
     
    458465    createForm: function() 
    459466    { 
    460         this.divErreurs = $( document.createElement( "div" ) ); 
    461         this.divErreurs.addClass( "errorsForm" ); 
    462         this.divErreurs.hide(); 
    463467 
    464468        var divAll = $( document.createElement( "div" ) ); 
     
    514518 
    515519        this.containerForm.append( divAll ); 
    516         this.containerForm.append( this.divErreurs ); 
     520        this.containerForm.append( this.divE ); 
    517521        //this.tabInput = new Array(3); 
    518522 
     
    653657    validFields: function() 
    654658    { 
    655         var testOk = isSup( this.selectObservatories.getValue(), 0 ); 
    656         if( !testOk ) 
     659        for( var i = 1; i <= this.nbRequest; i++ ) 
    657660        { 
    658             this.containerErrors.html( tapasTexts["label.observatory"] + " : " + tapasTexts["text.toselect"] ); 
    659             this.containerErrors.show(); 
    660             return false; 
     661 
     662            var chaine = tapasTexts["text.erreur.saisie"] + " " + i + "<br>"; 
     663            var testOk = isSup( this.selectObservatoriesList[i].getValue(), 0 ); 
     664            if( !testOk ) 
     665            { 
     666                this.divE.html( chaine + tapasTexts["label.observatory"] + " : " + tapasTexts["text.toselect"] ); 
     667                this.divE.show(); 
     668                return false; 
     669            } 
     670 
     671            testOk = isDiff( this.selectSpectralUnitsList[i].getValue(), -1 ); 
     672            if( !testOk ) 
     673            { 
     674                this.divE.html( chaine + tapasTexts["label.spectralUnit"] + " : " + tapasTexts["text.toselect"] ); 
     675                this.divE.show(); 
     676                return false; 
     677            } 
     678 
     679            testOk = isValidRange( $( "#iminspectral_ranger_" + i ).val(), $( "#imaxspectral_ranger_" + i ).val(), this.selectSpectralUnitsList[i].getValue() ); 
     680            if( !testOk ) 
     681            { 
     682                this.divE.html( chaine + tapasTexts["label.spectralRange"] + " : " + tapasTexts["text.badvalue"] ); 
     683                this.divE.show(); 
     684                return false; 
     685            } 
     686 
     687            testOk = isDeg( $( "#ide_" + i ).val() ); 
     688            if( !testOk ) 
     689            { 
     690                this.divE.html( chaine + tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 
     691                this.divE.show(); 
     692                return false; 
     693            } 
     694 
     695            testOk = isValidNum( $( "#iza_" + i ).val() ); 
     696            if( !testOk ) 
     697            { 
     698                this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 
     699                this.divE.show(); 
     700                return false; 
     701            } 
     702 
     703            testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 
     704            if( !testOk ) 
     705            { 
     706                this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 
     707                this.divE.show(); 
     708                return false; 
     709            } 
     710 
     711            testOk = isValidNum( $( "#irp_" + i ).val() ); 
     712            if( !testOk ) 
     713            { 
     714                this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
     715                this.divE.show(); 
     716                return false; 
     717            } 
     718 
     719            testOk = isSup( $( "#irp_" + i ).val(), 1 ); 
     720            if( !testOk ) 
     721            { 
     722                this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
     723                this.divE.show(); 
     724                return false; 
     725            } 
     726 
     727            testOk = isValidNum( $( "#isr_" + i ).val() ); 
     728            if( !testOk ) 
     729            { 
     730                this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 
     731                this.divE.show(); 
     732                return false; 
     733            } 
     734 
     735            testOk = isSup( $( "#isr_" + i ).val(), 1 ); 
     736            if( !testOk ) 
     737            { 
     738                this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 
     739                this.divE.show(); 
     740                return false; 
     741            } 
    661742        } 
    662743 
    663         testOk = isDiff( this.selectSpectralUnits.getValue(), -1 ); 
    664         if( !testOk ) 
    665         { 
    666             this.containerErrors.html( tapasTexts["label.spectralUnit"] + " : " + tapasTexts["text.toselect"] ); 
    667             this.containerErrors.show(); 
    668             return false; 
    669         } 
    670  
    671         testOk = isValidRange( $( "#iminspectral_ranger" ).val(), $( "#imaxspectral_ranger" ).val(), this.selectSpectralUnits.getValue() ); 
    672         if( !testOk ) 
    673         { 
    674             this.containerErrors.html( tapasTexts["label.spectralRange"] + " : " + tapasTexts["text.badvalue"] ); 
    675             this.containerErrors.show(); 
    676             return false; 
    677         } 
    678  
    679         testOk = isDeg( $( "#ide" ).val() ); 
    680         if( !testOk ) 
    681         { 
    682             this.containerErrors.html( tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 
    683             this.containerErrors.show(); 
    684             return false; 
    685         } 
    686  
    687         testOk = isValidNum( $( "#iza" ).val() ); 
    688         if( !testOk ) 
    689         { 
    690             this.containerErrors.html( tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 
    691             this.containerErrors.show(); 
    692             return false; 
    693         } 
    694  
    695         testOk = isBetween( $( "#iza" ).val(), 0, 90 ); 
    696         if( !testOk ) 
    697         { 
    698             this.containerErrors.html( tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 
    699             this.containerErrors.show(); 
    700             return false; 
    701         } 
    702  
    703         testOk = isValidNum( $( "#irp" ).val() ); 
    704         if( !testOk ) 
    705         { 
    706             this.containerErrors.html( tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
    707             this.containerErrors.show(); 
    708             return false; 
    709         } 
    710  
    711         testOk = isSup( $( "#irp" ).val(), 1 ); 
    712         if( !testOk ) 
    713         { 
    714             this.containerErrors.html( tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 
    715             this.containerErrors.show(); 
    716             return false; 
    717         } 
    718  
    719         testOk = isValidNum( $( "#isr" ).val() ); 
    720         if( !testOk ) 
    721         { 
    722             this.containerErrors.html( tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 
    723             this.containerErrors.show(); 
    724             return false; 
    725         } 
    726  
    727         testOk = isSup( $( "#isr" ).val(), 1 ); 
    728         if( !testOk ) 
    729         { 
    730             this.containerErrors.html( tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 
    731             this.containerErrors.show(); 
    732             return false; 
    733         } 
     744        return true; 
    734745    }, 
    735746 
     
    741752            this.delRequestButton.disable(); 
    742753 
    743         if( 9 <= this.nbRequest ) 
     754        if( 10 <= this.nbRequest ) 
    744755            this.addRequestButton.disable(); 
    745756        else 
  • tapas/web/resources/css/mainEther.css

    r481 r504  
    1313 
    1414.pageWrapper { 
    15     width: 980px; /*text-align: left;*/ 
     15    width: 1047px; /*text-align: left;*/ 
    1616    margin: auto; 
    1717    margin-top: -15px; 
  • tapas/web/resources/css/tapas.css

    r497 r504  
    1919 
    2020    float: right; 
     21    font-weight:bold; 
     22    //font-size:12px; 
    2123} 
    2224 
     
    5658    margin-left: -10px; 
    5759    padding-bottom: 30px; 
     60    width:650px; 
    5861} 
    5962 
     
    6366    -webkit-border-radius: 8px; 
    6467    border-radius: 8px; 
    65     padding-right: 40px; 
     68    padding-right: 30px; 
    6669    padding-bottom: 30px; 
    6770    margin-right: 0px; 
    68     margin-left: -30px; 
    69     padding-left: 30px 
    70 } 
     71    margin-left: -65px; 
     72    padding-left: 20px 
     73} 
     74 
     75 
    7176 
    7277.containerForm { 
    7378 
    7479    float: left; 
    75     width: 1000px; 
     80    width: 1070px; 
    7681    height: 400px; 
    7782 
     
    159164    color: white; 
    160165    font-weight: bold; 
    161  
    162166    text-align: center; 
    163167} 
     
    169173    -webkit-box-shadow: 2px 3px 7px rgba(0, 0, 0, 0.3); 
    170174    box-shadow: 2px 3px 7px rgba(0, 0, 0, 0.3); 
    171     width: 980px; 
     175    width: 1047px; 
    172176    float: left; 
    173177    margin-bottom: 10px; 
     
    227231.containerMenu { 
    228232    float: right; 
     233    margin-left:171px; 
    229234} 
    230235 
     
    251256    float: left; 
    252257    position: relative; 
    253     width: 150px; 
     258    width: 141px; 
    254259    height: 26px; 
    255260    color: white; 
     
    281286    top: -32px; 
    282287    padding: 10px; 
    283     width: 960px; 
     288    width: 1028px; 
    284289} 
    285290 
     
    294299    position: relative; 
    295300    top: -32px; 
    296     width: 972px; 
     301    width: 1040px; 
    297302} 
    298303 
     
    312317 
    313318.errorsForm { 
    314     background: white; 
    315     -moz-border-radius: 4px 4px 4px 4px; 
    316     -webkit-border-radius: 4px 4px 4px 4px; 
    317     border: 1px solid #574176; 
    318     color: red; 
    319     padding: 10px; 
    320     margin-left: 640px; 
    321     margin-top: -131px; 
     319 
     320    -moz-border-radius: 8px; 
     321    -webkit-border-radius: 8px; 
     322    border: 2px solid #cc0000 ; 
     323    color: #cc0000; 
     324    //padding-right: 284px; 
     325    //padding-bottom:60px; 
     326    padding:10px; 
     327    margin-left: 776px; 
     328    //margin-right: 0px; 
     329    margin-top: -121px; 
    322330    text-align: left; 
    323331    font-weight: bold; 
    324332    float: left; 
    325     min-height: 50px; 
    326     min-width: 260px; 
    327 } 
     333    background:white; 
     334} 
     335Spectral unit : must be selected 
     336Observatory : must be selected 
     337 
     338.cfs3 { 
     339   /* border: 2px solid red; 
     340    -moz-border-radius: 8px; 
     341    -webkit-border-radius: 8px; 
     342    border-radius: 8px; 
     343    padding-right: 40px; 
     344    padding-bottom: 30px; 
     345    margin-right: 0px; 
     346    margin-left: 30px; 
     347    padding-left: 30px ; 
     348    background: white;*/ 
     349} 
     350 
     351/*.errorsForm { 
     352    -moz-border-radius: 8px 8px 8px 8px; 
     353    border: 2px solid white; 
     354    //margin-left: 648px; 
     355    margin-right: 1500; 
     356    padding-bottom: 30px; 
     357    //padding-left: 30px; 
     358    //padding-right: 40px; 
     359 
     360} */ 
    328361 
    329362.containerErrors { 
  • tapas/web/resources/js/tools/controls.js

    r497 r504  
    9191function isValidRange( val1, val2, unit ) 
    9292{ 
     93    /*alert("val1 : "+val1); 
     94    alert("val2 : "+val2); 
     95    alert("unit : "+unit);*/ 
     96 
    9397    if( 'NM_VACUUM' == unit || 'NM_STANDARD' == unit ) 
    9498    { 
    9599        if( isFloat( val1 ) && isFloat( val2 ) && 350 <= parseFloat( val1 ) && 2500 >= parseFloat( val2 ) && parseFloat( val1 ) <= parseFloat( val2 ) ) return true; 
    96         else 
    97             return false; 
     100        else return false; 
    98101    } 
     102    else return 'Unit unknown'; 
     103 
    99104} 
  • tapas/web/resources/templates/templateEther_script.jsp

    r490 r504  
    7171        onClickLanguage: function() 
    7272        { 
    73             this.requestChangeLocale(); 
     73            if (confirm("This action will cancel all your selection.")) 
     74                this.requestChangeLocale(); 
    7475        }, 
    7576 
  • tapas/web/src/com/ether/Controller.java

    r496 r504  
    1111import org.apache.commons.logging.Log; 
    1212import org.apache.commons.logging.LogFactory; 
     13import org.jetbrains.annotations.NotNull; 
    1314 
    1415import java.io.FileInputStream; 
     
    3637     * @throws WebException 
    3738     */ 
    38     @ControllerMethod(view = VIEW_FORM_TAPAS, loginMandatory = false, defaultView = VIEW_INDEX) 
     39    @ControllerMethod(view = VIEW_FORM_TAPAS, loginMandatory = true, defaultView = VIEW_INDEX) 
    3940    public JSONObject viewForm() 
    4041            throws WebException 
     
    7273     * @throws WebException 
    7374     */ 
    74     //@ControllerMethod(jsonResult = true, userMandatory = true, defaultView = VIEW_INDEX) 
    75     @ControllerMethod(jsonResult = true, userMandatory = false, defaultView = VIEW_INDEX) 
    76     //public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas, @NotNull final User user ) 
    77     public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas ) 
     75    @ControllerMethod(jsonResult = true, userMandatory = true, defaultView = VIEW_INDEX) 
     76    //@ControllerMethod(jsonResult = true, userMandatory = false, defaultView = VIEW_INDEX) 
     77    public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas, @NotNull final User user ) 
     78    //public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas ) 
    7879            throws WebException 
    7980    { 
    8081 
    8182        /***********/ 
    82         final User user = new User(); 
     83    /*    final User user = new User(); 
    8384        user.setId( 12 ); 
    8485        user.setLastName( "tamere" ); 
    8586        user.setEmail( "rbopipsl@ipsl.jussieu.fr" ); 
    8687        user.setCreationDate( new Date() ); 
    87         user.setPassword( "pif" ); 
     88        user.setPassword( "pif" );*/ 
    8889        /******/ 
    8990 
     
    101102        } 
    102103 
    103         //TODO recuperer le USER via ControllerEther 
    104  
    105104        // creation fichier requete xml 
    106105        try 
     
    126125        try 
    127126        { 
    128             getTapasService().execAppelQSub( "popo", user, prop ); 
     127            getTapasService().execAppelQSub( javaTapas.getId(), user, prop ); 
    129128        } 
    130129        catch( ServiceException e ) 
  • tapas/web/src/messages_en.properties

    r490 r504  
    3131text.badvalue=bad value 
    3232text.toselect=must be selected 
     33text.erreur.saisie=Error form request 
    3334 
    34 label.delButton=CANCEL 
     35 
    3536 
    3637 
     
    5152label.backoffice=Backoffice 
    5253label.form=Request form 
     54label.confirm.del=Do you really want to remove this request ? 
     55label.success=Your request was taken into account. You will receive by email the access result files. 
    5356 
    5457label.role.administrator=Administrateur 
     
    5861 
    5962label.submitButton=EXECUTE 
    60 label.addButton=ADD REQUEST 
    61 label.confirm=ARE YOU SURE YOU WANT TO SEND THIS REQUEST ? 
     63label.addButton=+ 
     64label.delButton=x 
     65label.title.add=ADD A NEW REQUEST 
     66label.title.del=REMOVE CURRENT REQUEST 
     67label.confirm=SEND THE REQUEST PROCESSING ? 
    6268label.requete=Request 
    6369 
  • tapas/web/src/messages_fr.properties

    r490 r504  
    2626label.observatory=Observatoire 
    2727label.preferences=Préférences 
     28label.confirm.del=Voulez-vous vraiment supprimer cette requête ? 
     29label.success=Votre requête a été prise en compte. Vous allez recevoir par email l'accés aux fichiers résultats. 
    2830 
    29 label.delButton=ANNULER 
    3031 
    3132text.validnum=doit être numérique 
     
    3435text.NONE=Aucune 
    3536text.toselect=à sélectionner 
     37text.erreur.saisie=Erreur saisie requête 
    3638 
    3739 
     
    5658label.role.user=User 
    5759 
    58 label.confirm=CONFIRMEZ-VOUS L'ENREGISTREMENT DE CETTE REQUETE ? 
     60label.confirm=ENVOYER LA DEMANDE ? 
    5961 
    6062error.ERROR_JSON_TAPAS_IS_NULL=Erreur de création du formulaire Tapas 
    6163 
    6264label.submitButton=EXECUTER 
    63 label.addButton=ENREGISTRER 
     65label.addButton=+ 
     66label.delButton=x 
     67label.title.add=AJOUTER UNE NOUVELLE REQUETE 
     68label.title.del=SUPPRIMER LA REQUETE COURANTE 
    6469label.requete=Requete 
    6570 
Note: See TracChangeset for help on using the changeset viewer.