| @@ -1,232 +1,33 @@ | ||
| 1 | 1 | jQuery(document).ready(function(){ |
| 2 | - if(jQuery(".uam_hide_page:checked").val() == "true"){ | |
| 3 | - jQuery("#uam_page_settings").css("display","none"); | |
| 2 | + //Functions for the setting page | |
| 3 | + | |
| 4 | + if(jQuery(".uam_hide_page:checked").val() == "true"){ | |
| 5 | + jQuery("#uam_page_settings").css("display", "none"); | |
| 4 | 6 | jQuery(this).toggleClass("active"); |
| 5 | 7 | } |
| 6 | 8 | |
| 7 | 9 | jQuery(".uam_hide_page").change(function(){ |
| 8 | - jQuery("#uam_page_settings").slideToggle("slow"); | |
| 10 | + jQuery("#uam_page_settings").toggle(); | |
| 9 | 11 | jQuery(this).toggleClass("active"); |
| 10 | 12 | }); |
| 11 | 13 | |
| 12 | - if(jQuery(".uam_hide_post:checked").val() == "true"){ | |
| 13 | - jQuery("#uam_post_settings").css("display","none"); | |
| 14 | + if(jQuery(".uam_hide_post:checked").val() == "true"){ | |
| 15 | + jQuery("#uam_post_settings").css("display", "none"); | |
| 14 | 16 | jQuery(this).toggleClass("active"); |
| 15 | 17 | } |
| 16 | 18 | |
| 17 | 19 | jQuery(".uam_hide_post").change(function(){ |
| 18 | - jQuery("#uam_post_settings").slideToggle("slow"); | |
| 20 | + jQuery("#uam_post_settings").toggle(); | |
| 19 | 21 | jQuery(this).toggleClass("active"); |
| 20 | 22 | }); |
| 21 | 23 | |
| 22 | - if(jQuery(".uam_lock_file:checked").val() == "false"){ | |
| 23 | - jQuery("#uam_file_settings").css("display","none"); | |
| 24 | + if(jQuery(".uam_lock_file:checked").val() == "false"){ | |
| 25 | + jQuery("#uam_file_settings").css("display", "none"); | |
| 24 | 26 | jQuery(this).toggleClass("active"); |
| 25 | 27 | } |
| 26 | 28 | |
| 27 | 29 | jQuery(".uam_lock_file").change(function(){ |
| 28 | - jQuery("#uam_file_settings").slideToggle("slow"); | |
| 30 | + jQuery("#uam_file_settings").toggle(); | |
| 29 | 31 | 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(jQuery("#TXT_COLLAPS_ALL").val()); | |
| 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(jQuery("#TXT_EXPAND_ALL").val()); | |
| 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(jQuery("#TXT_EXPAND_ALL").val()); | |
| 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(jQuery("#TXT_COLLAPS_ALL").val()); | |
| 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 | - if(jQuery(this).parent().parent().next().children().hasClass("active")) | |
| 96 | - { | |
| 97 | - jQuery(this).text(jQuery("#TXT_COLLAPS").val()); | |
| 98 | - } | |
| 99 | - else | |
| 100 | - { | |
| 101 | - jQuery(this).text(jQuery("#TXT_EXPAND").val()); | |
| 102 | - } | |
| 103 | - }); | |
| 104 | - | |
| 105 | - function disable_childs(object) | |
| 106 | - { | |
| 107 | - if(jQuery(object).children("input:checked").length == 0) | |
| 108 | - { | |
| 109 | - jQuery(object).next(".uam_group_stuff_child").children("li").removeAttr("disabled"); | |
| 110 | - jQuery(object).next(".uam_group_stuff_child").children("li").children().removeAttr("disabled"); | |
| 111 | - jQuery(object).next(".uam_group_stuff_child").children("li").children("input").removeAttr("checked"); | |
| 112 | - | |
| 113 | - if(jQuery(object).next(".uam_group_stuff_child").children("ul").children().length != 0) | |
| 114 | - { | |
| 115 | - new_obj = jQuery(object).next(".uam_group_stuff_child").children(); | |
| 116 | - disable_childs(new_obj); | |
| 117 | - } | |
| 118 | - } | |
| 119 | - else | |
| 120 | - { | |
| 121 | - jQuery(object).next(".uam_group_stuff_child").children("li").attr("disabled","disabled"); | |
| 122 | - jQuery(object).next(".uam_group_stuff_child").children("li").children().attr("disabled","disabled"); | |
| 123 | - jQuery(object).next(".uam_group_stuff_child").children("li").children("input").attr("checked","checked"); | |
| 124 | - | |
| 125 | - if(jQuery(object).next(".uam_group_stuff_child").children("ul").children().length != 0) | |
| 126 | - { | |
| 127 | - new_obj = jQuery(object).next(".uam_group_stuff_child").children(); | |
| 128 | - disable_childs(new_obj); | |
| 129 | - } | |
| 130 | - } | |
| 131 | - } | |
| 132 | - | |
| 133 | - if(jQuery("#uam_set_lock_recursive").val() == "true") | |
| 134 | - { | |
| 135 | - var allGroupStuff = jQuery(".uam_group_stuff li"); | |
| 136 | - | |
| 137 | - for(var i = 0; i <= allGroupStuff.length; i++) | |
| 138 | - { | |
| 139 | - if(jQuery(allGroupStuff[i]).children("input:checked").length != 0 && jQuery(allGroupStuff[i]).next(".uam_group_stuff_child").length != 0) | |
| 140 | - disable_childs(allGroupStuff[i]); | |
| 141 | - } | |
| 142 | - | |
| 143 | - jQuery(".uam_group_stuff li").click(function(){ | |
| 144 | - disable_childs(this); | |
| 145 | - }); | |
| 146 | - } | |
| 147 | - | |
| 148 | - var allGroupStuff = jQuery(".uam_group_stuff"); | |
| 149 | - for(var i = 0; i <= allGroupStuff.length; i++) | |
| 150 | - { | |
| 151 | - jQuery(allGroupStuff[i]).prev().find(".uam_element_count").text(jQuery(allGroupStuff[i]).find("li input:checked").length); | |
| 152 | - } | |
| 153 | - | |
| 154 | - jQuery(".uam_group_stuff, .uam_role").click(function(){ | |
| 155 | - var allGroupStuff = jQuery(".uam_group_stuff"); | |
| 156 | - for(var i = 0; i <= allGroupStuff.length; i++) | |
| 157 | - { | |
| 158 | - jQuery(allGroupStuff[i]).prev().find(".uam_element_count").text(jQuery(allGroupStuff[i]).find("li input:checked").length); | |
| 159 | - } | |
| 160 | - }); | |
| 161 | - | |
| 162 | - var allCategories = jQuery(".uam_category li"); | |
| 163 | - | |
| 164 | - for(var i = 0; i <= allCategories.length; i++) | |
| 165 | - { | |
| 166 | - if(jQuery(allCategories[i]).children("input:checked").length != 0) | |
| 167 | - { | |
| 168 | - var cur_id = jQuery(allCategories[i]).children("input").val(); | |
| 169 | - var cur_class = ".cat-"+cur_id; | |
| 170 | - | |
| 171 | - jQuery(cur_class).attr("disabled","disabled"); | |
| 172 | - jQuery(cur_class).children().attr("disabled","disabled"); | |
| 173 | - jQuery(cur_class).children("input").attr("checked","checked"); | |
| 174 | - } | |
| 175 | - } | |
| 176 | - | |
| 177 | - jQuery(".uam_role li").click(function(){ | |
| 178 | - var cur_id = jQuery(this).children("input").val(); | |
| 179 | - var cur_class = ".usercap_"+cur_id; | |
| 180 | - | |
| 181 | - if(jQuery(this).children("input:checked").length == 0) | |
| 182 | - { | |
| 183 | - jQuery(cur_class).removeAttr("disabled"); | |
| 184 | - jQuery(cur_class).children().removeAttr("disabled"); | |
| 185 | - jQuery(cur_class).children("input").removeAttr("checked"); | |
| 186 | - } | |
| 187 | - else | |
| 188 | - { | |
| 189 | - jQuery(cur_class).attr("disabled","disabled"); | |
| 190 | - jQuery(cur_class).children().attr("disabled","disabled"); | |
| 191 | - jQuery(cur_class).children("input").attr("checked","checked"); | |
| 192 | - } | |
| 193 | - | |
| 194 | - }); | |
| 195 | - | |
| 196 | - jQuery(".uam_category li").click(function(){ | |
| 197 | - | |
| 198 | - var allCategories = jQuery(".uam_category li"); | |
| 199 | - | |
| 200 | - for(var c = 0; c <= allCategories.length; c++) | |
| 201 | - { | |
| 202 | - var cur_id = jQuery(allCategories[c]).children("input").val(); | |
| 203 | - var cur_class = ".cat-"+cur_id; | |
| 204 | - | |
| 205 | - if(jQuery(allCategories[c]).children("input:checked").length == 0) | |
| 206 | - { | |
| 207 | - var checkedCategorieNames = ""; | |
| 208 | - var otherCheckedCategories = jQuery(".uam_category li").children("input:checked"); | |
| 209 | - | |
| 210 | - for(var i = 0; i <= otherCheckedCategories.length; i++) | |
| 211 | - { | |
| 212 | - var cur_id = jQuery(otherCheckedCategories[i]).val(); | |
| 213 | - if(cur_id != "") | |
| 214 | - checkedCategorieNames += ".cat-"+cur_id+", "; | |
| 215 | - } | |
| 216 | - | |
| 217 | - if(checkedCategorieNames != "") | |
| 218 | - cur_class += ":not("+checkedCategorieNames+")"; | |
| 219 | - | |
| 220 | - jQuery(cur_class).removeAttr("disabled"); | |
| 221 | - jQuery(cur_class).children().removeAttr("disabled"); | |
| 222 | - jQuery(cur_class).children("input").removeAttr("checked"); | |
| 223 | - } | |
| 224 | - else | |
| 225 | - { | |
| 226 | - jQuery(cur_class).attr("disabled","disabled"); | |
| 227 | - jQuery(cur_class).children().attr("disabled","disabled"); | |
| 228 | - jQuery(cur_class).children("input").attr("checked","checked"); | |
| 229 | - } | |
| 230 | - } | |
| 231 | 32 | }); |
| 232 | 33 | }); |