Changeset 4568
- Timestamp:
- Oct 7, 2008, 3:54:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/src/docbook/userdoc/rawbioassays.xml
r4509 r4568 189 189 <listitem> 190 190 <para> 191 The scan this raw bioassay is related to (optional). 191 The scan this raw bioassay is related to (optional). Changing this property will 192 also update the value in <guilabel>Array design</guilabel>, but only if the 193 selected scan is connected to an array design and the current user has permission 194 to view it. 192 195 </para> 193 196 </listitem> -
trunk/www/views/rawbioassays/edit_rawbioassay.jsp
r4511 r4568 289 289 <%@page import="net.sf.basedb.core.Include"%> 290 290 <base:page type="popup" title="<%=title%>"> 291 <base:head scripts="tabcontrol.js,annotations.js,platforms.js " styles="tabcontrol.css">291 <base:head scripts="tabcontrol.js,annotations.js,platforms.js,ajax.js" styles="tabcontrol.css"> 292 292 <script language="JavaScript"> 293 293 // Validate the "RawBioAssay" tab … … 464 464 function scanOnChange() 465 465 { 466 var frm = document.forms['rawbioassay']; 467 var selectedIndex = frm.scan_id.selectedIndex 468 var scanId = frm.scan_id[selectedIndex].value; 469 if (scanId > 0) updateArrayDesign(scanId); 466 470 parentsChanged = true; 467 471 } … … 488 492 list[1].text = name; 489 493 list.selectedIndex = 1; 494 updateArrayDesign(id) 490 495 parentsChanged = true; 491 496 } … … 564 569 parentsChanged = true; 565 570 arrayDesignOnChange(); 571 } 572 function updateArrayDesign(scanId) 573 { 574 var request = Ajax.getXmlHttpRequest(); 575 if (request != null) 576 { 577 var url = '../scans/ajax.jsp?ID=<%=ID%>&cmd=GetArrayDesign&item_id=' + scanId; 578 request.open("GET", url, true); 579 Ajax.setReadyStateHandler(request, updateArrayDesignCallback); 580 request.send(null); 581 } 582 return request != null; 583 } 584 function updateArrayDesignCallback(request) 585 { 586 var frm = document.forms['rawbioassay']; 587 var response = Main.trimString(request.responseText).split(':'); 588 if (response[0] > 0) 589 { 590 var designId = response[0]; 591 var designName = response[1]; 592 var designList = frm.arraydesign_id; 593 if (designList.length < 2 || designList[1].value == '0') // > 594 { 595 Forms.addListOption(designList, 1, new Option()); 596 } 597 designList[1].value = designId; 598 designList[1].text = designName; 599 designList.selectedIndex = 1; 600 } 566 601 } 567 602 … … 732 767 newitem="<%=rawBioAssay == null%>" 733 768 onselect="selectScanOnClick()" 769 onchange="scanOnChange()" 734 770 /> 735 771 </td>
Note: See TracChangeset
for help on using the changeset viewer.