fact_check with Ray's permission check.
needs Ray's new css
This commit is contained in:
parent
d8b20ae993
commit
ef88c2dbc2
Binary file not shown.
|
@ -1,12 +1,14 @@
|
|||
$('.check[checked="checked"]').parents(".checkbox").addClass("checked")
|
||||
$(".checkbox").click(function(){
|
||||
if($(this).children(".check").attr("checked")){
|
||||
// uncheck
|
||||
$(document).ready(function() {
|
||||
$('.check[checked="checked"]').parents(".checkbox").addClass("checked");
|
||||
$(".checkbox").click(function(){
|
||||
if($(this).children(".check").attr("checked")){
|
||||
// uncheck
|
||||
$(this).children(".check").attr('checked', false);
|
||||
$(this).removeClass("checked");
|
||||
}else{
|
||||
// check
|
||||
$(this).children(".check").attr({checked: "checked"});
|
||||
$(this).addClass("checked");
|
||||
}
|
||||
}else{
|
||||
// check
|
||||
$(this).children(".check").attr({checked: "checked"});
|
||||
$(this).addClass("checked");
|
||||
}
|
||||
});
|
||||
});
|
|
@ -1,7 +1,23 @@
|
|||
<%= content_tag :div ,:id => "users_checkbox_ary", do -%>
|
||||
<% sys_users = User.all -%>
|
||||
<% sys_users.each do |user| -%>
|
||||
<%= label_tag "lab-user-#{user.id}", user.name rescue '' -%>
|
||||
<%= check_box_tag "[users][#{user.id}]", 'true',users.include?(user) -%>
|
||||
|
||||
<div class="checkblock">
|
||||
<div class="checkbox clear">
|
||||
<div class="check-icon">
|
||||
<i class="icons-check-2 icons-white"></i>
|
||||
</div>
|
||||
<div class='member-avatar'>
|
||||
<% if user.avatar? %>
|
||||
<%= image_tag(user.avatar.thumb.url,:class => "member-img") %>
|
||||
<% else %>
|
||||
<%= image_tag "person.png",:class => "member-img" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= label_tag "lab-user-#{user.id}", (user.name rescue ''),:class=>"member-name",:id=>nil -%>
|
||||
<%= check_box_tag "[users][#{user.id}]", 'true',users.include?(user),:class => "check" -%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end -%>
|
||||
<% end -%>
|
|
@ -1,3 +1,9 @@
|
|||
<% content_for :page_specific_css do %>
|
||||
<%= stylesheet_link_tag "inc/permission-checkbox" %>
|
||||
<% end %>
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "inc/permission-checkbox" %>
|
||||
<% end %>
|
||||
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
||||
<%= form_tag('', :remote => true) %>
|
||||
<div class="subnav">
|
||||
|
|
Reference in New Issue