diff --git a/LDK/resources/web/LDK/DataRegionUtils.js b/LDK/resources/web/LDK/DataRegionUtils.js index 36a173bf..cc7090ad 100644 --- a/LDK/resources/web/LDK/DataRegionUtils.js +++ b/LDK/resources/web/LDK/DataRegionUtils.js @@ -16,14 +16,19 @@ LDK.DataRegionUtils = new function(){ LDK.Assert.assertTrue(success + ' is not a valid success function.', Ext4.isFunction(success)); var selectionSuccess = function(selection) { - if(!selection.selected.length && Ext4.isFunction(onNoneSelected)) { - onNoneSelected(); - } - else { - var colExpr = '(' + tableAlias + '.' + selectorCols.join(" || ',' || " + tableAlias + ".") + ')'; - var clause = "WHERE " + colExpr + " IN ('" + selection.selected.join("', '") + "')"; - success(clause); - } + dataRegion.clearSelected({ + success: function () { + if (!selection.selected.length && Ext4.isFunction(onNoneSelected)) { + onNoneSelected(); + } + else { + var colExpr = '(' + tableAlias + '.' + selectorCols.join(" || ',' || " + tableAlias + ".") + ')'; + var clause = "WHERE " + colExpr + " IN ('" + selection.selected.join("', '") + "')"; + success(clause); + } + }, + failure: Ext4.isFunction(failure) ? failure : LDK.Utils.getErrorCallback() + }); }; var config = { diff --git a/LDK/resources/web/LDK/Utils.js b/LDK/resources/web/LDK/Utils.js index 43a2d027..13728442 100644 --- a/LDK/resources/web/LDK/Utils.js +++ b/LDK/resources/web/LDK/Utils.js @@ -518,8 +518,8 @@ LDK.Utils = new function(){ } //append non-removeable filters - if (LABKEY.DataRegions[dataRegionName].getBaseFilters().length){ - var array = LABKEY.DataRegions[dataRegionName].getBaseFilters(); + if (LABKEY.DataRegions[dataRegionName].filters && LABKEY.DataRegions[dataRegionName].filters){ + var array = LABKEY.DataRegions[dataRegionName].filters; for (var i=0;i 1) { + t[1] = decodeURIComponent(t[1]); + } switch(t[0]){ case 'inputType': context.inputType = t[1]; break; case 'showReport': - this.isReportTabSelected = (t[1] === 1); + this.isReportTabSelected = (t[1] === '1'); break; case 'activeReport': - var report = decodeURI(t[1]); + var report = t[1]; var tab = this.reportMap[report]; if (tab){ this.activeReport = tab; @@ -1086,7 +1095,7 @@ Ext4.define('LDK.panel.TabbedReportPanel', { } break; default: - context[t[0]] = decodeURI(t[1]); + context[t[0]] = t[1]; } } } @@ -1419,4 +1428,4 @@ Ext4.define('LDK.panel.TabbedReportPanel', { return filters; } -}); \ No newline at end of file +}); diff --git a/LDK/src/org/labkey/ldk/LDKController.java b/LDK/src/org/labkey/ldk/LDKController.java index 803a64aa..3a8b760d 100644 --- a/LDK/src/org/labkey/ldk/LDKController.java +++ b/LDK/src/org/labkey/ldk/LDKController.java @@ -1155,4 +1155,4 @@ public void export(Object o, HttpServletResponse response, BindException errors) PageFlowUtil.streamFileBytes(response, "naturalizeInstall.sql", installScript.getContents().getBytes(StringUtilsLabKey.DEFAULT_CHARSET), true); } } -} \ No newline at end of file +} diff --git a/laboratory/resources/web/laboratory/buttons.js b/laboratory/resources/web/laboratory/buttons.js index 546de402..db279c82 100644 --- a/laboratory/resources/web/laboratory/buttons.js +++ b/laboratory/resources/web/laboratory/buttons.js @@ -358,8 +358,9 @@ Laboratory.buttonHandlers = new function(){ var header = []; var fieldMap = LDK.StoreUtils.getFieldMap(store); Ext4.each(columns, function(name){ - if (name == 'rowid' || name == 'freezerid') + if (name == 'rowid' || name == 'freezerid') { return; + } header.push(fieldMap[name].caption); }, this);