7604 |
25 Feb 19 |
nicklas |
/* $Id $ |
7604 |
25 Feb 19 |
nicklas |
2 |
------------------------------------------------------------------ |
7604 |
25 Feb 19 |
nicklas |
Copyright (C) 2013 Nicklas Nordborg |
7604 |
25 Feb 19 |
nicklas |
4 |
|
7604 |
25 Feb 19 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
7604 |
25 Feb 19 |
nicklas |
Available at http://base.thep.lu.se/ |
7604 |
25 Feb 19 |
nicklas |
7 |
|
7604 |
25 Feb 19 |
nicklas |
BASE is free software; you can redistribute it and/or |
7604 |
25 Feb 19 |
nicklas |
modify it under the terms of the GNU General Public License |
7604 |
25 Feb 19 |
nicklas |
as published by the Free Software Foundation; either version 3 |
7604 |
25 Feb 19 |
nicklas |
of the License, or (at your option) any later version. |
7604 |
25 Feb 19 |
nicklas |
12 |
|
7604 |
25 Feb 19 |
nicklas |
BASE is distributed in the hope that it will be useful, |
7604 |
25 Feb 19 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
7604 |
25 Feb 19 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7604 |
25 Feb 19 |
nicklas |
GNU General Public License for more details. |
7604 |
25 Feb 19 |
nicklas |
17 |
|
7604 |
25 Feb 19 |
nicklas |
You should have received a copy of the GNU General Public License |
7604 |
25 Feb 19 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
7604 |
25 Feb 19 |
nicklas |
20 |
------------------------------------------------------------------ |
7604 |
25 Feb 19 |
nicklas |
21 |
|
7604 |
25 Feb 19 |
nicklas |
@author Nicklas |
7604 |
25 Feb 19 |
nicklas |
23 |
*/ |
7604 |
25 Feb 19 |
nicklas |
'use strict'; |
7604 |
25 Feb 19 |
nicklas |
25 |
|
7604 |
25 Feb 19 |
nicklas |
var Experiments = function() |
7604 |
25 Feb 19 |
nicklas |
27 |
{ |
7604 |
25 Feb 19 |
nicklas |
var experiments = {}; |
7604 |
25 Feb 19 |
nicklas |
29 |
|
7604 |
25 Feb 19 |
nicklas |
30 |
/** |
7604 |
25 Feb 19 |
nicklas |
Initialize the page. |
7604 |
25 Feb 19 |
nicklas |
32 |
*/ |
7604 |
25 Feb 19 |
nicklas |
experiments.initPage = function() |
7604 |
25 Feb 19 |
nicklas |
34 |
{ |
7604 |
25 Feb 19 |
nicklas |
var pageId = Doc.getPageId(); |
7604 |
25 Feb 19 |
nicklas |
if (pageId == 'edit-page') |
7604 |
25 Feb 19 |
nicklas |
37 |
{ |
7604 |
25 Feb 19 |
nicklas |
// Save + Close buttons |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnSave', experiments.save); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('close', App.closeWindow); |
7604 |
25 Feb 19 |
nicklas |
41 |
|
7604 |
25 Feb 19 |
nicklas |
// Tab validation |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabActivateListener('settings.annotations', Annotations.onSwitchToAnnotationsTab); |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabValidator('settings.info', experiments.validateExperiment); |
7604 |
25 Feb 19 |
nicklas |
45 |
|
7604 |
25 Feb 19 |
nicklas |
// RawBioAssays |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnAddRawBioAssays', experiments.addRawBioAssays); |
7604 |
25 Feb 19 |
nicklas |
48 |
|
7604 |
25 Feb 19 |
nicklas |
// Directory |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('directory_id.select', experiments.selectDirectory); |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('directory_id', 'base-selected', Items.onItemSelected); |
7604 |
25 Feb 19 |
nicklas |
52 |
|
7604 |
25 Feb 19 |
nicklas |
53 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (pageId == 'view-page') |
7604 |
25 Feb 19 |
nicklas |
55 |
{ |
7604 |
25 Feb 19 |
nicklas |
var itemId = Data.get('page-data', 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var attributes = {'item-type': 'EXPERIMENT', 'item-id': itemId}; |
7604 |
25 Feb 19 |
nicklas |
58 |
|
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnEdit', Buttons.editItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnDelete', Buttons.deleteItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRestore', Buttons.restoreItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnUsingItems', Buttons.showUsingItems, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnDeletePermanently', Buttons.deleteItemPermanently, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnShare', Buttons.shareItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnSetOwner', Buttons.setOwner, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnExport', Buttons.runPlugin, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnImport', Buttons.runPlugin, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRunPlugin', Buttons.runPlugin, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnCloneReporters', experiments.cloneReporters); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRemoveClonedReporters', experiments.removeClonedReporters); |
7604 |
25 Feb 19 |
nicklas |
71 |
|
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabActivateListener('main.bioassaysets', experiments.viewBioAssaySets); |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabActivateListener('main.clonedreporters', experiments.viewClonedReporters); |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabActivateListener('main.annotations', AnnotationsList.loadOnce); |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabActivateListener('main.overview', Overview.loadOnce); |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabActivateListener('main.history', History.loadOnce); |
7604 |
25 Feb 19 |
nicklas |
77 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.initUsedFactorValues(); |
7604 |
25 Feb 19 |
nicklas |
79 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (pageId == 'list-page') |
7604 |
25 Feb 19 |
nicklas |
81 |
{ |
7604 |
25 Feb 19 |
nicklas |
var attributes = {'item-type': 'EXPERIMENT'}; |
7604 |
25 Feb 19 |
nicklas |
var tableAttributes = {'table-id': 'experiments'}; |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnNewItem', Buttons.newItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnDeleteItems', Buttons.deleteItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRestoreItems', Buttons.restoreItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnShareItems', Buttons.shareItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnSetOwner', Buttons.setOwnerOfItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnColumns', Buttons.configureColumns, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnExport', Buttons.runListPlugin, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnImport', Buttons.runListPlugin, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRunPlugin', Buttons.runListPlugin, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
93 |
|
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('close', App.closeWindow); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnOk', Buttons.returnSelected, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
96 |
} |
7604 |
25 Feb 19 |
nicklas |
97 |
} |
7604 |
25 Feb 19 |
nicklas |
98 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.initElements = function(element, autoInit) |
7604 |
25 Feb 19 |
nicklas |
100 |
{ |
7604 |
25 Feb 19 |
nicklas |
if (autoInit == 'edit-experimental-factor') |
7604 |
25 Feb 19 |
nicklas |
102 |
{ |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler(element, experiments.editExperimentalFactor); |
7604 |
25 Feb 19 |
nicklas |
104 |
} |
7604 |
25 Feb 19 |
nicklas |
105 |
} |
7604 |
25 Feb 19 |
nicklas |
106 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.viewBioAssaySets = function() |
7604 |
25 Feb 19 |
nicklas |
108 |
{ |
7604 |
25 Feb 19 |
nicklas |
var experimentId = Data.get('page-data', 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var url = 'bioassaysets/index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&experiment_id='+experimentId; |
7604 |
25 Feb 19 |
nicklas |
location.replace(url); |
7604 |
25 Feb 19 |
nicklas |
113 |
} |
7604 |
25 Feb 19 |
nicklas |
114 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.viewClonedReporters = function() |
7604 |
25 Feb 19 |
nicklas |
116 |
{ |
7604 |
25 Feb 19 |
nicklas |
var experimentId = Data.get('page-data', 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var url = 'reporters/index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&experiment_id='+experimentId; |
7604 |
25 Feb 19 |
nicklas |
location.replace(url); |
7604 |
25 Feb 19 |
nicklas |
121 |
} |
7604 |
25 Feb 19 |
nicklas |
122 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.cloneReporters = function() |
7604 |
25 Feb 19 |
nicklas |
124 |
{ |
7604 |
25 Feb 19 |
nicklas |
var experimentId = Data.get('page-data', 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var url = 'clone_reporters.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&item_id='+experimentId; |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(url, 'CloneReporters', 600, 400); |
7604 |
25 Feb 19 |
nicklas |
129 |
} |
7604 |
25 Feb 19 |
nicklas |
130 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.removeClonedReporters = function() |
7604 |
25 Feb 19 |
nicklas |
132 |
{ |
7604 |
25 Feb 19 |
nicklas |
if (confirm('Are you sure that you want to remove all cloned reporter annotations?\nThis action can\'t be undone.')) |
7604 |
25 Feb 19 |
nicklas |
134 |
{ |
7604 |
25 Feb 19 |
nicklas |
var experimentId = Data.get('page-data', 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var url = 'index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&cmd=RemoveClonedReporters&item_id='+experimentId; |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(url, 'RemoveClonedReporters', 450, 300); |
7604 |
25 Feb 19 |
nicklas |
139 |
} |
7604 |
25 Feb 19 |
nicklas |
140 |
} |
7604 |
25 Feb 19 |
nicklas |
141 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.editExperimentalFactor = function(event) |
7604 |
25 Feb 19 |
nicklas |
143 |
{ |
7604 |
25 Feb 19 |
nicklas |
var url = App.getRoot() + 'common/annotations/annotate.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&item_type='+Data.get(event.currentTarget, 'item-type'); |
7604 |
25 Feb 19 |
nicklas |
url += '&item_id='+Data.get(event.currentTarget, 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
url += '&annotationtype_id='+Data.get(event.currentTarget, 'annotation-type'); |
7604 |
25 Feb 19 |
nicklas |
url += '&annotation_id='+Data.get(event.currentTarget, 'annotation'); |
7604 |
25 Feb 19 |
nicklas |
url += '&standalone=1'; |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(url, 'EditAnnotation', 750, 500); |
7604 |
25 Feb 19 |
nicklas |
151 |
} |
7604 |
25 Feb 19 |
nicklas |
152 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.initUsedFactorValues = function() |
7604 |
25 Feb 19 |
nicklas |
154 |
{ |
7604 |
25 Feb 19 |
nicklas |
var factorValues = Data.json('factor-values', 'factor-values'); |
7604 |
25 Feb 19 |
nicklas |
var numRawBioAssays = Data.int('factor-values', 'num-raw-bioassays'); |
7604 |
25 Feb 19 |
nicklas |
var numIncomplete = 0; |
7604 |
25 Feb 19 |
nicklas |
for (var i = 0; i < factorValues.length; i++) |
7604 |
25 Feb 19 |
nicklas |
159 |
{ |
7604 |
25 Feb 19 |
nicklas |
var fv = factorValues[i]; |
7604 |
25 Feb 19 |
nicklas |
if (fv.usedValues != undefined) |
7604 |
25 Feb 19 |
nicklas |
162 |
{ |
7604 |
25 Feb 19 |
nicklas |
var div = Doc.element('usedvalues.'+fv.id); |
7604 |
25 Feb 19 |
nicklas |
div.innerHTML = Strings.encodeTags(fv.usedValues); |
7604 |
25 Feb 19 |
nicklas |
165 |
} |
7604 |
25 Feb 19 |
nicklas |
166 |
|
7604 |
25 Feb 19 |
nicklas |
var statusDiv = Doc.element('status.'+fv.id); |
7604 |
25 Feb 19 |
nicklas |
var status = ''; |
7604 |
25 Feb 19 |
nicklas |
if (fv.numRawBioAssaysWithFactor >= numRawBioAssays) |
7604 |
25 Feb 19 |
nicklas |
170 |
{ |
7604 |
25 Feb 19 |
nicklas |
status = '<img src="../../images/ok.png" alt="Ok" title="All ' + numRawBioAssays + |
7604 |
25 Feb 19 |
nicklas |
' raw bioassays have a value for this experimental factor">'; |
7604 |
25 Feb 19 |
nicklas |
173 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (fv.disableInheritance) |
7604 |
25 Feb 19 |
nicklas |
175 |
{ |
7604 |
25 Feb 19 |
nicklas |
status = '<img src="../../images/notify.png" alt="!"> Inheritance not allowed'; |
7604 |
25 Feb 19 |
nicklas |
177 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (fv.usePermission) |
7604 |
25 Feb 19 |
nicklas |
179 |
{ |
7604 |
25 Feb 19 |
nicklas |
numIncomplete++; |
7604 |
25 Feb 19 |
nicklas |
var numMissing = numRawBioAssays - fv.numRawBioAssaysWithFactor; |
7604 |
25 Feb 19 |
nicklas |
status = '<img src="../../images/warning.png" alt="!"'; |
7604 |
25 Feb 19 |
nicklas |
status += ' title="' + numMissing + ' raw bioassays are missing a value for this experimental factor">'; |
7604 |
25 Feb 19 |
nicklas |
status += '<input type="checkbox" name="autoinherit" id="autoinherit'+fv.id+'" value="'+fv.id+'" checked'; |
7604 |
25 Feb 19 |
nicklas |
status += ' title="Select to automatically inherit annotations from parents"></td>'; |
7604 |
25 Feb 19 |
nicklas |
status += '<label for="autoinherit'+fv.id+'">' + numMissing + ' missing</label>'; |
7604 |
25 Feb 19 |
nicklas |
187 |
} |
7604 |
25 Feb 19 |
nicklas |
else |
7604 |
25 Feb 19 |
nicklas |
189 |
{ |
7604 |
25 Feb 19 |
nicklas |
status = 'Read-only'; |
7604 |
25 Feb 19 |
nicklas |
191 |
} |
7604 |
25 Feb 19 |
nicklas |
statusDiv.innerHTML = status; |
7604 |
25 Feb 19 |
nicklas |
193 |
} |
7604 |
25 Feb 19 |
nicklas |
194 |
|
7604 |
25 Feb 19 |
nicklas |
if (numIncomplete > 0) |
7604 |
25 Feb 19 |
nicklas |
196 |
{ |
7604 |
25 Feb 19 |
nicklas |
var checkAll = ''; |
7604 |
25 Feb 19 |
nicklas |
checkAll += '<span id="check.uncheck" data-table-id="tbl.experimentalFactors" data-regexp="autoinherit" class="link" title="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)">'; |
7604 |
25 Feb 19 |
nicklas |
checkAll += '<img src="../../images/check_uncheck.png" alt="x"></span>'; |
7604 |
25 Feb 19 |
nicklas |
checkAll += ' <span id="autoInherit" class="link"'; |
7604 |
25 Feb 19 |
nicklas |
checkAll += ' title="Automatically try to inherit values for the selected experimental factors from parent items">'; |
7604 |
25 Feb 19 |
nicklas |
checkAll += 'Auto-inherit…</span>' |
7604 |
25 Feb 19 |
nicklas |
Doc.element('tbl.experimentalFactors.status').innerHTML = checkAll; |
7604 |
25 Feb 19 |
nicklas |
Doc.show('warning.missing'); |
7604 |
25 Feb 19 |
nicklas |
205 |
|
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('check.uncheck', 'click', Table.checkUncheckOnClick); |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('autoInherit', 'click', experiments.autoInheritFactors); |
7604 |
25 Feb 19 |
nicklas |
208 |
} |
7604 |
25 Feb 19 |
nicklas |
209 |
} |
7604 |
25 Feb 19 |
nicklas |
210 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.autoInheritFactors = function() |
7604 |
25 Feb 19 |
nicklas |
212 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['tbl.experimentalFactors']; |
7604 |
25 Feb 19 |
nicklas |
if (!Table.checkIfSelected('tbl.experimentalFactors', /autoinherit/)) return; |
7604 |
25 Feb 19 |
nicklas |
Table.submitToPopup('tbl.experimentalFactors', 'AutoInherit', 750, 500); |
7604 |
25 Feb 19 |
nicklas |
216 |
} |
7604 |
25 Feb 19 |
nicklas |
217 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.validateExperiment = function() |
7604 |
25 Feb 19 |
nicklas |
219 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['experiment']; |
7604 |
25 Feb 19 |
nicklas |
if (Strings.trim(frm.name.value) == '') |
7604 |
25 Feb 19 |
nicklas |
222 |
{ |
7604 |
25 Feb 19 |
nicklas |
Forms.showNotification(frm.name, 'You must enter a name'); |
7604 |
25 Feb 19 |
nicklas |
return false; |
7604 |
25 Feb 19 |
nicklas |
225 |
} |
7604 |
25 Feb 19 |
nicklas |
if (frm.rawdatatype) |
7604 |
25 Feb 19 |
nicklas |
227 |
{ |
7604 |
25 Feb 19 |
nicklas |
if (frm.rawdatatype.value == '') |
7604 |
25 Feb 19 |
nicklas |
229 |
{ |
7604 |
25 Feb 19 |
nicklas |
Forms.showNotification(frm.rawdatatype, 'You must select a raw data type'); |
7604 |
25 Feb 19 |
nicklas |
return false; |
7604 |
25 Feb 19 |
nicklas |
232 |
} |
7604 |
25 Feb 19 |
nicklas |
233 |
} |
7604 |
25 Feb 19 |
nicklas |
return true; |
7604 |
25 Feb 19 |
nicklas |
235 |
} |
7604 |
25 Feb 19 |
nicklas |
236 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.save = function() |
7604 |
25 Feb 19 |
nicklas |
238 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['experiment']; |
7604 |
25 Feb 19 |
nicklas |
if (TabControl.validateActiveTab('settings')) |
7604 |
25 Feb 19 |
nicklas |
241 |
{ |
7604 |
25 Feb 19 |
nicklas |
Annotations.saveModifiedAnnotationsToForm(frm); |
7604 |
25 Feb 19 |
nicklas |
Link.exportActions('rawBioAssays'); |
7604 |
25 Feb 19 |
nicklas |
Link.exportActions('annotationTypes'); |
7604 |
25 Feb 19 |
nicklas |
frm.submit(); |
7604 |
25 Feb 19 |
nicklas |
246 |
} |
7604 |
25 Feb 19 |
nicklas |
247 |
} |
7604 |
25 Feb 19 |
nicklas |
248 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.addRawBioAssays = function() |
7604 |
25 Feb 19 |
nicklas |
250 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['experiment']; |
7604 |
25 Feb 19 |
nicklas |
var currentRawBioAssays = Link.getIdsInList(frm.rawBioAssays, 'RAWBIOASSAY'); |
7604 |
25 Feb 19 |
nicklas |
var rawDataType = frm.rawdatatype ? frm.rawdatatype.value : Data.get('page-data', 'current-raw-data-type'); |
7604 |
25 Feb 19 |
nicklas |
254 |
|
7604 |
25 Feb 19 |
nicklas |
var url = "&resetTemporary=1&exclude="+currentRawBioAssays.join(','); |
7604 |
25 Feb 19 |
nicklas |
url += '&tmpfilter:STRING:rawDataType='+rawDataType; |
7604 |
25 Feb 19 |
nicklas |
257 |
|
7604 |
25 Feb 19 |
nicklas |
Dialogs.selectItem('RAWBIOASSAY', 'rawBioAssays', 1, url); |
7604 |
25 Feb 19 |
nicklas |
259 |
} |
7604 |
25 Feb 19 |
nicklas |
260 |
|
7604 |
25 Feb 19 |
nicklas |
experiments.selectDirectory = function() |
7604 |
25 Feb 19 |
nicklas |
262 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['experiment']; |
7604 |
25 Feb 19 |
nicklas |
var url = '&resetTemporary=1'; |
7604 |
25 Feb 19 |
nicklas |
if (frm.directory_id.length > 1) |
7604 |
25 Feb 19 |
nicklas |
266 |
{ |
7604 |
25 Feb 19 |
nicklas |
var id = Math.abs(parseInt(frm.directory_id[1].value)); |
7604 |
25 Feb 19 |
nicklas |
url += '&directory_id='+id; |
7604 |
25 Feb 19 |
nicklas |
269 |
} |
7604 |
25 Feb 19 |
nicklas |
Dialogs.selectItem('DIRECTORY', 'directory_id', 0, url); |
7604 |
25 Feb 19 |
nicklas |
271 |
} |
7604 |
25 Feb 19 |
nicklas |
272 |
|
7604 |
25 Feb 19 |
nicklas |
return experiments; |
7604 |
25 Feb 19 |
nicklas |
274 |
}(); |
7604 |
25 Feb 19 |
nicklas |
275 |
|
7604 |
25 Feb 19 |
nicklas |
Doc.onLoad(Experiments.initPage); |
7604 |
25 Feb 19 |
nicklas |
Doc.addElementInitializer(Experiments.initElements); |
7604 |
25 Feb 19 |
nicklas |
278 |
|