var coverId="#picTextCover";(function($){if(typeof $.mk=="undefined"){$.mk={}}if(typeof $.mk.post=="undefined"){$.mk.post={}}$.mk.post.popDelPost=function(delType,postId,wKey){var param=$.param({delType:delType,postId:postId,wKey:wKey});$.mokoDialog({url:"/jsps/post/PostDel.jsp?"+param})};$.mk.post.gourlBack=function(classId,curPage,wKey){if(classId!=""&&curPage!=""){$("#BackCareer").attr("action","/post/"+wKey+"/category/"+classId+"/"+curPage+".html")}else{if(curPage!=""){$("#BackCareer").attr("action","/post/"+wKey+"/list.html")}}$("#BackCareer").submit()};var topNum;$.mk.post.ManagePostInit=function(topCount){topNum=topCount};$.mk.post.checkTop=function(obj,objIsPub){if($("#"+objIsPub).val()!="T"){alert("已设置隐私的展示无法设置为置顶或者代表展示");obj.checked=false;return}if(obj.checked){if(topNum>=4){alert("只能有4个置顶展示");obj.checked=false}else{topNum++}}else{topNum--}var id=obj.id.split("_")[1];_setPostUpdateStr(id)};$.mk.post.checkTopPub=function(obj){var flag=false;var indexId=obj.id.split("_")[1];if(obj.value!="T"){var newPostObj=document.getElementById("newPost_"+indexId);if($("#top_"+indexId).prop("checked")){topNum--;flag=true;$("#top_"+indexId).prop("checked",false)}if($("#newPost_"+indexId).prop("checked")){flag=true;$("#newPost_"+indexId).prop("checked",false)}if(flag){alert("置顶或代表作将自动取消!")}}_setPostUpdateStr(indexId)};var isPostClassShow=false;$.mk.post.popPostClass=function(postId,index){if($("#postClass").size()>0){$("#postClass").remove();return false}var pos=jQuery1.getElementPos("className"+index);var x=pos.x;var y=pos.y+20;var pop_postClassHtml="<div id='postClass' style='position:absolute;z-index:1000000;left:"+x+"px;top:"+y+"px;border:1px solid;background:#ffffff;padding:10px;border:1px solid #bfbfbf;min-width:200px; min-height:100px '>";var jsonPostClass=eval("("+$("#postClassStr").val()+")");for(i=0;i<jsonPostClass.count;i++){var classId=jsonPostClass.postClassList[i].id;var className=jsonPostClass.postClassList[i].className;pop_postClassHtml+='<div id="'+classId+"\" onmouseover=\"this.style.backgroundColor='#ff0099';this.style.color='#fff';return true;\" onmouseout=\"this.style.backgroundColor='white';this.style.color='#666';\" onclick=\"jQuery1.mk.post.setManagePostClass("+postId+","+classId+","+index+')" style="cursor:pointer; margin-top:5px;padding:0px 5px;">'+className+"</div>"}pop_postClassHtml+="</div>";$(document.body).append(pop_postClassHtml);isPostClassShow=false;$(document).bind("click",_popPostClass_hide)};$.mk.post.setManagePostClass=function(postId,classId,index){if(classId!=""&&postId!=""){var className=$("#"+classId).html();$("#hidPostClassStr").val($("#hidPostClassStr").val()+postId+","+classId+":");$("#className"+index).attr("title",className);if(className.length>8){className=className.substring(0,8)+"..."}$("#className"+index).text(className)}};$.mk.post.next=function(){var title=$("#postTitle").val();var $date=$("#calendar");if($date.size()>0&&$.trim($date.val())==""){alert("请选择发生时间");return}if($.trim(title)==""){alert("请输入标题！");$("#postTitle").focus();return}if(jQuery1.mk.common.checkTextModualValue()){return}if(title.length>22){$("#coverTitle").val(title.substring(0,22));$("#textNum").html(0)}else{$("#coverTitle").val(title);$("#textNum").html(22-title.length)}$("#cover_text").val($("#postTitle").val());$("#project_post_content").hide();$("#cover").show()};$.mk.post.prev=function(){$("#project_post_content").show();$("#cover").hide()};$.mk.post.coverType=function(type){if(type=="picText"){coverId="#picTextCover";$("#picTextCover").show();$("#picCover").hide();$("#textCover").hide();$("#picTextLi").attr("class","l alive");$("#picLi").attr("class","l weight700");$(coverId).find(".imgcutbox").find(".boximg").remove();$(coverId).find("#zoom_pic_text").attr("src",mokosimg+"/images/n.gif");$("#cover_text_Pic")[0].reset()}else{if(type=="pic"){coverId="#picCover";$("#picTextCover").hide();$("#picCover").show();$("#textCover").hide();$("#picTextLi").attr("class","l weight700");$("#picLi").attr("class","l alive");$(coverId).find(".imgcutbox").find(".boximg").remove();$(coverId).find("#zoom_pic").attr("src",mokosimg+"/images/n.gif");$("#cover_Pic")[0].reset()}}$("#coverType").val(type)};$.mk.post.changeImgSize=function(img){var newImage=new Image();newImage.onload=function(){_resize(img,newImage.width,newImage.height,100,100)};newImage.src=img.src};var _resize=function(img,w,h,width,height){var image=new Image();image.src=img.src;if((w/width)>(h/height)){image.width=width;image.height=Math.round(h*width/w)}else{image.height=height;image.width=Math.round(w*height/h)}img.width=image.width;img.height=image.height};var weblogPostClassNumber;var weblogPostClassAllCount;$.mk.post.popWeblogpostClassManage=function(strUrl){$.mokoDialog({url:strUrl+"&random="+Math.random(),initFn:function(){_postClassInit($("#classList").val()-1)}})};$.mk.post.addNewWeblogPostClass=function(){if(weblogPostClassAllCount>=8){alert("抱歉，最多只能创建9个分类！");return}var newClassName=$.trim($("#newClassName").val());if(newClassName==""){alert("请填写分类名称！");return}if(newClassName.indexOf("<")!=-1||newClassName.indexOf(">")!=-1||newClassName.indexOf('"')!=-1){alert("内容中含有非法字符");return}var showNewClassStr='<li id="weblogPostClassDiv_'+weblogPostClassNumber+'" name="postClassName"><p id="weblogPostClass'+weblogPostClassNumber+'" class="list gC"><span><a class="mC hU" href="javascript:void(0);" onclick="jQuery1.mk.post.editWeblogPostClass('+weblogPostClassNumber+');return false;" hidefocus="true" >编辑</a><a class="gmC hU" href="javascript:void(0)" onclick="jQuery1.mk.post.delWeblogPostClass('+weblogPostClassNumber+');return false;">删除</a></span><span id="weblogPostClassSpan'+weblogPostClassNumber+'" class="name">'+newClassName+'<input type="hidden" name="weblogPostClassIds" id="weblogPostClassHiddenId'+weblogPostClassNumber+'" value="0" /><input type="hidden" name="weblogPostClassNames" id="weblogPostClassHiddenName'+weblogPostClassNumber+'" value="'+newClassName+'" /></span><img id="classImg'+weblogPostClassNumber+'" class="arrow10" src="'+mokosimg+'/images/n.gif" title="向上一个排序" onclick="jQuery1.mk.post.moveupSort('+weblogPostClassNumber+');return false;" ';if(weblogPostClassAllCount==0){showNewClassStr+='style="display:none;"'}showNewClassStr+='/></p><p class="edit" id="weblogPostClassEdit'+weblogPostClassNumber+'" style="display:none;"><input id="weblogPostClassInput'+weblogPostClassNumber+'" class="bd gC" type="text" value="'+newClassName+'" maxlength="30" /><a class="mC hU" href="javascript:void(0);"  onclick="jQuery1.mk.post.editWeblogPostClassOper('+weblogPostClassNumber+', \'exec\');return false;" hidefocus="true" >确定</a><a class="gmC hU" href="javascript:void(0);" onclick="jQuery1.mk.post.editWeblogPostClassOper('+weblogPostClassNumber+', \'cancel\');return false;" hidefocus="true" >取消</a></p></li>';$("#default_li").before(showNewClassStr);$("#newClassName").val("");weblogPostClassNumber++;weblogPostClassAllCount++;_checkClassElement();_handleIEhasLayout()};$.mk.post.editWeblogPostClass=function(weblogPostClassIndex){$("#weblogPostClass"+weblogPostClassIndex).hide();$("#weblogPostClassEdit"+weblogPostClassIndex).show();$("#btnCreateClass").attr("disabled",true)};$.mk.post.delWeblogPostClass=function(weblogPostClassIndex){if(!confirm("删除后该分类中的展示将移至我的生活照中，确定要删除吗？")){return}weblogPostClassAllCount--;$("#weblogPostClassDiv_"+weblogPostClassIndex).remove();_checkClassElement();_handleIEhasLayout()};$.mk.post.editWeblogPostClassOper=function(weblogPostClassIndex,type){if(type=="exec"){var weblogPostClassName=$.trim($("#weblogPostClassInput"+weblogPostClassIndex).val());if(weblogPostClassName==""){alert("请填写分类名称！");return}if(weblogPostClassName.indexOf("<")!=-1||weblogPostClassName.indexOf(">")!=-1||weblogPostClassName.indexOf('"')!=-1){alert("内容中含有非法字符");return}$("#weblogPostClassSpan"+weblogPostClassIndex).html(weblogPostClassName);$("#weblogPostClassHiddenName"+weblogPostClassIndex).val(weblogPostClassName)}$("#weblogPostClass"+weblogPostClassIndex).show();$("#weblogPostClassEdit"+weblogPostClassIndex).hide();$("#btnCreateClass").attr("disabled",false)};$.mk.post.moveupSort=function(currentImgIndex){var index=0;var currentNode=$("#weblogPostClassDiv_"+currentImgIndex);$("#weblogPostClassList").find("li").each(function(i){if($(this).is(currentNode)){index=i;return}});var beforeIndex=0;if(index==0){return}else{beforeIndex=index-1}if(beforeIndex<=0){$("#classImg"+currentNode.prev().attr("id").split("_")[1]).css({display:"inline"});$("#classImg"+currentImgIndex).hide()}if(currentNode.prev()){currentNode.insertBefore(currentNode.prev())}};$.mk.post.saveWeblogPostClass=function(){$.ajax({url:"/weblogPostUpdate|saveWeblogPostClass.action",type:"post",data:$("#weblogPostClassForm").serialize(),success:function(xmlhttp){if(parseInt($("#operateType").val())==0){$.reload()}else{$("#weblogPostClassDiv").html(xmlhttp);$.mokoDialog.close()}}})};$.mk.post.savePost=function(){if($.mk.post.coverCropSet("coverText")){return}if($("#classID").val()==0){alert("请选择展示分类!");return}if($("#postClassId").val()==-1){alert("请选择展示内容分类。");return}if($("#addPostJobBlock").css("display")=="none"&&_checkPostJobInput()==false){alert("请输入幕后职业名单。");return}tag=true;$("input[name='setSyncTypes']:checkbox:checked").each(function(index,e){if(!$.mk.bd.checkToken(e)){tag=false;return false}});if(!tag){return}$("#syncTypesDiv").empty();$("input[name='setSyncTypes']:checkbox:checked").each(function(index,e){$("#syncTypesDiv").append('<input type="hidden" name="syncTypes['+index+']" value="'+$(e).val()+'" />')});$("#postIsPub").val($("input[name='setPostIsPub']:radio:checked").val());$("#postStyle").val($("input[name='setPostStyle']:radio:checked").val());$("#postClassID").val($("#classID").val());$("#postContentClassId").val($("#postClassId").val());$("#p0_uploadServer").val($("#uploadServerName").val());$("#p1_uploadServer").val($("#uploadServerName").val());_convertPostJobInput();if(jQuery1.mk.common.setValueBeforeSubmit("post")){jQuery1.mk.upload.cancelUpload();$("#saveNewPost").submit();$("#addPost").attr("disabled",true)}};$.mk.post.coverCropSet=function(coverTextId){var coverType=$("#coverType").val();var coverText="";if(coverType=="text"){coverText=$.trim($("#cover_text").val());if(coverText==null||coverText.length==0){alert("请输入封面文字!");return true}if(coverText.length>100){coverText=coverText.substring(0,100)}}else{var bimg=$(coverId).find(".boximg")[0],info,s=[];if(bimg){info=bimg.info();for(var i in info){s.push(info[i])}$("#times").val(s[0]);$("#x1").val(parseInt(s[1]));$("#y1").val(parseInt(s[2]));$("#x2").val(parseInt(s[3]));$("#y2").val(parseInt(s[4]))}else{alert("请上传图片");return true}if($("#coverTitle").size()!=0&&coverType=="picText"){coverText=$.trim($("#coverTitle").val());if(coverText.length<=0){alert("封面文字不可以为空!");return true}}}$("#"+coverTextId).val(coverText);return false};$.mk.post.saveUpdateCover=function(){if($.mk.post.coverCropSet("coverText")){return}jQuery1.mk.upload.cancelUpload();$("#p0_uploadServer").val($("#uploadServerName").val());$("#savePostCover").submit();$("#btnSave").attr("disabled",true)};$.mk.post.saveUpdatePostItem=function(){if(jQuery1.mk.common.checkTextModualValue()){return}var title=$("#postTitle").val();if($.trim(title)==""){alert("请输入标题！");$("#postTitle").focus();return}if($("input[name='setPostStyle']").length!=0){var postStyle=$("input[name='setPostStyle']:radio:checked").val();if(postStyle!=undefined){$("#postStyle").val(postStyle)}else{alert("请选择一种内容来源。");return}}if($("#addPostJobBlock").css("display")=="none"&&_checkPostJobInput()==false){alert("请输入幕后职业名单。");return}var postIsPubs=$("input[name='setPostIsPub']:radio:checked").val();$("#postIsPub").val(postIsPubs);$("#postClassID").val($("#classID").val());$("#postContentClassId").val($("#postClassId").val());$("#p0_uploadServer").val($("#uploadServerName").val());_convertPostJobInput();if(jQuery1.mk.common.setValueBeforeSubmit("post")){$("#savPostItem").submit();$("#updatePost").attr("disabled",true)}};$.mk.post.showPicFacePost=function(indexId,url,classID,lookState,postAuthorId,wKey,showCoverType,isShowPostTime){$.ajax({type:"post",url:url,data:{classID:classID,lookState:lookState,postAuthorId:postAuthorId,wKey:wKey,showCoverType:showCoverType,isShowPostTime:isShowPostTime},success:function(xmlhttp){$("#coverShowSmall_"+indexId).html(xmlhttp);$("#showAll_"+indexId).hide();$("#coverShowSmall_"+indexId).show()}})};$.mk.post.postCollection=function(postId,collectionCount){$("#shoucangBtn").attr("disabled",true);$.ajax({url:"/postCollection|postCollectionCheck.action",type:"post",data:{postId:postId},success:function(responseTag){if(responseTag==1){var param=$.param({postId:postId,collectionCount:collectionCount});$.mokoDialog({url:"/jsps/postcollection/PostCollectionConfirmView.jsp?"+param})}else{if(responseTag==0){$.mokoDialog({url:"/jsps/postcollection/PostCollectionAlertView.jsp"})}}$("#shoucangBtn").removeAttr("disabled")}})};$.mk.post.postNoCollection=function(){$.mokoDialog({url:"/jsps/postcollection/PostNoCollectionView.jsp"})};$.mk.post.postCollectionAdd=function(postId,collectionCount){$.mokoDialog.close();$.ajax({url:"/postCollection|postCollectionAdd.action",type:"post",data:{postId:postId},success:function(){$.mokoDialog({url:"/jsps/postcollection/PostCollectionSuccessView.jsp",initFn:function(){var count=$("#"+collectionCount).text();$("#"+collectionCount).text(parseInt(count)+1)}})}})};$.mk.post.canclePostCollection=function(postId,divId,curPage){if(!confirm("确定要取消收藏吗?")){return}$("#"+divId).load("/postCollection|postCollectionCancel.action",{postId:postId,curPage:curPage})};$.mk.post.delPagePost=function(divId,curPage){if(!confirm("确定要取消本页收藏吗?")){return}$.ajax({type:"post",url:"/postCollection|postCollectionPageCancel.action",data:$("#collenctionPostForm").serialize(),success:function(response){$("#"+divId).html(response)}})};$.mk.post.addPostJob=function(objHidId,objShowId,userId){$("#"+objHidId).hide();$("#"+objShowId).show();if($("li[name='liPostJobItem']").size()==0){$.mk.post.addPostJobItem(userId)}};$.mk.post.addPostJobItem=function(userId){var jobCountIndex=$("input[name='hidPostJobCount']").size();$("#addPostJob").before('<li id="addPostJob_'+jobCountIndex+'" class="clearfix" name="liPostJobItem"></li>');$("#addPostJob_"+jobCountIndex).load("/jsps/post/PostJobSmallView.jsp",{userId:userId,index:jobCountIndex})};$.mk.post.delPostJobItem=function(liId){if(confirm("确定删除吗？")){$("#"+liId).remove()}if($("li[name='liPostJobItem']").size()==0){$("#divPostJobBlock").hide();$("#addPostJobBlock").show()}};$.mk.post.postGeiLiAdd=function(postId){if(postId==""||postId<=0){return}$.ajax({type:"post",url:"/weblogPostShowList|postGeiLiAddAjax.action",data:{postId:postId},success:function(response){if(response=="dataErr"){$("#btnPostGeiLi").attr("title","已经给过力啦");$("#btnPostGeiLi").attr("class","sBt_2 mC")}else{var count=parseInt($("#btnPostGeiLi").text());$("#btnPostGeiLi").text(count+1);$("#btnPostGeiLi").attr("title","明儿再给力吧");$("#btnPostGeiLi").attr("class","sBt_2 mC");$("#btnPostGeiLi").attr("onclick","");$.mokoDialog({url:"/jsps/post/PostGeiLiSuccess.jsp"})}$("#btnPostGeiLi").attr("disabled","disabled")}})};$.mk.post.zuoYouPostShow=function(type,postId,curPage,totalPage,userId,lookState,wKey){if(type=="next"){if(curPage+1<=totalPage){curPage++}else{return}}else{if(curPage>1&&curPage<=totalPage){curPage--}else{return}}$.ajax({url:"/weblogPostShowList|zuoYouPostListAjax.action",type:"post",data:{curPage:curPage,postAuthorId:userId,lookState:lookState,zuoYouPostTotalPage:totalPage,wKey:wKey,postId:postId},success:function(response){$("#zuoYouPostListDiv").html(response)}})};$.mk.post.callBackPostItem=function(picsJson,errMsg){$.mk.upload.showUploadErrMsg(errMsg);if(picsJson==null||picsJson.count<=0){return}var json=eval("("+picsJson+")");var src=new Array();for(var i=0;i<json.count;i++){src[i]=json.pic[i].picName}_postItemPrepare(src)};$.mk.post.showPostItemPic=function(picsJson){var picNames=new Array();for(i=0;i<picsJson.pic.length;i++){picNames.push(picsJson.pic[i].picName)}_postItemPrepare(picNames)};$.mk.post.showPostCoverPic=function(picsJson){$.mk.crop.loadCoverPic(picsJson.pic[0].picName,picsJson.pic[0].visitPath,"post")};$.mk.post.pre_textPic=function(uploadType,picDivID,zoom,picNameID,progressId,coverTitleId){var title=$.trim($("#"+coverTitleId).val());if(title.length<=0){alert("封面文字不可以为空!");return}$.mk.crop.pre_pic(uploadType,picDivID,zoom,picNameID,progressId,"picText",title)};$.mk.post.callPhoto=function(coverType){var imgList='<ul id="photo_list" class="orderPicBox clearfix">';$(".simple").each(function(i){imgList+='<li id="item_'+i+'" class="l" style="position: relative;"><img width="10" height="10" onload="jQuery1.mk.post.changeImgSize(this)" src="'+$(this).find(".borderOn").attr("src")+'" name="'+$(this).find("input[name='p[0].src']").val()+'" style="cursor: pointer;"/></li>'});imgList+="</ul>";var content='<div id="loadImage">'+imgList+'<br/><div class="button" align="center"><input class="buttonM_1 font14 mainColor weight700" type="button" onfocus="this.blur()" onclick="jQuery1.mokoDialog.close();" value="关 闭"/></div></div>';$.mokoDialog({content:content,fixed:false,follow:$(coverId).find("#alreadyLoadImages")[0]});try{$(".dialogbg").remove();$("#loadImage").attr("class","orderPic floated");$("#loadImage").find("img").each(function(){this.onMouserOver="this.className='l alive'";this.onMouserOut="this.className='l'";this.style.cursor="pointer";$(this).bind("click",function(event){$.mokoDialog.close();var picName=this.name;if(coverType=="post_cover"){$.mk.crop.loadCoverPic(picName,"/"+picName,"post")}else{if(coverType=="project_cover"){$.mk.crop.loadCoverPic(picName,"/"+picName,"project")}}})})}catch(e){}};$.mk.post.showVideoView=function(c1,video,divName){if(c1.indexOf("xiyou.cntv.cn")!=-1){var url=c1.substring(0,c1.indexOf(".swf"));url="http://static.xiyou.cntv.cn/player/moko.swf?VideoId="+url.substring(url.lastIndexOf("/")+1)+"&type=video";var fo=new SWFObject(url,"moko_player",480,400,"9.0.115","#ffffff");fo.addParam("quality","high");fo.addParam("menu","false");fo.addParam("wmode","transparent");fo.addParam("allowFullScreen","true");fo.addParam("allowScriptAccess","always");fo.write(divName)}else{$("#"+divName).html(video)}};$.mk.post.coverEditCallPhoto=function(uploadType){$.ajax({url:"/commonAction|getUploadUrl.action",type:"get",dataType:"jsonp",async:false,success:function(response){if(response=="dataErr"||response==""){alert("数据错误,请刷新页面重新操作！");return}else{$("#webServerName").val(response.webserver)}$("#uploadServerName").val(response.uploadserver);$.mk.post.callPhoto(uploadType)}})};_postItemPrepare=function(src){var $param=$.param({"p[0].uploadType":"post_item","p[0].src":src,"p[0].uploadServer":$("#uploadServerName").val()},true);$.ajax({type:"POST",url:"/uploadPre|postItem_prepare.action",data:$param,dataType:"json",success:function(data){if(data.code!="1"){alert("图片上传出错!");return}$.mk.upload.loadPicItme(data)}})};_checkClassElement=function(){var classList=$("li[name='postClassName']");if(classList.length>0){var divID=classList[0].id;var index=divID.indexOf("_")+1;var id=divID.substring(index);$("#classImg"+id).hide()}};_postClassInit=function(postClassNumber){weblogPostClassNumber=postClassNumber;weblogPostClassAllCount=postClassNumber};_popPostClass_hide=function(event){if(isPostClassShow){if($("#postClass").size()>0){$("#postClass").remove()}$(document).unbind("click",_popPostClass_hide)}isPostClassShow=true};_setPostUpdateStr=function(id){var updateStr=$("#updateStr").val();var tt=";"+id+",";var index=updateStr.indexOf(tt);if(index>=0){var str1=updateStr.substr(0,index);var str2=updateStr.substr(index+tt.length+5);updateStr=str1+str2}var tValue="F";var nValue="F";var pValue=$("#pub_"+id).val();if($("#top_"+id).prop("checked")){tValue="T"}if($("#newPost_"+id).prop("checked")){nValue="T"}updateStr+=";"+id+","+tValue+","+pValue+","+nValue;$("#updateStr").val(updateStr)};_checkPostJobInput=function(){var jobName;var postJobFlag=true;$("li[name='liPostJobItem']").each(function(i){if(postJobFlag){jobName=$.trim($("input[name='jobName']")[i].value);if(jobName==""||jobName=="填写职业"){postJobFlag=false;return}if(postJobFlag){var jobUserIdItem=$($("div[name='jobUserIdItem']")[i]).find("input[name='jobUserIdList']");if(jobUserIdItem.size()==0){postJobFlag=false;return}}}});return postJobFlag};_convertPostJobInput=function(){var jobName;var userId;$("li[name='liPostJobItem']").each(function(i){jobName=$.trim($("input[name='jobName']")[i].value);if($("#weblogPostJobBeanList["+i+"].jobName").size()!=0){$("#weblogPostJobBeanList["+i+"].jobName").remove()}$("#postContentClassId").after('<input type="hidden" id="weblogPostJobBeanList['+i+'].jobName" name="weblogPostJobBeanList['+i+'].jobName" value="'+jobName+'" />');$($("div[name='jobUserIdItem']")[i]).find("input[name='jobUserIdList']").each(function(j){userId=this.value;if($("#weblogPostJobBeanList["+i+"]["+j+"].jobUserIdList").size()!=0){$("#weblogPostJobBeanList["+i+"]["+j+"].jobUserIdList").remove()}$("#postContentClassId").after('<input id="weblogPostJobBeanList['+i+"]["+j+'].jobUserIdList" type="hidden" name="weblogPostJobBeanList['+i+'].jobUserIdList" value="'+userId+'" />')})})};var _handleIEhasLayout=function(){document.body.style.zoom=1.1;document.body.style.zoom=""};$.mk.post.changeSyncTypes=function(){$obj=$("#setPostIsPub-hidden");if($obj.prop("checked")){$("input[name='setSyncTypes']:checkbox").attr({checked:false,disabled:true})}if(!$obj.prop("checked")){_getSyncTypes()}};_getSyncTypes=function(){$.ajax({url:"/weblogPostUpdate|getSyncTypesAjax.action",type:"get",async:false,success:function(response){$("input[name='setSyncTypes']:checkbox").attr("disabled",false);if(response=="dataErr"){alert("数据错误!");return}var jsonObj=eval("("+response+")");if(jsonObj.isSyncToQzone){$("#sync-qzone").attr("checked",true)}if(jsonObj.isSyncToQWeibo){$("#sync-qq-weibo").attr("checked",true)}if(jsonObj.isSyncToWeibo){$("#sync-sina-weibo").attr("checked",true)}}})}})(jQuery1);jQuery1(function(){jQuery1("textarea[commentTextArea=commentContentTextarea]").characterLimit({substring:true})});
