Skip to content

Commit 78eca09

Browse files
committed
Merge 20.6 to 20.7
2 parents f08774f + 852959a commit 78eca09

File tree

8 files changed

+70
-27
lines changed

8 files changed

+70
-27
lines changed

LDK/resources/web/LDK/StoreUtils.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ LDK.StoreUtils = new function(){
6060
* @param config.fileName
6161
* @param config.labelProperty
6262
* @param config.skippedColumns
63+
* @param config.includeDescription
6364
*/
6465
createExcelTemplate: function(config){
6566
Ext4.applyIf(config, {
@@ -72,7 +73,16 @@ LDK.StoreUtils = new function(){
7273
if (config.skippedColumns && Ext4.Array.contains(config.skippedColumns, field.name))
7374
return;
7475

75-
header.push(field[config.labelProperty]);
76+
//Sending label property and comment in case of including description
77+
if (config.includeDescription){
78+
header.push({
79+
value: field[config.labelProperty],
80+
cellComment: field['description']
81+
});
82+
}
83+
else{
84+
header.push(field[config.labelProperty]);
85+
}
7686
}
7787
}, this);
7888

LDK/resources/web/LDK/Utils.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ LDK.Utils = new function(){
538538
window.location = LABKEY.ActionURL.buildURL('ldk', 'updateQuery', null, params);
539539
},
540540

541-
splitIds: function(subjectArray, unsorted){
541+
splitIds: function(subjectArray, unsorted, preserveDuplicates){
542542
if (!subjectArray){
543543
return [];
544544
}
@@ -556,7 +556,9 @@ LDK.Utils = new function(){
556556
}
557557

558558
if (subjectArray.length > 0) {
559-
subjectArray = Ext4.unique(subjectArray);
559+
if (!preserveDuplicates) {
560+
subjectArray = Ext4.unique(subjectArray);
561+
}
560562
if (!unsorted) {
561563
subjectArray.sort();
562564
}

LDK/resources/web/LDK/panel/TabbedReportPanel.js

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
548548
}, this);
549549
}
550550
}
551-
551+
552552
return subjects;
553553
},
554554

@@ -764,19 +764,34 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
764764
scope: this
765765
};
766766

767-
//special case these two properties because they are common
768-
if (tab.report.viewName){
769-
queryConfig.viewName = tab.report.viewName;
770-
}
771-
772-
if (tab.report.containerPath){
773-
queryConfig.containerPath = tab.report.containerPath;
774-
}
775-
776-
//allow any other supported properties to be applied through here
777-
if (tab.report.queryConfig){
778-
Ext4.apply(queryConfig, tab.report.queryConfig);
779-
}
767+
//
768+
// Define a list of configuration options. These can be set on the report tab to override default values.
769+
// This list can be obtained by going to the URL for the
770+
// 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
771+
// run the function commented out to the right of this message (you'll need to load jQuery first). It will //
772+
// output an array of configuration options. //getConfigOptions = function() {
773+
// // var summaryTable = jQuery('table.summaryTable')
774+
var configOptions = [ // // Filter for the table with the config object
775+
"aggregates", "allowChooseQuery", "allowChooseView", "bodyClass", // .filter(function(index,element){ return jQuery(element).attr("summary").match(/config object/); });
776+
"buttonBar", "buttonBarPosition", "containerFilter", "containerPath", //
777+
"dataRegionName", "deleteURL", "detailsURL", "errorType", // var options = [];
778+
"failure", "filters", "frame", "importURL", //
779+
"insertURL", "linkTarget", "maskEl", "maxRows", // var configRegex = /^config\./;
780+
"metadata", "offset", "parameters", "queryName", // summaryTable.find('td.nameDescription a').each(function(index,element){
781+
"removeableFilters", "removeableSort", "renderTo", "reportId", // var configOption = jQuery(element).text();
782+
"schemaName", "scope", "shadeAlternatingRows", "showBorders", //
783+
"showDeleteButton", "showDetailsColumn", "showExportButtons", "showInsertNewButton", //
784+
"showPagination", "showRecordSelectors", "showReports", "showRows", // if (configOption.match(configRegex)) {
785+
"showSurroundingBorder", "showUpdateColumn", "showViewPanel", "sort", // options.push(configOption.replace(configRegex, ''));
786+
"sql", "success", "suppressRenderErrors", "timeout", // }
787+
"title", "titleHref", "updateURL", "viewName" // });
788+
]; //
789+
790+
Ext4.each(configOptions, function(option, index, list) {
791+
if (option in tab.report) {
792+
queryConfig[option] = tab.report[option];
793+
}
794+
});
780795

781796
tab.add({
782797
xtype: 'ldk-querycmp',

LDK/resources/web/LDK/ux/DateTimeField.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ Ext4.define('Ext.ux.form.field.DateTime', {
165165
}, me.timeConfig));
166166
me.items.push(me.timeField);
167167

168+
// Allow times in the style of "1423" to be accepted by the time field, instead of requiring colons
169+
// for 24 hour fields.
170+
var formats = me.timeField.altFormats.split("|");
171+
formats.push("Hi");
172+
me.timeField.altFormats = formats.join("|");
173+
168174
for (; i < me.items.length; i++) {
169175
if(me.items[i].xtype == 'splitter')
170176
continue;

LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ public void addRecordsToAssayTemplate(String[][] data, List<String> expectedColu
190190
}
191191

192192
_test.waitForText("Sample Information");
193-
_test._ext4Helper.waitForMaskToDisappear();
194193
_test.waitAndClick(Ext4Helper.Locators.ext4Button("Add From Spreadsheet"));
195194
_test.waitForElement(Ext4Helper.Locators.window("Spreadsheet Import"));
196195

laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ Ext4.define('Laboratory.panel.AbstractAssayPanel', {
584584
importMethodToggle: importMethod
585585
});
586586

587-
imf.fireEvent('change', this, imf.getValues, current);
587+
imf.fireEvent('change', this, imf.getValue(), current);
588588
}
589589

590590
var target = this.down('#templatePreviewPanel');

laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', {
7979
}, this);
8080
},
8181

82-
appendDownloadMenuItems: function(){
82+
appendDownloadMenuItems: function() {
8383
var btn = this.down('#downloadBtn');
8484
if(!this.templateMetadata.hideDownloadBtn)
8585
btn.setVisible(true);
8686
},
8787

88-
validateForm: function(){
88+
validateForm: function() {
8989
var title = this.down('#templateTitle').getValue();
9090
if (!title){
9191
Ext4.Msg.alert('Error', 'Must choose a name for this run');
@@ -267,8 +267,18 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', {
267267
scope: this,
268268
failure: LDK.Utils.getErrorCallback(),
269269
success: function(results){
270-
if (results.rows.length)
271-
this.setTemplate(results.rows[0], true);
270+
if (results.rows.length) {
271+
var row = results.rows[0];
272+
if (row.importMethod) {
273+
this.selectedMethod = this.getImportMethodByName(row.importMethod);
274+
var field = this.down('#templateImportMethod');
275+
if (field) {
276+
field.setValue(this.selectedMethod.name);
277+
}
278+
this.toggleImportMethod();
279+
}
280+
this.setTemplate(row, true);
281+
}
272282
}
273283
})
274284
},
@@ -456,4 +466,4 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', {
456466
resultFields.setVisible(false);
457467
}
458468
},
459-
});
469+
});

laboratory/resources/web/laboratory/panel/WellLayoutPanel.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ Ext4.define('Laboratory.ext.WellLayoutPanel', {
5050
},
5151

5252
drawWell: function(){
53-
if (!this.store.getCount()){
53+
var platePanel = this.down('#plate');
54+
var legendPanel = this.down('#legend');
55+
56+
if (!this.store.getCount() || !platePanel || !legendPanel){
5457
this.store.on('load', this.drawWell, this, {single: true});
5558
return;
5659
}
5760

58-
var platePanel = this.down('#plate');
59-
var legendPanel = this.down('#legend');
6061
var notAssigned = 0;
6162
var unknownWells = [];
6263

0 commit comments

Comments
 (0)