aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/layout.js
blob: f83319a72dcefa0e89bb3084546b0d24606d605f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
define([
  'backbone.marionette',
  './intro-view',
  '../../components/common/jquery-isolated-scroll',
  './templates'
], function (Marionette, IntroView) {

  return Marionette.LayoutView.extend({
    template: Templates['quality-profiles-layout'],

    regions: {
      headerRegion: '.search-navigator-workspace-header',
      actionsRegion: '.search-navigator-filters',
      resultsRegion: '.quality-profiles-results',
      detailsRegion: '.search-navigator-workspace-details'
    },

    onRender: function () {
      var navigator = this.$('.search-navigator');
      navigator.addClass('sticky search-navigator-extended-view');
      var top = navigator.offset().top;
      this.$('.search-navigator-workspace-header').css({ top: top });
      this.$('.search-navigator-side').css({ top: top }).isolatedScroll();
      this.renderIntro();
    },

    renderIntro: function () {
      this.detailsRegion.show(new IntroView());
    }
  });

});