diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-16 15:46:55 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-16 15:47:04 +0200 |
commit | b852e0e1beef8e3b0d7da0b76e006e82201d8d6d (patch) | |
tree | de4a9765c7109eeedb50f2c539284377412f43f3 /server/sonar-web | |
parent | 61e930fee6e29e42a6df0189aefa61b4783c6427 (diff) | |
download | sonarqube-b852e0e1beef8e3b0d7da0b76e006e82201d8d6d.tar.gz sonarqube-b852e0e1beef8e3b0d7da0b76e006e82201d8d6d.zip |
SONAR-5001 Use Markdown for custom rules and manual rules
Diffstat (limited to 'server/sonar-web')
4 files changed, 7 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee index 6274e9fb44c..951a224414e 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee @@ -56,7 +56,7 @@ define [ postData = name: @ui.customRuleCreationName.val() - html_description: @ui.customRuleCreationHtmlDescription.val() + markdown_description: @ui.customRuleCreationHtmlDescription.val() severity: @ui.customRuleCreationSeverity.val() status: @ui.customRuleCreationStatus.val() @@ -77,7 +77,7 @@ define [ reactivate: -> postData = name: @existingRule.name - html_description: @existingRule.htmlDesc + markdown_description: @existingRule.mdDesc severity: @existingRule.severity status: @existingRule.status template_key: @existingRule.templateKey diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-custom-rule-creation.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-custom-rule-creation.hbs index ebc66880c45..11439ba5373 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-custom-rule-creation.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-custom-rule-creation.hbs @@ -31,8 +31,8 @@ <tr class="property"> <th><h3>{{t 'description'}} <em class="mandatory">*</em></h3></th> <td> - <textarea type="textarea" name="html_description" id="coding-rules-custom-rule-creation-html-description" - rows="4" style="width: 100%; margin-bottom: 4px;">{{{htmlDesc}}}</textarea> + <textarea type="textarea" name="markdown_description" id="coding-rules-custom-rule-creation-html-description" + rows="4" style="width: 100%; margin-bottom: 4px;">{{{mdDesc}}}</textarea> </td> </tr> <tr class="property"> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/manual_rules_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/manual_rules_controller.rb index ec3e9f02d50..a98f6f193dc 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/manual_rules_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/manual_rules_controller.rb @@ -34,7 +34,7 @@ class ManualRulesController < ApplicationController rule_update = { 'ruleKey' => params[:key], 'name' => params[:name], - 'htmlDescription' => params[:description] + 'markdownDescription' => params[:description] } Internal.rules.updateManualRule(rule_update) render :text => 'ok', :status => 200 @@ -51,7 +51,7 @@ class ManualRulesController < ApplicationController new_rule = { 'manualKey' => manual_key, 'name' => params[:name], - 'htmlDescription' => params[:description] + 'markdownDescription' => params[:description] } Internal.rules.createManualRule(new_rule) render :text => 'ok', :status => 200 diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/manual_rules/_edit_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/manual_rules/_edit_form.html.erb index de72b676c02..cfc01cad476 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/manual_rules/_edit_form.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/manual_rules/_edit_form.html.erb @@ -13,7 +13,7 @@ </div> <div class="modal-field"> <label for="manual_rules[]">Description <em class="mandatory">*</em></label> - <textarea rows="5" cols="50" name="description"><%= h @rule.htmlDescription() -%></textarea> + <textarea rows="5" cols="50" name="description"><%= h @rule.markdownDescription() -%></textarea> <br/> </div> </div> |