function email(elid){
$('.mailDetail').hide();
$('.mailAddressee').hide();
//$('.send').hide();
$("#html_"+elid).show();
$("#client_"+elid).show();
//$("#send_"+elid).show();
}
function tabC(a,b){
$('#tab'+a).show();
$('#tab'+b).hide();
}
$(function() {
$("select[node-city]").change(function(){
var id=$(this).val();
var city=$("select[city]");
var url="/ajaxGetLv2";
$.ajax({
url:url,
type: "post",
cache: false,
dataType: "json",
data: {
lv1:id
},
global: true,
success: function(data){
var optionHtml='';
for(let i=0;i'+data.info[i]['name']+'';
console.log(data.info[i]);
}
city.html(optionHtml);
},
error:function(err){
}
});
});
$("a[node-mail]").click(function(){
$(this).attr('disabled',"true");
});
$("#natureNULL").click(function(){
if($("#natureNULL").attr("checked")=='checked'){
$("#natureNULL").val('NULL');
$("input[name='nature[]']").attr("disabled",true);
}else{
$("#natureNULL").val('');
$("input[name='nature[]']").attr("disabled",false);
}
});
$("p[id^='send_']").click(function(){
$(this).html('已发送');
});
$("input[id^='title']").keyup(function(){
$("span[name='titleHtml']").html($(this).val());
});
$("input[id^='inlineradio1']").click(function(){
$("#emailTemplate1").show();
$("#emailTemplate2").hide();
$("#emailTemplate3").hide();
});
$("input[id^='inlineradio2']").click(function(){
$("#emailTemplate1").hide();
$("#emailTemplate2").show();
$("#emailTemplate3").hide();
});
$("input[id^='inlineradio3']").click(function(){
$("#emailTemplate1").hide();
$("#emailTemplate2").hide();
$("#emailTemplate3").show();
});
$("textarea[id^='content']").keyup(function(){
$("p[name='contentHtml']").html($(this).val());
});
$("textarea[id^='content']").charCount({
allowed: 59,
warning: 10,
counterText: '剩余为'
});
})