function add_article_pic(a,b,c,d){var m,n,e=$("#article_pic_count").val(),f=$("#espcms_article_main_album_picname_title").val(),g=$("#espcms_article_main_album_picname_validation_msg").val(),h=$("#espcms_article_description_title").val(),i=$("#espcms_article_main_album_filedes_validation_msg").val(),j=a.split(","),k=b.split(","),l="";if(j.length>0)for(m=0;m<j.length;m++)e++,l=l+'<li id="photo_item_list_'+e+'"><table><tr>'+'<td class="photo_item"><div class="photo"><img src="'+k[m]+'"/><input type="hidden" name="picfile[]" value="'+j[m]+'"></div></td>'+'<td class="photo_input">'+'<div class="phto_input_title"><input type="text" name="picname[]" class="form-control" maxlength="100" data-msg-cssname="phto_input_title" data-icon-err="false" data-display-type="top" data-isvalidation="true" data-validation-maxlength="150" placeholder="'+f+'" title="'+f+'" data-validation-msg="'+g+'"/></div>'+'<div class="phto_input_content"><textarea class="form-control" style="width:100%;height:60px" name="filedes[]" maxlength="500" data-msg-cssname="phto_input_content" data-icon-err="false" data-display-type="top" data-isvalidation="true" data-validation-maxlength="500" placeholder="'+h+'" title="'+h+'" data-validation-msg="'+i+'" ></textarea></div>'+"</td>"+'<td class="photo_del"><a title="删除图片" class="del_botton file_del icon_botton"><i class="espcms_icon_fa espcms_icon_fa-trash"></i></a></td></tr></table></li>';$("#article_pic_count").val(e),n="#"+d,$(n).append(l),$("#espcms_saveInfo").espcms_formvalidation(),$(".photo_del > .file_del").click(function(){var a=$(this).parents("li");a.remove()}),$("#article_pic").sortable({revert:!1,axis:"y",opacity:.5,distance:5,cursor:"move",containment:"parent"})}function del_article_pic(){$(".photo_del > .file_del").click(function(){var a=$(this).parents("li");a.remove()}),$("#article_pic").sortable({revert:!1,axis:"y",opacity:.5,distance:5,cursor:"move",containment:"parent"})}function select_add_itme_list(a,b,c){var d,e,f,g,h,i;if(a.length<1)return!1;for($("#linkdid_botton .select_input_itme_title").hide(),d="",g=new Array,h=new Array,i=0;i<a.length;i++)a[i]["id"]&&a[i]["title"]&&(e=a[i]["id"],f=decodeURI(a[i]["title"]),d+='<li class="select_itme_id" id="select_itme_id_'+e+'" data-id="'+e+'" title="'+f+'"><span class="select_choice_remove" role="presentation" id="select_id_'+e+'" data-id="'+e+'" title="'+f+'">×</span><span><i class="espcms_icon_fa espcms_icon_fa-angle-right" aria-hidden="true"></i>'+f+"</span></li>",g.push(e),h.push(f));c?$("#linkdid_botton .select_input_itme_list_ul").append(d):$("#linkdid_botton .select_input_itme_list_ul").empty().append(d),$("#linkdid").val(g),$("#linkdid_title").val(h),$("#linkdid_botton .select_choice_remove").unbind("click").bind("click",function(){var a=$(this).attr("data-id"),b=$(this).attr("title"),c="#select_itme_id_"+a;g.remove(a),h.remove(b),$("#linkdid").val(g),$("#linkdid_title").val(h),$(c).remove(),0===g.length&&$("#linkdid_botton .select_input_itme_title").show()})}function del_select_remove(){$("#linkdid_botton .select_choice_remove").unbind("click").bind("click",function(){var a=$(this).attr("data-id"),b=$(this).attr("title"),c="#select_itme_id_"+a,d=$("#linkdid").val(),e=$("#linkdid_title").val(),f=d.split(","),g=e.split(",");f.remove(a),g.remove(b),$("#linkdid").val(f),$("#linkdid_title").val(g),$(c).remove(),0===f.length&&$("#linkdid_botton .select_input_itme_title").show()})}function select_add_vote_list(a,b,c){var d,e,f,g,h,i;if(a.length<1)return!1;for($("#votelink_botton .select_input_itme_title").hide(),d="",g=new Array,h=new Array,i=0;i<a.length;i++)a[i]["id"]&&a[i]["title"]&&(e=a[i]["id"],f=decodeURI(a[i]["title"]),d+='<li class="select_itme_id" id="select_vote_id_'+e+'" data-id="'+e+'" title="'+f+'"><span class="select_choice_remove" role="presentation" id="vote_id_'+e+'" data-id="'+e+'" title="'+f+'">×</span><span><i class="espcms_icon_fa espcms_icon_fa-angle-right" aria-hidden="true"></i>'+f+"</span></li>",g.push(e),h.push(f));c?$("#votelink_botton .select_input_itme_list_ul").append(d):$("#votelink_botton .select_input_itme_list_ul").empty().append(d),$("#votelink").val(g),$("#votelink_title").val(h),$("#votelink_botton .select_choice_remove").unbind("click").bind("click",function(){var a=$(this).attr("data-id"),b=$(this).attr("title"),c="#select_vote_id_"+a;g.remove(a),h.remove(b),$("#votelink").val(g),$("#votelink_title").val(h),$(c).remove(),0===g.length&&$("#votelink_botton .select_input_itme_title").show()})}function del_select_remove_vote(){$("#votelink_botton .select_choice_remove").unbind("click").bind("click",function(){var a=$(this).attr("data-id"),b=$(this).attr("title"),c="#select_vote_id_"+a,d=$("#votelink").val(),e=$("#votelink_title").val(),f=d.split(","),g=e.split(",");f.remove(a),g.remove(b),$("#votelink").val(f),$("#votelink_title").val(g),$(c).remove(),0===f.length&&$("#votelink_botton .select_input_itme_title").show()})}