Ignore:
Timestamp:
11/20/12 16:27:32 (12 years ago)
Author:
npipsl
Message:

label sur les graphiques

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geisa/web/initGeisa_script.jsp

    r666 r670  
    509509                //Titre général (qui changera en fonction de la base geisa choisie) 
    510510                document.getElementById('spectralRangeTitre').innerHTML = ""; 
    511                 document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup> :"; 
     511                document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range (0 to 35877.030506 cm<sup>-1</sup>) :"; 
    512512 
    513513                //Titre 
     
    10041004                switch (this.selectDatabase.getValue()) { 
    10051005                    case 'GEISA2003': 
    1006                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0 -input_format asc -database_name GEISA2003 -database_type gs03"; 
     1006                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0 -input_format asc -database_name GEISA2003 -database_type gs03 -type_out png"; 
    10071007                        break; 
    10081008                    case 'GEISA2011': 
    1009                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2009_bin -database_name GEISA2011 -database_type gs08"; 
     1009                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2009_bin -database_name GEISA2011 -database_type gs08 -type_out png"; 
    10101010                        break; 
    10111011                    case 'GEISAIASI2003': 
    1012                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0 -input_format asc -database_name GEISAIASI2003 -database_type gsi03"; 
     1012                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0 -input_format asc -database_name GEISAIASI2003 -database_type gsi03 -type_out png"; 
    10131013                        break; 
    10141014                    case 'GEISAIASI2011': 
    1015                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0 -database_name GEISAIASI2011 -database_type gsi08"; 
     1015                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0 -database_name GEISAIASI2011 -database_type gsi08 -type_out png"; 
    10161016                        break; 
    10171017                } 
     
    11151115                    case 'GEISA2003': 
    11161116                        //isNaN = n'est pas un nombre 
    1117                         if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506) 
     1117                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506) 
    11181118                        { 
    11191119                            alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506"); 
     
    11211121                        } 
    11221122 
    1123                         if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506) 
     1123                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506) 
    11241124                        { 
    11251125                            alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506"); 
    11261126                            return; 
    11271127                        } 
     1128 
    11281129                        break; 
    11291130                    case 'GEISA2011': 
    11301131                        //isNaN = n'est pas un nombre 
    1131                         if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506) 
     1132                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506) 
    11321133                        { 
    11331134                            alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506"); 
     
    11351136                        } 
    11361137 
    1137                         if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506) 
     1138                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506) 
    11381139                        { 
    11391140                            alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506"); 
     
    11431144                    case 'GEISAIASI2003': 
    11441145                        //isNaN = n'est pas un nombre 
    1145                         if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767) 
     1146                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767) 
    11461147                        { 
    11471148                            alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767"); 
     
    11491150                        } 
    11501151 
    1151                         if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767) 
     1152                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767) 
    11521153                        { 
    11531154                            alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767"); 
     
    11571158                    case 'GEISAIASI2011': 
    11581159                        //isNaN = n'est pas un nombre 
    1159                         if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767) 
     1160                        if(isNaN(parseInt(($("#rangeLower").val()))) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767) 
    11601161                        { 
    11611162                            alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767"); 
     
    11631164                        } 
    11641165 
    1165                         if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767) 
     1166                        if(isNaN(parseInt(($("#rangeUpper").val()))) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767) 
    11661167                        { 
    11671168                            alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767"); 
     
    15211522                    $.ajax( { 
    15221523                                url: "project?methodName=getTransitionByIsotopeName&isotopesSelectedNameArray="+isotopesSelectedNameArray+"&geisaSelectedDatabase="+this.selectDatabase.getValue2()+"&spectralRangeLower="+spectralRangeLower+"&spectralRangeUpper="+spectralRangeUpper, 
    1523                                 success:jQuery.proxy( this.handleRequestTransition, this ) 
     1524                                success:jQuery.proxy( this.handleRequestTransition, this ), 
     1525                                error: jQuery.proxy( this.handleErrorRequestTransition, this ) 
    15241526                            } ); 
    15251527 
     
    16731675            { 
    16741676 
    1675                  //numéro unique pour le nom du répertoire 
     1677                 //nom du répertoire : exemple de retour de valeur du controleur 
    16761678                //this.nb = jQuery.parseJSON( result ).nb; 
    16771679                //this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut; 
    1678                 //this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut+"image/"; 
    1679                  this.NomRepFileOutImage = this.NomRepFileOut+"image/"; 
    1680  
    1681                 //chemin de l'image 
    1682 //                this.pathImg = jQuery.parseJSON( result ).pathImg; 
    1683                 this.pathImg = "<%=Controller.PATH_IMAGES%>"+this.NomRepFileOutImage; 
     1680 
     1681                //chemin court de l'image 
     1682                this.pathImg = "<%=Controller.PATH_IMAGES%>"+this.NomRepFileOut; 
    16841683 
    16851684 
    16861685                //Pour tracer le bon nombre de graphe et de bouton download 
    16871686                var i=1; 
    1688                 //bouton  Download All 
    1689                 var content = "<a href=project?methodName=downloadFile&fileName=" +this.NomRepFileOutImage + "GEISA.tar&fileNameToDisplay=GEISA.tar><button class='dataProtocolDownloadButton'>Download All</button></a>"; 
     1687                var content=""; 
     1688                //bouton  "Download All"  si il y a plus d'un graph 
     1689                if (this.nbGraph > 1) 
     1690                { 
     1691                    content = "<a href=project?methodName=downloadFile&fileName=" +this.NomRepFileOut + "GEISA.tar&fileNameToDisplay=GEISA.tar><button class='dataProtocolDownloadButton'>Download All</button></a>"; 
     1692                } 
    16901693                //tracer chaque graphe avec son bouton  download associé 
    16911694                for (i=1; i<this.nbGraph+1; i++) { 
    16921695                    //content = content + '<img src=' + this.pathImg + "graph" + this.nb +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName='  + "graph" + this.nb+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>'; 
    1693                     content = content +'<img src=' + this.pathImg + this.nomFichier +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName=' +this.NomRepFileOutImage + this.nomFichier+"-"+i + ".png&fileNameToDisplay="+this.nomFichier+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>'; 
     1696                    content = content +'<img src=' + this.pathImg + this.nomFichier +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName=' +this.NomRepFileOut + this.nomFichier+"-"+i + ".png&fileNameToDisplay="+this.nomFichier+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>'; 
    16941697                } 
    16951698 
    16961699                this.displayWindow(content); 
    16971700            }, 
    1698  
    1699  
    1700 //            handleRequestTransition: function( result ) 
    1701 //            { 
    1702 //                alert("youpi"); 
    1703 //            }, 
    17041701 
    17051702 
     
    17431740 
    17441741                }, this)); 
     1742 
     1743            }, 
     1744 
     1745            //en cas d'erreur dans la requête des transitions ( pas de valeur ou caractÚres à la place de nombres dans champ spectral) 
     1746            handleErrorRequestTransition :  function() 
     1747            { 
     1748             //pour vider les menus déroulant des transitions précédentes 
     1749                document.getElementById("transition2").length=0; 
     1750                document.getElementById("transition1").length=0; 
     1751 
     1752               this.selectTransitionLower.append($( document.createElement( "option" ) ).attr( {value:"modify", text:"Modify spectral range value", disabled:"disabled", selected:"selected"} )); 
     1753               this.selectTransitionUpper.append($( document.createElement( "option" ) ).attr( {value:"modify", text:"Modify spectral range value", disabled:"disabled", selected:"selected"} )); 
    17451754 
    17461755            }, 
     
    18331842                { 
    18341843                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
    1835                     document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup> :"; 
     1844                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range (0 to 35877.030506 cm<sup>-1</sup>) :"; 
    18361845                    //$("#rangeLower").val(0); 
    18371846                    //$("#rangeUpper").val(35877.030506); 
     
    18631872                { 
    18641873                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
    1865                     document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup> :"; 
     1874                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range (0 to 35877.030506 cm<sup>-1</sup>) :"; 
    18661875                    //$("#rangeLower").val(0); 
    18671876                    //$("#rangeUpper").val(35877.030506); 
     
    21182127                { 
    21192128                 alert("Change isotopologues selection or spectral range values to obtain transition values"); 
     2129                } 
     2130                //si il n'y a qu'un élément dans les menu déroulant transition upper et lower et que la valeur est "transition" 
     2131                if (document.getElementById('transition1').length==1 && document.getElementById('transition1').options[0].value=="modify" && document.getElementById('transition2').length==1 && document.getElementById('transition2').options[0].value=="modify") 
     2132                { 
     2133                 alert("Change spectral range values to obtain transition values"); 
    21202134                } 
    21212135            }, 
     
    23932407                                    width:'30px', 
    23942408                                    title :'to reduce the window', 
    2395                                     click: function() { $(this).dialog({ height: 18, width:350  }); }, 
     2409                                    click: function() { $(this).dialog({ height:18, width:350  }); }, 
    23962410                                }, 
    23972411                                "max" :{ 
     
    24012415                                    width:'30px', 
    24022416                                    title :'to enlarge the window ', 
    2403                                     click: function() { $(this).dialog({ height: 628, width:700  }); }, 
     2417                                    click: function() { $(this).dialog({ height: 640, width:700  }); }, 
    24042418                                }, 
    24052419                            }, 
     
    24072421                            //minHeight: 500, 
    24082422                            // minWidth: 660, 
    2409                             height: 628, 
     2423                            height: 640, 
    24102424                            width:700, 
    24112425                            //Exemple de  valeurs possible pour position : "middle", "top",  [200, 100] 
Note: See TracChangeset for help on using the changeset viewer.