fix site structure main-enable checkboxes

This commit is contained in:
manson 2014-08-15 12:08:43 +08:00
parent 3435a7bfd3
commit 39cb82e83d
1 changed files with 5 additions and 5 deletions

View File

@ -110,22 +110,22 @@ var Items = function(){
sidePanel.on("click","#enable-menu .main-enable-parent",function(e){
if(!$(this).is(":checked")){
var parent = $(this).parent().parent();
parent.find(".main-enable-child,.main-enable-child-child").removeAttr("checked");
$(".main-enable-child[value="+ $(this).val() +"]").removeAttr("checked");
$(".main-enable-child-child[value="+ $(this).val() +"]").removeAttr("checked");
}
})
sidePanel.on("click","#enable-menu .main-enable-child",function(e){
if(!$("input[for=checkbox_for_"+ $(this).val() +"]").is(":checked")){
if(!$(".main-enable-parent[value="+ $(this).val() +"]").is(":checked")){
$(this).removeAttr("checked");
}
if(!$(this).is(":checked")){
$(this).parent().parent().parent().find(".main-enable-child-child").removeAttr("checked");
$(".main-enable-child-child[value="+ $(this).val() +"]").removeAttr("checked");
}
})
sidePanel.on("click","#enable-menu .main-enable-child-child",function(e){
if(!$("input[for=checkbox_for_child_"+ $(this).val() +"]").is(":checked")){
if(!$(".main-enable-child[value="+ $(this).val() +"]").is(":checked")){
$(this).removeAttr("checked");
}
})