%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/bitrix/js/socialnetwork/commentaux/
Upload File :
Create Path :
Current File : /home/bitrix/www/bitrix/js/socialnetwork/commentaux/socialnetwork.commentaux.min.js

(function(){var e=window.BX;if(e.CommentAux){return}e.CommentAux={postEventTypeList:["BLOG_POST","FORUM_TOPIC","TASK","TIMEMAN_ENTRY","TIMEMAN_REPORT","LOG_ENTRY","PHOTO_ALBUM","PHOTO_PHOTO","WIKI","LISTS_NEW_ELEMENT"],commentEventTypeList:["BLOG_COMMENT","FORUM_POST","LOG_COMMENT"]};e.CommentAux.init=function(t){e.RenderParts.init(t)};e.CommentAux.isSourcePost=function(t){return e.util.in_array(t,this.postEventTypeList)};e.CommentAux.isSourceComment=function(t){return e.util.in_array(t,this.commentEventTypeList)};e.CommentAux.getLiveText=function(t,n){var r="";if(t=="share"){if(typeof n=="object"&&n.length>0){r=e.message(n.length==1?"SONET_COMMENTAUX_JS_SHARE_TEXT":"SONET_COMMENTAUX_JS_SHARE_TEXT_1");r=r.replace("#SHARE_LIST#",this.getShareList(n))}}else if(t=="createtask"){if(typeof n=="object"&&typeof n.taskId!="undefined"&&parseInt(n.taskId)>0&&typeof n.taskName!="undefined"&&n.taskName.length>0&&typeof n.sourceEntityType!="undefined"&&n.sourceEntityType.length>0&&typeof n.sourceEntityId!="undefined"&&parseInt(n.sourceEntityId)>0){var i=this.renderEntity({ENTITY_TYPE:"task",NAME:n.taskName,LINK:"",VISIBILITY:{userId:typeof n.taskResponsibleId!="undefined"&&parseInt(n.taskResponsibleId)>0?parseInt(n.taskResponsibleId):0}});if(this.isSourcePost(n.sourceEntityType)){r=e.message("SONET_COMMENTAUX_JS_CREATETASK_POST_"+(e.type.isNotEmptyString(n.sourceEntityType)?n.sourceEntityType:"BLOG_POST")).replace("#TASK_NAME#",i).replace("#A_BEGIN#",!e.RenderParts.mobile?'<a target="_blank" href="'+(e.type.isNotEmptyString(n.sourceEntityLink)?n.sourceEntityLink:"")+'">':"").replace("#A_END#",!e.RenderParts.mobile?"</a>":"")}else if(this.isSourceComment(n.sourceEntityType)){r=e.message("SONET_COMMENTAUX_JS_CREATETASK_COMMENT_"+(e.type.isNotEmptyString(n.sourceEntityType)?n.sourceEntityType+(e.type.isNotEmptyString(n.suffix)?"_"+n.suffix:""):"BLOG_COMMENT")).replace("#TASK_NAME#",i).replace("#A_BEGIN#",!e.RenderParts.mobile?'<a target="_blank" href="'+(e.type.isNotEmptyString(n.sourceEntityLink)?n.sourceEntityLink:"")+'">':"").replace("#A_END#",!e.RenderParts.mobile?"</a>":"")}}}else if(t=="fileversion"){var s=typeof n=="object"&&typeof n.isEnabledKeepVersion!="undefined"&&n.isEnabledKeepVersion?"SONET_COMMENTAUX_JS_FILEVERSION_TEXT":"SONET_COMMENTAUX_JS_HEAD_FILEVERSION_TEXT";var o=typeof n=="object"&&typeof n.userGender!="undefined"?n.userGender:"";r=e.message(s+(o.length>0?"_"+o:""))}return r};e.CommentAux.getShareList=function(e){var t="";var n=[];if(typeof e=="object"&&e.length>0){var r;for(r=0;r<e.length;r++){if(e.hasOwnProperty(r)){n.push(this.renderEntity(e[r]))}}t=n.join(", ")}return t};e.CommentAux.renderEntity=function(t){var n="";if(typeof t=="object"&&t.ENTITY_TYPE!="undefined"){switch(t.ENTITY_TYPE){case"U":n=e.RenderParts.getNodeU(t);break;case"UA":n=e.RenderParts.getNodeUA();break;case"SG":n=e.RenderParts.getNodeSG(t);break;case"DR":n=e.RenderParts.getNodeDR(t);break;case"task":n=e.RenderParts.getNodeTask(t);break;default:}var r=e.create("div",{children:[n]});n=r.innerHTML;e.cleanNode(r,true)}return n}})();

Zerion Mini Shell 1.0