aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-gates/layout.js
blob: 5d0a65ae47b3f90bee72546af062c556fdf60ab1 (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
import Marionette from 'backbone.marionette';
import IntroView from './intro-view';
import './templates';

export default Marionette.LayoutView.extend({
  template: Templates['quality-gates-layout'],

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

  onRender: function () {
    var top = this.$('.search-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());
  }
});