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) -%> + +