From: Stas Vilchik Date: Thu, 8 Jan 2015 10:13:03 +0000 (+0100) Subject: Replace overlay component with modals X-Git-Tag: latest-silver-master-#65~294 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d1c73f7602df30f8c838e4bbbc2529883ebde1bd;p=sonarqube.git Replace overlay component with modals --- diff --git a/server/sonar-web/src/main/coffee/common/overlay.coffee b/server/sonar-web/src/main/coffee/common/overlay.coffee deleted file mode 100644 index 70574bef9ae..00000000000 --- a/server/sonar-web/src/main/coffee/common/overlay.coffee +++ /dev/null @@ -1,28 +0,0 @@ -define [ - 'backbone.marionette' -], ( - Marionette -) -> - - $ = jQuery - - - class extends Marionette.ItemView - className: 'overlay-popup' - - - events: -> - 'click .overlay-popup-close': 'close' - - - onRender: -> - @$el.isolatedScroll() - @$el.detach().appendTo $('body') - key 'escape', 'overlay-popup', => @close() - @keyScope = key.getScope() - key.setScope 'overlay-popup' - - - onClose: -> - key.unbind 'overlay-popup' - key.setScope @keyScope diff --git a/server/sonar-web/src/main/coffee/issue/issue-view.coffee b/server/sonar-web/src/main/coffee/issue/issue-view.coffee index eff00d06d1e..b56ea55e2fa 100644 --- a/server/sonar-web/src/main/coffee/issue/issue-view.coffee +++ b/server/sonar-web/src/main/coffee/issue/issue-view.coffee @@ -265,6 +265,7 @@ define [ $.get "#{baseUrl}/api/rules/show", key: ruleKey, (r) => ruleOverlay = new RuleOverlay model: new Backbone.Model r.rule + large: true ruleOverlay.render() diff --git a/server/sonar-web/src/main/coffee/issue/views/rule-overlay.coffee b/server/sonar-web/src/main/coffee/issue/views/rule-overlay.coffee index 54d13bd8f0a..8f87f1eecbf 100644 --- a/server/sonar-web/src/main/coffee/issue/views/rule-overlay.coffee +++ b/server/sonar-web/src/main/coffee/issue/views/rule-overlay.coffee @@ -1,12 +1,12 @@ define [ - 'common/overlay' + 'common/modals' 'templates/issue' ], ( - Overlay + ModalView Templates ) -> - class extends Overlay + class extends ModalView template: Templates['issue-rule'] diff --git a/server/sonar-web/src/main/hbs/issue/issue-rule.hbs b/server/sonar-web/src/main/hbs/issue/issue-rule.hbs index cee912e9594..deb4a080cf3 100644 --- a/server/sonar-web/src/main/hbs/issue/issue-rule.hbs +++ b/server/sonar-web/src/main/hbs/issue/issue-rule.hbs @@ -1,25 +1,27 @@ -

- {{name}} - - {{t 'coding_rules.permalink'}} - -

+ diff --git a/server/sonar-web/src/main/hbs/source-viewer/source-viewer-measures.hbs b/server/sonar-web/src/main/hbs/source-viewer/source-viewer-measures.hbs index 166e9c6beea..02278679b89 100644 --- a/server/sonar-web/src/main/hbs/source-viewer/source-viewer-measures.hbs +++ b/server/sonar-web/src/main/hbs/source-viewer/source-viewer-measures.hbs @@ -1,60 +1,62 @@ -
- {{#unless removed}} - {{#if projectName}} -
- {{qualifierIcon 'TRK'}} {{projectName}} - {{#if subProjectName}} -     - {{qualifierIcon 'TRK'}} {{subProjectName}} - {{/if}} -
- {{/if}} - -
- {{qualifierIcon q}} {{default path longName}} -
- {{else}} -
{{removedMessage}}
- {{/unless}} -
+