403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/im/call/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/im/call/invite_popup.min.js
(function(){BX.namespace("BX.Call");if(BX.Call.InvitePopup){return}BX.Call.InvitePopup=function(e){if(!BX.type.isPlainObject(e)){e={}}this.idleUsers=e.idleUsers||[];this.recentUsers=[];this.bindElement=e.bindElement;this.viewElement=e.viewElement||document.body;this.allowNewUsers=e.allowNewUsers;this.elements={root:null,inputBox:null,input:null,destinationContainer:null,contactList:null,moreButton:null};this.popup=null;this.zIndex=e.zIndex||0;this.searchPhrase="";this.searchNext=0;this.searchResult=[];this.searchTotalCount=0;this.searchTimeout=0;this.fetching=false;this.callbacks={onSelect:BX.type.isFunction(e.onSelect)?e.onSelect:BX.DoNothing,onClose:BX.type.isFunction(e.onClose)?e.onClose:BX.DoNothing,onDestroy:BX.type.isFunction(e.onDestroy)?e.onDestroy:BX.DoNothing}};BX.Call.InvitePopup.prototype={show:function(){if(!this.elements.root){this.render()}this.createPopup();this.popup.show();if(this.allowNewUsers){this.showLoader();this.getRecent().then(this.updateContactList.bind(this))}else{this.updateContactList()}},close:function(){if(this.popup){this.popup.close()}clearTimeout(this.searchTimeout)},createPopup:function(){var e=this;this.popup=new BX.PopupWindow("bx-call-popup-invite",this.bindElement,{targetContainer:this.viewElement,zIndex:this.zIndex,lightShadow:true,darkMode:BX.MessengerTheme.isDark(),autoHide:true,closeByEsc:true,content:this.elements.root,bindOptions:{position:"top"},angle:{position:"bottom",offset:49},buttons:[new BX.PopupWindowButton({text:BX.message("IM_CALL_INVITE_INVITE"),className:"popup-window-button-accept",events:{click:function(e){if(this.selectedUser){this.callbacks.onSelect({user:this.selectedUser})}}.bind(this)}}),new BX.PopupWindowButton({text:BX.message("IM_CALL_INVITE_CANCEL"),events:{click:function(){e.popup.close()}}})],events:{onPopupClose:function(){this.destroy()},onPopupDestroy:function(){e.popup=null;e.elements.contactList=null;clearTimeout(e.searchTimeout);e.callbacks.onDestroy()}}});BX.addClass(this.popup.popupContainer,"bx-messenger-mark")},getRecent:function(){var e=this;return new Promise((function(t,s){BX.CallEngine.getRestClient().callMethod("im.recent.get",{SKIP_OPENLINES:"Y",SKIP_CHAT:"Y"}).then((function(s){var n=s.answer;e.recentUsers=Object.values(n.result).map((function(e){return e.user})).filter((function(e){if(e.bot||e.network){return false}return true}));t()}))}))},search:function(){var e=this;return new Promise((function(t,s){e.searchResult=e.recentUsers.filter((function(t){return t.name.toString().toLowerCase().includes(e.searchPhrase.toLowerCase())}));e.searchTotalCount=e.searchResult.length;e.searchNext=0;if(e.searchPhrase.length<3){t();return}BX.CallEngine.getRestClient().callMethod("im.search.user.list",{FIND:e.searchPhrase}).then((function(s){var n=s.answer;e.searchTotalCount=n.total;e.searchNext=n.next;var i=e.searchResult.map((function(e){return parseInt(e.id)}));var r=Object.values(n.result).filter((function(e){if(e.bot||e.network){return false}return!i.includes(parseInt(e.id))}));e.searchResult=e.searchResult.concat(r);e.searchTotalCount=e.searchResult.length;t()}))}))},fetchMoreSearchResults:function(){var e=this;return new Promise((function(t,s){BX.CallEngine.getRestClient().callMethod("im.search.user.list",{FIND:e.searchPhrase,OFFSET:e.searchNext}).then((function(s){var n=s.answer;e.searchTotalCount=n.total;e.searchNext=n.next;var i=e.searchResult.map((function(e){return parseInt(e.id)}));var r=Object.values(n.result).filter((function(e){if(e.bot||e.network){return false}return!i.includes(parseInt(e.id))}));e.searchResult=e.searchResult.concat(r);e.searchTotalCount=e.searchResult.length;t(r)}))}))},render:function(){this.elements.root=BX.create("div",{props:{className:"bx-messenger-popup-newchat-wrap"},children:[BX.create("div",{props:{className:"bx-messenger-popup-newchat-caption"},text:BX.message("IM_CALL_INVITE_INVITE_USER")})]});this.elements.inputBox=BX.create("div",{props:{className:"bx-messenger-popup-newchat-box bx-messenger-popup-newchat-dest bx-messenger-popup-newchat-dest-even"},children:[this.elements.destinationContainer=BX.create("span",{props:{className:"bx-messenger-dest-items"}}),this.elements.input=BX.create("input",{props:{className:"bx-messenger-input"},attrs:{type:"text",placeholder:this.allowNewUsers?BX.message("IM_M_SEARCH_PLACEHOLDER"):BX.message("IM_M_CALL_REINVITE_PLACEHOLDER"),value:"",disabled:!this.allowNewUsers},events:{keyup:this._onInputKeyUp.bind(this)}})]});this.elements.root.appendChild(this.elements.inputBox);this.elements.contactList=BX.create("div",{props:{className:"bx-messenger-popup-newchat-box bx-messenger-popup-newchat-cl bx-messenger-recent-wrap"},children:[]});this.elements.root.appendChild(this.elements.contactList)},updateDestination:function(){if(!this.elements.inputBox){return}BX.cleanNode(this.elements.destinationContainer);if(this.selectedUser){this.elements.destinationContainer.appendChild(this.renderDestinationUser(this.selectedUser));this.elements.input.style.display="none"}else{this.elements.input.style.removeProperty("display");this.elements.input.focus()}},updateContactList:function(){BX.cleanNode(this.elements.contactList);if(this.elements.contactList){this.elements.contactList.appendChild(this.renderContactList())}},showLoader:function(){BX.cleanNode(this.elements.contactList);this.elements.contactList.appendChild(BX.create("div",{props:{className:"bx-messenger-cl-item-load"},text:BX.message("IM_CL_LOAD")}))},renderContactList:function(){var e=document.createDocumentFragment();var t;if(this.idleUsers.length>0){e.appendChild(this.renderSeparator(BX.message("IM_CALL_INVITE_CALL_PARTICIPANTS")));for(t=0;t<this.idleUsers.length;t++){e.appendChild(this.renderUser(this.idleUsers[t]))}}if(this.searchPhrase!=""){if(this.searchResult.length>0){e.appendChild(this.renderSeparator(BX.message("IM_CALL_INVITE_SEARCH_RESULTS")));for(t=0;t<this.searchResult.length;t++){e.appendChild(this.renderUser(this.searchResult[t]))}if(this.searchTotalCount>this.searchResult.length){this.elements.moreButton=this.renderMoreButton();e.appendChild(this.elements.moreButton)}}else{}}else if(this.recentUsers.length>0){e.appendChild(this.renderSeparator(BX.message("IM_CALL_INVITE_RECENT")));for(t=0;t<this.recentUsers.length;t++){e.appendChild(this.renderUser(this.recentUsers[t]))}}return e},renderSeparator:function(e){return BX.create("div",{props:{className:"bx-messenger-chatlist-group"},children:[BX.create("span",{props:{className:"bx-messenger-chatlist-group-title"},text:e})]})},renderUser:function(e){var t=BX.MessengerCommon.drawContactListElement({id:e.id,data:this.escapeUserData(e),showUserLastActivityDate:true,showLastMessage:false,showCounter:false});BX.bind(t,"click",function(){this.setSelectedUser(e)}.bind(this));return t},renderDestinationUser:function(e){return BX.create("span",{props:{className:"bx-messenger-dest-block"},children:[BX.create("span",{props:{className:"bx-messenger-dest-text"},text:e.name}),BX.create("span",{props:{className:"bx-messenger-dest-del"},events:{click:this.removeSelectedUser.bind(this)}})]})},renderMoreButton:function(){return BX.create("div",{props:{className:"bx-messenger-chatlist-more-wrap"},events:{click:this._onMoreButtonClick.bind(this)},children:[BX.create("span",{props:{className:"bx-messenger-chatlist-more"},text:BX.message("IM_CALL_INVITE_MORE")+" "+(this.searchTotalCount-this.searchResult.length)})]})},setSelectedUser:function(e){this.selectedUser=e;this.updateDestination()},removeSelectedUser:function(){this.selectedUser=null;this.updateDestination()},escapeUserData:function(e){e.name=BX.util.htmlspecialchars(e.name);e.first_name=BX.util.htmlspecialchars(e.first_name);e.last_name=BX.util.htmlspecialchars(e.last_name);e.work_position=BX.util.htmlspecialchars(e.work_position);e.external_auth_id=BX.util.htmlspecialchars(e.external_auth_id);e.status=BX.util.htmlspecialchars(e.status);return e},_onMoreButtonClick:function(){if(this.fetching){return}this.fetching=true;this.fetchMoreSearchResults().then(function(e){var t=document.createDocumentFragment();var s=null;for(var n=0;n<e.length;n++){t.appendChild(this.renderUser(e[n]))}if(this.searchTotalCount>this.searchResult.length){s=this.renderMoreButton();t.appendChild(s)}BX.replace(this.elements.moreButton,t);this.elements.moreButton=s;this.fetching=false}.bind(this))},_onInputKeyUp:function(e){var t=this;if(e.keyCode==16||e.keyCode==17||e.keyCode==18||e.keyCode==20||e.keyCode==244||e.keyCode==224||e.keyCode==91){return false}if(e.keyCode==27&&this.elements.input.value!==""){BX.MessengerCommon.preventDefault(e)}if(e.keyCode==27){this.elements.input.value=""}if(this.searchTimeout){clearTimeout(this.searchTimeout)}this.searchTimeout=setTimeout((function(){t.searchPhrase=t.elements.input.value;if(t.searchPhrase==""){t.updateContactList()}else{t.search().then((function(){t.updateContactList()}))}}),300)}}})();
//# sourceMappingURL=invite_popup.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit