Changeset 533 for geisa/web/initGeisa_script.jsp
- Timestamp:
- 07/17/12 16:37:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geisa/web/initGeisa_script.jsp
r532 r533 6 6 //permet de deselectionner la molecule quand on deselectionne un isotope (toutes les options sauf lst) 7 7 /*function decliquemol( name ) 8 {9 10 11 12 13 14 15 16 17 18 19 20 } */8 { 9 10 var inputs = document.getElementsByTagName( 'input' ); 11 var count = inputs.length; 12 for( i = 0; i < count; i++ ) 13 { 14 input = inputs.item( i ); 15 if( input.type == 'checkbox' && input.id == (name + '-all') && input.checked == true ) 16 { 17 input.checked = false; 18 } 19 } 20 } */ 21 21 22 22 … … 509 509 paramSelectTransitionUpper.parent = $("#transitionUpper"); 510 510 this.selectTransitionUpper = new Select( paramSelectTransitionUpper ); 511 this.selectTransitionUpper.add( 'transi1', "transi1" );512 this.selectTransitionUpper.add( 'transi2', "transi2" );511 this.selectTransitionUpper.add( 'transi1', "transi1", jQuery.proxy(this.onClickSelectTransition, this) ); 512 this.selectTransitionUpper.add( 'transi2', "transi2", jQuery.proxy(this.onClickSelectTransition, this) ); 513 513 this.selectTransitionUpper.selectFirst( false ); 514 514 // Create menu deroulant transition lower … … 686 686 * @param moleculesArray 687 687 */ 688 //createMolecules: function(container, moleculesArray)688 //createMolecules: function(container, moleculesArray) 689 689 createMolecules: function(container, moleculesArray, BddVersion) 690 690 { 691 691 var table = $(document.createElement("table")); 692 692 container.append(table); 693 // var tr = $(document.createElement("tr"));694 // tr.attr({valign: "top"});695 // table.append(tr);693 // var tr = $(document.createElement("tr")); 694 // tr.attr({valign: "top"}); 695 // table.append(tr); 696 696 var i=0; 697 697 //nombre de molecules par ligne … … 699 699 //taille du tableau 700 700 //alert("l" +moleculesArray.length); 701 // parseInt : partie entiÚre702 // var res = parseInt(8/3);701 // parseInt : partie entiÚre 702 // var res = parseInt(8/3); 703 703 //alert("res="+res); 704 704 … … 787 787 // var parameters = "&valselectTraceAxeY1="+this.selectTraceAxeY1.getValue()+"&valselectTraceAxeY2="+this.selectTraceAxeY2.getValue()+ 788 788 // "&inputSpectralRangeLower="+$("#spectralRangeLower").val()+ "&inputSpectralRangeUpper="+$("#spectralRangeUpper").val()+ 789 790 789 // "&inputIntensityLower="+$("#intensityLower").val()+"&inputIntensityUpper="+$("#intensityUpper").val()+ 790 // "&valselectTypeTraceY1="+this.selectTypeTraceY1.getValue(); 791 791 792 792 //molécules … … 915 915 916 916 //Valeur de mean value (a faire test sur la valeur à ne prendre que si val >=0 sinon afficher message) 917 917 var meanValue = "EEE-stepEEE"+$("#meanValue2").val(); 918 918 919 919 … … 938 938 //construction de la requête Fortran 939 939 var parameters2 = "&fortranRequest="+paramBase+"EEE"+molName+"EEE-wavenb_minEEE"+$("#RangeLower").val()+"EEE-wavenb_maxEEE"+$("#RangeUpper").val()+"EEE-int_minEEE"+$("#intensityLo").val()+"EEE-int_maxEEE"+$("#intensityUp").val()+ 940 940 meanValue+nbCourbes+"EEE-fieldEEE"+this.selectTraceAxeY1.getValue()+"EEE"+logScale+"EEE-line_typeEEE"+this.selectTypeTraceY1.getValue()+"EEE"+field2+"EEE"+logScale2+"EEE"+lineType; 941 941 942 942 alert(parameters2); … … 948 948 }, 949 949 950 // HANDLES ******************************************************** = retours ajax 950 requestIsotope: function(isotopeName) 951 { 952 $.ajax( { 953 url: "project?methodName=getTransitionByIsotopeName&isotopeName="+isotopeName, 954 success:jQuery.proxy( this.handleRequestIsotope, this ) 955 } ); 956 }, 957 958 requestTransition: function() 959 { 960 $.ajax( { 961 url: "project?methodName=transition&transitionValue="+ this.selectTransitionUpper.getValue(), 962 success:jQuery.proxy( this.handleRequestTransition, this ) 963 } ); 964 }, 965 966 // HANDLES ******************************************************** = retours ajax 951 967 952 968 … … 962 978 //numéro unique pour le nom du graph 963 979 this.nb = jQuery.parseJSON( result ).nb; 964 980 //alert("this.nb="+this.nb); 965 981 //nom de l'image 966 982 //this.nameImg = jQuery.parseJSON( result ).nameImg; … … 969 985 var i=1; 970 986 var content = ''; 971 for (i=1; i<this.nbGraph+1; i++) { 972 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>'; 973 } 974 975 976 //to do 977 // if( !this.pathImg ) 978 // setTimeout( jQuery.proxy( this.displayWindow, this ), 1000 ); 979 // else 980 this.displayWindow(content); 981 982 // window.setTimeout(function() { 983 // alert("Hello World!"); 984 // jQuery.proxy( this.displayWindow(content), this ); 985 // }, 2000); 986 987 }, 988 989 // EVENTS ******************************************************** 987 for (i=1; i<this.nbGraph+1; i++) { 988 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>'; 989 } 990 991 992 //to do 993 // if( !this.pathImg ) 994 // setTimeout( jQuery.proxy( this.displayWindow, this ), 1000 ); 995 // else 996 this.displayWindow(content); 997 998 // window.setTimeout(function() { 999 // alert("Hello World!"); 1000 // jQuery.proxy( this.displayWindow(content), this ); 1001 // }, 2000); 1002 1003 }, 1004 1005 handleRequestTransition: function( result ) 1006 { 1007 alert("youpi"); 1008 }, 1009 1010 handleRequestIsotope: function( result ) 1011 { 1012 var isotopes = jQuery.parseJSON( result ).isotopes; 1013 $.each(isotopes, jQuery.proxy( function(index, isotope ) 1014 { 1015 alert(isotope.codeQuantLower); 1016 })); 1017 1018 }, 1019 1020 // EVENTS ******************************************************** 990 1021 991 1022 … … 1026 1057 }, 1027 1058 1059 onClickSelectTransition: function() 1060 { 1061 this.requestTransition(); 1062 }, 1028 1063 1029 1064 //cliquer toutes les molécules et isotopes du meme nom dans toutes les bases … … 1038 1073 for( i = 0; i < count; i++ ) 1039 1074 { 1040 var input = inputs.item( i );1075 var input = inputs.item( i ); 1041 1076 //cliquer toutes les molécules et isotopes du meme nom dans toutes les bases 1042 1077 //if( input.type == 'checkbox' && ( input.id == ('chk-' + name + '-GEISA-11') || input.id == ('chk-' + name + '-GEISA-03') || input.id == ('chk-' + name + '-GEISA-IASI-11') || input.id == ('chk-' + name + '-GEISA-IASI-03') 1043 1078 // || input.id == (name + '-all-GEISA-03') || input.id == (name + '-all-GEISA-11') || input.id == (name + '-all-GEISA-IASI-03') || input.id == (name + '-all-GEISA-IASI-11'))) 1044 1079 1045 1080 if( input.type == 'checkbox' && ( input.id.indexOf('chk-' + moleculeName + '_') != -1 || input.id.indexOf('all-'+moleculeName+'-')!= -1 )) … … 1070 1105 } 1071 1106 } 1107 1108 context.requestIsotope("ho2:166"); 1072 1109 }, 1073 1110 … … 1102 1139 for( i = 0; i < count; i++ ) 1103 1140 { 1104 var div = divs.item( i );1141 var div = divs.item( i ); 1105 1142 1106 1143 … … 1226 1263 this.selectScaleY2.enable(); 1227 1264 } 1228 //si aucun parametre est choisi pour Y2, le type de plot est inactif1265 //si aucun parametre est choisi pour Y2, le type de plot est inactif 1229 1266 if (this.selectTraceAxeY2.getValue() == 'no') 1230 1267 { … … 1245 1282 }, 1246 1283 1247 1284 onClickSubmit: function() 1248 1285 { 1249 1286 this.requestGeisa(); … … 1275 1312 // displayWindow: function(coordinate) 1276 1313 //{ 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1314 //var content = '<img src=' + this.pathImg + ' /><a href="project?methodName=downloadFile&fileName=bib.txt"><button class="dataProtocolDownloadButton">Download</button></a>'; 1315 // var content = '<img src=' + this.pathImg + ' /><a href="project?methodName=downloadFile&fileName=' + this.nameImg + '"><button class="dataProtocolDownloadButton">Download</button></a>'; 1316 1317 //alert(content); 1318 // var $dialog = $( '<div></div>' ) 1319 // .html( content + content1 ) 1320 1321 // .dialog( { 1322 // autoOpen: false, 1323 // title: "GEISA : spectroscopic database", 1324 // minHeight: 500, 1325 // minWidth: 660, 1326 1327 //coordonnee y y 1328 // position:coordinate 1329 1330 // } ); 1331 // $dialog.dialog( 'open' ) 1295 1332 //}, 1296 1333 1297 1334 1298 1335 onClickDownload: function() 1299 1336 { 1300 1337 document.location.href = "project?methodName=downloadFile&fileName=bib.txt";
Note: See TracChangeset
for help on using the changeset viewer.