/********************************************************** **************************************************** Purpose: this file contains all javascript functions for arraydesign module Author: Seema Joshi (Persistent Systems Pvt. Ltd.) Version: 1.0 Version History: ------------------------------------- Date User Comments 03/27/2007 Seema Joshi Initial Creation ****************************************************************************************************************/ function openDownloadWin(link) { if (link == "none") return; else { window.open(link); window.close(); } } /************************************************************************************************************* Purpose: this function is called when user click download link on search result **************************************************************************************************************/ function downloadArrayDesign(adid, arraySetId,arraySetName,folderName,catalogReannotationFlag,customReannotationFlag,createdby_id,application_type) { var contextpath = ''; var currentUser; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } if((folderName=="AgilentCatalog" || folderName=="AgilentStaging") && application_type!='microRNA' && application_type!='DNACapture') { //opens a popup for the user to select the folder name(version of design) to download files under that folder var path = contextpath + "/array/downloadArrayDesign.do?action=populateCatalogFolderList&arraydesignid="+adid; //var path=contextpath+"/pages/common/rewriteFileConfirmation.jsp" window.open(path,'abc', 'width=450,height=225,scrollbars=no,location=no,resizable=no,top=200,left=300'); } else { if(catalogReannotationFlag==1 ||customReannotationFlag==1 ) { if(!(document.getElementById("personlogged").value==createdby_id)) { var path = contextpath + "/array/downloadArrayDesign.do?action=displaylist&arraydesignid="+adid; document.forms[0].action=path; document.forms[0].submit(); }else{ showReannotationConfirmationDialog(adid); //var path = contextpath + "/array/downloadArrayDesign.do?action=displaylist&showcustompopup=true&arraydesignid="+adid; //window.open(path,'abc', 'width=900,height=300,scrollbars=no,location=no,resizable=no,top=200,left=300'); } }else{ var path = contextpath + "/array/downloadArrayDesign.do?action=displaylist&arraydesignid="+adid; document.forms[0].action=path; document.forms[0].submit(); } } } /************************************************************************************************************* Purpose: This function is called when user click download link on search result on home page under MyDesign Tab **************************************************************************************************************/ function downloadArrayDesignFromHome(adid, arraySetId,arraySetName,folderName,catalogReannotationFlag,customReannotationFlag,createdby_id,application_type) { var contextpath = ''; // if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); /* } else { contextpath = ".."; }*/ if((folderName=="AgilentCatalog" || folderName=="AgilentStaging") && application_type!='microRNA' && application_type!='DNACapture') { //opens a popup for the user to select the folder name(version of design) to download files under that folder var path = contextpath + "/array/downloadArrayDesign.do?action=populateCatalogFolderList&arraydesignid="+adid; //var path=contextpath+"/pages/common/rewriteFileConfirmation.jsp" window.open(path,'abc', 'width=450,height=225,scrollbars=no,location=no,resizable=no,top=200,left=300'); } else { if(catalogReannotationFlag==1 ||customReannotationFlag==1 ) { if(!(document.getElementById("personlogged").value==createdby_id)) { var path = contextpath + "/array/downloadArrayDesign.do?action=displaylist&arraydesignid="+adid; // var path = contextpath + "/array/rewriteArrayDesign.do?action=rewriteFiles&arraydesignid="+adid document.forms[0].action=path; document.forms[0].submit(); } else { showReannotationConfirmationDialog(adid); //var path = contextpath + "/array/downloadArrayDesign.do?action=displaylist&showcustompopup=true&arraydesignid="+adid; //window.open(path,'abc', 'width=900,height=300,scrollbars=no,location=no,resizable=no,top=200,left=300'); } } else { var path = contextpath + "/array/downloadArrayDesign.do?action=displaylist&arraydesignid="+adid; // var path = contextpath + "/array/rewriteArrayDesign.do?action=rewriteFiles&arraydesignid="+adid document.forms[0].action=path; document.forms[0].submit(); } } } function showReannotationConfirmationDialog(adid){ showCommonLoadingDiv(); var kw = { url: contextPath + "/array/downloadArrayDesign.do?action=displaylist&showcustompopup=true&arraydesignid="+adid, load: function(data) { hideCommonLoadingDiv(); if(data){ var dialogtitle = resourceBundle.confirmlabel; var question; var okButtonLabel = resourceBundle.arraydesign_reannotate_label; var okClickAction = "javascript:sendDesignReannotation('"+adid+"')"; var cancelButtonLabel =resourceBundle.arraydesign_download_label; var cancelButtonAction = "javascript:sendDesignDownload('"+adid+"')"; if(data == 'A'){ question = resourceBundle.arrayDesign_custom_rewrite_confirmation_reannotateanddownload_msg; }else{ cancelButtonLabel=''; question = resourceBundle.arrayDesign_custom_rewrite_confirmation_reannotate_msg; } openConfirmationDialogWithWidth(dialogtitle, question, okButtonLabel, okClickAction, cancelButtonLabel, cancelButtonAction,500); } }, error: function(type, error) { }, headers: {'X-Requested-With': 'XMLHttpRequest'}, mimetype: "text/html" }; dojo.xhrPost(kw); } function sendDesignDownload(adid) { showCommonLoadingDiv(); closeConfirmDialog(); document.forms[0].action=contextPath+"/array/downloadArrayDesign.do?action=displaylist&showcustompopup=false&arraydesignid="+adid; document.forms[0].submit(); } function sendDesignReannotation(adid) { showCommonLoadingDiv(); closeConfirmDialog(); document.forms[0].action=contextPath+"/array/rewriteArrayDesign.do?action=rewriteFiles&showcustompopup=false&arraydesignid="+adid; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user click download link on Calatong Gene List page **************************************************************************************************************/ function downloadCatalogGeneList(amdid) { //var contextpath = ''; //if (dojo.isIE) { // contextpath = getElementHTML('hiddenContextPath'); //} else { // contextpath = getElementHTML('hiddenContextPath'); //} //var path = contextpath + "/downloadArrayDesign.do?action=download&amdid="+amdid+"&catalogGeneList=catalogGeneList"; //document.forms[0].action=path; //document.forms[0].submit(); var contextpath = getElementHTML('hiddenContextPath'); var sessionAttribute = 'downloadingModule' + 'ArrayDesign' + amdid; var path = contextpath +"/CommonDownloadServlet?downloadModuleType=ArrayDesign&amdid="; path = path +amdid+"&catalogGeneList=catalogGeneList&sessionAttribute=" + sessionAttribute; openDownloadWindow(path, sessionAttribute); } /************************************************************************************************************* Purpose: this function is called when user click submit link on search result **************************************************************************************************************/ function submitArrayDesign(arrayDesignID,arraySetId,arraySetName) { if ( arraySetId != "" && arraySetId != "null" ) { var textmessage = resourceBundle.submitSetConfirm; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + arraySetName + spart; var status = confirm(msg); if(status == true) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/arrayset/submitArraySet.do?eArrayAction=acceptconfirmation&arraysetid="+arraySetId; document.forms[0].action= path; document.forms[0].submit(); } }else { var status = confirm(resourceBundle.submitDesignConfirm); if(status == true) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/submitArrayDesign.do?eArrayAction=acceptconfirmation&arraydesignid="+arrayDesignID; document.forms[0].action= path; document.forms[0].submit(); } } } /************************************************************************************************************* Purpose: this function is called when user click submit link on search result for GP app type **************************************************************************************************************/ function submitGPLibrary(arrayDesignID,libType) { var okActionPath = "submitGPLibraryConfirm('"+arrayDesignID+"','"+libType+"')"; var cancelActionPath = "closeConfirmDialog()"; openConfirmationDialog(resourceBundle.confirmlabel,resourceBundle.submitLibConfirm,resourceBundle.yesbuttonlabel,okActionPath,resourceBundle.nobuttonlabel,cancelActionPath); } function submitGPLibraryConfirm(arrayDesignID,libType) { closeConfirmDialog(); var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/submitArrayDesign.do?eArrayAction=acceptconfirmation&arraydesignid="+arrayDesignID+ "&libType=" +libType; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user upload order layout link on search result **************************************************************************************************************/ function manageOrderedListArrayDesign(arrayDesignID) { var sessionId=document.getElementById('sessionId').innerHTML; var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var featureLayoutWindow = "selectFeatureLayout" + sessionId; var path = contextpath + "/array/manageOrderedList.do?eArrayAction=display&arraydesignid="+arrayDesignID; var win = window.open(path, featureLayoutWindow, 'width=450,height=280,scrollbars=yes,location=no,resizable=no,top=200,left=300'); } /************************************************************************************************************* Purpose: this function is called when user click convert link on search result **************************************************************************************************************/ function convertArrayDesign(arrayDesignId,arraySetId,arraySetName) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } if ( arraySetId != "" && arraySetId != "null" ) { var textmessage = resourceBundle.convertSetConfirm; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + arraySetName + spart; var status = confirm(msg); if(status == true) { var sessionId=document.getElementById('sessionId').innerHTML; var path = contextpath + "/arrayset/convertArraySet.do?eArrayAction=display&arraysetid="+arraySetId; document.forms[0].action=path; document.forms[0].submit(); } }else { var status = confirm(resourceBundle.convertDesignConfirm); if(status == true) { var sessionId=document.getElementById('sessionId').innerHTML; var path = contextpath + "/array/convertArrayDesign.do?eArrayAction=display&arraydesignid="+arrayDesignId; document.forms[0].action=path; document.forms[0].submit(); } } } /************************************************************************************************************* Purpose: this function is called when user click convert link on search result for GP app type **************************************************************************************************************/ function convertGPLibrary(arrayDesignId) { var status = confirm(resourceBundle.convertLibConfirm); if(status == true) { var sessionId=document.getElementById('sessionId').innerHTML; var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/convertArrayDesign.do?eArrayAction=display&arraydesignid="+arrayDesignId; document.forms[0].action=path; document.forms[0].submit(); } } /************************************************************************************************************* Purpose: this function is called when user click delete link on search result **************************************************************************************************************/ function deleteArrayDesign(arrayDesignId,arraySetId,arraySetName,fromPage) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } if ( arraySetId != "" && arraySetId != "null" ){ var textmessage = resourceBundle.deleteSetConfirm; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + arraySetName + spart; var status = confirm(msg); if(status == true){ var path = contextpath + "/arrayset/deleteArraySet.do?eArrayAction=delete&arraySetID=" + arraySetId + "&fromPage=" + fromPage; document.forms[0].action= path; document.forms[0].submit(); } }else{ var status = confirm(resourceBundle.deleteDesignConfirm); if(status == true) { var path = contextpath + "/array/deleteArrayDesign.do?eArrayAction=delete&arraydesignid=" + arrayDesignId + "&fromPage=" + fromPage; document.forms[0].action= path; document.forms[0].submit(); } } } /************************************************************************************************************* Purpose: this function is called when user click delete link on search result for GP App type **************************************************************************************************************/ function deleteGPLibrary(arrayDesignId,libType,fromPage) { var status = confirm(resourceBundle.deleteLibConfirm); if(status == true) { var contextpath = getElementHTML('hiddenContextPath'); var path = contextpath + "/array/deleteArrayDesign.do?eArrayAction=delete&arraydesignid=" + arrayDesignId + "&fromPage=" + fromPage + "&libType=" +libType; document.forms[0].action= path; document.forms[0].submit(); } } /************************************************************************************************************* Purpose: this function is called when user click view attachment link on search result **************************************************************************************************************/ function viewAttachment(arrayDesignId) { alert ( "view attachment " + arrayDesignId ); /* var path = "viewAttachments.do?arraydesignid=" + id; window.open(path, "Attachments_PID68_"+id , "toolbar=no, scrollbars=auto, location=no, width=600, height=300, resizable=yes"); */ } /************************************************************************************************************* Purpose: this function is called when user click view link on search result **************************************************************************************************************/ function viewArrayDesign(arrayDesignId) { var screenWidth= screen.width-100; var screenHeight= screen.height-120; var left = (screen.width/2)-(screenWidth/2); var screenConfig ='width=' + screenWidth + ',height=' + screenHeight +',scrollbars=yes,location=no,resizable=yes,top=0,left='+left; var contextpath = getElementHTML('hiddenContextPath'); var path = contextpath + "/array/displayViewArrayDesign.do?eArrayAction=view&arraydesignid="+arrayDesignId; window.open(path, "ArrayDesign_"+arrayDesignId , screenConfig); } /************************************************************************************************************* Purpose: this function is called when user click edit link on search result **************************************************************************************************************/ function editArrayDesign(arrayDesignId) { var contextpath = getElementHTML('hiddenContextPath'); var path = contextpath + "/array/editArrayDesign.do?eArrayAction=display&arraydesignid="+arrayDesignId; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is to move the arraydesign on domains **************************************************************************************************************/ function moveMicroArrayDesignList() { var sessionId = document.getElementById('sessionId').innerHTML; var moveToWindow = "MoveToWindow"; window.name="moveAD" + sessionId; var popup=window.open('about:blank',moveToWindow,'toolbar=no, scrollbars=yes, location=no, width=800, height=600, resizable=yes'); popup.opener.name=window.name; document.forms['searchForm'].target= moveToWindow; var contextpath = contextpath = getElementHTML('hiddenContextPath'); var path = contextpath + "/array/showDisplayDomainsList.do"; document.forms['searchForm'].action=path; document.forms['searchForm'].submit(); document.forms['searchForm'].target = "_self"; } /************************************************************************************************************* Purpose: this function is to move the arraydesign on domains **************************************************************************************************************/ function moveDesign() { if(getSelectedRowCount()!=0){ var sessionId = document.getElementById('sessionId').innerHTML; var moveToWindow = "MoveToWindow"; window.name="moveAD" + sessionId; var popup=window.open('about:blank',moveToWindow,'toolbar=no, scrollbars=yes, location=no, width=800, height=600, resizable=yes'); popup.opener.name=window.name; document.forms['searchForm'].target= moveToWindow; var contextpath = contextpath = getElementHTML('hiddenContextPath'); var path = contextpath + "/array/showDisplayDomains.do"; document.forms['searchForm'].action= path; document.forms['searchForm'].submit(); document.forms['searchForm'].target = "_self"; }else{ var applicationType = getElementHTML('applicationType'); if(applicationType == 'TargetEnrichment' || applicationType == 'RNAEnrichment'){ openAlertDialog("error",resourceBundle.moveshsrelibrary); }else{ openAlertDialog("error",resourceBundle.moveshsremicroarraydesign); } } } /**************************************************** Purpose: This function returns to Search Page after user clicks 'Cancel' button *****************************************************/ function returnToArrayDesignSearch() { var contextpath = contextpath = getElementHTML('hiddenContextPath'); var path = contextpath + "/array/searchArrayDesign.do?action=display"; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user click copy link on search result **************************************************************************************************************/ function copyArrayDesign(arrayDesignId) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/copyArrayDesign.do?eArrayAction=copy&arraydesignid="+arrayDesignId; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is to share the arraydesign in collaboration domains function shareDesign() { var shareToWindow = "ShareToWindow"; var popup=window.open('about:blank',shareToWindow,'toolbar=no, scrollbars=yes, location=no, width=650, height=500, resizable=yes'); document.forms['searchForm'].target= shareToWindow; document.forms['searchForm'].action="shareAD.do"; document.forms['searchForm'].submit(); } **************************************************************************************************************/ /************************************************************************************************************* Purpose: this function is to share the arraydesign in collaboration domains **************************************************************************************************************/ function shareDesign() { if(getSelectedRowCount()!=0){ var path="shareAD.do"; document.forms['searchForm'].action=path; document.forms['searchForm'].submit(); }else{ var applicationType = getElementHTML('applicationType'); if(applicationType == 'TargetEnrichment' || applicationType == 'RNAEnrichment'){ openAlertDialog("error",resourceBundle.moveshsrelibrary); }else{ openAlertDialog("error",resourceBundle.moveshsremicroarraydesign); } } } function shareMicroArrayDesignList() { var path="shareADList.do"; document.forms['searchForm'].action=path; document.forms['searchForm'].submit(); } /************************************************************************************************************* Purpose: this function is called when user click reset button on create arraydesign page. **************************************************************************************************************/ function createArrayDesign() { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/createArrayDesign.do?eArrayAction=createpage"; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user click approve locking button on search arraydesign page. **************************************************************************************************************/ function openLockingDecisionWindow(arrayDesignId) { // var sessionId=document.getElementById('sessionId').innerHTML; // var contextpath = ''; // if (dojo.isIE) // { // contextpath = getElementHTML('hiddenContextPath'); // } else // { // contextpath = ".."; // } // window.name="AD" + sessionId; // var lockingReasonWindow = "lockingReasonPopup" + sessionId; // var path = contextpath + "/array/editArrayDesign.do?eArrayAction=displayReasonList&arraydesignid="+arrayDesignId; // var win = window.open('about:blank', lockingReasonWindow, "width=450,height=400 toolbar=no, scrollbars=yes, location=no,resizable=yes"); // document.forms[0].target=lockingReasonWindow; // document.forms[0].action=path; // document.forms[0].submit(); // document.forms[0].target="_self"; var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/editLockingView.do?eArrayAction=display&arraydesignid="+arrayDesignId; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function opens new window to show FTP folder in Batch GEML Upload **************************************************************************************************************/ function openNewWindow(helpLink) { window.open(helpLink, "", "location=no,resizable=yes,scrollbars=yes"); } /************************************************************************************************************* Purpose: this function resets the window status bar to hide FTP connection info **************************************************************************************************************/ function clearStatus() { window.status=""; } /************************************************************************************************************* Purpose: It sumbits the form to save the Batch GEML Job entry in DB queue **************************************************************************************************************/ function saveBatchGEMLJob() { document.forms[0].action= "showBatchGEMLUpload.do?action=save"; document.forms[0].submit(); } /************************************************************************************************************* Purpose: It resets the Batch GEML UI page **************************************************************************************************************/ function resetBatchGEMLJob() { document.forms[0].action= "showBatchGEMLUpload.do?action=reset"; document.forms[0].submit(); } /************************************************************************************************************* Purpose: It sumbits the form to removw the selected Batch GEML Job entry from DB queue **************************************************************************************************************/ function removeBatchGEMLJob() { document.forms[1].action= "removeBatchGEMLUpload.do?action=remove"; document.forms[1].submit(); } /************************************************************************************************************* Purpose: For Home Page Wizard Creation. To Continue Array Design From uploaded probes **************************************************************************************************************/ function cotinueDesign(probeGroupId,species,dwqId,status,wizardName) { var screenWidth= 1040; var screenHeight= 700; var left = (screen.width/2)-(screenWidth/2); var screenConfig ='width=' + screenWidth + ',height=' + screenHeight +',scrollbars=yes,location=no,resizable=yes,top=0,left='+left; var contextpath = document.forms[0].elements['contextPathHidden'].value; if(status == "HD Search Complete") { var path = contextpath +"/common/arrayDesignUsingWizard.do?eArrayAction=createProbeGroupHDSearchWizard&designWizardId="+dwqId+"&wizardSearch=true"; } else { var path = contextpath +"/common/arrayDesignUsingWizard.do?eArrayAction=display&probeGroupId="+probeGroupId+"&species="+species+"&designWizardId="+dwqId+"&wizardName="+wizardName; } catWindow =window.open(path,null,screenConfig); } /************************************************************************************************************* Purpose: For Home Page Wizard Creation. To View HD Search Result **************************************************************************************************************/ function viewHDResults(dwqId,status,probeGroupId) { var contextpath = document.forms[0].elements['contextPathHidden'].value; var path=""; if(status == 'HD Probe Group created') { path = contextpath + "/probeGroup/viewProbeGroup.do?action=view&probegroupid="+probeGroupId; } else { path = contextpath +"/common/arrayDesignUsingWizard.do?eArrayAction=displayHDSearchWizard&designWizardId="+dwqId+"&wizardSearch=true"; } catWindow =window.open(path,null,'width=1000,height=600,scrollbars=yes,location=no,resizable=yes,top=140,left=80'); } /************************************************************************************************************* Purpose: For Home Page Wizard Creation. To delete wizard entry **************************************************************************************************************/ function deleteDesignWizardEntry(dwqId,status) { var contextpath = document.forms[0].elements['contextPathHidden'].value; var showViewAll =document.viewForm.showView.value; var confirmValue=""; if(status == "Complete" ||status == "HD Probe Group created") { confirmValue=confirm(resourceBundle.deleteHDWizardConfirm); } else { confirmValue=confirm(resourceBundle.deleteWizardConfirm); } if(confirmValue!=false) { document.location.href=contextpath+"/common/arrayDesignUsingWizard.do?eArrayAction=deleteWizardQueue&designWizardId="+dwqId+"&showViewAll="+showViewAll+"&status="+status; } else{ return; } } /************************************************************************************************************* Purpose: this function is called when user click quote link on search result **************************************************************************************************************/ function orderArrayDesign(arraydesignid,arraysetid,arraysetname) { var contextpath = ''; var path = ''; if (dojo.isIE) contextpath = getElementHTML('hiddenContextPath'); else contextpath = ".."; if ( arraysetid != "" && arraysetid != "null" ) { var textmessage = resourceBundle.orderSetConfirm; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + arraysetname + spart; var status = confirm(msg); if(status == true) { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArraySetId=" + arraysetid + "&fromPage=searchArrayDesignPage"; } else { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage"; } } else { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage"; } document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user click quote link on search result for GP. **************************************************************************************************************/ function orderLibrary(arraydesignid,arraysetid,arraysetname,isXT) { orderLibrary(arraydesignid,arraysetid,arraysetname,isXT,false) } function orderLibrary(arraydesignid,arraysetid,arraysetname,isXT,isXT2) { var contextpath = ''; var path = ''; if (dojo.isIE) contextpath = getElementHTML('hiddenContextPath'); else contextpath = ".."; if ( arraysetid != "" && arraysetid != "null" ) { var textmessage = resourceBundle.orderLibSetConfirm; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + arraysetname + spart; var status = confirm(msg); if(status == true) { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraysetid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; } else { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; } } else { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; } document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user click quote link on Home Page MyDesign **************************************************************************************************************/ function orderArrayDesignHomeWithAppType(arraydesignid,arraysetid,arraysetname,applicationType,isXT) { if(applicationType =="TargetEnrichment" || applicationType=="RNAEnrichment") { orderArrayDesignHomeTE(arraydesignid,arraysetid,arraysetname); } else { orderArrayDesignHome(arraydesignid,arraysetid,arraysetname,isXT,false); } } function orderArrayDesignHomeTE(arraydesignid,arraysetid,arraysetname) { dojo.xhrPost ( { url:contextPath + "/array/orderTECompleteTE.do?eArrayAction=checkForErrorBeforeOrderingProcess&ArrayDesignId=" + arraydesignid, headers: {'X-Requested-With': 'XMLHttpRequest'}, mimetype: "text/html", changeUrl: true, load: function( value) { var errorData = JSON.parse(value); if(errorData!=null && errorData.errorStatus=="true") { openAlertDialog("error",errorData.errorMessage); } else { var path=contextPath + "/array/orderTECompleteTE.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage"; window.open(path,"orderLibrary",'width=800,height=700,toolbar=no,menubar=no,titlebar=no,resizable=no,scrollbars=no'); } }, error: function(error) { openAlertDialog("error",error.message); } } ); } function orderArrayDesignHome(arraydesignid,arraysetid,arraysetname,isXT,isXT2) { var contextpath = document.forms[0].elements['contextPathHidden'].value; if ( arraysetid != "" && arraysetid != "null" ) { var textmessage = resourceBundle.orderSetConfirm; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + arraysetname + spart; var status = confirm(msg); if(status == true) { var path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArraySetId=" + arraysetid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; document.forms[0].action= path; document.forms[0].submit(); } else { var path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; document.forms[0].action= path; document.forms[0].submit(); } } else { var path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; document.forms[0].action= path; document.forms[0].submit(); } } /************************************************************************************************************* Purpose: this function is called from array design notification **************************************************************************************************************/ function subscribeNotification() { if ( getSelectedRowCount() == 0 ) { alert (resourceBundle.subscribeWarning); return; } var path="arraydesignNotificationUpdate.do?action=subscribe"; document.forms['searchForm'].action=path; document.forms['searchForm'].submit(); } function unsubscribeNotification() { if ( getSelectedRowCount() == 0 ) { alert (resourceBundle.subscribeWarning); return; } var path="arraydesignNotificationUpdate.do?action=unsubscribe"; document.forms['searchForm'].action=path; document.forms['searchForm'].submit(); } /************************************************************************************************************* Purpose: this function is called when user click change control type link on search result **************************************************************************************************************/ function changeControlType(arrayDesignId) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/changeControlTypeView.do?eArrayAction=display&arraydesignid="+arrayDesignId; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user clicks on ownershiptransfer **************************************************************************************************************/ function ownershiptranser() { //var contextpath = ""; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var winname = "domainList"; var popup = window.open('about:blank',winname,'width=700,height=400,toolbar=no,menubar=no,titlebar=no,resizable=yes,scrollbars=yes'); window.name = "ArrayDesign" + document.getElementById('sessionId').innerHTML; ; popup.opener = window.name; document.forms['searchForm'].target=winname; document.forms['searchForm'].action=contextpath + "/array/transferObjectValidate.do?objectType=ARRAYDESIGN"; document.forms['searchForm'].submit(); document.forms['searchForm'].target = "_self"; } /************************************************************************************************************* Purpose: this function is called when user click update GPL link on search result **************************************************************************************************************/ function updateGPL(arrayDesignId) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/updateGPL.do?eArrayAction=display&arraydesignid="+arrayDesignId; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called when user click update catalog array on search result **************************************************************************************************************/ function updateCatalogArray(arrayDesignId) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/updateCatalogArray.do?eArrayAction=display&arraydesignid="+arrayDesignId; document.forms[0].action= path; document.forms[0].submit(); } /************************************************************************************************************* Purpose: this function is called to validate values of array design edit/create page. **************************************************************************************************************/ function validateArrayDesignPage() { var obj; var fieldName; var type; var maxLen = 0; var isEdit = false; var allEle = document.forms[0].elements; for(i=0;i maxLen) { openAlertDialog("error",resourceBundle.designLengthValidate); obj.focus(); return false; } } if(document.forms[0].baitLength) { obj = document.forms[0].baitLength; if ( document.forms[0].baitLength.value == null || document.forms[0].baitLength.value == '' ||document.forms[0].baitLength.value == 'Select' ) { openAlertDialog("error",resourceBundle.baitLenghtRequired); obj.focus(); return false; } } if(applicationType=='TargetEnrichment' || applicationType=='RNAEnrichment') document.forms[0].indexSelArrayFormat.value=0; else { obj = document.forms[0].selArrayFormat; if ( document.forms[0].selArrayFormat.value == null || document.forms[0].selArrayFormat.value == "" ) { if(document.forms[0].baitLength) { openAlertDialog("error",resourceBundle.controlGridRequired); } else { openAlertDialog("error",resourceBundle.designFormatRequired); obj.focus(); } return false; } } obj = document.forms[0].desc; maxLen = 4000; if(isBlank(obj) == false) { var val = obj.value; var len = val.length; if (len > maxLen) { openAlertDialog("error",resourceBundle.designDescLenValidate); obj.focus(); return false; } } //For search words obj = document.forms[0].searchWords; if(isBlank(obj) == false) { var val = obj.value; var len = val.length; if (len > maxLen) { openAlertDialog("error",resourceBundle.designKeywordsLenValidate); obj.focus(); return false; } } type = "alphanumericwithspace"; if (obj.value.indexOf(":")!=-1) { openAlertDialog("error",resourceBundle.designKeywordsValidate1); obj.focus(); return false; } var pattern = new RegExp("]:"); if (obj.value.search(pattern)!=-1 || obj.value.indexOf("[:")!=-1) { openAlertDialog("error",resourceBundle.designKeywordsValidate2); obj.focus(); return false; } var pattern = new RegExp("\\:"); if (obj.value.indexOf("\\:")!=-1 || obj.value.indexOf("[:")!=-1) { openAlertDialog("error",resourceBundle.designKeywordsValidate3); obj.focus(); return false; } var pattern = new RegExp("/:"); if (obj.value.search(pattern)!=-1 || obj.value.indexOf("[:")!=-1) { openAlertDialog("error",resourceBundle.designKeywordsValidate3); obj.focus(); return false; } if(document.forms[0].applicationType && document.forms[0].applicationType.value =="TargetEnrichment"){ if(document.getElementById('divNoOfSlideCount')!=null && document.getElementById('divNoOfSlideCount')!='undefined') { var slideCountStr=document.getElementById('divNoOfSlideCount').innerHTML; var slideCount= parseInt(slideCountStr) ; if(slideCount > document.getElementById('maxAllowedCustomLibSetCount').value) { openAlertDialog("error","A library set must contain "+ document.getElementById('maxAllowedCustomLibSetCount').value +" or fewer libraries."); return false ; } } } //For SNP Probe Groups // 5% of CGH biological probes per CGH+SNP microarray if(document.forms[0].snpDesign && document.forms[0].snpDesign.value == 'true') { if(document.forms[0].numOfBiologicalProbeCount) { var numBiologicalprobeCount = document.forms[0].numOfBiologicalProbeCount.value; var numTotalFeature = document.forms[0].totalFeatures.value; if(parseInt(numBiologicalprobeCount) < parseInt(numTotalFeature)*0.05){ openAlertDialog("error",resourceBundle.snp5percentCGHBiolicalProbes); return false; } } } // 1% normalize probegroup should be present while creating any CGH Design. var totalNormalizaeCount = document.forms[0].normalizationProbeCount.value; if(document.forms[0].applicationType.value =="CGH"){ var numTotalFeature = document.forms[0].totalFeatures.value; if(parseInt(totalNormalizaeCount) > 0 && parseInt(totalNormalizaeCount) < parseInt(numTotalFeature)*0.01){ openAlertDialog("error",resourceBundle.normalizationProbeValidation); return false; } } //For Probe Groups if( (probeCount.length == 0) && (normalizationProbesCount.length == 0) && (replicateProbeCount.length == 0)) { if(document.forms[0].baitLength) { openAlertDialog("error",resourceBundle.designBaitGroupRequired); } else { openAlertDialog("error",resourceBundle.designProbeGroupRequired); } return false; }else { var validateresult = validateReplicate(); if (validateresult == false) return false; } //For Comments obj = document.forms[0].comments; type = "alphanumericwithspace"; if(document.forms[0].owner.value == "false") { if(isBlank(obj) == true) { openAlertDialog("error",resourceBundle.designCommentRequired); obj.focus(); return false; } } if(isBlank(obj) == false) { var val = obj.value; var len = val.length; if (len > maxLen) { openAlertDialog("error",resourceBundle.designCommentLenValidate); obj.focus(); return false; } } for (k = 0;k < replicateCount.length;k++) { var newvalue = replicateCount[k]; var numeric = /[.@!#^$%&*()+={}?><:;|/\\a-zA-Z]/; if(numeric.test(newvalue)) { var textmessage = resourceBundle.designRepCntValidate; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + newvalue + spart; openAlertDialog("error",msg); return false; } } for (k = 0;k < replicateReplicateCount.length;k++) { var newvalue = replicateReplicateCount[k]; var numeric = /[.@!#^$%&*()+={}?><:;|/\\a-zA-Z]/; if(numeric.test(newvalue)) { var textmessage = resourceBundle.designRepCntValidate; var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + newvalue + spart; openAlertDialog("error",msg); return false; } } if (document.forms[0].selArrayFormat) { var selindex = document.forms[0].selArrayFormat.selectedIndex; if(document.forms[0].selArrayFormat[selindex].value != null && document.forms[0].selArrayFormat[selindex].value != '') { var cgCount = getElementValue("controlGridProbeCount"); if(document.forms[0].baitLength) { var gpapptype = "true"; var statistics = calculateStatisticsForGP (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount, probeCount, replicateCount, pgType, enablearrayset, gpapptype); } else { if(document.forms[0].distinctTargets) { var featurePerTarget = document.forms[0].featurePerTarget.value; var distinctTargets = document.forms[0].distinctTargets.value; var statistics = calculateStatisticsMicroRNA ( slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount , probeCount, enablearrayset, featurePerTarget, distinctTargets); } else if(document.forms[0].arrayCategory && document.forms[0].arrayCategory.value == "CGH+SNP") { var statistics = calculateStatisticsForSNP (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount, probeCount, replicateCount, pgType, enablearrayset, normalizationProbesCount, replicateProbeCount, replicateReplicateCount, snpCount, snpReplicateCount); updateStatisticsDisplay(statistics); } else { var statistics = calculateStatistics (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount, probeCount, replicateCount, pgType, enablearrayset, normalizationProbesCount, replicateProbeCount, replicateReplicateCount); } // at least 2000 distinct snp probes are required for creating snp design; if(document.forms[0].snpDesign && document.forms[0].snpDesign.value == 'true') { var minSNPCount = document.getElementById("minimumSNPCountId").value; if(document.forms[0].selStatus){ var designStatus = document.forms[0].selStatus.value; if(designStatus == 'Locked' || designStatus == 'Submit') { //openAlertDialog("error","distinct probes"+document.forms[0].distinctSNPProbes.value+" "+minSNPCount); var ditinctSNPProbe=document.forms[0].distinctSNPProbes.value; //openAlertDialog("error","ditinctSNPProbe "+ ditinctSNPProbe); if(document.forms[0].distinctSNPProbes){ if((parseInt(ditinctSNPProbe) < parseInt(minSNPCount))){ openAlertDialog("error",resourceBundle.snpValidationMinimumSNPProbes); return false; } } } } } // display error message if control per array exceeds half of feature per slide var featurecount = slTotalFeatureList[selindex]; var controlperArray = statistics.totControlCount / statistics.microArrayReplica ; // display error message if control per array exceeds half of feature per slide var featurecount = slTotalFeatureList[selindex]; var message = resourceBundle.designCtrlPrbsFillHalf; var retval = validateControlCount(statistics,featurecount,message); if ( retval == false) { return false; } // set the default color to all statistic values. updateStatisticsDefaultColorDisplay(); // verify if normalization, replicate and user control probes count exceeded. var exceedCountFlag = getFeatureCount(selindex, cgCount) ; if(exceedCountFlag) { if(document.forms[0].applicationType.value =="CGH") { openAlertDialog("error",resourceBundle.designProbeLimitValidateCGH); }else if(document.forms[0].applicationType.value =="Expression") { openAlertDialog("error",resourceBundle.designProbeLimitValidateExp); } updateStatisticsChangeColorDisplay(); return false; } } } else { if(document.forms[0].baitLength) openAlertDialog("error",resourceBundle.baitLenghtRequired); else openAlertDialog("error",resourceBundle.designFormatRequired); obj.focus(); return false; } } var percentfilled = getElementValue('perFilled') ; document.forms[0].exceedCount.value = 0; if (percentfilled > 100*1) { var totalfeatures = document.forms[0].totalFeatures.value; var exceedcount = 0; if ( totalfeatures != 0 ) { exceedcount = ( (percentfilled * 1 - 100 ) / 100 ) * totalfeatures; exceedcount = Math.round(exceedcount * Math.pow(10,0))/Math.pow(10,0); } if (exceedcount > 0) { document.forms[0].exceedCount.value = exceedcount; } else { if(document.forms[0].baitLength) { openAlertDialog("error",resourceBundle.libFeatureExceed); return false; } else { openAlertDialog("error",resourceBundle.designFeatureExceed); return false; } } } return true; } // get the feature probes count for normalization, replicate and users control probes function getFeatureCount(selindex, cgCount) { var PGTYPE_BIOLOGICAL = "BiologicalProbeGroup"; var PGTYPE_CONTROL = "CustomControlProbeGroup"; var PGTYPE_AGILENTCONTROLPG = "AgilentControlProbeGroup"; var PGTYPE_REPLICATE = "ReplicateProbeGroup"; // calculate sum of biological and user control probes var bioProbeCountSum = 0; var ucProbeCountSum = 0; // calculate sum of normalization and replicate probes var normProbeCountSum = 0; var replProbeCountSum = 0; var totAgilentControlPGCount = 0; // for simple probegroup if(probeCount != null) { for (var i = 0;i 0) { var status = confirm(resourceBundle.movelibSetWarning); if(status == true) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/moveLibSet.do?eArrayAction=moveLibSetPage&libId="+libId; document.forms[0].action=path; document.forms[0].submit(); } else { moveToAgilentCatalog(libId, null,applicationType); } } else { moveToAgilentCatalog(libId, null,applicationType); } } function processMoveToCatalogResponse(value) { dojo.byId("messagesId").innerHTML = value; var dlgProg=null; if(dojo.byId("errormessagetable")){ dojo.byId("dialogerr").style.display=""; dlgProg = dijit.byId("dialogerr"); if(dlgProg){ dlgProg.destroy(); } dojo.parser.parse(dojo.byId("messagesId")); dlgProg = dijit.byId("dialogerr"); } else if(dojo.byId("messagetable")){ dojo.byId("dialogmsg").style.display=""; dlgProg = dijit.byId("dialogmsg"); if(dlgProg){ dlgProg.destroy(); } dojo.parser.parse(dojo.byId("messagesId")); dlgProg = dijit.byId("dialogmsg"); } dlgProg.show(); } function downloadDesign(id) { var contextPath = document.getElementById("hiddenContextPath").value; //document.forms['probeDesignForm'].action=contextPath+"/probedesign/downloadProbeDesignResults.do?eArrayAction=downloadBaitTilingResults&pdiId="+id; //document.forms['probeDesignForm'].submit(); var sessionAttribute = 'downloadingModule' + 'BaitTilingResults' + id; var path = contextPath + "/CommonDownloadServlet?downloadModuleType=BaitTilingResults&pdiId="+id+"&from=BaitTilingWizard" + "&sessionAttribute=" + sessionAttribute; openDownloadWindow(path, sessionAttribute); } /************************************************************************************************************* Purpose: This function is called when user clicks on 'Create Library Set' button. **************************************************************************************************************/ function createLibSet(fromPage) { var path="selectLib.do?action=setFromPage&fromPage=" + fromPage; document.forms['searchForm'].action=path; document.forms['searchForm'].submit(); } /************************************************************************************************************* Purpose: This function is called when user clicks on 'Partnumber Notification' button. **************************************************************************************************************/ function notificationForNAPartNo(arrayId) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/array/partNoNotification.do?action=display&arraydesignid="+arrayId; document.forms[0].action=path; document.forms[0].submit(); } function loadteDetails() { var ajaxCallConditionString = document.getElementById('baseCoverageIdHidden').value; if( ajaxCallConditionString == 'Calculating...'){ renderTEDetailsPage(); } } function renderTEDetailsPage() { var arraydesignid = document.forms['arrayDesignForm'].arrayDesignId.value; var contextpath = getElementHTML('hiddenContextPath'); if(dojo.byId('baseCoverageId')){ dojo.byId('baseCoverageId').innerHTML = "Calculating..."; dojo.byId('uniqueBaitId').innerHTML = "Calculating..."; } var kw = { url: contextpath + "/array/displayViewArrayDesign.do?eArrayAction=calculateTEDetails&arraydesignid="+arraydesignid, load: function(data) { dojo.byId("dynamicFields").innerHTML = data; dojo.parser.parse(dojo.byId("dynamicFields")); var estimatedString =""; if (document.getElementById('isEstimtdDynamicHidden').value == 'true' ) { estimatedString = " " + resourceBundle.estimatedLabel; } if(dojo.byId('baseCoverageId')){ dojo.byId('baseCoverageId').innerHTML = dojo.byId('bcDynamicHidden').value + ' ' +estimatedString ; dojo.byId('uniqueBaitId').innerHTML = dojo.byId('ubDynamicHIdden').value; } }, error: function(type, error) { if(dojo.byId('baseCoverageId')){ dojo.byId('baseCoverageId').innerHTML = "Error..."; dojo.byId('uniqueBaitId').innerHTML = "Error..."; } }, headers: {'X-Requested-With': 'XMLHttpRequest'}, mimetype: "text/html" }; //bind this configuration dojo.xhrPost(kw); } function snpPGGuidance(appType) { var contextpath = ''; if (dojo.isIE) { contextpath = getElementHTML('hiddenContextPath'); } else { contextpath = ".."; } var path = contextpath + "/pages/home/Custom_Design_SNP_Guidance.jsp?appType=" + appType; window.open(path,"Contact_SNP_Support", "width=650,height=550,location=no, resizable=yes, scrollbars=yes,top=50,left=50"); } function removepg(pgDetail) { var textmessage = ""; if(document.forms[0].enableArraySet) { if(document.forms[0].enableArraySet.checked) textmessage = ""; } //openLoadingWindow(textmessage); document.forms[0].target="_self"; document.forms[0].action="../array/editArrayDesign.do?eArrayAction=removepg&pgDetail="+pgDetail; document.forms[0].submit(); } function continueMutagenesisWizard(jobID, status) { var contextpath = getElementHTML('hiddenContextPath'); var screenWidth= 950; var screenHeight=685; var left = (screen.width/2)-(screenWidth/2); var screenConfig ='width=' + screenWidth.toString() + ',height=' + screenHeight.toString() +',scrollbars=yes,location=no,resizable=no,top=50,left='+left.toString(); windowObj=window.open(contextpath+"/mutagenesis/showMutagenesisLibrary.do?eArrayAction=continueJob&jobID="+jobID,'popupindexpage',screenConfig); windowObj.focus(); } function deleteMutagenesisWizard(jobID, status) { var contextpath = ''; contextpath = getElementHTML('hiddenContextPath'); var path = contextpath + "/mutagenesis/showMutagenesisLibrary.do?eArrayAction=deleteJob&jobID="+jobID; document.forms[0].action=path; document.forms[0].submit(); } function downloadLibrary(libraryId){ var contextpath = getElementHTML('hiddenContextPath'); document.forms[0].action= contextpath+"/mutagenesis/downloadLibrary.do?action=displaylist&libraryId="+libraryId; document.forms[0].submit(); } function orderMutagenesisLibrary(libraryId){ var contextpath = getElementHTML('hiddenContextPath'); var kw = { url:contextpath+"/mutagenesis/orderLibrary.do?action=checkForErrorsBeforeOrderingProcess&libraryId="+libraryId, form: document.forms[0], load: function(value) { var errorData = JSON.parse(value); if(errorData!=null && errorData.errorStatus=="true") { openAlertDialog("error",errorData.errorMessage); } else { document.forms[0].action= contextpath+"/mutagenesis/orderLibrary.do?action=displayOrderDetails&libraryId="+libraryId; document.forms[0].submit(); } }, error: function(error) { alert( "Error : "+error ); }, headers: {'X-Requested-With': 'XMLHttpRequest'}, mimetype: "text/html" }; //bind this configuration dojo.xhrPost(kw); } function toggleEditableFields(groupType, pgid, index) { // for control type enable evenly distribute and disable replicatecount if ( groupType == PGTYPE_CONTROL ) { var replCountName = 'probeGroupInfo.replicateCount(' + pgid + ')'; var objReplicateCount = document.forms[0].elements[replCountName]; if ( objReplicateCount ) { objReplicateCount.value = 1; objReplicateCount.readOnly = true; //objReplicateCount.disabled = true; replicateCount[index] = 1 * 1; } var replCountDisabledName = 'probeGroupInfo.replicateCountDisabled(' + pgid + ')'; var objReplicateCountDisabled = document.forms[0].elements[replCountDisabledName]; if ( objReplicateCountDisabled ) { objReplicateCountDisabled.value = "true"; } if ( enablearrayset) { var evenlyDistName = "probeGroupInfo.evenlyDistribute(" + pgid+ ")"; var objEvenlyDist = document.forms[0].elements[evenlyDistName]; var evenlydistcontrolradio = "pgdiv" + evenlyDistName; var evenlydistcontrolradiodiv = dojo.byId(evenlydistcontrolradio); if(evenlydistcontrolradiodiv !=null){ evenlydistcontrolradiodiv.style.display = 'block'; } objEvenlyDist[0].disabled = false; objEvenlyDist[1].disabled = false; var evenlyDistDisabledName = "probeGroupInfo.evenlyDistributeDisabled(" + pgid+ ")"; var objEvenlyDistDisabled = document.forms[0].elements[evenlyDistDisabledName]; if ( objEvenlyDistDisabled) { objEvenlyDistDisabled.value = "false" } } var objgroupTypeName = 'probeGroupInfo.probegroupType(' + pgid + ')'; var objgroupType = document.forms[0].elements[objgroupTypeName]; if (objgroupType) { objgroupType.value = PGTYPE_CONTROL; } }else if ( groupType == PGTYPE_BIOLOGICAL ) { var replCountName = 'probeGroupInfo.replicateCount(' + pgid + ')'; var objReplicateCount = document.forms[0].elements[replCountName]; if ( objReplicateCount ) { objReplicateCount.readOnly = false; objReplicateCount.value = 1; objReplicateCount.disabled = false; replicateCount[index] = 1 * 1; } var replCountDisabledName = 'probeGroupInfo.replicateCountDisabled(' + pgid + ')'; var objReplicateCountDisabled = document.forms[0].elements[replCountDisabledName]; if ( objReplicateCountDisabled ) { objReplicateCountDisabled.value = "false"; } if ( enablearrayset) { var evenlyDistName = "probeGroupInfo.evenlyDistribute(" + pgid+ ")"; var objEvenlyDist = document.forms[0].elements[evenlyDistName]; objEvenlyDist[0].disabled = true; objEvenlyDist[0].checked = true; objEvenlyDist[1].disabled = true; var evenlydistbiodiv = "pgdiv" + evenlyDistName; var evenlydistbioradiodiv = dojo.byId(evenlydistbiodiv); if(evenlydistbioradiodiv != null){ evenlydistbioradiodiv.style.display = 'none'; } var evenlyDistDisabledName = "probeGroupInfo.evenlyDistributeDisabled(" + pgid+ ")"; var objEvenlyDistDisabled = document.forms[0].elements[evenlyDistDisabledName]; if ( objEvenlyDistDisabled) { objEvenlyDistDisabled.value = "true"; } } var objgroupTypeName = 'probeGroupInfo.probegroupType(' + pgid + ')'; var objgroupType = document.forms[0].elements[objgroupTypeName]; if (objgroupType) { objgroupType.value = PGTYPE_BIOLOGICAL; } } } function onremovepgclick1() { // enable disable remove pg button var eleArr = document.getElementsByName("removedProbeGroupIds"); var checkedcount = 0; for (var i=0;i -1 && document.forms[0].selArrayFormat[selindex].value != null && document.forms[0].selArrayFormat[selindex].value != '') { if(document.forms[0].baitLength) { var gpapptype = "true"; var statistics = calculateStatisticsForGP (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount, probeCount, replicateCount, pgType, enablearrayset, gpapptype); setElementHTML('divPercentFeatureOccupied',roundNumber(statistics.percentFeatureOccupied ) + " %"); setElementValue("percentFeatureOccupied",roundNumber(statistics.percentFeatureOccupied )); } else { var statistics = calculateStatistics (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount, probeCount, replicateCount, pgType, enablearrayset, normalizationProbesCount, replicateProbeCount, replicateReplicateCount); updateStatisticsDisplay(statistics); // display error message if control per array exceeds half of feature per slide var featurecount = slTotalFeatureList[selindex]; var message = resourceBundle.designCtrlPrbsFillHalf; var retval = validateControlCount(statistics,featurecount,message); } updateStatisticsDisplay(statistics); } } } function modifyFeaturePerTargetWizard() { var selindex = document.forms[0].indexSelArrayFormat.value; // recalculate statistics var cgCount = getElementValue("controlGridProbeCount"); if(document.forms[0].distinctTargets) { var featurePerTarget = document.forms[0].featurePerTarget.value; var distinctTargets = document.forms[0].distinctTargets.value; statistics = calculateStatisticsMicroRNA (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount , probeCount, enablearrayset, featurePerTarget, distinctTargets); } updateStatisticsDisplay(statistics); // display error message if control per array exceeds half of feature per slide var featurecount = slTotalFeatureList[selindex]; var message = resourceBundle.designCtrlPrbsFillHalf; var retval = validateControlCount(statistics,featurecount,message); } function modifyProbegroupControlTypeWizard(selindex,index, newcontrltype, pgid) { pgControlType[index] = newcontrltype; if ( newcontrltype == PGCONTROL_POSITIVE || newcontrltype == PGCONTROL_NEGATIVE ) { // change group type pgType[index] = PGTYPE_CONTROL; } else pgType[index] = PGTYPE_BIOLOGICAL; // toggle evenly distribute and replicate count if(!document.forms[0].baitLength) toggleEditableFields(pgType[index],pgid,index); else toggleEditableFieldsForGP(pgType[index],pgid,index); // recalculate statistics var cgCount = getElementValue("controlGridProbeCount"); if(document.forms[0].baitLength) { var gpapptype = "true"; var statistics = calculateStatisticsForGP (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount, probeCount, replicateCount, pgType, enablearrayset, gpapptype); setElementHTML('divPercentFeatureOccupied',roundNumber(statistics.percentFeatureOccupied ) + " %"); setElementValue("percentFeatureOccupied",roundNumber(statistics.percentFeatureOccupied )); updateStatisticsDisplay(statistics); } else { var statistics = calculateStatistics (slArrayCountList[selindex], slTotalFeatureList[selindex], cgCount, probeCount, replicateCount, pgType, enablearrayset, normalizationProbesCount, replicateProbeCount, replicateReplicateCount); updateStatisticsDisplay(statistics); // display error message if control per array exceeds half of feature per slide var featurecount = slTotalFeatureList[selindex]; var message = resourceBundle.designCtrlPrbsFillHalf; var retval = validateControlCount(statistics,featurecount,message); } } function orderArrayDesignRequestQuote(arraydesignid,arraysetid,arraysetname,applicationType,isXT){ orderArrayDesignRequestQuote(arraydesignid,arraysetid,arraysetname,applicationType,isXT,false); } function orderArrayDesignRequestQuote(arraydesignid,arraysetid,arraysetname,applicationType,isXT,isXT2) { var contextpath = ''; var path = ''; if (dojo.isIE) contextpath = getElementHTML('hiddenContextPath'); else contextpath = ".."; if ( arraysetid != "" && arraysetid != "null" ) { var textmessage; if(applicationType == 'TargetEnrichment' || applicationType == 'RNAEnrichment'){ textmessage = resourceBundle.orderLibSetConfirm; } else{ textmessage = resourceBundle.orderSetConfirm; } var index = textmessage.indexOf("@"); var fpart = textmessage.substring(0,index); var spart = textmessage.substring(index+1); var msg = fpart + arraysetname + spart; var status = confirm(msg); if(status == true) { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArraySetId=" + arraysetid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; } else { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; } } else { path = contextpath + "/array/orderComplete.do?eArrayAction=displayOrderDetails&ArrayDesignId=" + arraydesignid + "&fromPage=searchArrayDesignPage&isXT="+isXT+"&isXT2="+isXT2; } document.forms[0].action= path; document.forms[0].submit(); } function calculateTEBaseCoverage() { var arraydesignid = document.forms['arrayDesignForm'].arrayDesignId.value; var contextpath = getElementHTML('hiddenContextPath'); var kw = { url: contextpath + "/array/displayViewArrayDesign.do?eArrayAction=calculateTEDetails&arraydesignid="+arraydesignid, load: function(data) { }, error: function(type, error) { }, headers: {'X-Requested-With': 'XMLHttpRequest'}, mimetype: "text/html" }; //bind this configuration dojo.xhrPost(kw); }