Ignore:
Timestamp:
10/22/12 17:03:40 (12 years ago)
Author:
npipsl
Message:

Suite modification interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geisa/web/initGeisa_script.jsp

    r568 r594  
    485485                this.selectDatabase.add( 'GEISAIASI2003', "GEISA-IASI 2003", jQuery.proxy(this.onClickSelectDatabase, this), '<%=IsotopeIasiG03.class%>' ); 
    486486                this.selectDatabase.selectFirst( false ); 
    487  
    488  
     487                 var bob = this.selectDatabase.getValues(); 
     488 
     489 
     490                //création du bloc des molécules 
    489491                this.createMolecules($('#BDD-GEISA2011'), this.arrayGeisa2011, "GEISA2011"); 
    490492                this.createMolecules($('#BDD-GEISA2003'), this.arrayGeisa2003, "GEISA2003"); 
    491493                this.createMolecules($('#BDD-GEISAIASI2011'), this.arrayGeisaIasi2011, "GEISAIASI2011"); 
    492494                this.createMolecules($('#BDD-GEISAIASI2003'), this.arrayGeisaIasi2003, "GEISAIASI2003"); 
     495 
     496                //bouton selection-deselection toutes les molécules et isotopes 
     497                this.selectButton = new Button( {value:"Select all isotopologues", parent:$( "#selectAndShow" ), id:"buttonSelect", className: "gray_button", onClick:jQuery.proxy( this.selectAll, this )} ); 
     498                //bouton montrer-cacher les isotopes 
     499                this.showButton = new Button( {value:"View all isotopologues", parent:$( "#selectAndShow" ), id:"buttonShow", className: "gray_button", onClick:jQuery.proxy( this.viewAll, this )} ); 
     500 
    493501 
    494502 
     
    505513               // document.getElementById("spectralRangeUpper").appendChild(titleSpectralRangeUpper); 
    506514                document.getElementById("spectralRangeUpper").innerHTML = "Upper value, cm<sup>-1</sup> : "; 
     515                document.getElementById("samplingStep").innerHTML = "<br>Sampling step : "; 
    507516                //zone texte  SpectralRangeLower 
    508517                var inputSpectralRangeLower = $( document.createElement( "input" ) ); 
     
    519528                inputSpectralRangeUpper.bind( 'blur', this, jQuery.proxy( this.requestTransition, this )); 
    520529                this.containerFormSpectralRangeUpper.append( inputSpectralRangeUpper ); 
    521  
     530                //zone texte   Sampling step 
     531                var inputSamplingStep = $( document.createElement( "input" ) ); 
     532                inputSamplingStep.attr( {id:"sampStep", size:6} ); 
     533                $("#samplingStep").append( inputSamplingStep ); 
    522534 
    523535                 //Zone texte Intensity 
     
    556568                this.selectTraceAxeY1.add( 'C', "Air broadening pressure halfwidth", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
    557569                this.selectTraceAxeY1.add( 'D', "Energy of the lower transition level", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
    558                 this.selectTraceAxeY1.add( 'F', "Temperature dependence coefficient n of the air broadening halfwidth ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
     570                this.selectTraceAxeY1.add( 'F', "Temperature of the air broadening halfwidth ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
    559571                this.selectTraceAxeY1.add( 'N', "Self broadening pressure halfwidth (HWHM)", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
    560572                this.selectTraceAxeY1.add( 'O', "Air pressure shift of the line transition", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
    561                 this.selectTraceAxeY1.add( 'R', "Temperature dependence coefficient of the air pressure shift ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
     573                this.selectTraceAxeY1.add( 'R', "Temperature of the air pressure shift ", jQuery.proxy(this.onClickSelectTraceAxeY1, this ) ); 
    562574                this.selectTraceAxeY1.selectFirst( false ); 
    563575               //  this.selectTraceAxeY1 = $( document.createElement( "select" ) ); 
     
    587599                this.selectNbCourbes = new Select( paramNbCourbes ); 
    588600                this.selectNbCourbes.add( 'ca', "One curve for all selection", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
    589                 this.selectNbCourbes.add( 'cm', "One curve for each molecule selected", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
    590                 this.selectNbCourbes.add( 'ci', "One curve for each isotopologue selected", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
    591                 this.selectNbCourbes.add( 'gm', "One graph for each molecule selected", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
    592                 this.selectNbCourbes.add( 'gi', "One graph for each isotopologue selected", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
     601                this.selectNbCourbes.add( 'cm', "Separated molecules : same graph", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
     602                this.selectNbCourbes.add( 'gm', "Separated molecules : different graphs", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
     603                this.selectNbCourbes.add( 'gi', "Separated isotopologues : different graphs", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
     604                this.selectNbCourbes.add( 'ci', "Separated isotopologues : same graph", jQuery.proxy(this.onClickSelectNbCourbes, this ) ); 
    593605                this.selectNbCourbes.selectFirst( false ); 
    594606                // this.selectNbCourbes = $( document.createElement( "select" ) ); 
     
    745757                //champ input 
    746758                var inputMeanValue = $( document.createElement( "input" ) ); 
    747                 inputMeanValue.attr( {id:"meanValue2"} ); 
     759                inputMeanValue.attr( {id:"meanValue2", size:6} ); 
    748760                inputMeanValue.val(0); 
    749761                this.containerFormMeanValue1.append( inputMeanValue ); 
     
    764776                this.selectTraceAxeY2.add( 'C', "Air broadening pressure halfwidth", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
    765777                this.selectTraceAxeY2.add( 'D', "Energy of the lower transition level", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
    766                 this.selectTraceAxeY2.add( 'F', "Temperature dependence coefficient n of the air broadening halfwidth ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
     778                this.selectTraceAxeY2.add( 'F', "Temperature of the air broadening halfwidth ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
    767779                this.selectTraceAxeY2.add( 'N', "Self broadening pressure halfwidth (HWHM)", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
    768780                this.selectTraceAxeY2.add( 'O', "Air pressure shift of the line transition", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
    769                 this.selectTraceAxeY2.add( 'R', "Temperature dependence coefficient of the air pressure shift ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
     781                this.selectTraceAxeY2.add( 'R', "Temperature of the air pressure shift ", jQuery.proxy(this.onClickSelectTraceAxeY2, this ) ); 
    770782                this.selectTraceAxeY2.selectFirst( false ); 
    771783                //this.selectTraceAxeY2 = $( document.createElement( "select" ) ); 
     
    10881100                        if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506) 
    10891101                        { 
    1090                             alert("Error: Invalid value for lower spectral range area"); 
     1102                            alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506"); 
    10911103                            return; 
    10921104                        } 
     
    10941106                        if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506) 
    10951107                        { 
    1096                             alert("Error: Invalid value for upper spectral range area"); 
     1108                            alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506"); 
    10971109                            return; 
    10981110                        } 
     
    11021114                        if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0  || parseInt($("#rangeLower").val()) > 35877.030506) 
    11031115                        { 
    1104                             alert("Error: Invalid value for lower spectral range area"); 
     1116                            alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506"); 
    11051117                            return; 
    11061118                        } 
     
    11081120                        if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  || parseInt($("#rangeUpper").val()) > 35877.030506) 
    11091121                        { 
    1110                             alert("Error: Invalid value for upper spectral range area"); 
     1122                            alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506"); 
    11111123                            return; 
    11121124                        } 
     
    11161128                        if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767) 
    11171129                        { 
    1118                             alert("Error: Invalid value for lower spectral range area"); 
     1130                            alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767"); 
    11191131                            return; 
    11201132                        } 
     
    11221134                        if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767) 
    11231135                        { 
    1124                             alert("Error: Invalid value for upper spectral range area"); 
     1136                            alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767"); 
    11251137                            return; 
    11261138                        } 
     
    11301142                        if(isNaN($("#rangeLower").val()) == true ||   parseInt($("#rangeLower").val()) < 0 || parseInt($("#rangeLower").val()) < 599.000793 || parseInt($("#rangeLower").val()) > 3000.998767) 
    11311143                        { 
    1132                             alert("Error: Invalid value for lower spectral range area"); 
     1144                            alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767"); 
    11331145                            return; 
    11341146                        } 
     
    11361148                        if(isNaN($("#rangeUpper").val()) == true ||   parseInt( $("#rangeUpper").val()) == 0 || parseInt( $("#rangeUpper").val()) < 0  ||  parseInt($("#rangeUpper").val()) < 599.000793 || parseInt($("#rangeUpper").val()) > 3000.998767) 
    11371149                        { 
    1138                             alert("Error: Invalid value for upper spectral range area"); 
     1150                            alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767"); 
    11391151                            return; 
    11401152                        } 
     
    11571169                    return; 
    11581170                } 
     1171 
     1172 
     1173 
     1174                //Sampling step 
     1175                if( $("#sampStep").val() > 0 ) 
     1176                { 
     1177                    var samplingStep="-band "+$("#sampStep").val(); 
     1178                    //calcul du nombre de graphs générés par l'option  Sampling step 
     1179                    this.nbGraphSamplingStep = (parseFloat($("#rangeUpper").val()) - parseFloat($("#rangeLower").val())) / parseFloat($("#sampStep").val()); 
     1180                    //calcul du nombre de graphs total à tracer   (nbr de graph générés par "type of graph" * nbr de graph généré par "Sampling Step") 
     1181                       //test pour voir si    "nbGraphSamplingStep" est un entier 
     1182                       if ((this.nbGraphSamplingStep - parseInt(this.nbGraphSamplingStep)) == 0) 
     1183                       { 
     1184                        this.nbGraph=(this.nbGraph)*(this.nbGraphSamplingStep); 
     1185                       } 
     1186                       else 
     1187                       { 
     1188                        // si  "nbGraphSamplingStep" n'est pas un entier prendre le nbre entier suivant 
     1189                        this.nbGraph=this.nbGraph*(parseInt(this.nbGraphSamplingStep)+1); 
     1190                       } 
     1191                } 
     1192 
     1193                if(isNaN($("#sampStep").val()) == true ||   parseInt($("#sampStep").val()) < 0 ) 
     1194                { 
     1195                    alert("Error: Invalid value for sampling step"); 
     1196                    return; 
     1197                } 
     1198 
     1199                if( $("#sampStep").val() == 0 ) 
     1200                { 
     1201                    var samplingStep=""; 
     1202                } 
     1203 
     1204                //test sur le nombre de graphs générés 
     1205                if (this.nbGraph > 20) 
     1206                { 
     1207                    alert("Too many graphics will be drawn ("+this.nbGraph+"). Please change the value of the sampling step or change the value of the type of graph."); 
     1208                    return; 
     1209                } 
     1210 
    11591211 
    11601212 
     
    12151267                 if(isNaN($("#intensityLo").val()) == true ||   $("#intensityLo").val() < 0  ) 
    12161268                { 
    1217                     alert("Error: Invalid value for lower intensity range area"); 
     1269                    alert("Error: Invalid value for lower intensity range area. The value must be between 0 and 1E-16"); 
    12181270                    return; 
    12191271                } 
     
    12241276                if(isNaN($("#intensityUp").val()) == true ||   $("#intensityUp").val() < 0  ) 
    12251277                { 
    1226                     alert("Error: Invalid value for upper intensity range area"); 
     1278                    alert("Error: Invalid value for upper intensity range area. The value must be between 0 and 1E-16"); 
    12271279                    return; 
    12281280                } 
     
    12441296                var meanValue = "-step "+$("#meanValue2").val(); 
    12451297                //controle des valeurs entrées par l'utilisateur 
    1246                 //Si ce n'est pas un nombre ou si il est négatif 
    1247                 if(isNaN($("#meanValue2").val()) == true ||   $("#meanValue2").val() < 0 ) 
     1298                //Si ce n'est pas un nombre ou si il est négatif  ou si mean value est supérieur ou égal à l'interval spectral 
     1299                if(isNaN($("#meanValue2").val()) == true ||   $("#meanValue2").val() < 0 ||   $("#meanValue2").val() >= (parseFloat($("#rangeUpper").val()) - parseFloat($("#rangeLower").val())) ) 
    12481300                { 
    12491301                    alert("Error: Invalid value for Average calculation area"); 
     
    13351387                                      // meanValue+" "+nbCourbes+" "+field+" "+logScale+" "+lineType+" "+field2+" "+logScale2+" "+lineType2; 
    13361388 
    1337                 var parameters = "&fortranRequest="+paramBase+" "+isotopesSelectedName+" "+rangeLower+" "+rangeUpper+" "+intensityLower+" "+intensityUpper+" "+ 
     1389                var parameters = "&fortranRequest="+paramBase+" "+isotopesSelectedName+" "+rangeLower+" "+rangeUpper+" "+samplingStep+" "+intensityLower+" "+intensityUpper+" "+ 
    13381390                                       meanValue+" "+nbCourbes+" "+field+" "+logScale+" "+lineType+" "+field2+" "+logScale2+" "+lineType2; 
    13391391 
    1340                 alert ("parameters"+parameters); 
     1392                // alert ("parameters"+parameters); 
    13411393 
    13421394                //remplacement de espace par "EEE" pour que le shell script ne voit qu'un seul argument en entrée 
     
    14011453                    //this.selectTransitionLower.disable(); 
    14021454                    //this.selectTransitionUpper.disable(); 
    1403                     //ajoute une classe à celle déjà existante de transitionUpperTitle 
    1404                     $("#transitionUpperTitle").addClass("notActiveText"); 
    1405                     $("#transitionLowerTitle").addClass("notActiveText"); 
     1455                    //ajoute une classe à celle déjà existante de transitionUpper 
     1456                    $("#transitionUpper").addClass("notActiveText"); 
     1457                    $("#transitionLower").addClass("notActiveText"); 
    14061458                } 
    14071459                else 
     
    14091461                    //this.selectTransitionLower.enable(); 
    14101462                    //this.selectTransitionUpper.enable(); 
    1411                     $("#transitionUpperTitle").removeClass("notActiveText"); 
    1412                     $("#transitionLowerTitle").removeClass("notActiveText"); 
     1463                    $("#transitionUpper").removeClass("notActiveText"); 
     1464                    $("#transitionLower").removeClass("notActiveText"); 
    14131465                } 
    14141466 
     
    14551507                        //this.selectTransitionLower.selectFirst(); 
    14561508                        //this.selectTransitionUpper.selectFirst(); 
     1509                        //ajoute une classe à celle déjà existante de transitionUpper 
     1510                        $("#transitionUpper").addClass("notActiveText"); 
     1511                        $("#transitionLower").addClass("notActiveText"); 
    14571512                    } 
    14581513                } 
     
    17261781                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
    17271782                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup> :"; 
    1728                     $("#rangeLower").val(0); 
    1729                     $("#rangeUpper").val(35877.030506); 
     1783                    //$("#rangeLower").val(0); 
     1784                    //$("#rangeUpper").val(35877.030506); 
     1785                    $("#rangeLower").val(""); 
     1786                    $("#rangeUpper").val(""); 
    17301787 
    17311788                    document.getElementById( "BDD-GEISA2011" ).style.display = ""; 
     
    17391796                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
    17401797                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing spectral range (599.000793 to 3000.998767 cm<sup>-1</sup>) :"; 
    1741                     $("#rangeLower").val(599.000793); 
    1742                     $("#rangeUpper").val(3000.998767); 
     1798                    //$("#rangeLower").val(599.000793); 
     1799                    //$("#rangeUpper").val(3000.998767); 
     1800                    $("#rangeLower").val(""); 
     1801                    $("#rangeUpper").val(""); 
    17431802 
    17441803                    document.getElementById( "BDD-GEISA2011" ).style.display = "none"; 
     
    17521811                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
    17531812                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup> :"; 
    1754                     $("#rangeLower").val(0); 
    1755                     $("#rangeUpper").val(35877.030506); 
     1813                    //$("#rangeLower").val(0); 
     1814                    //$("#rangeUpper").val(35877.030506); 
     1815                    $("#rangeLower").val(""); 
     1816                    $("#rangeUpper").val(""); 
    17561817 
    17571818                    document.getElementById( "BDD-GEISA2011" ).style.display = "none"; 
     
    17641825                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
    17651826                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing spectral range (599.000793 to 3000.998767 cm<sup>-1</sup>) :"; 
    1766                     $("#rangeLower").val(599.000793); 
    1767                     $("#rangeUpper").val(3000.998767); 
     1827                    //$("#rangeLower").val(599.000793); 
     1828                    // $("#rangeUpper").val(3000.998767); 
     1829                    $("#rangeLower").val(""); 
     1830                    $("#rangeUpper").val(""); 
    17681831 
    17691832                    document.getElementById( "BDD-GEISA2011" ).style.display = "none"; 
     
    17771840            }, 
    17781841 
    1779  
     1842            //Pour sélectionner-desélectionner tous les isotopes 
     1843            selectAll: function() 
     1844            { 
     1845                var inputs = document.getElementsByTagName( 'input' ); 
     1846                var count = inputs.length; 
     1847                var i=0; 
     1848 
     1849 
     1850                if( this.selectButton.getValue() == 'Select all isotopologues') 
     1851                { 
     1852                    for( i = 0; i < count; i++ ) 
     1853                    { 
     1854                        var  input = inputs.item( i ); 
     1855                        if( input.type == 'checkbox' ) 
     1856                        { 
     1857                            input.checked = true; 
     1858                        } 
     1859                    } 
     1860                    this.selectButton.setValue("Unselect all isotopologues"); 
     1861 
     1862                } 
     1863                else 
     1864                { 
     1865                    for( i = 0; i < count; i++ ) 
     1866                    { 
     1867                        var  input = inputs.item( i ); 
     1868                        if( input.type == 'checkbox' ) 
     1869                        { 
     1870                            input.checked = false; 
     1871                        } 
     1872                    } 
     1873                    this.selectButton.setValue("Select all isotopologues"); 
     1874                } 
     1875 
     1876              //mettre a jour le menu déroulant des transitions en fonction des isotopes sélectionnés, de la longueur d'onde et de la base geisa 
     1877                this.requestTransition(); 
     1878 
     1879            }, 
     1880 
     1881            //Pour montrer-cacher tous les isotopes 
     1882            viewAll: function() 
     1883            { 
     1884                var divs = document.getElementsByTagName( 'div' ); 
     1885                var count = divs.length; 
     1886                var i = 0; 
     1887                if( this.showButton.getValue() == 'View all isotopologues') 
     1888                { 
     1889                    for( i = 0; i < count; i++ ) 
     1890                    { 
     1891                        //ouvrir que les div dont l'id contient la chaine Cache 
     1892                        if (divs.item(i).id.indexOf("Cache") != -1) { 
     1893                            divs.item(i).style.display = "" ; 
     1894                        } 
     1895                    } 
     1896                    this.showButton.setValue("Hide all isotopologues"); 
     1897                } 
     1898                else 
     1899                { 
     1900                    for( i = 0; i < count; i++ ) 
     1901                    { 
     1902                        //ouvrir que les div dont l'id contient la chaine Cache 
     1903                        if (divs.item(i).id.indexOf("Cache") != -1) { 
     1904                            divs.item(i).style.display = "none" ; 
     1905                        } 
     1906                    } 
     1907                    this.showButton.setValue("View all isotopologues"); 
     1908                } 
     1909            }, 
    17801910 
    17811911            //Actions déclenchées quand on clique sur le nom d'une molécule 
     
    17881918                var inputs = document.getElementsByTagName( 'input' ); 
    17891919                var count = inputs.length; 
     1920                var i=0; 
    17901921                for( i = 0; i < count; i++ ) 
    17911922                { 
     
    18391970                //pour cocher molecule quand on clique sur un isotope et décocher molécule quand tous les isotopes de la molécule sont décochés 
    18401971                var nbIsotopeSelected=0; 
    1841  
    1842                 for( i = 0; i < count; i++ ) 
    1843                 { 
    1844                     input = inputs.item( i ); 
    1845                     if( input.type == 'checkbox' &&  input.id.indexOf('chk-'+moleculeName+'_') != -1  && input.id.indexOf(bddVersion) != -1 && input.checked == true ) 
     1972                var input = ""; 
     1973                var j=0; 
     1974                var k=0; 
     1975               // for( i = 0; i < count; i++ ) 
     1976               // { 
     1977               //     input = inputs.item( i ); 
     1978               //     if( input.type == 'checkbox' &&  input.id.indexOf('chk-'+moleculeName+'_') != -1  && input.id.indexOf(bddVersion) != -1 && input.checked == true ) 
     1979               //     { 
     1980               //      nbIsotopeSelected=nbIsotopeSelected+1; 
     1981                //    } 
     1982 
     1983               // } 
     1984 
     1985 
     1986                //for( i = 0; i < count; i++ ) 
     1987              //  { 
     1988                //    input = inputs.item( i ); 
     1989                //    if (input.type == 'checkbox' && input.id.indexOf('all-'+ moleculeName+'-') != -1 && nbIsotopeSelected == 0) 
     1990                //    { 
     1991                //        input.checked = false; 
     1992                //    } 
     1993 
     1994               //      if (input.type == 'checkbox' && input.id.indexOf('all-'+ moleculeName+'-') != -1 && nbIsotopeSelected > 0) 
     1995               //     { 
     1996              //          input.checked = true; 
     1997               //     } 
     1998               // } 
     1999 
     2000                //if ( nbIsotopeSelected == 0) 
     2001               // { 
     2002                //document.getElementById('all-'+ moleculeName+'-'+bddVersion).checked=false; 
     2003               // } 
     2004 
     2005               // if ( nbIsotopeSelected > 0) 
     2006               // { 
     2007               // document.getElementById('all-'+ moleculeName+'-'+bddVersion).checked=true; 
     2008               // } 
     2009 
     2010 
     2011                var databaseValues=context.selectDatabase.getValues(); 
     2012                var nbdatabaseValues=context.selectDatabase.getSize(); 
     2013                for( j = 0; j < nbdatabaseValues ; j++ ) 
     2014                { 
     2015                    var nbIsotopeSelected=0; 
     2016                    //alert("bob"+  databaseValues[i]); 
     2017                    for( k = 0; k < count; k++ ) 
    18462018                    { 
    1847                      nbIsotopeSelected=nbIsotopeSelected+1; 
     2019                        input = inputs.item( k ); 
     2020                        if( input.type == 'checkbox' &&  input.id.indexOf('chk-'+moleculeName+'_') != -1  && input.id.indexOf(databaseValues[j]) != -1 && input.checked == true ) 
     2021                        { 
     2022                            nbIsotopeSelected=nbIsotopeSelected+1; 
     2023                        } 
     2024 
    18482025                    } 
    18492026 
    1850                 } 
    1851  
    1852  
    1853                 for( i = 0; i < count; i++ ) 
    1854                 { 
    1855                     input = inputs.item( i ); 
    1856                     if (input.type == 'checkbox' && input.id.indexOf('all-'+ moleculeName+'-') != -1 && nbIsotopeSelected == 0) 
     2027                    if ( nbIsotopeSelected == 0) 
    18572028                    { 
    1858                         input.checked = false; 
     2029                        document.getElementById('all-'+ moleculeName+'-'+databaseValues[j]).checked=false; 
    18592030                    } 
    18602031 
    1861                      if (input.type == 'checkbox' && input.id.indexOf('all-'+ moleculeName+'-') != -1 && nbIsotopeSelected > 0) 
     2032                    if ( nbIsotopeSelected > 0) 
    18622033                    { 
    1863                         input.checked = true; 
     2034                        document.getElementById('all-'+ moleculeName+'-'+databaseValues[j]).checked=true; 
    18642035                    } 
    1865  
    1866                 } 
    1867  
    1868                 // alert("database"+context.selectDatabase.getSize()); 
     2036                } 
     2037 
     2038 
     2039 
    18692040 
    18702041                //mettre a jour le menu déroulant des transitions en fonction des isotopes sélectionnés, de la longueur d'onde et de la base geisa 
     
    21142285                                    text:'Close', 
    21152286                                    height:'30px', 
    2116                                     width:'45px', 
     2287                                    width:'47px', 
    21172288                                    title :'to close the window', 
    21182289                                    click: function() { $(this).dialog("close"); }, 
     
    21222293                                    text:'Min', 
    21232294                                    height:'30px', 
    2124                                     width:'45px', 
     2295                                    width:'47px', 
    21252296                                    title :'to reduce the window', 
    21262297                                    click: function() { $(this).dialog({ height: 18, width:350  }); }, 
     
    21302301                                    text:'Max', 
    21312302                                    height:'30px', 
    2132                                     width:'45px', 
     2303                                    width:'47px', 
    21332304                                    title :'to enlarge the window ', 
    21342305                                    click: function() { $(this).dialog({ height: 628, width:700  }); }, 
Note: See TracChangeset for help on using the changeset viewer.