| 1 |
jQuery(document).ready(function(){ |
| 2 |
if(jQuery(".uam_hide_page:checked").val() == "true"){ |
| 3 |
jQuery("#uam_page_settings").css("display","none"); |
| 4 |
jQuery(this).toggleClass("active"); |
| 5 |
} |
| 6 |
|
| 7 |
jQuery(".uam_hide_page").change(function(){ |
| 8 |
jQuery("#uam_page_settings").slideToggle("slow"); |
| 9 |
jQuery(this).toggleClass("active"); |
| 10 |
}); |
| 11 |
|
| 12 |
if(jQuery(".uam_hide_post:checked").val() == "true"){ |
| 13 |
jQuery("#uam_post_settings").css("display","none"); |
| 14 |
jQuery(this).toggleClass("active"); |
| 15 |
} |
| 16 |
|
| 17 |
jQuery(".uam_hide_post").change(function(){ |
| 18 |
jQuery("#uam_post_settings").slideToggle("slow"); |
| 19 |
jQuery(this).toggleClass("active"); |
| 20 |
}); |
| 21 |
|
| 22 |
if(jQuery(".uam_lock_file:checked").val() == "false"){ |
| 23 |
jQuery("#uam_file_settings").css("display","none"); |
| 24 |
jQuery(this).toggleClass("active"); |
| 25 |
} |
| 26 |
|
| 27 |
jQuery(".uam_lock_file").change(function(){ |
| 28 |
jQuery("#uam_file_settings").slideToggle("slow"); |
| 29 |
jQuery(this).toggleClass("active"); |
| 30 |
}); |
| 31 |
|
| 32 |
jQuery(".uam_info_content").css("display","none"); |
| 33 |
|
| 34 |
jQuery("a.uam_info_link").click(function(){ |
| 35 |
jQuery(this).next().slideToggle("slow"); |
| 36 |
jQuery(this).next().toggleClass("expand_active"); |
| 37 |
jQuery(this).next().toggleClass("expand_deactive"); |
| 38 |
if(jQuery(this).parent().parent().children().children(".expand_deactive").size() == 0) |
| 39 |
{ |
| 40 |
jQuery("a.uam_info_link_all").text("collaps all"); |
| 41 |
jQuery("a.uam_info_link_all").addClass("active"); |
| 42 |
} |
| 43 |
if(jQuery(this).parent().parent().children().children(".expand_active").size() == 0) |
| 44 |
{ |
| 45 |
jQuery("a.uam_info_link_all").text("expand all"); |
| 46 |
jQuery("a.uam_info_link_all").removeClass("active"); |
| 47 |
} |
| 48 |
}); |
| 49 |
|
| 50 |
jQuery("a.uam_info_link_all").click(function(){ |
| 51 |
if(jQuery(this).hasClass("active")) |
| 52 |
{ |
| 53 |
jQuery(this).parent().parent().children().children(".expand_active").slideToggle("slow"); |
| 54 |
jQuery(this).parent().parent().children().children(".expand_active").toggleClass("expand_deactive"); |
| 55 |
jQuery(this).parent().parent().children().children(".expand_active").toggleClass("expand_active"); |
| 56 |
jQuery(this).text("expand all"); |
| 57 |
} |
| 58 |
else |
| 59 |
{ |
| 60 |
jQuery(this).parent().parent().children().children(".expand_deactive").slideToggle("slow"); |
| 61 |
jQuery(this).parent().parent().children().children(".expand_deactive").toggleClass("expand_active"); |
| 62 |
jQuery(this).parent().parent().children().children(".expand_deactive").toggleClass("expand_deactive"); |
| 63 |
jQuery(this).text("collaps all"); |
| 64 |
} |
| 65 |
|
| 66 |
jQuery(this).toggleClass("active"); |
| 67 |
}); |
| 68 |
|
| 69 |
jQuery(".uma_user_access_group_from").css("display","none"); |
| 70 |
|
| 71 |
jQuery(".uma_user_access_group").click(function(){ |
| 72 |
jQuery(this).next().slideToggle("slow"); |
| 73 |
jQuery(this).next().toggleClass("active"); |
| 74 |
}); |
| 75 |
|
| 76 |
jQuery(".uam_group_info").css("display","none"); |
| 77 |
|
| 78 |
jQuery(".uam_group_info_link").click(function(){ |
| 79 |
jQuery(this).parent().next().slideToggle("slow"); |
| 80 |
jQuery(this).parent().next().toggleClass("active"); |
| 81 |
}); |
| 82 |
|
| 83 |
jQuery(".uam_group_lock_info").css("display","none"); |
| 84 |
|
| 85 |
jQuery(".uam_group_lock_info_link").click(function(){ |
| 86 |
jQuery(this).parent().next().next().slideToggle("slow"); |
| 87 |
jQuery(this).parent().next().next().toggleClass("active"); |
| 88 |
}); |
| 89 |
|
| 90 |
jQuery(".uam_group_stuff").css("display","none"); |
| 91 |
|
| 92 |
jQuery(".uam_group_stuff_link").click(function(){ |
| 93 |
jQuery(this).parent().parent().next().children().slideToggle("slow"); |
| 94 |
jQuery(this).parent().parent().next().children().toggleClass("active"); |
| 95 |
}); |
| 96 |
|
| 97 |
function disable_childs(object) |
| 98 |
{ |
| 99 |
if(jQuery(object).children("input:checked").length == 0) |
| 100 |
{ |
| 101 |
jQuery(object).next(".uam_group_stuff_child").children("li").removeAttr("disabled"); |
| 102 |
jQuery(object).next(".uam_group_stuff_child").children("li").children().removeAttr("disabled"); |
| 103 |
jQuery(object).next(".uam_group_stuff_child").children("li").children("input").removeAttr("checked"); |
| 104 |
|
| 105 |
if(jQuery(object).next(".uam_group_stuff_child").children("ul").children().length != 0) |
| 106 |
{ |
| 107 |
new_obj = jQuery(object).next(".uam_group_stuff_child").children(); |
| 108 |
disable_childs(new_obj); |
| 109 |
} |
| 110 |
} |
| 111 |
else |
| 112 |
{ |
| 113 |
jQuery(object).next(".uam_group_stuff_child").children("li").attr("disabled","disabled"); |
| 114 |
jQuery(object).next(".uam_group_stuff_child").children("li").children().attr("disabled","disabled"); |
| 115 |
jQuery(object).next(".uam_group_stuff_child").children("li").children("input").attr("checked","checked"); |
| 116 |
|
| 117 |
if(jQuery(object).next(".uam_group_stuff_child").children("ul").children().length != 0) |
| 118 |
{ |
| 119 |
new_obj = jQuery(object).next(".uam_group_stuff_child").children(); |
| 120 |
disable_childs(new_obj); |
| 121 |
} |
| 122 |
} |
| 123 |
} |
| 124 |
|
| 125 |
if(jQuery("#uam_set_lock_recursive").val() == "true") |
| 126 |
{ |
| 127 |
var allGroupStuff = jQuery(".uam_group_stuff li"); |
| 128 |
|
| 129 |
for(var i = 0; i <= allGroupStuff.length; i++) |
| 130 |
{ |
| 131 |
if(jQuery(allGroupStuff[i]).children("input:checked").length != 0 && jQuery(allGroupStuff[i]).next(".uam_group_stuff_child").length != 0) |
| 132 |
disable_childs(allGroupStuff[i]); |
| 133 |
} |
| 134 |
|
| 135 |
jQuery(".uam_group_stuff li").click(function(){ |
| 136 |
disable_childs(this); |
| 137 |
}); |
| 138 |
} |
| 139 |
}); |