diff options
5 files changed, 14 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee index 7a10db2512f..d9697a317d3 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee @@ -36,6 +36,7 @@ define [ tagInput: '.coding-rules-detail-tag-input' tagsEdit: '.coding-rules-detail-tag-edit' tagsEditDone: '.coding-rules-detail-tag-edit-done' + tagsEditCancel: '.coding-rules-details-tag-edit-cancel' tagsList: '.coding-rules-detail-tag-list' subcharacteristic: '.coding-rules-subcharacteristic' @@ -61,6 +62,7 @@ define [ events: 'click @ui.tagsChange': 'changeTags' 'click @ui.tagsEditDone': 'editDone' + 'click @ui.tagsEditCancel': 'cancelEdit' 'click @ui.extendDescriptionLink': 'showExtendDescriptionForm' 'click @ui.cancelExtendDescription': 'hideExtendDescriptionForm' @@ -199,6 +201,7 @@ define [ @ui.tagsEdit.show() if @ui.tagsList.hide @ui.tagsList.hide() + @tagsBuffer = @ui.tagInput.select2 'val' key.setScope 'tags' key 'escape', 'tags', => @cancelEdit() @@ -208,6 +211,8 @@ define [ if @ui.tagsList.show @ui.tagsList.show() if @ui.tagInput.select2 + console.log @tagsBuffer + @ui.tagInput.select2 'val', @tagsBuffer @ui.tagInput.select2 'close' if @ui.tagsEdit.hide @ui.tagsEdit.hide() diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs index 24295ac0478..7da358161f2 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs @@ -31,6 +31,7 @@ <div class="button-group"> <button class="coding-rules-detail-tag-edit-done">{{t 'Done'}}</button> </div> + <a class="coding-rules-details-tag-edit-cancel">{{t 'cancel'}}</a> </li>{{/if}} {{#if subcharacteristic}} diff --git a/server/sonar-web/src/main/less/coding-rules.less b/server/sonar-web/src/main/less/coding-rules.less index 23f96841f69..93a858dd9bc 100644 --- a/server/sonar-web/src/main/less/coding-rules.less +++ b/server/sonar-web/src/main/less/coding-rules.less @@ -210,6 +210,10 @@ line-height: 1; } +.coding-rules-details-tag-edit-cancel { + vertical-align: middle; +} + .coding-rules-detail-description { margin: 2 * @navigatorPadding 0; } diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb index e4985adb843..687ca6b6db8 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb @@ -10,8 +10,8 @@ </body><script> -<% if flash[:notice] %>info('<%=escape_javascript(flash[:notice])-%>');<% end %> -<% if flash[:warning] %>warning('<%=escape_javascript(flash[:warning])-%>');<% end %> -<% if flash[:error] %>error('<%=escape_javascript(flash[:error])-%>');<% end %> +<% if flash[:notice] %>info('<%= h escape_javascript(flash[:notice])-%>');<% end %> +<% if flash[:warning] %>warning('<%= h escape_javascript(flash[:warning])-%>');<% end %> +<% if flash[:error] %>error('<%= h escape_javascript(flash[:error])-%>');<% end %> </script> </html> diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/RuleRepository.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/RuleRepository.java index a6d849c8970..0275e58736a 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/RuleRepository.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/RuleRepository.java @@ -28,7 +28,7 @@ import java.util.List; /** * @since 2.3 - * @deprecated in 4.2. Replaced by org.sonar.api.server.rule.RuleDefinition + * @deprecated in 4.2. Replaced by org.sonar.api.server.rule.RulesDefinition */ @Deprecated public abstract class RuleRepository implements ServerExtension { |