From 1bf2052233aeef50654b12a405a17e44f599c7af Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 21 Mar 2014 18:59:59 +0600 Subject: [PATCH] SONAR-4366 Rework rename/copy modal --- .../resources/org/sonar/l10n/core.properties | 2 +- .../qualitygate/ws/QgateAppHandler.java | 2 +- .../main/webapp/js/templates/quality-gates.js | 60 ++++--------------- .../quality-gates/quality-gate-edit.hbs | 6 +- 4 files changed, 15 insertions(+), 55 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 2ab11ccf802..6ba967a3998 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -1559,7 +1559,7 @@ quality_profiles.copy_new_name=New name #------------------------------------------------------------------------------ quality_gates.noQualityGates=No Quality Gates -quality_gates.add=Create Quality Gate +quality_gates.create=Create Quality Gate quality_gates.rename=Rename Quality Gate: quality_gates.copy=Copy Quality Gate: quality_gates.conditions=Conditions diff --git a/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java b/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java index 47f39e88dbd..5faf20aa64c 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java +++ b/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java @@ -48,10 +48,10 @@ public class QgateAppHandler implements RequestHandler { "delete", "more", "name", - "quality_gates.add", "quality_gates.add_condition", "quality_gates.conditions", "quality_gates.copy", + "quality_gates.create", "quality_gates.health_icons", "quality_gates.introduction", "quality_gates.no_conditions", diff --git a/sonar-server/src/main/webapp/js/templates/quality-gates.js b/sonar-server/src/main/webapp/js/templates/quality-gates.js index bfb6744a218..2ba729006af 100644 --- a/sonar-server/src/main/webapp/js/templates/quality-gates.js +++ b/sonar-server/src/main/webapp/js/templates/quality-gates.js @@ -410,41 +410,6 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; function program1(depth0,data) { - var buffer = "", stack1, helper, options; - buffer += "

" - + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "quality_gates.rename", options) : helperMissing.call(depth0, "t", "quality_gates.rename", options))) - + " "; - if (helper = helpers.name) { stack1 = helper.call(depth0, {hash:{},data:data}); } - else { helper = (depth0 && depth0.name); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; } - buffer += escapeExpression(stack1) - + "

"; - return buffer; - } - -function program3(depth0,data) { - - var buffer = "", stack1, helper, options; - buffer += "

" - + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "quality_gates.copy", options) : helperMissing.call(depth0, "t", "quality_gates.copy", options))) - + " "; - if (helper = helpers.name) { stack1 = helper.call(depth0, {hash:{},data:data}); } - else { helper = (depth0 && depth0.name); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; } - buffer += escapeExpression(stack1) - + "

"; - return buffer; - } - -function program5(depth0,data) { - - var buffer = "", helper, options; - buffer += "

" - + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "quality_gates.add", options) : helperMissing.call(depth0, "t", "quality_gates.add", options))) - + "

"; - return buffer; - } - -function program7(depth0,data) { - var buffer = "", helper, options; buffer += "