From: Stas Vilchik Date: Fri, 26 Dec 2014 14:17:59 +0000 (+0100) Subject: Add modal form view X-Git-Tag: latest-silver-master-#65~405 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=22cd61fd989adc1ed5b1e6f9319bb3d2fccf62ae;p=sonarqube.git Add modal form view --- diff --git a/server/sonar-web/src/main/coffee/common/modals.coffee b/server/sonar-web/src/main/coffee/common/modals.coffee deleted file mode 100644 index c9e7c4adce2..00000000000 --- a/server/sonar-web/src/main/coffee/common/modals.coffee +++ /dev/null @@ -1,43 +0,0 @@ -define [ - 'backbone.marionette' -], ( - Marionette -) -> - - $ = jQuery - EVENT_SCOPE = 'modal' - - - class extends Marionette.ItemView - className: 'modal' - overlayClassName: 'modal-overlay' - - - events: -> - 'click .js-modal-close': 'close' - - - onRender: -> - @$el.detach().appendTo $('body') - @renderOverlay() - key 'escape', (=> @close()) - - - onClose: -> - @removeOverlay() - - - renderOverlay: -> - overlay = $(".#{@overlayClassName}") - if overlay.length == 0 - overlay = $("
").appendTo $('body') - - - removeOverlay: -> - $('.modal-overlay').remove() - - - attachCloseEvents: -> - $('body').on "click.#{EVENT_SCOPE}", => - $('body').off "click.#{EVENT_SCOPE}" - @close() diff --git a/server/sonar-web/src/main/hbs/coding-rules-old/coding-rules-custom-rule-creation.hbs b/server/sonar-web/src/main/hbs/coding-rules-old/coding-rules-custom-rule-creation.hbs index c1244ff82e6..94323fa40cf 100644 --- a/server/sonar-web/src/main/hbs/coding-rules-old/coding-rules-custom-rule-creation.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules-old/coding-rules-custom-rule-creation.hbs @@ -8,6 +8,7 @@