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,4 +1,5 @@
|
||||||
$('.check[checked="checked"]').parents(".checkbox").addClass("checked")
|
$(document).ready(function() {
|
||||||
|
$('.check[checked="checked"]').parents(".checkbox").addClass("checked");
|
||||||
$(".checkbox").click(function(){
|
$(".checkbox").click(function(){
|
||||||
if($(this).children(".check").attr("checked")){
|
if($(this).children(".check").attr("checked")){
|
||||||
// uncheck
|
// uncheck
|
||||||
|
@ -10,3 +11,4 @@ $(".checkbox").click(function(){
|
||||||
$(this).addClass("checked");
|
$(this).addClass("checked");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
|
@ -1,7 +1,23 @@
|
||||||
<%= content_tag :div ,:id => "users_checkbox_ary", do -%>
|
<%= content_tag :div ,:id => "users_checkbox_ary", do -%>
|
||||||
<% sys_users = User.all -%>
|
<% sys_users = User.all -%>
|
||||||
<% sys_users.each do |user| -%>
|
<% 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 -%>
|
||||||
<% 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") %>
|
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
||||||
<%= form_tag('', :remote => true) %>
|
<%= form_tag('', :remote => true) %>
|
||||||
<div class="subnav">
|
<div class="subnav">
|
||||||
|
|
Loading…
Reference in New Issue