Files
EasySoft-ZenTaoPMS/module/webhook/js/create.js
2019-11-19 15:39:23 +08:00

42 lines
1.2 KiB
JavaScript

$(function()
{
$('#type').change(function()
{
var type = $(this).val();
$('#sendTypeTR').toggle(type != 'dingding' && type != 'dingapi');
$('#secretTR').toggle(type == 'dingding');
$('#urlTR').toggle(type != 'dingapi');
$('.dingapiTR').toggle(type == 'dingapi');
$('#paramsTR').toggle(type != 'bearychat' && type != 'dingding' && type != 'dingapi' && type != 'weixin');
$('#urlNote').html(urlNote[type]);
});
$('.objectType').click(function()
{
if($(this).prop('checked'))
{
$(this).parent().parent().next().find('input[type=checkbox]').attr('checked', 'checked');
}
else
{
$(this).parent().parent().next().find('input[type=checkbox]').removeAttr('checked');
}
});
$('#allParams, #allActions').click(function()
{
if($(this).prop('checked'))
{
$(this).parents('tr').find('input[type=checkbox]').attr('checked', 'checked');
}
else
{
$(this).parents('tr').find('input[type=checkbox][disabled!=disabled]').removeAttr('checked');
}
});
$('#name').focus();
$('#type').change();
$('#paramstext').attr('disabled', 'disabled');
});