script type text javascript charset utf-8 feUserGroups echo javascript

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<script type="text/javascript" charset="utf-8">
feUserGroups = <?echo $javascript->object($feUserGroups)?>;
function check_fe_user(){
if(jQuery.inArray($('#AddFieldAddFieldGroupsId option[@selected]').val() ,feUserGroups) == -1){
$('#AddFieldFeVisible').attr('disabled', 'disabled')
} else {
$('#AddFieldFeVisible').removeAttr('disabled')
$('.fe_user').show()
}
}
$(document).ready(function() {
check_fe_user();
$('#add_addfield').bind('submit', function(){
check_fe_user();
})
$('#AddFieldAddFieldGroupsId').bind('change', function(){
check_fe_user();
})
} )
</script>