- Timestamp:
- Oct 24, 2013, 2:32:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/reports/case_summary.jsp
r2099 r2100 309 309 var caseInfo = response.caseInfo; 310 310 var site = response.site; 311 initSections(response.sections); 311 312 var consentOk = true; 312 313 … … 776 777 printNote += ' You may have to <i>scale down</i> to fit everything on the width of the page.'; 777 778 openPrintWindow('<%=ID%>', 'all-content', 'Case summary - <%=HTML.encodeTags(caseName)%>', 'portrait', printNote, '../', 'case_summary.css'); 779 } 780 781 function toggleDetails(event) 782 { 783 var sectionId = event.currentTarget.sectionId; 784 var details = document.getElementById(sectionId+'-details'); 785 // If the details section is 'forcibly' hidden (eg. no items of that type), ignore this call 786 if (details.style.display == 'none') return; 787 788 // Add 'hide-details' class to main <div section-info> if it is visible 789 var section = document.getElementById(sectionId+'-info'); 790 var isVisible = section.className.indexOf('hide-details') == -1; 791 Main.addOrRemoveClass(section, 'hide-details', isVisible); 792 793 // Save to BASE setting 794 var url = '../CaseSummary.servlet?ID=<%=ID%>&cmd=SetSectionVisibility'; 795 url += '§ion='+sectionId+'&hidden='+(isVisible ? 1 : 0); 796 var request = Ajax.getXmlHttpRequest(); 797 request.open("POST", url, false); 798 request.send(null); 799 800 if (debug) Main.debug(request.responseText); 801 } 802 803 function initSections(sections) 804 { 805 for (var s = 0; s < sections.length; s++) 806 { 807 var section = sections[s]; 808 809 var details = document.getElementById(section.id+'-details'); 810 // If the details section is 'forcibly' hidden (eg. no items of that type), ignore this call 811 if (details.style.display != 'none') 812 { 813 var headerDiv = document.getElementById(section.id+'-header'); 814 if (headerDiv) 815 { 816 Main.addClass(headerDiv, 'link'); 817 headerDiv.title = 'Hide/show details'; 818 headerDiv.sectionId = section.id; 819 headerDiv.addEventListener('click', toggleDetails, false); 820 } 821 822 var sectionDiv = document.getElementById(section.id+'-info'); 823 Main.addOrRemoveClass(sectionDiv, 'hide-details', section.hiddenDetails); 824 } 825 } 778 826 } 779 827 … … 855 903 <thead> 856 904 <tr id="case.name"> 857 <th >Case</th>905 <th id="case-header">Case</th> 858 906 </tr> 859 907 </thead> 860 <tbody id="case-details" >908 <tbody id="case-details" class="info-details"> 861 909 <tr id="case.registrationDate"> 862 910 <th>Registration date</th> … … 884 932 <thead> 885 933 <tr id="patient.name"> 886 <th >Patient</th>934 <th id="patient-header">Patient</th> 887 935 </tr> 888 936 </thead> 889 <tbody id="patient-details" >937 <tbody id="patient-details" class="info-details"> 890 938 <tr id="patient.registrationDate"> 891 939 <th>Registration date</th> … … 916 964 <thead> 917 965 <tr id="blood.name"> 918 <th >Blood</th>966 <th id="blood-header">Blood</th> 919 967 </tr> 920 968 </thead> 921 <tbody id="blood-details" >969 <tbody id="blood-details" class="info-details"> 922 970 <tr id="blood.registrationDate"> 923 971 <th>Registration date</th> … … 951 999 <thead> 952 1000 <tr id="specimen.name"> 953 <th >Specimen</th>1001 <th id="specimen-header">Specimen</th> 954 1002 </tr> 955 1003 </thead> 956 <tbody id="specimen-details" >1004 <tbody id="specimen-details" class="info-details"> 957 1005 <tr id="specimen.registrationDate"> 958 1006 <th>Registration date</th> … … 1001 1049 <thead> 1002 1050 <tr id="nospecimen.name"> 1003 <th >NoSpecimen</th>1051 <th id="nospecimen-header">NoSpecimen</th> 1004 1052 </tr> 1005 1053 </thead> 1006 <tbody id="nospecimen-details" >1054 <tbody id="nospecimen-details" class="info-details"> 1007 1055 <tr id="nospecimen.registrationDate"> 1008 1056 <th>Registration date</th> … … 1033 1081 <thead> 1034 1082 <tr id="histology.name"> 1035 <th >Histology</th>1083 <th id="histology-header">Histology</th> 1036 1084 </tr> 1037 1085 </thead> 1038 <tbody id="histology-details" >1086 <tbody id="histology-details" class="info-details"> 1039 1087 <tr id="histology.registrationDate"> 1040 1088 <th>Registration date</th> … … 1084 1132 <thead> 1085 1133 <tr id="lysate.name"> 1086 <th >Lysate</th>1134 <th id="lysate-header">Lysate</th> 1087 1135 </tr> 1088 1136 </thead> 1089 <tbody id="lysate-details" >1137 <tbody id="lysate-details" class="info-details"> 1090 1138 <tr id="lysate.registrationDate"> 1091 1139 <th>Registration date</th> … … 1128 1176 <thead> 1129 1177 <tr id="rna.name"> 1130 <th >RNA</th>1178 <th id="rna-header">RNA</th> 1131 1179 </tr> 1132 1180 </thead> 1133 <tbody id="rna-details" >1181 <tbody id="rna-details" class="info-details"> 1134 1182 <tr id="rna.flag" class="dynamic-column"> 1135 1183 <th>Flag</th> … … 1193 1241 <thead> 1194 1242 <tr id="dna.name"> 1195 <th >DNA</th>1243 <th id="dna-header">DNA</th> 1196 1244 </tr> 1197 1245 </thead> 1198 <tbody id="dna-details" >1246 <tbody id="dna-details" class="info-details"> 1199 1247 <tr id="dna.registrationDate"> 1200 1248 <th>Registration date</th> … … 1231 1279 <thead> 1232 1280 <tr id="ft.name"> 1233 <th >FlowThrough</th>1281 <th id="ft-header">FlowThrough</th> 1234 1282 </tr> 1235 1283 </thead> 1236 <tbody id="ft-details" >1284 <tbody id="ft-details" class="info-details"> 1237 1285 <tr id="ft.registrationDate"> 1238 1286 <th>Registration date</th> … … 1266 1314 <thead> 1267 1315 <tr id="mrna.name"> 1268 <th >mRNA</th>1316 <th id="mrna-header">mRNA</th> 1269 1317 </tr> 1270 1318 </thead> 1271 <tbody id="mrna-details" >1319 <tbody id="mrna-details" class="info-details"> 1272 1320 <tr id="mrna.registrationDate"> 1273 1321 <th>Registration date</th> … … 1295 1343 <thead> 1296 1344 <tr id="cdna.name"> 1297 <th >cDNA</th>1345 <th id="cdna-header">cDNA</th> 1298 1346 </tr> 1299 1347 </thead> 1300 <tbody id="cdna-details" >1348 <tbody id="cdna-details" class="info-details"> 1301 1349 <tr id="cdna.registrationDate"> 1302 1350 <th>Registration date</th> … … 1321 1369 <thead> 1322 1370 <tr id="lib.name"> 1323 <th >Library</th>1371 <th id="lib-header">Library</th> 1324 1372 </tr> 1325 1373 </thead> 1326 <tbody id="lib-details" >1374 <tbody id="lib-details" class="info-details"> 1327 1375 <tr id="lib.registrationDate"> 1328 1376 <th>Registration date</th> … … 1365 1413 <thead> 1366 1414 <tr id="pooledlib.name"> 1367 <th >Pooled Library</th>1415 <th id="pooledlib-header">Pooled Library</th> 1368 1416 </tr> 1369 1417 </thead> 1370 <tbody id="pooledlib-details" >1418 <tbody id="pooledlib-details" class="info-details"> 1371 1419 <tr id="pooledlib.registrationDate"> 1372 1420 <th>Registration date</th>
Note: See TracChangeset
for help on using the changeset viewer.