aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-gates/actions-view.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-05-26 15:58:33 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-05-28 09:48:55 +0200
commit456991a9a6292cfd88b053d808066f541e847028 (patch)
tree9b5161ae04622a4498a162916077ebcf2bc82bd3 /server/sonar-web/src/main/js/apps/quality-gates/actions-view.js
parent2a9e0c6bbfc7e3403d353f0373d302b7ecd32706 (diff)
downloadsonarqube-456991a9a6292cfd88b053d808066f541e847028.tar.gz
sonarqube-456991a9a6292cfd88b053d808066f541e847028.zip
refactor quality gates page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates/actions-view.js')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/actions-view.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/actions-view.js b/server/sonar-web/src/main/js/apps/quality-gates/actions-view.js
new file mode 100644
index 00000000000..156c7d88104
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/quality-gates/actions-view.js
@@ -0,0 +1,27 @@
+define([
+ './create-view',
+ './templates'
+], function (CreateView) {
+
+ return Marionette.ItemView.extend({
+ template: Templates['quality-gate-actions'],
+
+ events: {
+ 'click #quality-gate-add': 'add'
+ },
+
+ add: function (e) {
+ e.preventDefault();
+ new CreateView({
+ collection: this.collection
+ }).render();
+ },
+
+ serializeData: function () {
+ return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
+ canEdit: this.options.canEdit
+ });
+ }
+ });
+
+});