Changeset 670 for geisa/web/initGeisa_script.jsp
- Timestamp:
- 11/20/12 16:27:32 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geisa/web/initGeisa_script.jsp
r666 r670 509 509 //Titre général (qui changera en fonction de la base geisa choisie) 510 510 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>) :"; 512 512 513 513 //Titre … … 1004 1004 switch (this.selectDatabase.getValue()) { 1005 1005 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"; 1007 1007 break; 1008 1008 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"; 1010 1010 break; 1011 1011 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"; 1013 1013 break; 1014 1014 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"; 1016 1016 break; 1017 1017 } … … 1115 1115 case 'GEISA2003': 1116 1116 //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) 1118 1118 { 1119 1119 alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506"); … … 1121 1121 } 1122 1122 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) 1124 1124 { 1125 1125 alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506"); 1126 1126 return; 1127 1127 } 1128 1128 1129 break; 1129 1130 case 'GEISA2011': 1130 1131 //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) 1132 1133 { 1133 1134 alert("Error: Invalid value for lower spectral range area. The value must be between 0 and 35877.030506"); … … 1135 1136 } 1136 1137 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) 1138 1139 { 1139 1140 alert("Error: Invalid value for upper spectral range area. The value must be between 0 and 35877.030506"); … … 1143 1144 case 'GEISAIASI2003': 1144 1145 //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) 1146 1147 { 1147 1148 alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767"); … … 1149 1150 } 1150 1151 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) 1152 1153 { 1153 1154 alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767"); … … 1157 1158 case 'GEISAIASI2011': 1158 1159 //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) 1160 1161 { 1161 1162 alert("Error: Invalid value for lower spectral range area. The value must be between 599.000793 and 3000.998767"); … … 1163 1164 } 1164 1165 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) 1166 1167 { 1167 1168 alert("Error: Invalid value for upper spectral range area. The value must be between 599.000793 and 3000.998767"); … … 1521 1522 $.ajax( { 1522 1523 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 ) 1524 1526 } ); 1525 1527 … … 1673 1675 { 1674 1676 1675 //n uméro unique pour le nom du répertoire1677 //nom du répertoire : exemple de retour de valeur du controleur 1676 1678 //this.nb = jQuery.parseJSON( result ).nb; 1677 1679 //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; 1684 1683 1685 1684 1686 1685 //Pour tracer le bon nombre de graphe et de bouton download 1687 1686 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 } 1690 1693 //tracer chaque graphe avec son bouton download associé 1691 1694 for (i=1; i<this.nbGraph+1; i++) { 1692 1695 //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.NomRepFileOut Image+ 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>'; 1694 1697 } 1695 1698 1696 1699 this.displayWindow(content); 1697 1700 }, 1698 1699 1700 // handleRequestTransition: function( result )1701 // {1702 // alert("youpi");1703 // },1704 1701 1705 1702 … … 1743 1740 1744 1741 }, 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"} )); 1745 1754 1746 1755 }, … … 1833 1842 { 1834 1843 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>) :"; 1836 1845 //$("#rangeLower").val(0); 1837 1846 //$("#rangeUpper").val(35877.030506); … … 1863 1872 { 1864 1873 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>) :"; 1866 1875 //$("#rangeLower").val(0); 1867 1876 //$("#rangeUpper").val(35877.030506); … … 2118 2127 { 2119 2128 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"); 2120 2134 } 2121 2135 }, … … 2393 2407 width:'30px', 2394 2408 title :'to reduce the window', 2395 click: function() { $(this).dialog({ height: 2409 click: function() { $(this).dialog({ height:18, width:350 }); }, 2396 2410 }, 2397 2411 "max" :{ … … 2401 2415 width:'30px', 2402 2416 title :'to enlarge the window ', 2403 click: function() { $(this).dialog({ height: 6 28, width:700 }); },2417 click: function() { $(this).dialog({ height: 640, width:700 }); }, 2404 2418 }, 2405 2419 }, … … 2407 2421 //minHeight: 500, 2408 2422 // minWidth: 660, 2409 height: 6 28,2423 height: 640, 2410 2424 width:700, 2411 2425 //Exemple de valeurs possible pour position : "middle", "top", [200, 100]
Note: See TracChangeset
for help on using the changeset viewer.