50 lines
1.9 KiB
JavaScript
50 lines
1.9 KiB
JavaScript
/*--------------------------- 用户授权全选 -------------------------------*/
|
|
$("#all_member_select").live('click', function(){
|
|
if($("#all_member_select").is(':checked')){
|
|
$("input[name='member_ids[]']").attr("checked", "checked");
|
|
} else {
|
|
$("input[name='member_ids[]']").removeAttr("checked");
|
|
}
|
|
});
|
|
$("input[name='member_ids[]']").live('click', function(){
|
|
if($("input[name='member_ids[]']:checked").length == $("input[name='member_ids[]']").length){
|
|
$("#all_member_select").attr("checked", "checked");
|
|
} else{
|
|
$("#all_member_select").removeAttr("checked");
|
|
}
|
|
});
|
|
|
|
/*-------------------------- 下拉框点击事件 -------------------------------*/
|
|
$(".edu-admin-option").live("click", function(ev){
|
|
var tText = $(ev.target).html();
|
|
var tVal = $(ev.target).attr("data-val");
|
|
var $hMain = $(ev.target).parent().parent();
|
|
$hMain.find('p').html(tText + "<i class='fa fa-caret-down ml10'></i>");
|
|
$hMain.find('input').attr("value", tVal);
|
|
$(ev.target).parent().hide();
|
|
console.log($(ev.target).parent()[0]);
|
|
console.log($(ev.target).html());
|
|
console.log(tVal);
|
|
// 只有授权按钮才提交表单
|
|
var sub = ["trial_agree", "trial_cancel", "realname_agree", "realname_cancel", "occupation_agree", "occupation_cancel"];
|
|
if(sub.indexOf(tVal) >= 0){
|
|
$('#management_search_user').submit();
|
|
$hMain.find('input').attr("value", "");
|
|
}
|
|
});
|
|
|
|
/*------------------- 绑定按钮移入移除效果 --------------------------*/
|
|
$(".edu-position").live("mouseover", function(){
|
|
$(this).find('ul').show();
|
|
});
|
|
$(".edu-position").live("mouseout", function(){
|
|
$(this).find('ul').hide();
|
|
});
|
|
|
|
/*------------------------清除按钮-------------------------*/
|
|
$("#clear_contents").live("click", function(){
|
|
$("input[name='research_contents']").val("");
|
|
});
|
|
|
|
/*------------------- 锁定/删除 用户----------------------*/
|