-<div id="vId<%= violation.id -%>"
- <% if current_user -%>onmouseover="sVA(<%= violation.id -%>)" onmouseout="hVA(<%= violation.id -%>)"
- <% end -%>>
+<div id="vId<%= violation.id -%>">
<div class="violation">
<div class="vtitle">
<% if violation.review %>
<img src="<%= ApplicationController.root_context -%>/images/sep12.png">
<span class="rulename">
- <a onclick="window.open(this.href,'rule','height=800,width=900,scrollbars=1,resizable=1');return false;" href="<%= url_for :controller => 'rules', :action => 'show', :id => violation.rule.key, :resource_id => @resource.id, :layout => 'false' -%>"><%= h(violation.rule.name) -%></a>
+ <a onclick="window.open(this.href,'rule','height=800,width=900,scrollbars=1,resizable=1');return false;" href="<%= url_for :controller => 'rules', :action => 'show', :id => violation.rule.key, :layout => 'false' -%>"><%= h(violation.rule.name) -%></a>
</span>
<img src="<%= ApplicationController.root_context -%>/images/sep12.png">
</div>
<div class="discussionComment first" id="vBody<%= violation.id -%>">
- <% if current_user %>
- <div style="display: none" class="vActions" id="vActions<%= violation.id -%>">
- <%= button_to_function message('reviews.comment'), "sCF(#{violation.id})", :name => 'bComment' -%>
+ <div id="vMsg<%= violation.id -%>">
+
+ <% if current_user %>
+ <img src="<%= ApplicationController.root_context -%>/images/actions.png" onclick="$('vActions<%= violation.id -%>').toggle();">
+ <div style="display: none" class="popup-menu" id="vActions<%= violation.id -%>" onmouseout="this.hide();" onmouseover="this.show();">
+ <ul>
+ <li><%= link_to_function message('reviews.comment'), "sCF(#{violation.id})", :name => 'bComment' -%></li>
- <% unless violation.review && violation.review.resolved? %>
- <%= button_to_function message('reviews.assign'), "sAF(#{violation.id})", :name => 'bAssign' -%>
- <% end %>
+ <% unless violation.review && violation.review.resolved? %>
+ <li><%= link_to_function message('reviews.assign'), "sAF(#{violation.id})", :name => 'bAssign' -%></li>
+ <% end %>
- <% if !violation.switched_off? %>
- <%= button_to_function (violation.review && violation.review.resolved? ? message('reviews.reopen') : message('reviews.resolved')),
- "sCStF(#{violation.id})", :name => (violation.review && violation.review.resolved? ? 'bReopen' : 'bResolved') -%>
- <% end %>
+ <% if !violation.switched_off? %>
+ <li><%= link_to_function (violation.review && violation.review.resolved? ? message('reviews.reopen') : message('reviews.resolved')),
+ "sCStF(#{violation.id})", :name => (violation.review && violation.review.resolved? ? 'bReopen' : 'bResolved') -%></li>
+ <% end %>
- <% if violation.review.nil? || violation.review.can_change_false_positive_flag? %>
- <%= button_to_function message(violation.switched_off? ? 'reviews.unflag_as_false_positive' : 'reviews.flag_as_false_positive'),
- "sFPF(#{violation.id})",
- :name => 'bFalsePositive' -%>
- <% end %>
+ <% if violation.review.nil? || violation.review.can_change_false_positive_flag? %>
+ <li><%= link_to_function message(violation.switched_off? ? 'reviews.unflag_as_false_positive' : 'reviews.flag_as_false_positive'),
+ "sFPF(#{violation.id})",
+ :name => 'bFalsePositive' -%></li>
+ <% end %>
+
+ <% unless violation.review && violation.review.resolved? %>
+ <li><%= link_to_function message('reviews.change_severity'), "sCSF(#{violation.id})", :name => 'bChangeSeverity' -%></li>
- <% unless violation.review && violation.review.resolved? %>
- <%= button_to_function message('reviews.change_severity'), "sCSF(#{violation.id})", :name => 'bChangeSeverity' -%>
-
- <%= button_to_function message('reviews.link_to_action_plan'), "sAPF(#{violation.id})", :name => 'bLinkActionPlan' -%>
- <% end %>
- </div>
- <% end %>
- <div id="vMsg<%= violation.id -%>"><%= violation.html_message || ' ' -%></div>
+ <li><%= link_to_function message('reviews.link_to_action_plan'), "sAPF(#{violation.id})", :name => 'bLinkActionPlan' -%></li>
+ <% end %>
+ </ul>
+ </div>
+
+ <%= image_tag 'sep12.png' -%>
+
+ <% end %>
+
+ <%= violation.html_message || ' ' -%>
+ </div>
</div>
<div class="discussionComment" id="reviewForm<%= violation.id -%>" style="display:none"></div>
cursor: default;
}
+.popup-menu {
+ background-clip: padding-box;
+ background-color: #FFFFFF;
+ border-color: rgba(0, 0, 0, 0.2);
+ border-style: solid;
+ border-width: 1px;
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -o-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ float: left;
+ margin: 0;
+ max-width: 220px;
+ min-width: 160px;
+ padding: 0px;
+ position: absolute;
+}
+
+.popup-menu li {
+ list-style-type: none !important;
+ padding: 2px 5px !important;
+ cursor: pointer !important;
+ color: red !important;
+}
+
+.popup-menu li:hover {
+ background-color: #4b9fd5 !important;
+}
+
+.popup-menu li:hover a {
+ color: #fff !important;
+ font-weight: bold !important;
+}
+
+.popup-menu a {
+ text-decoration: none !important;
+ display: block !important;
+}
+
/* ------------------- PAGE ------------------- */
h1 {
color: #444;
text-shadow: 1px 1px 0 #FFFFFF;
}
-div.vActions {
- position: absolute;
- line-height: 1.5em;
- height: 1.5em;
- padding-right: 10px;
- max-height: 1.5em;
- background-color: #F4F4F4;
- box-shadow: 10px 10px 10px #EFEFEF;
-}
-
span.review_permalink a {
color: #777;
font-size: 11px;