Changeset 437
- Timestamp:
- 03/26/12 13:41:07 (12 years ago)
- Location:
- geisa
- Files:
-
- 476 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
geisa/Geisa.iml
r391 r437 19 19 <root url="file://$MODULE_DIR$/web" relative="/" /> 20 20 </webroots> 21 <sourceRoots> 22 <root url="file://$MODULE_DIR$/work" /> 23 </sourceRoots> 21 24 </configuration> 22 25 </facet> … … 24 27 <component name="NewModuleRootManager" inherit-compiler-output="true"> 25 28 <exclude-output /> 26 <content url="file://$MODULE_DIR$"> 27 <sourceFolder url="file://$MODULE_DIR$/work" isTestSource="false" /> 28 </content> 29 <content url="file://$MODULE_DIR$" /> 29 30 <orderEntry type="inheritedJdk" /> 30 31 <orderEntry type="sourceFolder" forTests="false" /> 31 <orderEntry type="library" name="lib _common" level="project" />32 <orderEntry type="library" name="lib" level="project" /> 32 33 </component> 33 34 </module> -
geisa/common/Common.iml
r435 r437 6 6 <exclude-output /> 7 7 <content url="file://$MODULE_DIR$"> 8 <sourceFolder url="file://$MODULE_DIR$/implementation" isTestSource="false" /> 9 <sourceFolder url="file://$MODULE_DIR$/interface" isTestSource="false" /> 8 10 <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> 9 <sourceFolder url="file://$MODULE_DIR$/interface" isTestSource="false" />10 <sourceFolder url="file://$MODULE_DIR$/implementation" isTestSource="false" />11 11 </content> 12 12 <orderEntry type="inheritedJdk" /> -
geisa/persistence/Persistence.iml
r435 r437 14 14 <exclude-output /> 15 15 <content url="file://$MODULE_DIR$"> 16 <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> 16 17 <sourceFolder url="file://$MODULE_DIR$/implementation" isTestSource="false" /> 17 <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />18 18 <sourceFolder url="file://$MODULE_DIR$/interface" isTestSource="false" /> 19 19 </content> … … 21 21 <orderEntry type="sourceFolder" forTests="false" /> 22 22 <orderEntry type="library" name="lib" level="project" /> 23 <orderEntry type="module" module-name="Domain" /> 23 24 <orderEntry type="module" module-name="Common" /> 24 <orderEntry type="module" module-name="Domain" />25 25 </component> 26 26 </module> -
geisa/service/Service.iml
r435 r437 6 6 <exclude-output /> 7 7 <content url="file://$MODULE_DIR$"> 8 <sourceFolder url="file://$MODULE_DIR$/implementation" isTestSource="false" /> 8 9 <sourceFolder url="file://$MODULE_DIR$/interface" isTestSource="false" /> 9 <sourceFolder url="file://$MODULE_DIR$/implementation" isTestSource="false" />10 10 <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> 11 11 </content> … … 14 14 <orderEntry type="library" name="lib" level="project" /> 15 15 <orderEntry type="module" module-name="Persistence" /> 16 <orderEntry type="module" module-name="Domain" /> 16 17 <orderEntry type="module" module-name="Common" /> 17 <orderEntry type="module-library" scope="TEST">18 <orderEntry type="module-library"> 18 19 <library> 19 20 <CLASSES> -
geisa/web/Web.iml
r435 r437 2 2 <module type="JAVA_MODULE" version="4"> 3 3 <component name="FacetManager"> 4 <facet type="Spring" name="Spring"> 5 <configuration /> 6 </facet> 4 7 <facet type="web" name="Web"> 5 8 <configuration> … … 11 14 </webroots> 12 15 </configuration> 13 </facet>14 <facet type="Spring" name="Spring">15 <configuration />16 16 </facet> 17 17 </component> -
geisa/web/initGeisa.jsp
r436 r437 9 9 <ether:htmlCss cssFile="geisa"/> 10 10 <ether:htmlCss cssFile="select"/> 11 </tiles:put> 12 <tiles:put name="insertJsOrJsp" type="string"> 13 <ether:htmlJsp jspFile="init_scriptGeisa"></ether:htmlJsp> 14 <ether:htmlJs jsFile="classesForJQuery/Select"/> 11 <ether:htmlCss cssFile="jquery-ui-1.8.16.custom/jquery-ui-1.8.16.custom"/> 15 12 </tiles:put> 16 13 17 <tiles:put name="title" type="string"><spring:message code="app.title"/> - <spring:message 18 code="title.home"/></tiles:put> 14 <tiles:put name="insertJsOrJsp" type="string"> 15 <ether:htmlJsp jspFile="init_scriptGeisa"/> 16 <ether:htmlJs jsFile="classesForJQuery/Select"/> 17 <ether:htmlJs jsFile="library/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min"/> 18 </tiles:put> 19 19 20 <tiles:put name="title" type="string"><spring:message code="app.title"/> - <spring:message code="title.home"/></tiles:put> 20 21 21 22 … … 25 26 <tiles:put name="body" type="string"> 26 27 27 28 <br><br> 28 29 29 30 <div id="formulaire"> 30 31 <div id="molecules"> 31 <span class="molecule"><nobr><input type=checkbox id=h2o-all onclick="cliquetout('h2o');"><B><a href="javascript:visibilite('h2oCache');">H<sub>2</sub>O</a></B></nobr></span><div class="divViolet" id="h2oCache" style="display:none;"><span class="isotope"><nobr> <input type=checkbox id=chk-h2o name=moles value=h2o_161 onclick="decliquemol('h2o');">161</nobr><br><nobr> <input type=checkbox id=chk-h2o name=moles value=h2o_162 onclick="decliquemol('h2o');">162</nobr><br><nobr> <input type=checkbox id=chk-h2o name=moles value=h2o_171 onclick="decliquemol('h2o');">171</nobr><br><nobr> <input type=checkbox id=chk-h2o name=moles value=h2o_181 onclick="decliquemol('h2o');">181</nobr><br><nobr> <input type=checkbox id=chk-h2o name=moles value=h2o_182 onclick="decliquemol('h2o');">182</nobr><br><nobr> <input type=checkbox id="chk-h2o_Bob" name=moles value=h2o_172 onclick="decliquemol('h2o');">172</nobr><br></span></div> 32 <span class="molecule"><nobr><input type=checkbox id=h2o-all onclick="cliquetout('h2o');"><B><a href="javascript:visibilite('h2oCache');">H<sub>2</sub>O</a></B> 33 </nobr></span> 34 35 <div class="divViolet" id="h2oCache" style="display:none;"><span class="isotope"><nobr> <input type=checkbox id=chk-h2o name=moles 36 value=h2o_161 37 onclick="decliquemol('h2o');">161 38 </nobr><br><nobr> <input type=checkbox id=chk-h2o name=moles value=h2o_162 onclick="decliquemol('h2o');">162</nobr><br><nobr> <input 39 type=checkbox id=chk-h2o name=moles value=h2o_171 onclick="decliquemol('h2o');">171 40 </nobr><br><nobr> <input type=checkbox id=chk-h2o name=moles value=h2o_181 onclick="decliquemol('h2o');">181</nobr><br><nobr> <input 41 type=checkbox id=chk-h2o name=moles value=h2o_182 onclick="decliquemol('h2o');">182 42 </nobr><br><nobr> <input type=checkbox id="chk-h2o_Bob" name=moles value=h2o_172 onclick="decliquemol('h2o');">172</nobr><br></span> 43 </div> 32 44 33 45 </div> 34 46 <div id="box"> 35 <div id="box1"></div><br> 36 <div id="box2"></div><br> 37 <div id="box3"></div><br> 38 <div id="box4"></div><br> 47 <div id="box1"></div> 48 <br> 49 50 <div id="box2"></div> 51 <br> 52 53 <div id="box3"></div> 54 <br> 55 56 <div id="box4"></div> 57 <br> 39 58 </div> 40 59 </div> … … 59 78 60 79 80 // function handleOnClickSubmit(result) 81 // { 82 // var bob = jQuery.parseJSON( result ).resultAjax; 83 // alert(bob); 84 // var pathImg = jQuery.parseJSON( result ).pathImg; 85 // alert(pathImg); 86 // var img = $(document.createElement("img")); 87 // 88 // //img.attr({src:pathImg, width:"200px", height:"200px"}); 89 // img.attr({src:pathImg}); 90 // 91 ////<img src="zrzer" width="100px" height="100px"/> 92 // 93 // $("#graphique").append(img); 94 // 95 // var selectValue = getSelectValue('trace_select_id'); 96 // alert(selectValue); 97 // } 61 98 62 // function handleOnClickSubmit(result) 63 // { 64 // var bob = jQuery.parseJSON( result ).resultAjax; 65 // alert(bob); 66 // var pathImg = jQuery.parseJSON( result ).pathImg; 67 // alert(pathImg); 68 // var img = $(document.createElement("img")); 69 // 70 // //img.attr({src:pathImg, width:"200px", height:"200px"}); 71 // img.attr({src:pathImg}); 72 // 73 ////<img src="zrzer" width="100px" height="100px"/> 74 // 75 // $("#graphique").append(img); 76 // 77 // var selectValue = getSelectValue('trace_select_id'); 78 // alert(selectValue); 79 // } 80 81 // function onClickSubmit(){ 82 <%----%> 83 // $.ajax( { 84 // url: "project?methodName=createUserRequest&check1="+$("#chk-h2o_Bob").attr('checked')+"&check2="+$("#chk-h2o_Bob").val(), 85 // success:handleOnClickSubmit 86 // } ); 87 // } 99 // function onClickSubmit(){ 100 <%----%> 101 // $.ajax( { 102 // url: "project?methodName=createUserRequest&check1="+$("#chk-h2o_Bob").attr('checked')+"&check2="+$("#chk-h2o_Bob").val(), 103 // success:handleOnClickSubmit 104 // } ); 105 // } 88 106 89 107 90 91 // var submitButton = new Button( {value:"Submit", parent:$("#boutonSubmit"), id:"button_submit_2", className: "red_button", classNameText:"red_button_text", onClick:onClickSubmit} ); 108 // var submitButton = new Button( {value:"Submit", parent:$("#boutonSubmit"), id:"button_submit_2", className: "red_button", classNameText:"red_button_text", onClick:onClickSubmit} ); 92 109 93 110 … … 95 112 96 113 97 98 99 100 101 114 </tiles:put> 102 115 -
geisa/web/init_scriptGeisa.jsp
r436 r437 3 3 4 4 //pour cacher ou voir les isotopes d'une molecule 5 function visibilite( thingId)5 function visibilite( thingId ) 6 6 { 7 7 var targetElement; 8 targetElement = document.getElementById( thingId);9 if (targetElement.style.display == "none")8 targetElement = document.getElementById( thingId ); 9 if( targetElement.style.display == "none" ) 10 10 { 11 targetElement.style.display = "" ; 12 } else { 13 targetElement.style.display = "none" ; 11 targetElement.style.display = ""; 12 } 13 else 14 { 15 targetElement.style.display = "none"; 14 16 } 15 17 } 16 18 //pour cacher ou voir tous les isotopes de toutes les molecules pour toutes les options 17 function visibiliteMol( nameId)19 function visibiliteMol( nameId ) 18 20 { 19 var inputsdiv = document.getElementsByTagName('div'); 20 var countdiv = inputsdiv.length; 21 if (document.getElementById(nameId).value == 'View all isotopes') { 22 for (j = 0; j < countdiv; j++) { 21 var inputsdiv = document.getElementsByTagName( 'div' ); 22 var countdiv = inputsdiv.length; 23 if( document.getElementById( nameId ).value == 'View all isotopes' ) 24 { 25 for( j = 0; j < countdiv; j++ ) 26 { 23 27 //ouvrir que les div dont l'id contient la chaine Cache 24 if (inputsdiv.item(j).id.indexOf("Cache") != -1) { 25 inputsdiv.item(j).style.display = "" ; 28 if( inputsdiv.item( j ).id.indexOf( "Cache" ) != -1 ) 29 { 30 inputsdiv.item( j ).style.display = ""; 26 31 }//if (inputsdiv) 27 32 }//for (j = 0) 28 document.getElementById( 'boutView1').value = 'Hide all isotopes';29 document.getElementById( 'boutView2').value = 'Hide all isotopes';33 document.getElementById( 'boutView1' ).value = 'Hide all isotopes'; 34 document.getElementById( 'boutView2' ).value = 'Hide all isotopes'; 30 35 return true; 31 36 }//if (document.getElementById) 32 if (document.getElementById(nameId).value == 'Hide all isotopes') { 33 for (j = 0; j < countdiv; j++) { 37 if( document.getElementById( nameId ).value == 'Hide all isotopes' ) 38 { 39 for( j = 0; j < countdiv; j++ ) 40 { 34 41 //fermer que les div dont l'id contient la chaine Cache 35 if (inputsdiv.item(j).id.indexOf("Cache") != -1) { 36 inputsdiv.item(j).style.display = "none" ; 42 if( inputsdiv.item( j ).id.indexOf( "Cache" ) != -1 ) 43 { 44 inputsdiv.item( j ).style.display = "none"; 37 45 }//if (inputsdiv) 38 46 }//for (j = 0;) 39 document.getElementById( 'boutView1').value = 'View all isotopes';40 document.getElementById( 'boutView2').value = 'View all isotopes';47 document.getElementById( 'boutView1' ).value = 'View all isotopes'; 48 document.getElementById( 'boutView2' ).value = 'View all isotopes'; 41 49 return true; 42 50 }//if (document.getElementById) … … 44 52 45 53 //permet de selectionner tous les isotopes quand on clique sur une molecule (toutes les options sauf lst) 46 function cliquetout(name) { var inputs = document.getElementsByTagName('input'); 47 var count = inputs.length; 48 for (i = 0; i < count; i++) { 49 input = inputs.item(i); 50 if (input.type == 'checkbox' && input.id == ('chk-' + name)) { 51 input.checked = document.getElementById(name + '-all').checked; 54 function cliquetout( name ) 55 { 56 var inputs = document.getElementsByTagName( 'input' ); 57 var count = inputs.length; 58 for( i = 0; i < count; i++ ) 59 { 60 input = inputs.item( i ); 61 if( input.type == 'checkbox' && input.id == ('chk-' + name) ) 62 { 63 input.checked = document.getElementById( name + '-all' ).checked; 52 64 } 53 65 } … … 55 67 56 68 //permet de deselectionner la molecule quand on deselectionne un isotope (toutes les options sauf lst) 57 function decliquemol (name) { 69 function decliquemol( name ) 70 { 58 71 59 var inputs = document.getElementsByTagName('input'); 60 var count = inputs.length; 61 for (i = 0; i < count; i++) { 62 input = inputs.item(i); 63 if (input.type == 'checkbox' && input.id == (name + '-all') && input.checked == true) { 72 var inputs = document.getElementsByTagName( 'input' ); 73 var count = inputs.length; 74 for( i = 0; i < count; i++ ) 75 { 76 input = inputs.item( i ); 77 if( input.type == 'checkbox' && input.id == (name + '-all') && input.checked == true ) 78 { 64 79 input.checked = false; 65 80 } … … 68 83 69 84 70 71 85 var InterfaceInit = Class.create( { 72 86 73 74 75 76 77 78 79 87 initialize: function() 88 { 89 /** *********** CONTAINERS *********** **/ 90 this.containerForm1 = $( "#box1" ); 91 this.containerForm2 = $( "#box2" ); 92 this.containerForm3 = $( "#box3" ); 93 this.containerForm4 = $( "#box4" ); 80 94 81 95 82 96 this.createForm(); 83 97 84 98 }, 85 99 86 87 88 89 90 91 92 100 // CREATES ******************************************************** 101 createForm: function() 102 { 103 // Create zone text 104 this.input1 = $( document.createElement( "input" ) ); 105 var input2 = $( document.createElement( "input" ) ); 106 var input3 = $( document.createElement( "input" ) ); 93 107 94 108 95 96 109 this.input1.attr( {id:"1"} ); 110 this.containerForm1.append( this.input1 ); 97 111 98 99 112 input2.attr( {id:"2"} ); 113 this.containerForm2.append( input2 ); 100 114 101 102 115 input3.attr( {id:"3"} ); 116 this.containerForm3.append( input3 ); 103 117 104 118 119 // Create menu deroulant 105 120 106 107 // Create menu deroulant 108 109 var paramSelect = new Object(); 110 paramSelect.id = "trace_select_id"; 111 paramSelect.parent = $("#box4"); 112 this.selectTrace = new Select( paramSelect ); 113 this.selectTrace.add( '-line_type l', "Lignes" ); 114 this.selectTrace.add( '-line_type p', "Points" ); 115 this.selectTrace.add( '-line_type i', "Piques" ); 116 this.selectTrace.add( '-line_type lp', "Lignes et Points" ); 117 this.selectTrace.selectFirst( false ); 121 var paramSelect = new Object(); 122 paramSelect.id = "trace_select_id"; 123 paramSelect.parent = $( "#box4" ); 124 this.selectTrace = new Select( paramSelect ); 125 this.selectTrace.add( '-line_type l', "Lignes" ); 126 this.selectTrace.add( '-line_type p', "Points" ); 127 this.selectTrace.add( '-line_type i', "Piques" ); 128 this.selectTrace.add( '-line_type lp', "Lignes et Points" ); 129 this.selectTrace.selectFirst( false ); 118 130 119 131 … … 137 149 138 150 139 151 // Create bouton 140 152 141 153 // var submitButton = new Button( {value:initTexts["label.submitButton"], parent:this.containerForm1, id:"button_submit1", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 142 var submitButton = new Button( {value:"Submit", parent:$("#boutonSubmit"), id:"button_submit_2", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} );143 154 var submitButton = new Button( {value:"Submit", parent:$( "#boutonSubmit" ), id:"button_submit_2", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 155 }, 144 156 145 157 146 // REQUESTS ******************************************************** 147 requestGeisa: function() 148 { 149 var parameters = "check1="+$("#chk-h2o_Bob").attr('checked')+"&check2="+$("#chk-h2o_Bob").val(); 150 $.ajax( { 151 url: "project?methodName=createUserRequest&"+parameters, 152 success:jQuery.proxy( this.handleGeisa, this ) 153 } ); 158 // REQUESTS ******************************************************** 159 requestGeisa: function() 160 { 161 var parameters = "check1=" + $( "#chk-h2o_Bob" ).attr( 'checked' ) + "&check2=" + $( "#chk-h2o_Bob" ).val(); 162 $.ajax( { 163 url: "project?methodName=createUserRequest&" + parameters, 164 success:jQuery.proxy( this.handleGeisa, this ) 165 } ); 166 }, 167 168 // HANDLES ******************************************************** = retours ajax 169 handleGeisa: function( result ) 170 { 171 var bob = jQuery.parseJSON( result ).resultAjax; 172 var pathImg = jQuery.parseJSON( result ).pathImg; 173 174 var $dialog = $( '<div></div>' ) 175 .html( '<img src=' + pathImg + ' />' ) 176 .dialog( { 177 autoOpen: false, 178 title: "Titre", 179 minHeight: 500, 180 minWidth: 660 181 } ); 182 $dialog.dialog( 'open' ); 183 }, 184 185 // EVENTS ******************************************************** 186 onClickSubmit: function() 187 { 188 this.requestGeisa(); 189 } 154 190 155 191 156 // alert(this.input1.val()+' - '+$("#2").val()+' - '+$("#3").val()); 157 // $.ajax( { 158 // url: "project?methodName=createUserRequest&input1="+this.input1.val()+"&input2="+$("#2").val()+"&input3="+$("#3").val(), 159 // success:jQuery.proxy( this.handleCreateXML, this ) 160 // } ); 161 }, 162 163 // HANDLES ******************************************************** = retours ajax 164 handleGeisa: function( result ) 165 { 166 var bob = jQuery.parseJSON( result ).resultAjax; 167 alert(bob); 168 var pathImg = jQuery.parseJSON( result ).pathImg; 169 alert(pathImg); 170 var img = $(document.createElement("img")); 171 172 //img.attr({src:pathImg, width:"200px", height:"200px"}); 173 img.attr({src:pathImg}); 174 175 //<img src="zrzer" width="100px" height="100px"/> 176 177 $("#graphique").append(img); 178 179 var selectValue = getSelectValue('trace_select_id'); 180 alert(selectValue); 181 182 183 }, 184 185 // EVENTS ******************************************************** 186 onClickSubmit: function() 187 { 188 this.requestGeisa(); 189 } 190 191 192 }); 192 } ); 193 193 194 194
Note: See TracChangeset
for help on using the changeset viewer.