%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/bitrix/components/bitrix/report.construct/templates/.default/
Upload File :
Create Path :
Current File : //home/bitrix/www/bitrix/components/bitrix/report.construct/templates/.default/script.min.js

BX.namespace("BX.Report");BX.Report.ReportConstructClass=function(){var t=function(t){this.ajaxUrl="/bitrix/components/bitrix/report.construct/ajax.php";this.jsClass=t.jsClass;this.sharingData=t.sharingData;this.sessionError=Boolean(t.sessionError);this.sharingBlockId="report-sharing-block";this.sharingFormDataId="report-sharing-form-data";this.helpWindow=false;this.destFormName=t.destFormName||"report-construct-destFormName";this.init()};var e={};var i={};var o="";t.prototype.init=function(){BX.bind(BX("report-title-sharing-help"),"mouseover",BX.delegate(function(t){this.onHelpShow()},this));BX.bind(BX("report-title-sharing-help"),"mouseout",BX.delegate(function(t){this.onHelpHide()},this));if(this.sessionError){BX.Report.showModalWithStatusAction({status:"error",message:BX("report-list-error").innerHTML})}e={};i={};o=this.sharingData.maxAccess;BX(this.sharingBlockId).appendChild(BX.create("div",{props:{className:"bx-report-popup-construct-content"},children:[BX.create("table",{props:{id:"bx-report-popup-shared-people-list",className:"bx-report-popup-shared-people-list",style:"display:none;"},children:[BX.create("thead",{html:"<tr>"+'<td class="bx-report-popup-shared-people-list-head-col1">'+BX.message("REPORT_SHARING_NAME_RIGHTS_USER")+"</td>"+'<td class="bx-report-popup-shared-people-list-head-col2">'+BX.message("REPORT_SHARING_NAME_RIGHTS")+'</td><td class="bx-report-popup-shared-people-list-head-col3">'+"</td></tr>"})]}),BX.create("div",{props:{id:"feed-add-post-destination-container",className:"feed-add-post-destination-wrap report-destination-wrap-construct"},children:[BX.create("span",{props:{className:"feed-add-post-destination-item"}}),BX.create("span",{props:{id:"feed-add-post-destination-input-box",className:"feed-add-destination-input-box"},style:{background:"transparent"},children:[BX.create("input",{props:{type:"text",value:"",id:"feed-add-post-destination-input",className:"feed-add-destination-inp report-destination-input"}})]}),BX.create("a",{props:{href:"#",id:"bx-destination-tag",className:"feed-add-destination-link"},style:{background:"transparent"},text:BX.message("REPORT_SHARING_NAME_ADD_RIGHTS_USER"),events:{click:BX.delegate(function(){},this)}})]})]}));BX.addCustomEvent("onChangeRightOfSharing",BX.proxy(this.onChangeRightOfSharing,this));for(var t in this.sharingData.members){if(!this.sharingData.members.hasOwnProperty(t)){continue}e[this.sharingData.members[t].entityId]={item:{id:this.sharingData.members[t].entityId,name:this.sharingData.members[t].name,avatar:this.sharingData.members[t].avatar},type:this.sharingData.members[t].type,right:this.sharingData.members[t].right}}BX.SocNetLogDestination.init({name:this.destFormName,searchInput:BX("feed-add-post-destination-input"),bindMainPopup:{node:BX("feed-add-post-destination-container"),offsetTop:"5px",offsetLeft:"15px"},bindSearchPopup:{node:BX("feed-add-post-destination-container"),offsetTop:"5px",offsetLeft:"15px"},callback:{select:BX.proxy(this.onSelectDestination,this),unSelect:BX.proxy(this.onUnSelectDestination,this),openDialog:BX.proxy(this.onOpenDialogDestination,this),closeDialog:BX.proxy(this.onCloseDialogDestination,this),openSearch:BX.proxy(this.onOpenSearchDestination,this),closeSearch:BX.proxy(this.onCloseSearchDestination,this)},items:this.sharingData.destination.items,itemsLast:this.sharingData.destination.itemsLast,itemsSelected:this.sharingData.destination.itemsSelected});var n=this.destFormName;BX.bind(BX("feed-add-post-destination-container"),"click",function(t){BX.SocNetLogDestination.openDialog(n);BX.PreventDefault(t)});BX.bind(BX("feed-add-post-destination-input"),"keyup",BX.proxy(this.onKeyUpDestination,this));BX.bind(BX("feed-add-post-destination-input"),"keydown",BX.proxy(this.onKeyDownDestination,this))};t.prototype.onSetEntityToForm=function(){BX(this.sharingFormDataId).innerHTML="";for(var t in e){if(!e.hasOwnProperty(t)){continue}BX(this.sharingFormDataId).appendChild(BX.create("input",{props:{id:"report-sharing-entity-"+t},attrs:{name:"sharing_entity["+t+"]",value:e[t].right}}))}};t.prototype.onDeleteEntityFromForm=function(t){BX.Report.removeElement(BX("report-sharing-entity-"+t))};t.prototype.onSelectDestination=function(t,n,s){e[t.id]=e[t.id]||{};BX.Report.appendNewShared({maxAccessName:o,readOnly:!!i[t.id],destFormName:this.destFormName,item:t,type:n,right:e[t.id].right});e[t.id]={item:t,type:n,right:e[t.id].right||"access_read"};this.onSetEntityToForm();BX.Report.show(BX("bx-report-popup-shared-people-list"))};t.prototype.onUnSelectDestination=function(t,o,n){var s=t.id;if(!!i[s]){return false}this.onDeleteEntityFromForm(s);delete e[s];var a=BX.findChild(BX("bx-report-popup-shared-people-list"),{attribute:{"data-dest-id":""+s+""}},true);if(a){BX.remove(a)}if(BX.Report.isEmptyObject(e)){BX.Report.hide(BX("bx-report-popup-shared-people-list"))}};t.prototype.onOpenDialogDestination=function(){BX.style(BX("feed-add-post-destination-input-box"),"display","inline-block");BX.style(BX("bx-destination-tag"),"display","none");BX.focus(BX("feed-add-post-destination-input"));if(BX.SocNetLogDestination.popupWindow)BX.SocNetLogDestination.popupWindow.adjustPosition({forceTop:true})};t.prototype.onCloseDialogDestination=function(){var t=BX("feed-add-post-destination-input");if(!BX.SocNetLogDestination.isOpenSearch()&&t&&t.value.length<=0){BX.style(BX("feed-add-post-destination-input-box"),"display","none");BX.style(BX("bx-destination-tag"),"display","inline-block")}};t.prototype.onOpenSearchDestination=function(){if(BX.SocNetLogDestination.popupSearchWindow)BX.SocNetLogDestination.popupSearchWindow.adjustPosition({forceTop:true})};t.prototype.onCloseSearchDestination=function(){var t=BX("feed-add-post-destination-input");if(!BX.SocNetLogDestination.isOpenSearch()&&t&&t.value.length>0){BX.style(BX("feed-add-post-destination-input-box"),"display","none");BX.style(BX("bx-destination-tag"),"display","inline-block");BX("feed-add-post-destination-input").value=""}};t.prototype.onKeyUpDestination=function(t){var e=this.destFormName;if(t.keyCode==16||t.keyCode==17||t.keyCode==18||t.keyCode==20||t.keyCode==244||t.keyCode==224||t.keyCode==91)return false;if(t.keyCode==13){BX.SocNetLogDestination.selectFirstSearchItem(e);return BX.PreventDefault(t)}if(t.keyCode==27){BX("feed-add-post-destination-input").value=""}else{BX.SocNetLogDestination.search(BX("feed-add-post-destination-input").value,true,e)}if(BX.SocNetLogDestination.sendEvent&&BX.SocNetLogDestination.isOpenDialog())BX.SocNetLogDestination.closeDialog();if(t.keyCode==8){BX.SocNetLogDestination.sendEvent=true}return BX.PreventDefault(t)};t.prototype.onKeyDownDestination=function(t){var e=this.destFormName;if(t.keyCode==8&&BX("feed-add-post-destination-input").value.length<=0){BX.SocNetLogDestination.sendEvent=false;BX.SocNetLogDestination.deleteLastItem(e)}return true};t.prototype.onChangeRightOfSharing=function(t,i){if(e[t]){e[t].right=i}};t.prototype.export=function(t){var e=BX.create("form",{props:{method:"POST"},children:[BX.create("input",{props:{type:"hidden",name:"sessid",value:BX.bitrix_sessid()}}),BX.create("input",{props:{type:"text",name:"EXPORT_REPORT",value:BX.util.htmlspecialchars(t)}})]});document.body.appendChild(e);BX.submit(e)};t.prototype.onHelpShow=function(){var t=BX.proxy_context,e=t.innerHTML;if(BX.type.isNotEmptyString(e)){if(this.helpWindow){this.helpWindow.close()}var i=this;var o=new BX.PopupWindow("report-help",t,{lightShadow:true,autoHide:false,darkMode:true,offsetLeft:0,offsetTop:2,bindOptions:{position:"top"},zIndex:200,events:{onPopupClose:function(){this.destroy();i.helpWindow=false}},content:BX.create("div",{attrs:{style:"padding-right: 5px; width: 250px;"},html:e})});o.setAngle({offset:13,position:"bottom"});o.show();this.helpWindow=o}};t.prototype.onHelpHide=function(){if(this.helpWindow){this.helpWindow.close()}};return t}();
//# sourceMappingURL=script.map.js

Zerion Mini Shell 1.0