Skip to content

Commit 860eee2

Browse files
committed
Allow opening of dialog when dojo-bootstrap is used in cmv-calcite-maps.
1 parent e0c2d9b commit 860eee2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

widgets/Export.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ define([
1313
'dojo/string',
1414
'dojo/keys',
1515
'dojo/on',
16+
'dojo/query',
1617
'dojo/dom-style',
1718
'module',
1819

@@ -47,6 +48,7 @@ define([
4748
string,
4849
keys,
4950
on,
51+
domQuery,
5052
domStyle,
5153
module,
5254

@@ -314,8 +316,14 @@ define([
314316
this.initExportSelect();
315317
this.removeLink();
316318

317-
if (options.show) {
318-
this.parentWidget.show();
319+
if (options.show && this.parentWidget) {
320+
//dojo modal dialog
321+
if (typeof(this.parentWidget.show) === 'function') {
322+
this.parentWidget.show();
323+
// dojo-boostrap modal dialog
324+
} else if (typeof(this.parentWidget.containerNode) === 'string') {
325+
domQuery('#' + this.parentWidget.containerNode).closest('.modal').modal('show');
326+
}
319327
}
320328
},
321329

0 commit comments

Comments
 (0)