diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-18 11:58:22 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-18 12:26:20 +0200 |
commit | 2cc04077c80f684fc3860b1b622accf4eb0af08d (patch) | |
tree | 13bb020eb7528d4e7e2a92e8fddc4a45cd06c009 /server/sonar-web/src/main/coffee/component-viewer | |
parent | 0867840d7ce984d7008dc6f3d1cded806bf4252d (diff) | |
download | sonarqube-2cc04077c80f684fc3860b1b622accf4eb0af08d.tar.gz sonarqube-2cc04077c80f684fc3860b1b622accf4eb0af08d.zip |
SONAR-5460 Refactor out bubble popup component
Diffstat (limited to 'server/sonar-web/src/main/coffee/component-viewer')
6 files changed, 5 insertions, 40 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/coverage-popup.coffee b/server/sonar-web/src/main/coffee/component-viewer/coverage-popup.coffee index bc9bf899ed6..9311fef5b1c 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/coverage-popup.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/coverage-popup.coffee @@ -1,7 +1,7 @@ define [ 'backbone.marionette' 'templates/component-viewer' - 'component-viewer/popup' + 'common/popup' 'component-viewer/utils' ], ( Marionette diff --git a/server/sonar-web/src/main/coffee/component-viewer/covered-files-popup.coffee b/server/sonar-web/src/main/coffee/component-viewer/covered-files-popup.coffee index ccf628a6434..2d6a37a135b 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/covered-files-popup.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/covered-files-popup.coffee @@ -1,7 +1,7 @@ define [ 'backbone.marionette' 'templates/component-viewer' - 'component-viewer/popup' + 'common/popup' 'component-viewer/utils' ], ( Marionette diff --git a/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee b/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee index 1f975a2619e..108da019e95 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/duplication-popup.coffee @@ -1,7 +1,7 @@ define [ 'backbone.marionette' 'templates/component-viewer' - 'component-viewer/popup' + 'common/popup' 'component-viewer/utils' ], ( Marionette diff --git a/server/sonar-web/src/main/coffee/component-viewer/line-actions-popup.coffee b/server/sonar-web/src/main/coffee/component-viewer/line-actions-popup.coffee index 303fe28b1e5..f0de0ac50c5 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/line-actions-popup.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/line-actions-popup.coffee @@ -1,7 +1,7 @@ define [ 'backbone.marionette' 'templates/component-viewer' - 'component-viewer/popup' + 'common/popup' 'issues/manual-issue-view' ], ( Marionette diff --git a/server/sonar-web/src/main/coffee/component-viewer/popup.coffee b/server/sonar-web/src/main/coffee/component-viewer/popup.coffee deleted file mode 100644 index 939180e37be..00000000000 --- a/server/sonar-web/src/main/coffee/component-viewer/popup.coffee +++ /dev/null @@ -1,35 +0,0 @@ -define [ - 'backbone.marionette' -], ( - Marionette -) -> - - $ = jQuery - - - class CoveragePopupView extends Marionette.ItemView - className: 'component-viewer-popup' - - - onRender: -> - @$el.detach().appendTo $('body') - - if @options.bottom - @$el.addClass 'component-viewer-popup-bottom' - @$el.css - top: @options.triggerEl.offset().top + @options.triggerEl.outerHeight() - left: @options.triggerEl.offset().left - else if @options.bottomRight - @$el.addClass 'component-viewer-popup-bottom-right' - @$el.css - top: @options.triggerEl.offset().top + @options.triggerEl.outerHeight() - right: $(window).width() - @options.triggerEl.offset().left - @options.triggerEl.outerWidth() - else - @$el.css - top: @options.triggerEl.offset().top - left: @options.triggerEl.offset().left + @options.triggerEl.outerWidth() - - - $('body').on 'click.coverage-popup', => - $('body').off 'click.coverage-popup' - @close()
\ No newline at end of file diff --git a/server/sonar-web/src/main/coffee/component-viewer/time-changes-popup.coffee b/server/sonar-web/src/main/coffee/component-viewer/time-changes-popup.coffee index 2e1cad33c72..0854f1b91e6 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/time-changes-popup.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/time-changes-popup.coffee @@ -1,7 +1,7 @@ define [ 'backbone.marionette' 'templates/component-viewer' - 'component-viewer/popup' + 'common/popup' ], ( Marionette Templates |