Skip to content

Commit baad25d

Browse files
committed
Merge discvr-26.7 to develop
2 parents af7edfa + 94ef616 commit baad25d

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

laboratory/resources/web/laboratory/window/WorkbookTagsWindow.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
Ext4.define('Laboratory.window.WorkbookTagsWindow', {
1212
extend: 'Ext.window.Window',
13-
13+
modal: true,
1414
initComponent: function(){
1515
if (this.dataRegionName){
1616
var dr = LABKEY.DataRegions[this.dataRegionName];
@@ -25,6 +25,24 @@ Ext4.define('Laboratory.window.WorkbookTagsWindow', {
2525
return;
2626
}
2727

28+
const theStore = Ext4.create('Ext.data.Store', {
29+
fields: ['tag']
30+
})
31+
32+
LABKEY.Query.selectDistinctRows({
33+
containerPath: Laboratory.Utils.getQueryContainerPath(),
34+
schemaName: 'laboratory',
35+
queryName: 'workbook_tags',
36+
column: 'tag',
37+
scope: this,
38+
success: function (results) {
39+
theStore.add(results.values.map(val => {
40+
return({tag: val})
41+
}))
42+
},
43+
error: LDK.Utils.getErrorCallback()
44+
})
45+
2846
Ext4.apply(this, {
2947
border: false,
3048
width: 420,
@@ -41,13 +59,9 @@ Ext4.define('Laboratory.window.WorkbookTagsWindow', {
4159
fieldLabel: 'Choose Existing Tag',
4260
emptyText: 'Choose a pre-defined tag',
4361
itemId: 'existingTag',
44-
store: {
45-
type: 'labkey-store',
46-
containerPath: Laboratory.Utils.getQueryContainerPath(),
47-
schemaName: 'laboratory',
48-
sql: 'SELECT DISTINCT tag FROM laboratory.workbook_tags',
49-
autoLoad: true
50-
},
62+
store: theStore,
63+
queryMode: 'local',
64+
triggerAction: 'all',
5165
valueField: 'tag',
5266
displayField: 'tag',
5367
listeners: {

0 commit comments

Comments
 (0)