aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
blob: 6b3fd957638721f6655b65a90902921dee9e5546 (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
import _ from 'underscore';
import Marionette from 'backbone.marionette';
import BaseView from './base-viewer-view';
import '../templates';

export default BaseView.extend({
  template: Templates['workspace-rule'],

  onRender: function () {
    BaseView.prototype.onRender.apply(this, arguments);
    this.$('[data-toggle="tooltip"]').tooltip({ container: 'body' });
  },

  onDestroy: function () {
    this.$('[data-toggle="tooltip"]').tooltip('destroy');
  },

  serializeData: function () {
    return _.extend(Marionette.LayoutView.prototype.serializeData.apply(this, arguments), {
      allTags: _.union(this.model.get('sysTags'), this.model.get('tags'))
    });
  }
});