File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/components/bitrix/lists.live.feed/templates/.default/script.min.js
Back
BX.namespace("BX.Lists");BX.Lists.LiveFeedClass=function(){var t=function(t){this.ajaxUrl="/bitrix/components/bitrix/lists.live.feed/ajax.php";this.socnetGroupId=t.socnetGroupId;this.randomString=t.randomString;this.listData=t.listData;var s=this;BX.addCustomEvent("onDisplayClaimLiveFeed",function(t){s.init(t)});if(this.listData){var e=[this.listData.ID,this.listData.NAME,this.listData.DESCRIPTION,this.listData.PICTURE,this.listData.CODE];BX.addCustomEvent("BX.Socialnetwork.Livefeed.Post.Form.Tabs:onInitialized",function(t){var s=t.getData().tabsInstance;if(s){s.changePostFormTab("lists",e)}})}};t.prototype.init=function(t){this.manyTemplate=false;this.constantsPopup=null;this.templateId=null;if(t instanceof Array){var s=t[0],e=t[1],i=t[2],a=t[3],o=t[4];this.setPicture(a);this.setTitle(e);this.getList(s,i,o);this.isConstantsTuned(s)}};t.prototype.isConstantsTuned=function(t){BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","isConstantsTuned"),data:{iblockId:t},onsuccess:BX.delegate(function(t){if(t.status=="success"){var s="",e,i=0;for(e in t.templateData){s+=e+",";i++}if(i>1){this.manyTemplate=true}BX("bx-lists-template-id").value=s;if(t.admin===true){this.setResponsible()}else if(t.admin===false){this.notifyAdmin();BX("bx-lists-check-notify-admin").value=1}}else{t.errors=t.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:t.errors.pop().message})}},this)})};t.prototype.setPicture=function(t){BX("bx-lists-table-td-title-img").innerHTML=t};t.prototype.setTitle=function(t){BX("bx-lists-table-td-title").innerHTML=BX.util.htmlspecialchars(t);BX("bx-lists-title-notify-admin-popup").value=BX.util.htmlspecialchars(t)};t.prototype.getList=function(t,s,e){var i=BX.findChildrenByClassName(BX("bx-lists-store-lists"),"bx-lists-input-list");for(var a=0;a<i.length;a++){if(i[a].value==t){BX.show(BX("bx-lists-div-list-"+i[a].value))}else{BX.hide(BX("bx-lists-div-list-"+i[a].value))}}BX("bx-lists-selected-list").value=t;if(BX("bx-lists-input-list-"+t)){return}BX.Lists.ajax({url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","getList"),method:"POST",dataType:"html",processData:false,data:{iblockId:t,iblockDescription:s,iblockCode:e,socnetGroupId:this.socnetGroupId,randomString:this.randomString},onsuccess:BX.delegate(function(s){BX("bx-lists-store-lists").appendChild(BX.create("input",{props:{id:"bx-lists-input-list-"+t,className:"bx-lists-input-list"},attrs:{type:"hidden",value:t}}));BX("bx-lists-total-div-id").appendChild(BX.create("div",{props:{id:"bx-lists-div-list-"+t,className:"bx-lists-div-list"},attrs:{style:"display: block;"},html:s}));var e=BX.processHTML(s);BX.ajax.processScripts(e.SCRIPT)},this)});BX.unbindAll(BX("blog-submit-button-save"));BX.bind(BX("blog-submit-button-save"),"click",BX.proxy(function(t){this.submitForm(t)},this))};t.prototype.addNewFileTableRow=function(t,s,e,i){var a=document.getElementById(t);var o=a.rows.length;var n=a.insertRow(o);for(var l=0;l<s;l++){var r=n.insertCell(l);var p=a.rows[o-1].cells[l].innerHTML;var d=document.createElement("div");d.innerHTML=p;d.firstChild.lastChild.innerHTML="";p=d.innerHTML;r.innerHTML=p.replace(e,function(t){return t.replace("[n"+arguments[i]+"]","[n"+(1+parseInt(arguments[i]))+"]")})}};t.prototype.getNameInputFile=function(){var t=document.getElementsByClassName("bx-lists-input-file");for(var s=0;s<t.length;s++){var e=t[s].getElementsByTagName("input");for(var i=0;i<e.length;i++){e[i].onchange=getName}}};t.prototype.createAdditionalHtmlEditor=function(t,s,e){var i=document.getElementById(t);var a=i.rows.length;var o=i.insertRow(a);var n=o.insertCell(0);var l=i.rows[a-1].cells[0].innerHTML;var r=0;while(true){var p=l.indexOf("[n",r);if(p<0)break;var d=l.indexOf("]",p);if(d<0)break;var u=parseInt(l.substr(p+2,d-p));l=l.substr(0,p)+"[n"+ ++u+"]"+l.substr(d+1);r=p+1}var r=0;while(true){var p=l.indexOf("__n",r);if(p<0)break;var d=l.indexOf("_",p+2);if(d<0)break;var u=parseInt(l.substr(p+3,d-p));l=l.substr(0,p)+"__n"+ ++u+"_"+l.substr(d+1);r=d+1}n.innerHTML=l;var c="id_"+s+"__n"+a+"_";var m=s+"[n"+a+"][VALUE]";window.BXHtmlEditor.Show({id:c,inputName:m,name:m,content:"",width:"100%",height:"200",allowPhp:false,limitPhpAccess:false,templates:[],templateId:"",templateParams:[],componentFilter:"",snippets:[],placeholder:"Text here...",actionUrl:"/bitrix/tools/html_editor_action.php",cssIframePath:"/bitrix/js/fileman/html_editor/iframe-style.css?1412693817",bodyClass:"",bodyId:"",spellcheck_path:"/bitrix/js/fileman/html_editor/html-spell.js?v=1412693817",usePspell:"N",useCustomSpell:"Y",bbCode:false,askBeforeUnloadPage:false,settingsKey:"user_settings_1",showComponents:true,showSnippets:true,view:"wysiwyg",splitVertical:false,splitRatio:"1",taskbarShown:false,taskbarWidth:"250",lastSpecialchars:false,cleanEmptySpans:true,lazyLoad:false,showTaskbars:false,showNodeNavi:false,controlsMap:[{id:"Bold",compact:true,sort:"80"},{id:"Italic",compact:true,sort:"90"},{id:"Underline",compact:true,sort:"100"},{id:"Strikeout",compact:true,sort:"110"},{id:"RemoveFormat",compact:true,sort:"120"},{id:"Color",compact:true,sort:"130"},{id:"FontSelector",compact:false,sort:"135"},{id:"FontSize",compact:false,sort:"140"},{separator:true,compact:false,sort:"145"},{id:"OrderedList",compact:true,sort:"150"},{id:"UnorderedList",compact:true,sort:"160"},{id:"AlignList",compact:false,sort:"190"},{separator:true,compact:false,sort:"200"},{id:"InsertLink",compact:true,sort:"210"},{id:"InsertImage",compact:false,sort:"220"},{id:"InsertVideo",compact:true,sort:"230"},{id:"InsertTable",compact:false,sort:"250"},{id:"Smile",compact:false,sort:"280"},{separator:true,compact:false,sort:"290"},{id:"Fullscreen",compact:false,sort:"310"},{id:"More",compact:true,sort:"400"}],autoResize:true,autoResizeOffset:"40",minBodyWidth:"350",normalBodyWidth:"555"});var B=BX.findChildrenByClassName(BX(t),"bx-html-editor");for(var b in B){var f=B[b].getAttribute("id");var X=BX.findChildrenByClassName(BX(f),"bx-editor-iframe");if(X.length>1){for(var h=0;h<X.length-1;h++){X[h].parentNode.removeChild(X[h])}}}};t.prototype.createSettingsDropdown=function(t){BX.PreventDefault(t);BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","createSettingsDropdown"),data:{iblockId:BX("bx-lists-selected-list").value,randomString:this.randomString},onsuccess:BX.delegate(function(t){if(t.status=="success"){var s=BX.PopupMenu.getMenuById("settings-lists");if(s&&s.popupWindow){if(s.popupWindow.isShown()){BX.PopupMenu.destroy("settings-lists");return}}BX.PopupMenu.show("settings-lists",BX("bx-lists-settings-btn"),t.settingsDropdown,{autoHide:true,offsetTop:0,offsetLeft:0,angle:{offset:15},events:{onPopupClose:function(){}}})}else{t.errors=t.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:t.errors.pop().message})}},this)})};t.prototype.setDelegateResponsible=function(){if(BX.PopupWindowManager.getCurrentPopup()){BX.PopupWindowManager.getCurrentPopup().close()}var t=BX.Lists.hide,s=BX.Lists.addToLinkParam,e=BX.Lists.showModalWithStatusAction,i=this.ajaxUrl;BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","checkDelegateResponsible"),data:{iblockId:BX("bx-lists-selected-list").value},onsuccess:BX.delegate(function(t){if(t.status=="success"){BX.show(BX("feed-add-lists-right"));BX.Lists.modalWindow({modalId:"bx-lists-popup",title:BX.message("LISTS_SELECT_STAFF_SET_RIGHT"),draggable:true,overlay:false,autoHide:false,contentStyle:{width:"600px",paddingTop:"10px",paddingBottom:"10px"},content:[BX("feed-add-lists-right")],events:{onPopupClose:function(){BX.hide(BX("feed-add-lists-right"));BX("bx-lists-total-div-id").appendChild(BX("feed-add-lists-right"))},onAfterPopupShow:function(t){BX.PopupMenu.destroy("settings-lists")}},buttons:[BX.create("a",{text:BX.message("LISTS_SAVE_BUTTON_SET_RIGHT"),props:{className:"webform-small-button webform-small-button-accept"},events:{click:BX.delegate(function(t){var a=BX.findChildrenByClassName(BX("feed-add-post-lists-item"),"feed-add-post-lists"),o=[];for(var n=0;n<a.length;n++){o.push(a[n].getAttribute("data-id"))}BX.Lists.ajax({method:"POST",dataType:"json",url:s(i,"action","setDelegateResponsible"),data:{iblockId:BX("bx-lists-selected-list").value,selectUsers:o},onsuccess:function(t){if(t.status=="success"){BX.PopupWindowManager.getCurrentPopup().close();e({status:"success",message:t.message})}else{BX.PopupWindowManager.getCurrentPopup().close();t.errors=t.errors||[{}];e({status:"error",message:t.errors.pop().message})}}})},this)}}),BX.create("a",{text:BX.message("LISTS_CANCEL_BUTTON_SET_RIGHT"),props:{className:"webform-small-button webform-button-cancel"},events:{click:BX.delegate(function(t){BX.PopupWindowManager.getCurrentPopup().close()},this)}})]});for(var a in t.listUser){var o=BX.findChildrenByClassName(BX("feed-add-post-lists-item"),"feed-add-post-lists");for(var n in o){if(t.listUser[a].id==o[n].getAttribute("data-id")){delete t.listUser[a]}}BXfpListsSelectCallback(t.listUser[a])}}else{t.errors=t.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:t.errors.pop().message})}},this)})};t.prototype.jumpSettingProcess=function(){BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","checkPermissions"),data:{iblockId:BX("bx-lists-selected-list").value},onsuccess:BX.delegate(function(t){if(t.status=="success"){document.location.href=BX("bx-lists-lists-page").value+BX("bx-lists-selected-list").value+"/edit/"}else{t.errors=t.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:t.errors.pop().message})}},this)})};t.prototype.jumpProcessDesigner=function(){BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","getBizprocTemplateId"),data:{iblockId:BX("bx-lists-selected-list").value},onsuccess:BX.delegate(function(t){if(t.status=="success"){var s;if(t.manyTemplate){var e="<p>"+BX.message("LISTS_DESIGNER_POPUP_DESCRIPTION")+"</p>";for(s in t.templateData){var i=BX("bx-lists-lists-page").value+BX("bx-lists-selected-list").value+"/bp_edit/"+t.templateData[s].ID+"/";e+='<a href="'+i+'"><div class="bx-lists-designer-item">'+t.templateData[s].NAME+"</div></a>"}e+="";BX("bx-lists-designer-template-popup-content").innerHTML=e;BX.Lists.modalWindow({modalId:"bx-lists-popup",title:BX.message("LISTS_DESIGNER_POPUP_TITLE"),draggable:true,overlay:false,contentStyle:{width:"400px",paddingTop:"10px",paddingBottom:"10px"},content:[BX("bx-lists-designer-template-popup-content")],events:{onPopupClose:function(){BX("bx-lists-designer-template-popup-content").innerHTML="";BX("bx-lists-designer-template-popup").appendChild(BX("bx-lists-designer-template-popup-content"))},onAfterPopupShow:function(t){BX.PopupMenu.destroy("settings-lists")}},buttons:[BX.create("a",{text:BX.message("LISTS_CANCEL_BUTTON_CLOSE"),props:{className:"webform-small-button webform-button-cancel"},events:{click:BX.delegate(function(t){BX.PopupWindowManager.getCurrentPopup().close()},this)}})]})}else{for(s in t.templateData){document.location.href=BX("bx-lists-lists-page").value+BX("bx-lists-selected-list").value+"/bp_edit/"+t.templateData[s].ID+"/"}}}else{t.errors=t.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:t.errors.pop().message})}},this)})};t.prototype.notify=function(t){BX("bx-lists-notify-button-"+t).setAttribute("onclick","");var s="/",e=null;if(BX("bx-lists-select-site-dir")){s=BX("bx-lists-select-site-dir").value}if(BX("bx-lists-select-site-id")){e=BX("bx-lists-select-site-id").value}BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","notifyAdmin"),data:{iblockId:BX("bx-lists-selected-list").value,iblockName:BX("bx-lists-title-notify-admin-popup").value,userId:t,siteDir:s,siteId:e},onsuccess:BX.delegate(function(s){if(s.status=="success"){BX.Lists.removeElement(BX("bx-lists-notify-button-"+t));BX("bx-lists-notify-success-"+t).innerHTML=s.message}else{BX("bx-lists-notify-button-"+t).setAttribute("onclick",'BX.Lists["LiveFeedClass_'+this.randomString+'"].notify('+t+")");s.errors=s.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:s.errors.pop().message})}},this)})};t.prototype.notifyAdmin=function(){BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","getListAdmin"),data:{iblockId:BX("bx-lists-selected-list").value},onsuccess:BX.delegate(function(t){if(t.status=="success"){var s='<span class="bp-question"><span>!</span>'+BX.message("LISTS_NOTIFY_ADMIN_TITLE_WHY").replace("#NAME_PROCESSES#",BX("bx-lists-title-notify-admin-popup").value)+"</span>";s+="<p>"+BX.message("LISTS_NOTIFY_ADMIN_TEXT_ONE").replace("#NAME_PROCESSES#",BX("bx-lists-title-notify-admin-popup").value)+"</p>";s+="<p>"+BX.message("LISTS_NOTIFY_ADMIN_TEXT_TWO").replace("#NAME_PROCESSES#",BX("bx-lists-title-notify-admin-popup").value)+"</p>";s+='<span class="bp-question-title">'+BX.message("LISTS_NOTIFY_ADMIN_MESSAGE")+"</span>";for(var e in t.listAdmin){var i="";if(t.listAdmin[e].img){i='<img src="'+t.listAdmin[e].img+'" alt="">'}s+='<div class="bp-question-item"><a href="#" class="bp-question-item-avatar"><span class="bp-question-item-avatar-inner">'+i+'</span></a><span class="bp-question-item-info"><span>'+t.listAdmin[e].name+"</span></span>"+'<span id="bx-lists-notify-success-'+t.listAdmin[e].id+'" class="bx-lists-notify-success"></span>'+'<a id="bx-lists-notify-button-'+t.listAdmin[e].id+'" href="#" onclick=\'BX.Lists["LiveFeedClass_'+this.randomString+'"].notify('+t.listAdmin[e].id+');\' class="webform-small-button bp-small-button webform-small-button-blue">'+""+BX.message("LISTS_NOTIFY_ADMIN_MESSAGE_BUTTON")+"</a></div>"}BX("bx-lists-notify-admin-popup-content").innerHTML=s;BX.Lists.modalWindow({modalId:"bx-lists-popup",title:BX("bx-lists-title-notify-admin-popup").value,draggable:true,overlay:false,contentStyle:{width:"600px",paddingTop:"10px",paddingBottom:"10px"},content:[BX("bx-lists-notify-admin-popup-content")],events:{onPopupClose:function(){BX("bx-lists-notify-admin-popup-content").innerHTML="";BX("bx-lists-notify-admin-popup").appendChild(BX("bx-lists-notify-admin-popup-content"))},onAfterPopupShow:function(t){BX.PopupMenu.destroy("settings-lists")}},buttons:[BX.create("a",{text:BX.message("LISTS_CANCEL_BUTTON_CLOSE"),props:{className:"webform-small-button webform-button-cancel"},events:{click:BX.delegate(function(t){BX.PopupWindowManager.getCurrentPopup().close()},this)}})]})}else{t.errors=t.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:t.errors.pop().message})}},this)})};t.prototype.setResponsible=function(t){this.templateId=t;BX.Lists.ajax({method:"POST",dataType:"json",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","checkPermissions"),data:{iblockId:BX("bx-lists-selected-list").value},onsuccess:BX.delegate(function(t){if(t.status==="success"){BX.Lists.ajax({url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","setResponsible"),method:"POST",dataType:"html",data:{iblockId:BX("bx-lists-selected-list").value,randomString:this.randomString,templateId:this.templateId},onsuccess:BX.delegate(function(t){this.showConstantsPopup(t)},this)})}else{if(BX("bx-lists-check-notify-admin").value){this.notifyAdmin()}else{t.errors=t.errors||[{}];BX.Lists.showModalWithStatusAction({status:"error",message:t.errors.pop().message})}}},this)})};t.prototype.showConstantsPopup=function(t){if(BX.PopupWindowManager.getCurrentPopup())BX.PopupWindowManager.getCurrentPopup().close();if(this.manyTemplate&&!this.templateId){this.constantsPopup=BX.Lists.modalWindow({modalId:"bx-lists-popup",title:BX.message("LISTS_DESIGNER_POPUP_TITLE"),overlay:false,draggable:true,contentStyle:{width:"600px",paddingBottom:"10px"},content:[this.getConstantsForm(t)],events:{onPopupClose:function(){this.constantsPopup=null}.bind(this),onAfterPopupShow:function(t){BX.PopupMenu.destroy("settings-lists")}},buttons:[BX.create("a",{text:BX.message("LISTS_CANCEL_BUTTON_CLOSE"),props:{className:"webform-small-button webform-button-cancel"},events:{click:BX.delegate(function(t){if(!!this.constantsPopup)this.constantsPopup.close()},this)}})]})}else{this.constantsPopup=BX.Lists.modalWindow({modalId:"bx-lists-popup",title:BX.message("LISTS_SELECT_STAFF_SET_RESPONSIBLE"),overlay:false,draggable:true,withoutWindowManager:true,contentStyle:{width:"600px",paddingBottom:"10px"},content:[this.getConstantsForm(t)],events:{onPopupClose:function(){this.constantsPopup=null}.bind(this),onAfterPopupShow:function(t){BX.PopupMenu.destroy("settings-lists")}},buttons:[BX.create("a",{text:BX.message("LISTS_SAVE_BUTTON_SET_RIGHT"),props:{className:"webform-small-button webform-small-button-accept"},events:{click:BX.delegate(function(t){var s=BX.findChild(BX("bx-lists-set-responsible-content"),{tag:"FORM"},true);if(s){s.modalWindow=this.constantsPopup;s.onsubmit(s,t)}},this)}}),BX.create("a",{text:BX.message("LISTS_CANCEL_BUTTON_SET_RIGHT"),props:{className:"webform-small-button webform-button-cancel"},events:{click:BX.delegate(function(t){if(!!this.constantsPopup)this.constantsPopup.close()},this)}})]})}};t.prototype.getConstantsForm=function(t){return BX.create("div",{children:[BX.create("div",{props:{id:"bx-lists-set-responsible-content",className:"bx-lists-set-responsible-content"},html:t})]})};t.prototype.submitForm=function(t){BX.unbindAll(BX("blog-submit-button-save"));if(BX("feed-add-post-content-lists").style.display==="none"){BX.bind(BX("blog-submit-button-save"),"click",submitBlogPostForm())}BX.addClass(BX("blog-submit-button-save"),"ui-btn-clock");var s=BX.findChildrenByClassName(BX("bx-lists-store-lists"),"bx-lists-input-list");for(var e=0;e<s.length;e++){if(s[e].value!==BX("bx-lists-selected-list").value){BX.Lists.removeElement(BX("bx-lists-div-list-"+s[e].value));BX.Lists.removeElement(BX("bx-lists-input-list-"+s[e].value))}}BX.ajax.submitAjax(BX("blogPostForm"),{method:"POST",url:BX.Lists.addToLinkParam(this.ajaxUrl,"action","checkDataElementCreation"),processData:true,onsuccess:BX.delegate(function(t){var s=BX.parseJSON(t,{});if(s!==null&&s!==undefined){if(s.status==="success"){BX.bind(BX("blog-submit-button-save"),"click",submitBlogPostForm())}else{BX.removeClass(BX("blog-submit-button-save"),"ui-btn-clock");BX("bx-lists-block-errors").innerHTML=s.errors.pop().message;BX.show(BX("bx-lists-block-errors"));BX.bind(BX("blog-submit-button-save"),"click",BX.proxy(function(t){this.submitForm(t)},this))}}else{BX.removeClass(BX("blog-submit-button-save"),"ui-btn-clock");BX("bx-lists-block-errors").innerHTML=t;BX.show(BX("bx-lists-block-errors"));BX.bind(BX("blog-submit-button-save"),"click",BX.proxy(function(t){this.submitForm(t)},this))}},this)});t.preventDefault()};t.prototype.errorPopup=function(t){BX.Lists.showModalWithStatusAction({status:"error",message:t})};return t}(); //# sourceMappingURL=script.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.24 |
proxy
|
phpinfo
|
Settings