blob: aeeb6f4f9c96998f74a4f64f513670100580b0a5 (
plain)
1
|
!function(){var c,n;c=jQuery,n={inputs:null,popInputs:null,initialize:function(){n.popInputs=c("#nova_menuchecklist-pop").find(":checkbox"),n.inputs=c("#nova_menuchecklist").find(":checkbox").change(n.checkOne).change(n.syncPop),n.isChecked()||n.checkFirst(),n.syncPop()},syncPop:function(){n.popInputs.each((function(){var n=c(this);n.prop("checked",c("#in-nova_menu-"+n.val()).is(":checked"))}))},isChecked:function(){return n.inputs.is(":checked")},checkFirst:function(){n.inputs.first().prop("checked",!0)},checkOne:function(){return c(this).is(":checked")?n.inputs.not(this).prop("checked",!1):c(this).closest("#nova_menuchecklist").find(":checked").length>0?c(this).prop("checked",!1):n.checkFirst()}},c(n.initialize)}();
|