aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-01-30 12:32:02 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-01-30 14:53:08 +0600
commit347bde2e7f58716018a7175d9993c623567797c8 (patch)
treec998d44ed68bb9c5673295355727cdedc473b067 /sonar-server
parent23b3b740c46c0a1ba7e49e74a5e411e6a1b9b5b3 (diff)
downloadsonarqube-347bde2e7f58716018a7175d9993c623567797c8.tar.gz
sonarqube-347bde2e7f58716018a7175d9993c623567797c8.zip
New Issues Page: fix plan/unplan
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_plan_form.hbs.erb2
-rw-r--r--sonar-server/src/main/webapp/javascripts/navigator/issues.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_plan_form.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_plan_form.hbs.erb
index 71bf25b520f..0a2fcf1f874 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_plan_form.hbs.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_plan_form.hbs.erb
@@ -2,7 +2,7 @@
{{#if items}}
<select id="issue-detail-plan-select">
{{#if issue.actionPlan}}
- <option value=""><%= message('issue.unplan.submit') -%></option>
+ <option value="#unplan"><%= message('issue.unplan.submit') -%></option>
{{/if}}
{{#each items}}
<option value="{{this.key}}">{{this.name}} {{#if this.fDeadLine}}({{this.fDeadLine}}){{/if}}</option>
diff --git a/sonar-server/src/main/webapp/javascripts/navigator/issues.js b/sonar-server/src/main/webapp/javascripts/navigator/issues.js
index 02bb1fdbd0e..9f984a4e1c7 100644
--- a/sonar-server/src/main/webapp/javascripts/navigator/issues.js
+++ b/sonar-server/src/main/webapp/javascripts/navigator/issues.js
@@ -667,14 +667,15 @@ jQuery(function() {
submit: function() {
- var that = this;
+ var that = this,
+ plan = this.ui.select.val();
jQuery.ajax({
type: 'POST',
url: baseUrl + '/api/issues/plan',
data: {
issue: this.options.issue.get('key'),
- plan: this.ui.select.val()
+ plan: plan === '#unplan' ? '' : plan
}
}).done(function() {
that.options.detailView.updateAfterAction(true);