Changeset 6254
- Timestamp:
- Mar 22, 2013, 8:28:26 AM (10 years ago)
- Location:
- trunk/www
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/admin/pluginconfigurations/edit_configuration.jsp
r6217 r6254 130 130 if (configuration != null) configuration.checkPermission(Permission.WRITE); 131 131 132 133 134 132 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), configuration); 135 133 ExtensionsInvoker invoker = EditUtil.useEditExtensions(jspContext); 136 134 %> 137 135 <base:page type="popup" title="<%=title%>"> 138 <base:head scripts="tabcontrol.js ,annotations.js" styles="tabcontrol.css">136 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 139 137 <ext:scripts context="<%=jspContext%>" /> 140 138 <ext:stylesheets context="<%=jspContext%>" /> … … 163 161 if (TabControl.validateActiveTab('settings')) 164 162 { 165 if (annotationsLoaded) 166 { 167 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 168 } 163 Annotations.saveModifiedAnnotationsToForm(frm); 169 164 frm.configure.value = configure; 170 165 frm.submit(); 171 166 } 172 167 } 173 174 var annotationsLoaded = false;175 function switchTab(tabControlId, tabId)176 {177 if (TabControl.setActiveTab(tabControlId, tabId))178 {179 if (tabId == 'annotations' && !annotationsLoaded)180 {181 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>);182 annotationsLoaded = true;183 }184 }185 }186 168 169 function loadAnnotationsFrame() 170 { 171 Annotations.autoLoadEditFrame(); 172 } 173 187 174 function init() 188 175 { … … 249 236 <t:tabcontrol id="settings" 250 237 subclass="content dialogtabcontrol" 251 position="bottom" remember="<%=configuration != null%>" switch="switchTab"238 position="bottom" remember="<%=configuration != null%>" 252 239 extensions="<%=invoker%>"> 253 240 <t:tab id="info" title="Configuration" validate="validateConfiguration()" helpid="pluginconfiguration.edit"> … … 303 290 <t:tab id="annotations" title="Annotations" 304 291 helpid="annotations.edit" tooltip="Enter values for annotations" 305 visible="<%=currentPlugin != null && currentPlugin.supports("net.sf.basedb.core.plugin.AnnotationSetterPlugin")%>"><iframe 306 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 307 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 292 visible="<%=currentPlugin != null && currentPlugin.supports("net.sf.basedb.core.plugin.AnnotationSetterPlugin")%>" 293 activate="loadAnnotationsFrame()"> 294 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 295 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 296 <jsp:param name="item_id" value="<%=itemId%>" /> 297 <jsp:param name="ID" value="<%=ID%>" /> 298 </jsp:include> 299 </t:tab> 308 300 </t:tabcontrol> 309 301 </form> -
trunk/www/admin/plugindefinitions/edit_plugin.jsp
r6217 r6254 173 173 } 174 174 175 176 177 175 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), plugin); 178 176 ExtensionsInvoker invoker = EditUtil.useEditExtensions(jspContext); 179 177 %> 180 178 <base:page type="popup" title="<%=title%>"> 181 <base:head scripts="tabcontrol.js, annotations.js,linkitems.js" styles="tabcontrol.css">179 <base:head scripts="tabcontrol.js,linkitems.js" styles="tabcontrol.css"> 182 180 <ext:scripts context="<%=jspContext%>" /> 183 181 <ext:stylesheets context="<%=jspContext%>" /> … … 226 224 frm.allAgents.value = agents.join(','); 227 225 frm.removeAgents.value = Link.getActionIds(-1, 'A').join(','); 228 if (annotationsLoaded) 229 { 230 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 231 } 226 Annotations.saveModifiedAnnotationsToForm(frm); 232 227 frm.submit(); 233 228 } 234 229 } 235 230 236 var annotationsLoaded = false; 237 function switchTab(tabControlId, tabId) 238 { 239 if (TabControl.setActiveTab(tabControlId, tabId)) 240 { 241 if (tabId == 'annotations' && !annotationsLoaded) 242 { 243 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>); 244 annotationsLoaded = true; 245 } 246 } 231 function loadAnnotationsFrame() 232 { 233 Annotations.autoLoadEditFrame(); 247 234 } 248 235 … … 704 691 subclass="content dialogtabcontrol" 705 692 position="bottom" remember="<%=plugin != null%>" 706 active="<%=selectedAgentId == -1 ? null : "agents" %>" switch="switchTab"693 active="<%=selectedAgentId == -1 ? null : "agents" %>" 707 694 extensions="<%=invoker%>"> 708 695 <t:tab id="info" title="Plugin" validate="validatePlugin()" helpid="plugindefinition.edit"> … … 1015 1002 <t:tab id="annotations" title="Annotations" 1016 1003 helpid="annotations.edit" tooltip="Enter values for annotations" 1017 visible="<%=plugin != null && !plugin.requiresConfiguration() && plugin.supports("net.sf.basedb.core.plugin.AnnotationSetterPlugin")%>"><iframe 1018 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 1019 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 1004 visible="<%=plugin != null && !plugin.requiresConfiguration() && plugin.supports("net.sf.basedb.core.plugin.AnnotationSetterPlugin")%>" 1005 activate="loadAnnotationsFrame()"> 1006 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 1007 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 1008 <jsp:param name="item_id" value="<%=itemId%>" /> 1009 <jsp:param name="ID" value="<%=ID%>" /> 1010 </jsp:include> 1011 </t:tab> 1020 1012 </t:tabcontrol> 1021 1013 <% -
trunk/www/admin/protocols/edit_protocol.jsp
r6217 r6254 118 118 final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType); 119 119 subtypesQuery.include(Include.ALL); 120 121 122 120 123 121 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), protocol); 124 122 ExtensionsInvoker invoker = EditUtil.useEditExtensions(jspContext); 125 123 %> 126 127 124 <base:page type="popup" title="<%=title%>"> 128 <base:head scripts="tabcontrol.js, annotations.js,linkitems.js,subtypes.js" styles="tabcontrol.css">125 <base:head scripts="tabcontrol.js,linkitems.js,subtypes.js" styles="tabcontrol.css"> 129 126 <ext:scripts context="<%=jspContext%>" /> 130 127 <ext:stylesheets context="<%=jspContext%>" /> … … 153 150 if (TabControl.validateActiveTab('settings')) 154 151 { 155 if (annotationsLoaded) 156 { 157 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 158 } 152 Annotations.saveModifiedAnnotationsToForm(frm); 159 153 frm.addedAnnotationTypes.value = Link.getActionIds(1, 'A').join(','); 160 154 frm.removedAnnotationTypes.value = Link.getActionIds(-1, 'A').join(','); … … 163 157 } 164 158 165 var annotationsLoaded = false; 166 function switchTab(tabControlId, tabId) 167 { 168 if (TabControl.setActiveTab(tabControlId, tabId)) 169 { 170 if (tabId == 'annotations' && !annotationsLoaded) 171 { 172 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>); 173 annotationsLoaded = true; 174 } 175 } 159 function loadAnnotationsFrame() 160 { 161 Annotations.autoLoadEditFrame(null, ItemSubtype.getSubtypeId('protocol')); 176 162 } 177 163 … … 303 289 <t:tabcontrol id="settings" 304 290 subclass="content dialogtabcontrol" 305 position="bottom" remember="<%=protocol != null%>" switch="switchTab"291 position="bottom" remember="<%=protocol != null%>" 306 292 extensions="<%=invoker%>"> 307 293 <t:tab id="info" title="Protocol" validate="validateProtocol()" helpid="protocol.edit"> … … 449 435 </t:tab> 450 436 451 <t:tab id="annotations" title="Annotations" helpid="annotations.edit"><iframe 452 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 453 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 454 437 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 438 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 439 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 440 <jsp:param name="item_id" value="<%=itemId%>" /> 441 <jsp:param name="ID" value="<%=ID%>" /> 442 </jsp:include> 443 </t:tab> 455 444 </t:tabcontrol> 456 445 </form> -
trunk/www/biomaterials/bioplates/edit_bioplate.jsp
r6217 r6254 184 184 %> 185 185 <base:page type="popup" title="<%=title%>"> 186 <base:head scripts="tabcontrol.js, annotations.js,subtypes.js" styles="tabcontrol.css">186 <base:head scripts="tabcontrol.js,subtypes.js" styles="tabcontrol.css"> 187 187 <ext:scripts context="<%=jspContext%>" /> 188 188 <ext:stylesheets context="<%=jspContext%>" /> … … 216 216 if (TabControl.validateActiveTab('settings')) 217 217 { 218 if (annotationsLoaded) 219 { 220 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 221 } 222 if (inheritedAnnotationsLoaded) 223 { 224 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 225 } 218 Annotations.saveModifiedAnnotationsToForm(frm); 226 219 frm.submit(); 227 220 } 228 221 } 229 222 230 var annotationsLoaded = false; 231 var inheritedAnnotationsLoaded = false; 232 var parentsChanged = false; 233 function switchTab(tabControlId, tabId) 234 { 235 if (TabControl.setActiveTab(tabControlId, tabId)) 236 { 237 if (tabId == 'annotations' && !annotationsLoaded) 238 { 239 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=bioplate == null ? 0 : bioplate.getId()%>); 240 annotationsLoaded = true; 241 } 242 else if (tabId == 'inheritedAnnotations' && 243 (parentsChanged || !inheritedAnnotationsLoaded)) 244 { 245 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 246 inheritedAnnotationsLoaded = true; 247 parentsChanged = false; 248 } 249 } 250 } 251 function getParents() 252 { 253 return new Array(); 254 } 223 function loadAnnotationsFrame() 224 { 225 Annotations.autoLoadEditFrame(); 226 } 227 255 228 function selectPlateGeometryOnClick() 256 229 { … … 361 334 <t:tabcontrol id="settings" 362 335 subclass="content dialogtabcontrol" 363 position="bottom" remember="<%=bioplate != null%>" switch="switchTab"336 position="bottom" remember="<%=bioplate != null%>" 364 337 extensions="<%=invoker%>"> 365 338 <t:tab id="info" title="Plate" validate="validateBioPlate()" helpid="bioplate.edit"> … … 521 494 </t:tab> 522 495 523 <t:tab id="annotations" title="Annotations" helpid="annotations.edit"><iframe 524 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 525 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 496 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 497 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 498 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 499 <jsp:param name="item_id" value="<%=itemId%>" /> 500 <jsp:param name="ID" value="<%=ID%>" /> 501 </jsp:include> 502 503 </t:tab> 526 504 </t:tabcontrol> 527 505 </form> -
trunk/www/biomaterials/extracts/edit_extract.jsp
r6217 r6254 286 286 %> 287 287 <base:page type="popup" title="<%=title%>"> 288 <base:head scripts="tabcontrol.js, annotations.js,linkitems.js,subtypes.js" styles="tabcontrol.css">288 <base:head scripts="tabcontrol.js,linkitems.js,subtypes.js" styles="tabcontrol.css"> 289 289 <ext:scripts context="<%=jspContext%>" /> 290 290 <ext:stylesheets context="<%=jspContext%>" /> … … 313 313 if (TabControl.validateActiveTab('settings')) 314 314 { 315 if (annotationsLoaded) 316 { 317 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 318 } 319 if (inheritedAnnotationsLoaded) 320 { 321 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 322 } 315 Annotations.saveModifiedAnnotationsToForm(frm); 316 Annotations.saveInheritedAnnotationsToForm(frm); 323 317 frm.modifiedExtracts.value = Link.exportModified(frm, 'E', true).join(','); 324 318 frm.removedExtracts.value = Link.getActionIds(-1, 'E').join(','); … … 326 320 } 327 321 } 328 329 var annotationsLoaded = false; 330 var inheritedAnnotationsLoaded = false; 331 var parentsChanged = false; 332 var protocolChanged = false; 333 function switchTab(tabControlId, tabId) 334 { 335 if (TabControl.setActiveTab(tabControlId, tabId)) 336 { 337 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 338 { 339 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getProtocolId()); 340 annotationsLoaded = true; 341 protocolChanged = false; 342 } 343 else if (tabId == 'inheritedAnnotations' && 344 (parentsChanged || !inheritedAnnotationsLoaded)) 345 { 346 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 347 inheritedAnnotationsLoaded = true; 348 parentsChanged = false; 349 } 350 } 351 } 352 322 323 function loadAnnotationsFrame() 324 { 325 Annotations.autoLoadEditFrame(getProtocolId(), ItemSubtype.getSubtypeId('extract')); 326 } 327 328 function loadInheritedAnnotationsFrame() 329 { 330 Annotations.autoLoadInheritFrame(getParents()); 331 } 332 353 333 function getProtocolId() 354 334 { … … 387 367 var subtypeId = ItemSubtype.getSubtypeId('extract'); 388 368 var recentInfo = ItemSubtype.getRecentAndRelatedInfo(subtypeId, 'EXTRACT', ['PROTOCOL', 'BIOPLATE', 'TAG', 'SAMPLE', 'EXTRACT']); 389 protocolChanged =ItemSubtype.updateSelectionList(frm.protocol_id, recentInfo.PROTOCOL['recent'], recentInfo.PROTOCOL['default']);369 ItemSubtype.updateSelectionList(frm.protocol_id, recentInfo.PROTOCOL['recent'], recentInfo.PROTOCOL['default']); 390 370 ItemSubtype.updateSelectionList(frm.tag_id, recentInfo.TAG['recent']); 391 371 ItemSubtype.updateSelectionList(frm.bioplate_id, recentInfo.BIOPLATE['recent']); … … 416 396 list[1].text = name; 417 397 list.selectedIndex = 1; 418 protocolChanged = true;419 }420 function protocolOnChange()421 {422 protocolChanged = true;423 398 } 424 399 function selectTagOnClick() … … 548 523 frm.extracts.disabled = !useExtracts; 549 524 frm.used_quantity.disabled = !useExtracts; 550 parentsChanged = true;551 }552 function sampleOnChange()553 {554 parentsChanged = true;555 525 } 556 526 … … 582 552 frm.parentType[1].checked = false; 583 553 parentTypeOnClick(); 584 parentsChanged = true;585 554 } 586 555 … … 603 572 frm.parentType[1].checked = true; 604 573 parentTypeOnClick(); 605 parentsChanged = true;606 574 } 607 575 function extractsOnChange() … … 650 618 { 651 619 Link.removeSelected(document.forms['extract'].extracts); 652 parentsChanged = true;653 620 } 654 621 … … 707 674 <t:tabcontrol id="settings" 708 675 subclass="content dialogtabcontrol" 709 position="bottom" remember="<%=extract != null%>" switch="switchTab"676 position="bottom" remember="<%=extract != null%>" 710 677 extensions="<%=invoker%>"> 711 678 <t:tab id="info" title="Extract" validate="validateExtract()" helpid="extract.edit"> … … 824 791 newitem="<%=extract == null%>" 825 792 onselect="selectProtocolOnClick()" 826 onchange="protocolOnChange()"827 793 disabled="<%=lockEventProperties%>" 828 794 /> … … 910 876 newitem="<%=extract == null%>" 911 877 onselect="selectSampleOnClick()" 912 onchange="sampleOnChange()"913 878 /> 914 879 </td> … … 976 941 </t:tab> 977 942 978 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 979 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 980 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 943 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 944 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 945 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 946 <jsp:param name="item_id" value="<%=itemId%>" /> 947 <jsp:param name="ID" value="<%=ID%>" /> 948 </jsp:include> 949 </t:tab> 981 950 982 951 <t:tab id="inheritedAnnotations" title="Inherited annotations" 983 helpid="annotations.edit.inherited"><iframe 984 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 985 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 952 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 953 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 954 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 955 <jsp:param name="item_id" value="<%=itemId%>" /> 956 <jsp:param name="ID" value="<%=ID%>" /> 957 </jsp:include> 958 </t:tab> 986 959 </t:tabcontrol> 987 960 </form> -
trunk/www/lims/arraybatches/edit_batch.jsp
r6217 r6254 175 175 %> 176 176 <base:page type="popup" title="<%=title%>"> 177 <base:head scripts="tabcontrol.js ,annotations.js" styles="tabcontrol.css">177 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 178 178 <ext:scripts context="<%=jspContext%>" /> 179 179 <ext:stylesheets context="<%=jspContext%>" /> … … 202 202 if (TabControl.validateActiveTab('settings')) 203 203 { 204 if (annotationsLoaded) 205 { 206 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 207 } 208 if (inheritedAnnotationsLoaded) 209 { 210 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 211 } 204 Annotations.saveModifiedAnnotationsToForm(frm); 205 Annotations.saveInheritedAnnotationsToForm(frm); 212 206 frm.submit(); 213 207 } 214 208 } 215 209 216 var annotationsLoaded = false; 217 var inheritedAnnotationsLoaded = false; 218 var parentsChanged = false; 219 var protocolChanged = false; 220 function switchTab(tabControlId, tabId) 221 { 222 if (TabControl.setActiveTab(tabControlId, tabId)) 223 { 224 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 225 { 226 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=batch == null ? 0 : batch.getId()%>, getProtocolId()); 227 annotationsLoaded = true; 228 protocolChanged = false; 229 } 230 else if (tabId == 'inheritedAnnotations' && 231 (parentsChanged || !inheritedAnnotationsLoaded)) 232 { 233 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 234 inheritedAnnotationsLoaded = true; 235 parentsChanged = false; 236 } 237 } 210 function loadAnnotationsFrame() 211 { 212 Annotations.autoLoadEditFrame(getProtocolId()); 238 213 } 239 214 215 function loadInheritedAnnotationsFrame() 216 { 217 Annotations.autoLoadInheritFrame(getParents()); 218 } 219 240 220 function getProtocolId() 241 221 { … … 261 241 } 262 242 263 function arrayDesignOnChange()264 {265 parentsChanged = true;266 }267 243 function selectArrayDesignOnClick() 268 244 { … … 287 263 list[0].text = name; 288 264 list.selectedIndex = 0; 289 parentsChanged = true;290 265 } 291 266 … … 313 288 list[1].text = name; 314 289 list.selectedIndex = 1; 315 protocolChanged = true; 316 } 317 function protocolOnChange() 318 { 319 protocolChanged = true; 320 } 321 290 } 322 291 function selectPrintRobotOnClick() 323 292 { … … 368 337 <t:tabcontrol id="settings" 369 338 subclass="content dialogtabcontrol" 370 position="bottom" remember="<%=batch != null%>" switch="switchTab"339 position="bottom" remember="<%=batch != null%>" 371 340 extensions="<%=invoker%>"> 372 341 <t:tab id="info" title="Array batch" validate="validateArrayBatch()" helpid="arraybatch.edit"> … … 402 371 newitem="true" 403 372 onselect="selectArrayDesignOnClick()" 404 onchange="arrayDesignOnChange()"405 373 /> 406 374 <% … … 440 408 newitem="<%=batch == null%>" 441 409 onselect="selectProtocolOnClick()" 442 onchange="protocolOnChange()"443 410 /> 444 411 </td> … … 458 425 </t:tab> 459 426 460 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 461 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 462 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 427 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 428 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 429 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 430 <jsp:param name="item_id" value="<%=itemId%>" /> 431 <jsp:param name="ID" value="<%=ID%>" /> 432 </jsp:include> 433 </t:tab> 463 434 464 435 <t:tab id="inheritedAnnotations" title="Inherited annotations" 465 helpid="annotations.edit.inherited"><iframe 466 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 467 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 436 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 437 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 438 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 439 <jsp:param name="item_id" value="<%=itemId%>" /> 440 <jsp:param name="ID" value="<%=ID%>" /> 441 </jsp:include> 442 </t:tab> 468 443 </t:tabcontrol> 469 444 </form> -
trunk/www/lims/arraydesigns/edit_design.jsp
r6217 r6254 149 149 ItemResultList<PlatformVariant> variants = variantQuery.list(dc); 150 150 151 152 153 151 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), design); 154 152 ExtensionsInvoker invoker = EditUtil.useEditExtensions(jspContext); 155 153 %> 156 154 <base:page type="popup" title="<%=title%>"> 157 <base:head scripts="tabcontrol.js, annotations.js,platforms.js" styles="tabcontrol.css">155 <base:head scripts="tabcontrol.js,platforms.js" styles="tabcontrol.css"> 158 156 <ext:scripts context="<%=jspContext%>" /> 159 157 <ext:stylesheets context="<%=jspContext%>" /> … … 187 185 if (TabControl.validateActiveTab('settings')) 188 186 { 189 if (annotationsLoaded) 190 { 191 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 192 } 193 if (inheritedAnnotationsLoaded) 194 { 195 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 196 } 187 Annotations.saveModifiedAnnotationsToForm(frm); 188 Annotations.saveInheritedAnnotationsToForm(frm); 197 189 if (dataFilesLoaded) 198 190 { … … 203 195 } 204 196 205 var annotationsLoaded = false; 206 var inheritedAnnotationsLoaded = false; 207 var parentsChanged = false; 197 function loadAnnotationsFrame() 198 { 199 Annotations.autoLoadEditFrame(); 200 } 201 202 function loadInheritedAnnotationsFrame() 203 { 204 Annotations.autoLoadInheritFrame(); 205 } 206 208 207 var dataFilesLoaded = false; 209 208 var platformChanged = false; 210 function switchTab(tabControlId, tabId) 211 { 212 var frm = document.forms['design']; 213 if (TabControl.setActiveTab(tabControlId, tabId)) 214 { 215 if (tabId == 'annotations' && !annotationsLoaded) 216 { 217 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=design == null ? 0 : design.getId()%>); 218 annotationsLoaded = true; 219 } 220 else if (tabId == 'inheritedAnnotations' && 221 (parentsChanged || !inheritedAnnotationsLoaded)) 222 { 223 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 224 inheritedAnnotationsLoaded = true; 225 parentsChanged = false; 226 } 227 else if (tabId == 'datafiles' && (platformChanged || !dataFilesLoaded)) 228 { 229 var platform = Platforms.getSelectedPlatform(frm.platform); 230 var variant = Platforms.getSelectedVariant(frm.platform); 231 Platforms.loadDataFilesFrame(frames.datafiles, '<%=ID%>', '<%=itemType.name()%>', <%=design == null ? 0 : design.getId()%>, platform == null ? 0 : platform.id, variant == null ? 0 : variant.id); 232 dataFilesLoaded = true; 233 platformChanged = false; 234 } 235 } 236 } 237 238 function getParents() 239 { 240 return new Array(); 241 } 242 209 function loadDataFilesFrame() 210 { 211 var frm = document.forms['design']; 212 if (platformChanged || !dataFilesLoaded) 213 { 214 var platform = Platforms.getSelectedPlatform(frm.platform); 215 var variant = Platforms.getSelectedVariant(frm.platform); 216 Platforms.loadDataFilesFrame(frames.datafiles, '<%=ID%>', '<%=itemType.name()%>', <%=design == null ? 0 : design.getId()%>, platform == null ? 0 : platform.id, variant == null ? 0 : variant.id); 217 dataFilesLoaded = true; 218 platformChanged = false; 219 } 220 } 221 243 222 function platformOnChange() 244 223 { … … 298 277 <t:tabcontrol id="settings" 299 278 subclass="content dialogtabcontrol" 300 position="bottom" active="<%=tabId%>" remember="<%=tabId == null && design != null%>" switch="switchTab"279 position="bottom" active="<%=tabId%>" remember="<%=tabId == null && design != null%>" 301 280 extensions="<%=invoker%>"> 302 281 <t:tab id="info" title="Array design" validate="validateArrayDesign()" helpid="arraydesign.edit"> … … 361 340 </t:tab> 362 341 363 <t:tab id="datafiles" title="Data files" helpid="datafiles.edit" ><iframe342 <t:tab id="datafiles" title="Data files" helpid="datafiles.edit" activate="loadDataFilesFrame()"><iframe 364 343 name="datafiles" id="idDatafiles" src="../../common/datafiles/wait.jsp" 365 344 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 366 345 367 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 368 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 369 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 346 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 347 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 348 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 349 <jsp:param name="item_id" value="<%=itemId%>" /> 350 <jsp:param name="ID" value="<%=ID%>" /> 351 </jsp:include> 352 </t:tab> 370 353 371 354 <t:tab id="inheritedAnnotations" title="Inherited annotations" 372 helpid="annotations.edit.inherited"><iframe 373 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 374 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 355 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 356 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 357 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 358 <jsp:param name="item_id" value="<%=itemId%>" /> 359 <jsp:param name="ID" value="<%=ID%>" /> 360 </jsp:include> 361 </t:tab> 375 362 </t:tabcontrol> 376 363 </form> -
trunk/www/lims/arrayslides/edit_slide.jsp
r6217 r6254 118 118 %> 119 119 <base:page type="popup" title="<%=title%>"> 120 <base:head scripts="tabcontrol.js ,annotations.js" styles="tabcontrol.css">120 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 121 121 <ext:scripts context="<%=jspContext%>" /> 122 122 <ext:stylesheets context="<%=jspContext%>" /> … … 145 145 if (TabControl.validateActiveTab('settings')) 146 146 { 147 if (annotationsLoaded) 148 { 149 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 150 } 151 if (inheritedAnnotationsLoaded) 152 { 153 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 154 } 147 Annotations.saveModifiedAnnotationsToForm(frm); 148 Annotations.saveInheritedAnnotationsToForm(frm); 155 149 frm.submit(); 156 150 } 157 151 } 158 152 159 var annotationsLoaded = false; 160 var inheritedAnnotationsLoaded = false; 161 var parentsChanged = false; 162 function switchTab(tabControlId, tabId) 163 { 164 if (TabControl.setActiveTab(tabControlId, tabId)) 165 { 166 if (tabId == 'annotations' && !annotationsLoaded) 167 { 168 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=slide == null ? 0 : slide.getId()%>); 169 annotationsLoaded = true; 170 } 171 else if (tabId == 'inheritedAnnotations' && 172 (parentsChanged || !inheritedAnnotationsLoaded)) 173 { 174 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 175 inheritedAnnotationsLoaded = true; 176 parentsChanged = false; 177 } 178 } 153 function loadAnnotationsFrame() 154 { 155 Annotations.autoLoadEditFrame(); 156 } 157 158 function loadInheritedAnnotationsFrame() 159 { 160 Annotations.autoLoadInheritFrame(getParents()); 179 161 } 180 162 … … 191 173 } 192 174 193 function arrayBatchOnChange()194 {195 parentsChanged = true;196 }197 175 function selectArrayBatchOnClick() 198 176 { … … 213 191 list[0].text = name; 214 192 list.selectedIndex = 0; 215 parentsChanged = true;216 193 } 217 194 … … 238 215 <t:tabcontrol id="settings" 239 216 subclass="content dialogtabcontrol" 240 position="bottom" remember="<%=slide != null%>" switch="switchTab"217 position="bottom" remember="<%=slide != null%>" 241 218 extensions="<%=invoker%>"> 242 219 <t:tab id="info" title="Array slide" validate="validateArraySlide()" helpid="arrayslide.edit"> … … 285 262 newitem="true" 286 263 onselect="selectArrayBatchOnClick()" 287 onchange="arrayBatchOnChange()()"288 264 /> 289 265 <% … … 313 289 </t:tab> 314 290 315 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 316 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 317 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 291 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 292 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 293 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 294 <jsp:param name="item_id" value="<%=itemId%>" /> 295 <jsp:param name="ID" value="<%=ID%>" /> 296 </jsp:include> 297 </t:tab> 318 298 319 299 <t:tab id="inheritedAnnotations" title="Inherited annotations" 320 helpid="annotations.edit.inherited"><iframe 321 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 322 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 300 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 301 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 302 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 303 <jsp:param name="item_id" value="<%=itemId%>" /> 304 <jsp:param name="ID" value="<%=ID%>" /> 305 </jsp:include> 306 </t:tab> 323 307 </t:tabcontrol> 324 308 </form> -
trunk/www/lims/plates/edit_plate.jsp
r6217 r6254 111 111 %> 112 112 <base:page type="popup" title="<%=title%>"> 113 <base:head scripts="tabcontrol.js ,annotations.js" styles="tabcontrol.css">113 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 114 114 <ext:scripts context="<%=jspContext%>" /> 115 115 <ext:stylesheets context="<%=jspContext%>" /> … … 138 138 if (TabControl.validateActiveTab('settings')) 139 139 { 140 if (annotationsLoaded) 141 { 142 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 143 } 144 if (inheritedAnnotationsLoaded) 145 { 146 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 147 } 140 Annotations.saveModifiedAnnotationsToForm(frm); 141 Annotations.saveInheritedAnnotationsToForm(frm); 148 142 frm.submit(); 149 143 } 150 144 } 151 145 152 var annotationsLoaded = false; 153 var inheritedAnnotationsLoaded = false; 154 var parentsChanged = false; 155 function switchTab(tabControlId, tabId) 156 { 157 if (TabControl.setActiveTab(tabControlId, tabId)) 158 { 159 if (tabId == 'annotations' && !annotationsLoaded) 160 { 161 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=plate == null ? 0 : plate.getId()%>); 162 annotationsLoaded = true; 163 } 164 else if (tabId == 'inheritedAnnotations' && 165 (parentsChanged || !inheritedAnnotationsLoaded)) 166 { 167 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 168 inheritedAnnotationsLoaded = true; 169 parentsChanged = false; 170 } 171 } 172 } 173 function getParents() 174 { 175 return new Array(); 176 } 146 function loadAnnotationsFrame() 147 { 148 Annotations.autoLoadEditFrame(); 149 } 150 151 function loadInheritedAnnotationsFrame() 152 { 153 Annotations.autoLoadInheritFrame(); 154 } 155 177 156 function selectPlateTypeOnClick() 178 157 { … … 216 195 <t:tabcontrol id="settings" 217 196 subclass="content dialogtabcontrol" 218 position="bottom" remember="<%=plate != null%>" switch="switchTab"197 position="bottom" remember="<%=plate != null%>" 219 198 extensions="<%=invoker%>"> 220 199 <t:tab id="info" title="Plate" validate="validatePlate()" helpid="plate.edit"> … … 301 280 </t:tab> 302 281 303 <t:tab id="annotations" title="Annotations" helpid="annotations.edit"><iframe 304 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 305 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 282 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 283 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 284 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 285 <jsp:param name="item_id" value="<%=itemId%>" /> 286 <jsp:param name="ID" value="<%=ID%>" /> 287 </jsp:include> 288 </t:tab> 306 289 307 290 <t:tab id="inheritedAnnotations" title="Inherited annotations" 308 helpid="annotations.edit.inherited"><iframe 309 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 310 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 311 291 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 292 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 293 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 294 <jsp:param name="item_id" value="<%=itemId%>" /> 295 <jsp:param name="ID" value="<%=ID%>" /> 296 </jsp:include> 297 </t:tab> 312 298 </t:tabcontrol> 313 299 </form> -
trunk/www/lims/plates/wells/edit_well.jsp
r6217 r6254 66 66 67 67 title = "Edit well -- " + HTML.encodeTags(plate.getName()) + " [" + rowFormatter.format(well.getRow()) + columnFormatter.format(well.getColumn()) + "]"; 68 69 70 71 68 72 69 if (well != null && !well.hasPermission(Permission.WRITE)) … … 79 76 %> 80 77 <base:page type="popup" title="<%=title%>"> 81 <base:head scripts="tabcontrol.js ,annotations.js" styles="tabcontrol.css">78 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 82 79 <ext:scripts context="<%=jspContext%>" /> 83 80 <ext:stylesheets context="<%=jspContext%>" /> … … 96 93 if (TabControl.validateActiveTab('settings')) 97 94 { 98 if (annotationsLoaded) 99 { 100 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 101 } 102 if (inheritedAnnotationsLoaded) 103 { 104 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 105 } 95 Annotations.saveModifiedAnnotationsToForm(frm); 96 Annotations.saveInheritedAnnotationsToForm(frm); 106 97 frm.submit(); 107 98 } 108 99 } 109 100 110 var annotationsLoaded = false; 111 var inheritedAnnotationsLoaded = false; 112 var parentsChanged = false; 113 function switchTab(tabControlId, tabId) 101 function loadAnnotationsFrame() 114 102 { 115 if (TabControl.setActiveTab(tabControlId, tabId)) 116 { 117 if (tabId == 'annotations' && !annotationsLoaded) 118 { 119 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=well == null ? 0 : well.getId()%>); 120 annotationsLoaded = true; 121 } 122 else if (tabId == 'inheritedAnnotations' && 123 (parentsChanged || !inheritedAnnotationsLoaded)) 124 { 125 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 126 inheritedAnnotationsLoaded = true; 127 parentsChanged = false; 128 } 129 } 103 Annotations.autoLoadEditFrame(); 130 104 } 131 function getParents() 105 106 function loadInheritedAnnotationsFrame() 132 107 { 133 return new Array();108 Annotations.autoLoadInheritFrame(); 134 109 } 135 110 </script> … … 143 118 <t:tabcontrol id="settings" 144 119 subclass="content dialogtabcontrol" 145 position="bottom" switch="switchTab"120 position="bottom" 146 121 extensions="<%=invoker%>"> 147 122 <t:tab id="info" title="Well" validate="validateWell()" helpid="well.edit"> … … 170 145 </t:tab> 171 146 172 <t:tab id="annotations" title="Annotations" helpid="annotations.edit"><iframe 173 name="annotations" id="idAnnotations" src="../../../common/annotations/wait.jsp" 174 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 147 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 148 <jsp:include page="../../../common/annotations/annotate_frameset.jsp"> 149 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 150 <jsp:param name="item_id" value="<%=itemId%>" /> 151 <jsp:param name="ID" value="<%=ID%>" /> 152 </jsp:include> 153 </t:tab> 175 154 176 155 <t:tab id="inheritedAnnotations" title="Inherited annotations" 177 helpid="annotations.edit.inherited"><iframe 178 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../../common/annotations/wait.jsp" 179 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 156 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 157 <jsp:include page="../../../common/annotations/inherit_frameset.jsp"> 158 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 159 <jsp:param name="item_id" value="<%=itemId%>" /> 160 <jsp:param name="ID" value="<%=ID%>" /> 161 </jsp:include> 162 </t:tab> 180 163 </t:tabcontrol> 181 164 </form> -
trunk/www/views/derivedbioassays/edit_bioassay.jsp
r6217 r6254 244 244 %> 245 245 <base:page type="popup" title="<%=title%>"> 246 <base:head scripts="tabcontrol.js, annotations.js,platforms.js,subtypes.js,linkitems.js" styles="tabcontrol.css">246 <base:head scripts="tabcontrol.js,platforms.js,subtypes.js,linkitems.js" styles="tabcontrol.css"> 247 247 <ext:scripts context="<%=jspContext%>" /> 248 248 <ext:stylesheets context="<%=jspContext%>" /> … … 266 266 if (TabControl.validateActiveTab('settings')) 267 267 { 268 if (annotationsLoaded) 269 { 270 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 271 } 272 if (inheritedAnnotationsLoaded) 273 { 274 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 275 } 268 Annotations.saveModifiedAnnotationsToForm(frm); 269 Annotations.saveInheritedAnnotationsToForm(frm); 276 270 if (dataFilesLoaded) 277 271 { … … 292 286 } 293 287 294 var annotationsLoaded = false; 295 var inheritedAnnotationsLoaded = false; 296 var parentsChanged = false; 297 var protocolChanged = false; 288 function loadAnnotationsFrame() 289 { 290 Annotations.autoLoadEditFrame(getProtocolId(), ItemSubtype.getSubtypeId('bioAssay')); 291 } 292 293 function loadInheritedAnnotationsFrame() 294 { 295 Annotations.autoLoadInheritFrame(getParents()); 296 } 297 298 298 var subtypeChanged = false; 299 299 var dataFilesLoaded = false; 300 function switchTab(tabControlId, tabId) 301 { 302 if (TabControl.setActiveTab(tabControlId, tabId)) 303 { 304 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 305 { 306 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getProtocolId()); 307 annotationsLoaded = true; 308 protocolChanged = false; 309 } 310 else if (tabId == 'inheritedAnnotations' && 311 (parentsChanged || !inheritedAnnotationsLoaded)) 312 { 313 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 314 inheritedAnnotationsLoaded = true; 315 parentsChanged = false; 316 } 317 else if (tabId == 'datafiles' && (subtypeChanged || !dataFilesLoaded)) 318 { 319 var subtypeId = ItemSubtype.getSubtypeId('bioAssay'); 320 Platforms.loadDataFilesFrame(frames.datafiles, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, 0, 0, subtypeId); 321 dataFilesLoaded = true; 322 subtypeChanged = false; 323 } 324 } 325 } 326 300 301 function loadDataFilesFrame() 302 { 303 if (subtypeChanged || !dataFilesLoaded) 304 { 305 var subtypeId = ItemSubtype.getSubtypeId('bioAssay'); 306 Platforms.loadDataFilesFrame(frames.datafiles, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, 0, 0, subtypeId); 307 dataFilesLoaded = true; 308 subtypeChanged = false; 309 } 310 } 311 327 312 function getProtocolId() 328 313 { … … 368 353 subtypeChanged = true; 369 354 var recentInfo = ItemSubtype.getRecentAndRelatedInfo(subtypeId, 'BIOASSAY', ['PROTOCOL', 'HARDWARE', 'SOFTWARE']); 370 protocolChanged =ItemSubtype.updateSelectionList(frm.protocol_id, recentInfo.PROTOCOL['recent'], recentInfo.PROTOCOL['default']);355 ItemSubtype.updateSelectionList(frm.protocol_id, recentInfo.PROTOCOL['recent'], recentInfo.PROTOCOL['default']); 371 356 ItemSubtype.updateSelectionList(frm.hardware_id, recentInfo.HARDWARE['recent'], recentInfo.HARDWARE['default']); 372 357 ItemSubtype.updateSelectionList(frm.software_id, recentInfo.SOFTWARE['recent'], recentInfo.SOFTWARE['default']); … … 398 383 list[1].text = name; 399 384 list.selectedIndex = 1; 400 protocolChanged = true;401 }402 function protocolOnChange()403 {404 protocolChanged = true;405 }406 407 function physicalBioAssayOnChange()408 {409 parentsChanged = true;410 }411 412 function parentBioAssayOnChange()413 {414 parentsChanged = true;415 385 } 416 386 … … 538 508 list[1].text = name; 539 509 list.selectedIndex = 1; 540 extractOnChange(); 541 } 542 543 function extractOnChange() 544 { 545 parentsChanged = true; 546 } 547 510 } 511 548 512 function addPhysicalBioAssayOnClick() 549 513 { … … 561 525 if (!item) item = new Item('P', pbaId, name); 562 526 Link.addItem(frm.physicalBioAssays, item); 563 parentsChanged = true;564 527 } 565 528 … … 567 530 { 568 531 Link.removeSelected(document.forms['bioAssay'].physicalBioAssays); 569 parentsChanged = true;570 532 } 571 533 … … 586 548 if (!item) item = new Item('D', dbaId, name); 587 549 Link.addItem(frm.parents, item); 588 parentsChanged = true;589 550 } 590 551 … … 592 553 { 593 554 Link.removeSelected(document.forms['bioAssay'].parents); 594 parentsChanged = true;595 555 } 596 556 … … 699 659 subclass="content dialogtabcontrol" 700 660 position="bottom" active="<%=tabId%>" remember="<%=tabId == null && bioAssay != null%>" 701 switch="switchTab"702 661 extensions="<%=invoker%>"> 703 662 <t:tab id="info" title="Bioassay" validate="validateBioAssay()" helpid="derivedbioassay.edit"> … … 778 737 <tr> 779 738 <td> 780 <select name="physicalBioAssays" size="4" multiple onchange="physicalBioAssayOnChange()">739 <select name="physicalBioAssays" size="4" multiple> 781 740 </select> 782 741 </td> … … 820 779 <tr> 821 780 <td> 822 <select name="parents" size="4" multiple onchange="parentsOnChange()">781 <select name="parents" size="4" multiple> 823 782 </select> 824 783 </td> … … 865 824 newitem="<%=bioAssay == null%>" 866 825 onselect="selectExtractOnClick()" 867 onchange="extractOnChange()"868 826 /> 869 827 </td> … … 883 841 newitem="<%=bioAssay == null%>" 884 842 onselect="selectProtocolOnClick()" 885 onchange="protocolOnChange()"886 843 /> 887 844 </td> … … 936 893 </t:tab> 937 894 938 <t:tab id="datafiles" title="Data files" helpid="datafiles.edit" ><iframe895 <t:tab id="datafiles" title="Data files" helpid="datafiles.edit" activate="loadDataFilesFrame()"><iframe 939 896 name="datafiles" id="idDatafiles" src="../../common/datafiles/wait.jsp" 940 897 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 941 898 942 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 943 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 944 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 899 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 900 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 901 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 902 <jsp:param name="item_id" value="<%=itemId%>" /> 903 <jsp:param name="ID" value="<%=ID%>" /> 904 </jsp:include> 905 </t:tab> 945 906 946 907 <t:tab id="inheritedAnnotations" title="Inherited annotations" 947 helpid="annotations.edit.inherited"><iframe 948 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 949 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 908 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 909 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 910 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 911 <jsp:param name="item_id" value="<%=itemId%>" /> 912 <jsp:param name="ID" value="<%=ID%>" /> 913 </jsp:include> 914 </t:tab> 950 915 </t:tabcontrol> 951 916 </form> -
trunk/www/views/experiments/bioassays/edit_bioassay.jsp
r6217 r6254 68 68 %> 69 69 <base:page type="popup" title="<%=title%>"> 70 <base:head scripts="tabcontrol.js ,annotations.js" styles="tabcontrol.css">70 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 71 71 <ext:scripts context="<%=jspContext%>" /> 72 72 <ext:stylesheets context="<%=jspContext%>" /> … … 90 90 if (TabControl.validateActiveTab('settings')) 91 91 { 92 if (annotationsLoaded) 93 { 94 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 95 } 96 if (inheritedAnnotationsLoaded) 97 { 98 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 99 } 92 Annotations.saveModifiedAnnotationsToForm(frm); 93 Annotations.saveInheritedAnnotationsToForm(frm); 100 94 frm.submit(); 101 95 } 102 96 } 103 97 104 var annotationsLoaded = false; 105 var inheritedAnnotationsLoaded = false; 106 var parentsChanged = false; 107 var protocolChanged = false; 108 function switchTab(tabControlId, tabId) 98 function loadAnnotationsFrame() 109 99 { 110 if (TabControl.setActiveTab(tabControlId, tabId)) 111 { 112 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 113 { 114 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getProtocolId()); 115 annotationsLoaded = true; 116 protocolChanged = false; 117 } 118 else if (tabId == 'inheritedAnnotations' && 119 (parentsChanged || !inheritedAnnotationsLoaded)) 120 { 121 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 122 inheritedAnnotationsLoaded = true; 123 parentsChanged = false; 124 } 125 } 100 Annotations.autoLoadEditFrame(); 126 101 } 127 function getProtocolId() 102 103 function loadInheritedAnnotationsFrame() 128 104 { 129 // No protocol 130 return 0; 105 Annotations.autoLoadInheritFrame(); 131 106 } 132 function getParents()133 {134 // Parents are always fixed and if we pass null they will be loaded by135 // the annotate.jsp page136 return null;137 }138 107 function init() 139 108 { … … 158 127 <t:tabcontrol id="settings" 159 128 subclass="content dialogtabcontrol" 160 position="bottom" remember="<%=bioAssay != null%>" switch="switchTab"129 position="bottom" remember="<%=bioAssay != null%>" 161 130 extensions="<%=invoker%>"> 162 131 <t:tab id="info" title="Bioassay" validate="validateBioAssay()" helpid="bioassay.edit"> … … 181 150 </table> 182 151 </t:tab> 183 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 184 name="annotations" id="idAnnotations" src="../../../common/annotations/wait.jsp" 185 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 152 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 153 <jsp:include page="../../../common/annotations/annotate_frameset.jsp"> 154 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 155 <jsp:param name="item_id" value="<%=itemId%>" /> 156 <jsp:param name="ID" value="<%=ID%>" /> 157 </jsp:include> 158 </t:tab> 186 159 187 160 <t:tab id="inheritedAnnotations" title="Inherited annotations" 188 helpid="annotations.edit.inherited"><iframe 189 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../../common/annotations/wait.jsp" 190 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 161 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 162 <jsp:include page="../../../common/annotations/inherit_frameset.jsp"> 163 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 164 <jsp:param name="item_id" value="<%=itemId%>" /> 165 <jsp:param name="ID" value="<%=ID%>" /> 166 </jsp:include> 167 </t:tab> 191 168 </t:tabcontrol> 192 169 </form> -
trunk/www/views/experiments/bioassaysets/edit_bioassayset.jsp
r6217 r6254 78 78 %> 79 79 <base:page type="popup" title="<%=title%>"> 80 <base:head scripts="tabcontrol.js ,annotations.js" styles="tabcontrol.css">80 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 81 81 <ext:scripts context="<%=jspContext%>" /> 82 82 <ext:stylesheets context="<%=jspContext%>" /> … … 100 100 if (TabControl.validateActiveTab('settings')) 101 101 { 102 if (annotationsLoaded) 103 { 104 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 105 } 106 if (inheritedAnnotationsLoaded) 107 { 108 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 109 } 102 Annotations.saveModifiedAnnotationsToForm(frm); 103 Annotations.saveInheritedAnnotationsToForm(frm); 110 104 frm.submit(); 111 105 } 112 106 } 113 107 114 var annotationsLoaded = false; 115 var inheritedAnnotationsLoaded = false; 116 var parentsChanged = false; 117 var protocolChanged = false; 118 function switchTab(tabControlId, tabId) 119 { 120 if (TabControl.setActiveTab(tabControlId, tabId)) 121 { 122 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 123 { 124 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getProtocolId()); 125 annotationsLoaded = true; 126 protocolChanged = false; 127 } 128 else if (tabId == 'inheritedAnnotations' && 129 (parentsChanged || !inheritedAnnotationsLoaded)) 130 { 131 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 132 inheritedAnnotationsLoaded = true; 133 parentsChanged = false; 134 } 135 } 136 } 137 138 function getProtocolId() 139 { 140 // No protocol 141 return 0; 142 } 143 144 function getParents() 145 { 146 // Parents are always fixed and if we pass null they will be loaded by 147 // the annotate.jsp page 148 return null; 108 function loadAnnotationsFrame() 109 { 110 Annotations.autoLoadEditFrame(); 111 } 112 113 function loadInheritedAnnotationsFrame() 114 { 115 Annotations.autoLoadInheritFrame(); 149 116 } 150 117 … … 171 138 <t:tabcontrol id="settings" 172 139 subclass="content dialogtabcontrol" 173 position="bottom" remember="<%=bioAssaySet != null%>" switch="switchTab"140 position="bottom" remember="<%=bioAssaySet != null%>" 174 141 extensions="<%=invoker%>"> 175 142 <t:tab id="info" title="Bioassay set" validate="validateBioAssaySet()" helpid="bioassayset.edit"> … … 212 179 </table> 213 180 </t:tab> 214 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 215 name="annotations" id="idAnnotations" src="../../../common/annotations/wait.jsp" 216 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 181 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 182 <jsp:include page="../../../common/annotations/annotate_frameset.jsp"> 183 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 184 <jsp:param name="item_id" value="<%=itemId%>" /> 185 <jsp:param name="ID" value="<%=ID%>" /> 186 </jsp:include> 187 </t:tab> 217 188 218 189 <t:tab id="inheritedAnnotations" title="Inherited annotations" 219 helpid="annotations.edit.inherited"><iframe 220 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../../common/annotations/wait.jsp" 221 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 190 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 191 <jsp:include page="../../../common/annotations/inherit_frameset.jsp"> 192 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 193 <jsp:param name="item_id" value="<%=itemId%>" /> 194 <jsp:param name="ID" value="<%=ID%>" /> 195 </jsp:include> 196 </t:tab> 222 197 </t:tabcontrol> 223 198 </form> -
trunk/www/views/experiments/edit_experiment.jsp
r6217 r6254 152 152 %> 153 153 <base:page type="popup" title="<%=title%>"> 154 <base:head scripts="tabcontrol.js,linkitems.js ,annotations.js" styles="tabcontrol.css">154 <base:head scripts="tabcontrol.js,linkitems.js" styles="tabcontrol.css"> 155 155 <ext:scripts context="<%=jspContext%>" /> 156 156 <ext:stylesheets context="<%=jspContext%>" /> … … 188 188 if (TabControl.validateActiveTab('settings')) 189 189 { 190 if (annotationsLoaded) 191 { 192 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 193 } 190 Annotations.saveModifiedAnnotationsToForm(frm); 194 191 195 192 frm.addedRawBioAssays.value = Link.getActionIds(1, 'R').join(','); … … 203 200 } 204 201 205 var annotationsLoaded = false; 206 function switchTab(tabControlId, tabId) 207 { 208 var frm = document.forms['experiment']; 209 if (TabControl.setActiveTab(tabControlId, tabId)) 210 { 211 if (tabId == 'annotations' && (!annotationsLoaded)) 212 { 213 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=experiment == null ? 0 : experiment.getId()%>); 214 annotationsLoaded = true; 215 } 216 } 217 } 218 202 function loadAnnotationsFrame() 203 { 204 Annotations.autoLoadEditFrame(); 205 } 206 219 207 function addRawBioAssaysOnClick() 220 208 { … … 359 347 subclass="content dialogtabcontrol" 360 348 position="bottom" remember="<%=tabId == null && experiment != null%>" 361 switch="switchTab"362 349 extensions="<%=invoker%>"> 363 350 <t:tab id="info" title="Experiment" validate="validateExperiment()" helpid="experiment.edit"> … … 623 610 </t:tab> 624 611 625 <t:tab id="annotations" title="Annotations" helpid="annotations.edit"><iframe 626 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 627 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 612 <t:tab id="annotations" title="Annotations" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 613 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 614 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 615 <jsp:param name="item_id" value="<%=itemId%>" /> 616 <jsp:param name="ID" value="<%=ID%>" /> 617 </jsp:include> 618 </t:tab> 628 619 629 620 </t:tabcontrol> -
trunk/www/views/physicalbioassays/edit_bioassay.jsp
r6217 r6254 248 248 %> 249 249 <base:page type="popup" title="<%=title%>"> 250 <base:head scripts="tabcontrol.js, annotations.js,linkitems.js,subtypes.js" styles="tabcontrol.css">250 <base:head scripts="tabcontrol.js,linkitems.js,subtypes.js" styles="tabcontrol.css"> 251 251 <ext:scripts context="<%=jspContext%>" /> 252 252 <ext:stylesheets context="<%=jspContext%>" /> … … 280 280 if (TabControl.validateActiveTab('settings')) 281 281 { 282 if (annotationsLoaded) 283 { 284 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 285 } 286 if (inheritedAnnotationsLoaded) 287 { 288 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 289 } 282 Annotations.saveModifiedAnnotationsToForm(frm); 283 Annotations.saveInheritedAnnotationsToForm(frm); 290 284 frm.modifiedExtracts.value = Link.exportModified(frm, 'E', true).join(','); 291 285 frm.removedExtracts.value = Link.getActionIds(-1, 'E').join(','); … … 294 288 } 295 289 296 var annotationsLoaded = false; 297 var inheritedAnnotationsLoaded = false; 298 var parentsChanged = false; 299 var protocolChanged = false; 300 function switchTab(tabControlId, tabId) 301 { 302 if (TabControl.setActiveTab(tabControlId, tabId)) 303 { 304 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 305 { 306 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=pba == null ? 0 : pba.getId()%>, getProtocolId()); 307 annotationsLoaded = true; 308 protocolChanged = false; 309 } 310 else if (tabId == 'inheritedAnnotations' && 311 (parentsChanged || !inheritedAnnotationsLoaded)) 312 { 313 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 314 inheritedAnnotationsLoaded = true; 315 parentsChanged = false; 316 } 317 } 290 function loadAnnotationsFrame() 291 { 292 Annotations.autoLoadEditFrame(getProtocolId(), ItemSubtype.getSubtypeId('bioassay')); 293 } 294 295 function loadInheritedAnnotationsFrame() 296 { 297 Annotations.autoLoadInheritFrame(getParents()); 318 298 } 319 299 … … 337 317 if (arraySlideId > 0) parents[parents.length] = 'ARRAYSLIDE:'+arraySlideId; 338 318 339 var ids = Link.getListIds(frm.extracts, ' L');319 var ids = Link.getListIds(frm.extracts, 'E'); 340 320 if (ids.length > 0) 341 321 { … … 351 331 var recentInfo = ItemSubtype.getRecentAndRelatedInfo(subtypeId, 'BIOASSAY', ['PROTOCOL', 'HARDWARE']); 352 332 353 protocolChanged =ItemSubtype.updateSelectionList(frm.protocol_id, recentInfo.PROTOCOL['recent'], recentInfo.PROTOCOL['default']);333 ItemSubtype.updateSelectionList(frm.protocol_id, recentInfo.PROTOCOL['recent'], recentInfo.PROTOCOL['default']); 354 334 ItemSubtype.updateSelectionList(frm.hardware_id, recentInfo.HARDWARE['recent'], recentInfo.HARDWARE['default']); 355 335 } … … 379 359 list[1].text = name; 380 360 list.selectedIndex = 1; 381 protocolChanged = true;382 }383 function protocolOnChange()384 {385 protocolChanged = true;386 361 } 387 362 … … 418 393 var arraySlideId = frm.arrayslide_id[selectedIndex].value; 419 394 if (arraySlideId > 0) updateSize(arraySlideId); 420 parentsChanged = true;421 395 } 422 396 function selectArraySlideOnClick() … … 444 418 frm.arrayslide_id.selectedIndex = 1; 445 419 updateSize(arraySlideId); 446 parentsChanged = true;447 420 } 448 421 function updateSize(arraySlideId) … … 491 464 if (!item) item = new Item('E', extractId, '1: '+name+' [-]', '', ''); 492 465 Link.addItem(document.forms['bioassay'].extracts, item); 493 parentsChanged = true;494 466 extractsOnChange(); 495 467 } … … 544 516 { 545 517 Link.removeSelected(document.forms['bioassay'].extracts); 546 parentsChanged = true;547 518 } 548 519 … … 595 566 <t:tabcontrol id="settings" 596 567 subclass="content dialogtabcontrol" 597 position="bottom" remember="<%=pba != null%>" switch="switchTab"568 position="bottom" remember="<%=pba != null%>" 598 569 extensions="<%=invoker%>"> 599 570 <t:tab id="info" title="Physical bioassay" validate="validatePhysicalBioAssay()" helpid="physicalbioassay.edit"> … … 686 657 newitem="<%=pba == null%>" 687 658 onselect="selectProtocolOnClick()" 688 onchange="protocolOnChange()"689 659 /> 690 660 </td> … … 802 772 </t:tab> 803 773 804 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 805 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 806 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 774 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 775 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 776 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 777 <jsp:param name="item_id" value="<%=itemId%>" /> 778 <jsp:param name="ID" value="<%=ID%>" /> 779 </jsp:include> 780 </t:tab> 807 781 808 782 <t:tab id="inheritedAnnotations" title="Inherited annotations" 809 helpid="annotations.edit.inherited"><iframe 810 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 811 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 783 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 784 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 785 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 786 <jsp:param name="item_id" value="<%=itemId%>" /> 787 <jsp:param name="ID" value="<%=ID%>" /> 788 </jsp:include> 789 </t:tab> 812 790 </t:tabcontrol> 813 791 </form> -
trunk/www/views/rawbioassays/edit_rawbioassay.jsp
r6217 r6254 332 332 %> 333 333 <base:page type="popup" title="<%=title%>"> 334 <base:head scripts="tabcontrol.js, annotations.js,platforms.js" styles="tabcontrol.css">334 <base:head scripts="tabcontrol.js,platforms.js" styles="tabcontrol.css"> 335 335 <ext:scripts context="<%=jspContext%>" /> 336 336 <ext:stylesheets context="<%=jspContext%>" /> … … 354 354 if (TabControl.validateActiveTab('settings')) 355 355 { 356 if (annotationsLoaded) 357 { 358 Annotations.addModifiedAnnotationsToForm(frames.annotations, frm); 359 } 360 if (inheritedAnnotationsLoaded) 361 { 362 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 363 } 356 Annotations.saveModifiedAnnotationsToForm(frm); 357 Annotations.saveInheritedAnnotationsToForm(frm); 364 358 if (dataFilesLoaded) 365 359 { … … 370 364 } 371 365 372 var annotationsLoaded = false; 373 var inheritedAnnotationsLoaded = false; 374 var parentsChanged = false; 375 var protocolChanged = false; 366 function loadAnnotationsFrame() 367 { 368 Annotations.autoLoadEditFrame(getProtocolId()); 369 } 370 371 function loadInheritedAnnotationsFrame() 372 { 373 Annotations.autoLoadInheritFrame(getParents()); 374 } 375 376 376 var dataFilesLoaded = false; 377 377 var platformChanged = false; 378 function switchTab(tabControlId, tabId) 379 { 380 var frm = document.forms['rawbioassay']; 381 if (TabControl.setActiveTab(tabControlId, tabId)) 382 { 383 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 384 { 385 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=rawBioAssay == null ? 0 : rawBioAssay.getId()%>, getProtocolId()); 386 annotationsLoaded = true; 387 protocolChanged = false; 388 } 389 else if (tabId == 'inheritedAnnotations' && 390 (parentsChanged || !inheritedAnnotationsLoaded)) 391 { 392 Annotations.loadInheritFrame(frames.inheritedAnnotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>, getParents()); 393 inheritedAnnotationsLoaded = true; 394 parentsChanged = false; 395 } 396 else if (tabId == 'datafiles' && (platformChanged || !dataFilesLoaded)) 397 { 398 var platform = Platforms.getSelectedPlatform(frm.platform); 399 var variant = Platforms.getSelectedVariant(frm.platform); 400 Platforms.loadDataFilesFrame(frames.datafiles, '<%=ID%>', '<%=itemType.name()%>', <%=rawBioAssay == null ? 0 : rawBioAssay.getId()%>, platform == null ? 0 : platform.id, variant == null ? 0 : variant.id); 401 dataFilesLoaded = true; 402 platformChanged = false; 403 } 404 } 405 } 406 378 379 function loadDataFilesFrame() 380 { 381 var frm = document.forms['rawbioassay']; 382 if (platformChanged || !dataFilesLoaded) 383 { 384 var platform = Platforms.getSelectedPlatform(frm.platform); 385 var variant = Platforms.getSelectedVariant(frm.platform); 386 Platforms.loadDataFilesFrame(frames.datafiles, '<%=ID%>', '<%=itemType.name()%>', <%=rawBioAssay == null ? 0 : rawBioAssay.getId()%>, platform == null ? 0 : platform.id, variant == null ? 0 : variant.id); 387 dataFilesLoaded = true; 388 platformChanged = false; 389 } 390 } 391 407 392 function platformOnChange() 408 393 { … … 489 474 list[1].text = name; 490 475 list.selectedIndex = 1; 491 protocolChanged = true;492 }493 function protocolOnChange()494 {495 protocolChanged = true;496 476 } 497 477 … … 502 482 var bioAssayId = Math.abs(frm.bioassay_id[frm.bioassay_id.selectedIndex].value); 503 483 if (bioAssayId > 0) updateArrayDesign(bioAssayId); 504 parentsChanged = true;505 484 } 506 485 function selectBioAssayOnClick() … … 529 508 } 530 509 531 function extractOnChange()532 {533 parentsChanged = true;534 }535 510 function selectExtractOnClick() 536 511 { … … 580 555 list[1].text = name; 581 556 list.selectedIndex = 1; 582 extractOnChange();583 557 } 584 558 … … 610 584 function arrayDesignOnChange() 611 585 { 612 parentsChanged = true;613 586 <% 614 587 if (rawBioAssay != null && rawBioAssay.getNumDbSpots() > 0) … … 654 627 list[1].text = name; 655 628 list.selectedIndex = 1; 656 parentsChanged = true;657 629 arrayDesignOnChange(); 658 630 } … … 743 715 position="bottom" active="<%=tabId%>" 744 716 remember="<%=tabId == null && rawBioAssay != null%>" 745 switch="switchTab"746 717 extensions="<%=invoker%>"> 747 718 <t:tab id="info" title="Raw bioassay" validate="validateRawBioAssay()" helpid="rawbioassay.edit"> … … 823 794 selectrecent="false" 824 795 onselect="selectExtractOnClick()" 825 onchange="extractOnChange()"826 796 /> 827 797 </td> … … 875 845 newitem="<%=rawBioAssay == null%>" 876 846 onselect="selectProtocolOnClick()" 877 onchange="protocolOnChange()"878 847 /> 879 848 </td> … … 910 879 </t:tab> 911 880 912 <t:tab id="datafiles" title="Data files" helpid="datafiles.edit" ><iframe881 <t:tab id="datafiles" title="Data files" helpid="datafiles.edit" activate="loadDataFilesFrame()"><iframe 913 882 name="datafiles" id="idDatafiles" src="../../common/datafiles/wait.jsp" 914 883 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 915 884 916 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"><iframe 917 name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 918 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 885 <t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit" activate="loadAnnotationsFrame()"> 886 <jsp:include page="../../common/annotations/annotate_frameset.jsp"> 887 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 888 <jsp:param name="item_id" value="<%=itemId%>" /> 889 <jsp:param name="ID" value="<%=ID%>" /> 890 </jsp:include> 891 </t:tab> 919 892 920 893 <t:tab id="inheritedAnnotations" title="Inherited annotations" 921 helpid="annotations.edit.inherited"><iframe 922 name="inheritedAnnotations" id="idInheritedAnnotations" src="../../common/annotations/wait.jsp" 923 class="absolutefull" style="width: 100%; height: 100%;"></iframe></t:tab> 894 helpid="annotations.edit.inherited" activate="loadInheritedAnnotationsFrame()"> 895 <jsp:include page="../../common/annotations/inherit_frameset.jsp"> 896 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 897 <jsp:param name="item_id" value="<%=itemId%>" /> 898 <jsp:param name="ID" value="<%=ID%>" /> 899 </jsp:include> 900 </t:tab> 924 901 </t:tabcontrol> 925 902 </form>
Note: See TracChangeset
for help on using the changeset viewer.