diff --git a/app/assets/javascripts/.DS_Store b/app/assets/javascripts/.DS_Store index 5008ddfcf..51582ef8a 100644 Binary files a/app/assets/javascripts/.DS_Store and b/app/assets/javascripts/.DS_Store differ diff --git a/app/assets/javascripts/inc/permission-checkbox.js b/app/assets/javascripts/inc/permission-checkbox.js index f106e7958..e314d2aaf 100644 --- a/app/assets/javascripts/inc/permission-checkbox.js +++ b/app/assets/javascripts/inc/permission-checkbox.js @@ -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"); + } + }); }); \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_privilege_user.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_privilege_user.html.erb index 347b15b25..7a7725f4b 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_privilege_user.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_privilege_user.html.erb @@ -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) -%> + +
+
+
+ +
+
+ <% if user.avatar? %> + <%= image_tag(user.avatar.thumb.url,:class => "member-img") %> + <% else %> + <%= image_tag "person.png",:class => "member-img" %> + <% end %> +
+ <%= 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" -%> +
+
+ <% end -%> <% end -%> \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb index 251d83462..cf5cf13c9 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb @@ -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) %>