Skip to content

Commit d5a385d

Browse files
committed
Merge 20.11 to develop
2 parents 575d083 + 843390a commit d5a385d

File tree

5 files changed

+31
-16
lines changed

5 files changed

+31
-16
lines changed

LDK/resources/web/LDK/DataRegionUtils.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@ LDK.DataRegionUtils = new function(){
1616
LDK.Assert.assertTrue(success + ' is not a valid success function.', Ext4.isFunction(success));
1717

1818
var selectionSuccess = function(selection) {
19-
if(!selection.selected.length && Ext4.isFunction(onNoneSelected)) {
20-
onNoneSelected();
21-
}
22-
else {
23-
var colExpr = '(' + tableAlias + '.' + selectorCols.join(" || ',' || " + tableAlias + ".") + ')';
24-
var clause = "WHERE " + colExpr + " IN ('" + selection.selected.join("', '") + "')";
25-
success(clause);
26-
}
19+
dataRegion.clearSelected({
20+
success: function () {
21+
if (!selection.selected.length && Ext4.isFunction(onNoneSelected)) {
22+
onNoneSelected();
23+
}
24+
else {
25+
var colExpr = '(' + tableAlias + '.' + selectorCols.join(" || ',' || " + tableAlias + ".") + ')';
26+
var clause = "WHERE " + colExpr + " IN ('" + selection.selected.join("', '") + "')";
27+
success(clause);
28+
}
29+
},
30+
failure: Ext4.isFunction(failure) ? failure : LDK.Utils.getErrorCallback()
31+
});
2732
};
2833

2934
var config = {

LDK/resources/web/LDK/Utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ LDK.Utils = new function(){
518518
}
519519

520520
//append non-removeable filters
521-
if (LABKEY.DataRegions[dataRegionName].getBaseFilters().length){
522-
var array = LABKEY.DataRegions[dataRegionName].getBaseFilters();
521+
if (LABKEY.DataRegions[dataRegionName].filters && LABKEY.DataRegions[dataRegionName].filters){
522+
var array = LABKEY.DataRegions[dataRegionName].filters;
523523
for (var i=0;i<array.length;i++){
524524
var filter = array[i];
525525
params[filter.getURLParameterName()] = filter.getURLParameterValue();

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,11 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
641641
var reportTab = tab.items[0];
642642
if (reportTab.filters){
643643
for (var i in filters){
644+
// The intent of this code is to test the filter conditions of this report (i.e. IDs, groups).
645+
// showReport has nothing to do with this
646+
if (i === 'showReport') {
647+
continue;
648+
}
644649
if (JSON.stringify(filters[i]) !== JSON.stringify(reportTab.filters[i])){
645650
reload = true;
646651
break;
@@ -1067,15 +1072,19 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
10671072

10681073
for (var i=0;i<token.length;i++){
10691074
var t = token[i].split(':');
1075+
t[0] = decodeURIComponent(t[0]);
1076+
if (t.length > 1) {
1077+
t[1] = decodeURIComponent(t[1]);
1078+
}
10701079
switch(t[0]){
10711080
case 'inputType':
10721081
context.inputType = t[1];
10731082
break;
10741083
case 'showReport':
1075-
this.isReportTabSelected = (t[1] === 1);
1084+
this.isReportTabSelected = (t[1] === '1');
10761085
break;
10771086
case 'activeReport':
1078-
var report = decodeURI(t[1]);
1087+
var report = t[1];
10791088
var tab = this.reportMap[report];
10801089
if (tab){
10811090
this.activeReport = tab;
@@ -1086,7 +1095,7 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
10861095
}
10871096
break;
10881097
default:
1089-
context[t[0]] = decodeURI(t[1]);
1098+
context[t[0]] = t[1];
10901099
}
10911100
}
10921101
}
@@ -1419,4 +1428,4 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
14191428

14201429
return filters;
14211430
}
1422-
});
1431+
});

LDK/src/org/labkey/ldk/LDKController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,4 +1156,4 @@ public void export(Object o, HttpServletResponse response, BindException errors)
11561156
PageFlowUtil.streamFileBytes(response, "naturalizeInstall.sql", installScript.getContents().getBytes(StringUtilsLabKey.DEFAULT_CHARSET), true);
11571157
}
11581158
}
1159-
}
1159+
}

laboratory/resources/web/laboratory/buttons.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,9 @@ Laboratory.buttonHandlers = new function(){
358358
var header = [];
359359
var fieldMap = LDK.StoreUtils.getFieldMap(store);
360360
Ext4.each(columns, function(name){
361-
if (name == 'rowid' || name == 'freezerid')
361+
if (name == 'rowid' || name == 'freezerid') {
362362
return;
363+
}
363364

364365
header.push(fieldMap[name].caption);
365366
}, this);

0 commit comments

Comments
 (0)