aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/groups/header-view.js
blob: a60f0c51f3442e291b395fd64ee29662dabfbbad (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
define([
  'backbone.marionette',
  './create-view',
  './templates'
], function (Marionette, 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();
    }
  });

});