Server IP : 85.193.89.191 / Your IP : 3.15.195.87 Web Server : Apache System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : bitrix ( 600) PHP Version : 8.1.27 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/bitrix/www/bitrix/js/calendar/ |
Upload File : |
var ECCalendarAccess=function(e){BX.Access.Init();if(!window.EC_MESS)EC_MESS={};this.bind=e.bind;this.GetAccessName=e.GetAccessName;this.pTbl=e.pCont.appendChild(BX.create("TABLE",{props:{className:"bxc-access-tbl"}}));this.pSel=BX("bxec-"+this.bind);var s=this;this.delTitle=e.delTitle||EC_MESS.Delete;this.noAccessRights=e.noAccessRights||EC_MESS.NoAccessRights;this.inputName=e.inputName||false;e.pLink.onclick=function(){BX.Access.ShowForm({callback:BX.proxy(s.InsertRights,s),bind:s.bind})}};ECCalendarAccess.prototype={InsertRights:function(e){var s,t;for(s in e)for(t in e[s])this.InsertAccessRow(BX.Access.GetProviderName(s)+" "+e[s][t].name,t)},InsertAccessRow:function(e,s,t){var i=this,c,l,n,a;if(this.pTbl.rows[0]&&this.pTbl.rows[0].cells[0]&&this.pTbl.rows[0].cells[0].className.indexOf("bxc-access-no-vals")!=-1)this.DeleteRow(0);c=this.pTbl.insertRow(-1);l=BX.adjust(c.insertCell(-1),{props:{className:"bxc-access-c-l"},html:e+":"});n=BX.adjust(c.insertCell(-1),{props:{className:"bxc-access-c-r"}});a=n.appendChild(this.pSel.cloneNode(true));a.id="BXEC_ACCESS_"+s;if(t)a.value=t;pDel=n.appendChild(BX.create("A",{props:{className:"access-delete",href:"javascript:void(0)",title:this.delTitle},events:{click:function(){i.DeleteRow(this.parentNode.parentNode.rowIndex)}}}));if(this.inputName){a.name=this.inputName+"["+s+"]"}},DeleteRow:function(e){if(this.pTbl.rows[e])this.pTbl.deleteRow(e)},GetValues:function(){var e,s,t={},i=this.pTbl.getElementsByTagName("SELECT"),c,l=i.length;for(c=0;c<l;c++){e=i[c].id.substr("BXEC_ACCESS_".length);s=i[c].value;t[e]=s}return t},SetSelected:function(e){if(!e)e={};while(this.pTbl.rows[0])this.pTbl.deleteRow(0);var s,t={};for(s in e){this.InsertAccessRow(this.GetTitleByCode(s),s,e[s]);t[s]=true}if(this.pTbl.rows.length<=0)BX.adjust(this.pTbl.insertRow(-1).insertCell(-1),{props:{className:"bxc-access-no-vals",colSpan:2},html:"<span>"+this.noAccessRights+"</span>"});BX.Access.SetSelected(t,this.bind)},GetTitleByCode:function(e){return this.GetAccessName(e)}}; //# sourceMappingURL=cal-controlls.map.js