aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-05-02 14:00:59 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-05-02 14:00:59 +0200
commit42268bc95b07757f4821511342ccbd14084a0ef3 (patch)
tree0516d8a13c549ee5d06fbd484ea3be0a718e96a7 /sonar-server/src/main
parent6ef3cc3c65f9bbbb50aecc4e144a4a6efb5829b2 (diff)
downloadsonarqube-42268bc95b07757f4821511342ccbd14084a0ef3.tar.gz
sonarqube-42268bc95b07757f4821511342ccbd14084a0ef3.zip
SONAR-1973, SONAR-2327 Fix minor UI issues
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb8
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb1
5 files changed, 9 insertions, 6 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb
index 71065ec421f..94eadb0f8b2 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb
@@ -43,7 +43,7 @@
<%= link_to_remote (violation.review && violation.review.assignee_id ? "Reassign" : "Assign"),
:url => { :controller => "reviews", :action => "violation_assign_form", :violation_id => violation.id},
:update => "vActions" + violation.id.to_s,
- :complete => "$('vActions" + violation.id.to_s + "').show();$('assignee_id').focus();" -%>
+ :complete => "$('vActions" + violation.id.to_s + "').show();$('commentActions" + violation.id.to_s + "').hide();$('assignee_id').focus();" -%>
<%
end
else
@@ -52,14 +52,14 @@
<%= link_to_remote "Review",
:url => { :controller => "reviews", :action => "violation_comment_form", :id => violation.id },
:update => "reviewForm" + violation.id.to_s,
- :complete => "$('vActions#{violation.id}').hide();$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus()" -%>
+ :complete => "$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus();$('vActions#{violation.id}').hide();" -%>
<% end %>
&nbsp;
<%= link_to_remote (violation.switched_off? ? "Unflag as false-positive" : "Flag as false-positive"),
:url => { :controller => "reviews", :action => "violation_false_positive_form", :id => violation.id, :false_positive => !violation.switched_off? },
:update => "reviewForm" + violation.id.to_s,
- :complete => "$('vActions" + violation.id.to_s + "').hide();$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus();" -%>
+ :complete => "$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus();$('vActions" + violation.id.to_s + "').hide();$('commentActions" + violation.id.to_s + "').hide();" -%>
</span>
<% end %>
@@ -93,7 +93,7 @@
<%= link_to_remote "Edit",
:url => { :controller => "reviews", :action => "violation_comment_form", :comment_id => review_comment.id, :id => violation.id },
:update => "lastComment" + violation.id.to_s,
- :complete => "$('reviewForm#{violation.id}').hide();$('vActions#{violation.id}').hide();$('commentAction#{violation.id}').hide();$('commentText#{violation.id}').focus();" -%>
+ :complete => "$('vActions#{violation.id}').hide();$('commentActions#{violation.id}').hide();$('commentText#{violation.id}').focus();" -%>
<% unless comment_index == 0 %>
&nbsp;
<%= link_to_remote "Delete",
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb
index 58beeb5ac65..2a7723c8324 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb
@@ -13,6 +13,7 @@
<textarea id="commentText" rows="8" name="text" style="width: 100%" onkeyup="if (this.value=='') $('submit_btn').disabled='true'; else $('submit_btn').disabled='';"><%= @comment.text if @comment -%></textarea>
<br/>
<%= submit_to_remote "submit_btn", button, :url => { :action => 'save_comment'}, :html => { :id => "submit_btn", :disabled => "true" }, :update => 'review' -%>
+ &nbsp;
<%= link_to_remote 'Cancel', :url => {:action => 'show', :id => params[:id]}, :update => 'review' -%>
</td>
<td class="sep"></td>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb
index 6cc844cb38e..98f329bd088 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb
@@ -3,5 +3,6 @@
<h3>Why is it a false-positive ?</h3>
<textarea id="commentText" rows="8" name="comment" style="width: 100%" onkeyup="if (this.value=='') $('submit_btn').disabled='true'; else $('submit_btn').disabled='';"></textarea>
<%= submit_to_remote "submit_btn", "Flag as false-positive", :url => { :action => 'flag_as_false_positive' }, :html => { :id => "submit_btn", :disabled => "true" }, :update => 'review' -%>
+ &nbsp;
<%= link_to_remote 'Cancel', :url => {:action => 'show', :id => params[:id]}, :update => 'review' -%>
</form>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb
index 9b69baadc63..be8cccb920f 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb
@@ -11,13 +11,13 @@
<%= link_to_remote (review.assignee_id ? "Reassign" : "Assign"),
:url => { :controller => "reviews", :action => "assign_form", :review_id => review.id},
:update => "assignForm",
- :complete => "$('rActions').hide(); $('commentAction').hide(); $('assignee_id').focus();" -%>
+ :complete => "$('rActions').hide(); $('editActions').hide(); $('assignee_id').focus();" -%>
&nbsp;
<%= link_to_remote ("Flag as false-positive"),
:url => { :controller => "reviews", :action => "false_positive_form", :id => review.id },
:update => "reviewForm",
- :complete => "$('rActions').hide(); $('commentAction').hide(); $('reviewForm').show();$('commentText').focus();" -%>
+ :complete => "$('reviewForm').show(); $('rActions').hide(); $('editActions').hide(); $('commentText').focus();" -%>
</span>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb
index a080d8b0e5e..d045ad90c28 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb
@@ -13,6 +13,7 @@
<textarea id="commentText<%= params[:id] -%>" rows="8" name="text" style="width: 100%" onkeyup="if (this.value=='') $('submit_btn').disabled='true'; else $('submit_btn').disabled='';"><%= @comment.text if @comment -%></textarea>
<br/>
<%= submit_to_remote "submit_btn", button, :url => { :action => 'violation_save_comment'}, :html => { :id => "submit_btn", :disabled => "true" }, :update => 'vId'+params[:id] -%>
+ &nbsp;
<%= link_to_remote 'Cancel', :url => {:action => 'display_violation', :id => params[:id]}, :update => 'vId' + params[:id] -%>
<% if @violation.review.nil? || @violation.review.comments.size==0 %>