diff --git a/src/common/viz/InformDialog.js b/src/common/viz/InformDialog.js new file mode 100644 index 000000000..c6ab564ed --- /dev/null +++ b/src/common/viz/InformDialog.js @@ -0,0 +1,39 @@ +/* globals define, $*/ +define([ +], function( +) { + + const InformDialog = function(title, body) { + this.$el = this.createElement(title, body); + this.$ok = this.$el.find('.btn-primary'); + }; + + InformDialog.prototype.createElement = function(title, body) { + const html = ``; + return $(html); + }; + + InformDialog.prototype.show = function() { + return new Promise(resolve => { + this.$ok.on('click', () => resolve()); + this.$el.modal('show'); + this.$el.on('hidden.bs.modal', () => resolve()); + }); + }; + + return InformDialog; +});