diff --git a/frontend-js/src/main/js/gui/CommentDialog.js b/frontend-js/src/main/js/gui/CommentDialog.js index cbc0c3a0b11c5e24fb0a90f7510e3e8b724196da..fc433cc4112b0969bd24df8401defc3fc5a95a47 100644 --- a/frontend-js/src/main/js/gui/CommentDialog.js +++ b/frontend-js/src/main/js/gui/CommentDialog.js @@ -52,6 +52,7 @@ CommentDialog.prototype.open = function(types) { } return Promise.all(promises).then(function(elements) { self.setTypes(elements); + $(self.getElement()).dialog("open"); }); }; CommentDialog.prototype._createGui = function(types) { diff --git a/frontend-js/src/main/js/gui/ContextMenu.js b/frontend-js/src/main/js/gui/ContextMenu.js index 2d0b5265548465577a0a8ac7969b26c3926626fd..22e3bf731ee566c77a3419f710416750fdda1d0c 100644 --- a/frontend-js/src/main/js/gui/ContextMenu.js +++ b/frontend-js/src/main/js/gui/ContextMenu.js @@ -40,7 +40,6 @@ ContextMenu.prototype.addOption = function(name, handler) { }; ContextMenu.prototype.open = function(x, y) { - logger.debug("open: " + x + ", " + y); var self = this; var $menu = $(self.getElement()).show().css({ position : "absolute", diff --git a/frontend-js/src/test/js/gui/CommentDialog-test.js b/frontend-js/src/test/js/gui/CommentDialog-test.js index 8952c66fc375a5fe00c72d46b47bbb867065d145..a8272ddf97186014cc8770d2319108734a2183dd 100644 --- a/frontend-js/src/test/js/gui/CommentDialog-test.js +++ b/frontend-js/src/test/js/gui/CommentDialog-test.js @@ -39,4 +39,18 @@ describe('CommentDialog', function() { assert.ok(dialog.getName() !== undefined); dialog.destroy(); }); + + it('open', function() { + var map = helper.createCustomMap(); + var dialog = new CommentDialog({ + element : testDiv, + customMap : map + }); + return dialog.open([]).then(function(){ + assert.ok($(testDiv).dialog('isOpen')); + dialog.destroy(); + }); + }); + + });