Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion LDK/resources/web/LDK/StoreUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ LDK.StoreUtils = new function(){
* @param config.fileName
* @param config.labelProperty
* @param config.skippedColumns
* @param config.includeDescription
*/
createExcelTemplate: function(config){
Ext4.applyIf(config, {
Expand All @@ -72,7 +73,16 @@ LDK.StoreUtils = new function(){
if (config.skippedColumns && Ext4.Array.contains(config.skippedColumns, field.name))
return;

header.push(field[config.labelProperty]);
//Sending label property and comment in case of including description
if (config.includeDescription){
header.push({
value: field[config.labelProperty],
cellComment: field['description']
});
}
else{
header.push(field[config.labelProperty]);
}
}
}, this);

Expand Down
6 changes: 4 additions & 2 deletions LDK/resources/web/LDK/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ LDK.Utils = new function(){
window.location = LABKEY.ActionURL.buildURL('ldk', 'updateQuery', null, params);
},

splitIds: function(subjectArray, unsorted){
splitIds: function(subjectArray, unsorted, preserveDuplicates){
if (!subjectArray){
return [];
}
Expand All @@ -556,7 +556,9 @@ LDK.Utils = new function(){
}

if (subjectArray.length > 0) {
subjectArray = Ext4.unique(subjectArray);
if (!preserveDuplicates) {
subjectArray = Ext4.unique(subjectArray);
}
if (!unsorted) {
subjectArray.sort();
}
Expand Down
43 changes: 29 additions & 14 deletions LDK/resources/web/LDK/panel/TabbedReportPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
}, this);
}
}

return subjects;
},

Expand Down Expand Up @@ -764,19 +764,34 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
scope: this
};

//special case these two properties because they are common
if (tab.report.viewName){
queryConfig.viewName = tab.report.viewName;
}

if (tab.report.containerPath){
queryConfig.containerPath = tab.report.containerPath;
}

//allow any other supported properties to be applied through here
if (tab.report.queryConfig){
Ext4.apply(queryConfig, tab.report.queryConfig);
}
//
// Define a list of configuration options. These can be set on the report tab to override default values.
// This list can be obtained by going to the URL for the
// LABKEY.QueryWebPart API, and looking in the config summary table. If you'd like to get it programatically, // https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.QueryWebPart.html#constructor
// run the function commented out to the right of this message (you'll need to load jQuery first). It will //
// output an array of configuration options. //getConfigOptions = function() {
// // var summaryTable = jQuery('table.summaryTable')
var configOptions = [ // // Filter for the table with the config object
"aggregates", "allowChooseQuery", "allowChooseView", "bodyClass", // .filter(function(index,element){ return jQuery(element).attr("summary").match(/config object/); });
"buttonBar", "buttonBarPosition", "containerFilter", "containerPath", //
"dataRegionName", "deleteURL", "detailsURL", "errorType", // var options = [];
"failure", "filters", "frame", "importURL", //
"insertURL", "linkTarget", "maskEl", "maxRows", // var configRegex = /^config\./;
"metadata", "offset", "parameters", "queryName", // summaryTable.find('td.nameDescription a').each(function(index,element){
"removeableFilters", "removeableSort", "renderTo", "reportId", // var configOption = jQuery(element).text();
"schemaName", "scope", "shadeAlternatingRows", "showBorders", //
"showDeleteButton", "showDetailsColumn", "showExportButtons", "showInsertNewButton", //
"showPagination", "showRecordSelectors", "showReports", "showRows", // if (configOption.match(configRegex)) {
"showSurroundingBorder", "showUpdateColumn", "showViewPanel", "sort", // options.push(configOption.replace(configRegex, ''));
"sql", "success", "suppressRenderErrors", "timeout", // }
"title", "titleHref", "updateURL", "viewName" // });
]; //

Ext4.each(configOptions, function(option, index, list) {
if (option in tab.report) {
queryConfig[option] = tab.report[option];
}
});

tab.add({
xtype: 'ldk-querycmp',
Expand Down
6 changes: 6 additions & 0 deletions LDK/resources/web/LDK/ux/DateTimeField.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ Ext4.define('Ext.ux.form.field.DateTime', {
}, me.timeConfig));
me.items.push(me.timeField);

// Allow times in the style of "1423" to be accepted by the time field, instead of requiring colons
// for 24 hour fields.
var formats = me.timeField.altFormats.split("|");
formats.push("Hi");
me.timeField.altFormats = formats.join("|");

for (; i < me.items.length; i++) {
if(me.items[i].xtype == 'splitter')
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public void addRecordsToAssayTemplate(String[][] data, List<String> expectedColu
}

_test.waitForText("Sample Information");
_test._ext4Helper.waitForMaskToDisappear();
_test.waitAndClick(Ext4Helper.Locators.ext4Button("Add From Spreadsheet"));
_test.waitForElement(Ext4Helper.Locators.window("Spreadsheet Import"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ Ext4.define('Laboratory.panel.AbstractAssayPanel', {
importMethodToggle: importMethod
});

imf.fireEvent('change', this, imf.getValues, current);
imf.fireEvent('change', this, imf.getValue(), current);
}

var target = this.down('#templatePreviewPanel');
Expand Down
20 changes: 15 additions & 5 deletions laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', {
}, this);
},

appendDownloadMenuItems: function(){
appendDownloadMenuItems: function() {
var btn = this.down('#downloadBtn');
if(!this.templateMetadata.hideDownloadBtn)
btn.setVisible(true);
},

validateForm: function(){
validateForm: function() {
var title = this.down('#templateTitle').getValue();
if (!title){
Ext4.Msg.alert('Error', 'Must choose a name for this run');
Expand Down Expand Up @@ -267,8 +267,18 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', {
scope: this,
failure: LDK.Utils.getErrorCallback(),
success: function(results){
if (results.rows.length)
this.setTemplate(results.rows[0], true);
if (results.rows.length) {
var row = results.rows[0];
if (row.importMethod) {
this.selectedMethod = this.getImportMethodByName(row.importMethod);
var field = this.down('#templateImportMethod');
if (field) {
field.setValue(this.selectedMethod.name);
}
this.toggleImportMethod();
}
this.setTemplate(row, true);
}
}
})
},
Expand Down Expand Up @@ -456,4 +466,4 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', {
resultFields.setVisible(false);
}
},
});
});
7 changes: 4 additions & 3 deletions laboratory/resources/web/laboratory/panel/WellLayoutPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ Ext4.define('Laboratory.ext.WellLayoutPanel', {
},

drawWell: function(){
if (!this.store.getCount()){
var platePanel = this.down('#plate');
var legendPanel = this.down('#legend');

if (!this.store.getCount() || !platePanel || !legendPanel){
this.store.on('load', this.drawWell, this, {single: true});
return;
}

var platePanel = this.down('#plate');
var legendPanel = this.down('#legend');
var notAssigned = 0;
var unknownWells = [];

Expand Down