aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/groups/header-view.js
blob: da6f7f60919294c1730fedee1e524a059acb3ad0 (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
define([
  './create-view',
  './templates'
], function (CreateView) {

  return Marionette.ItemView.extend({
    template: Templates['groups-header'],

    events: {
      'click #groups-create': 'onCreateClick'
    },

    onCreateClick: function (e) {
      e.preventDefault();
      this.createGroup();
    },

    createGroup: function () {
      new CreateView({
        collection: this.collection
      }).render();
    }
  });

});