Your IP : 18.118.210.110


Current Path : /var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/voximplant/
Upload File :
Current File : /var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/voximplant/transcript.min.js

(function(){var t="/bitrix/components/bitrix/voximplant.transcript.view/ajax.php";BX.namespace("BX.Voximplant");BX.Voximplant.Transcript=function(t){this.callId=t.callId;this.bindNode=BX.type.isDomNode(t.bindNode)||null;this.popupId="vi-transcript-"+BX.util.getRandomString(5);this.popup=null;this.rootNode=null;this.messages=[]};BX.Voximplant.Transcript.create=function(t){return new BX.Voximplant.Transcript(t)};BX.Voximplant.Transcript.prototype.getNode=function(t,o){if(!o)o=this.rootNode;return o?o.querySelector('[data-role="'+t+'"]'):null};BX.Voximplant.Transcript.prototype.show=function(){var t=this;this.load(function(o){t.showPopup({title:BX.message("VOX_TRANSCRIPT_POPUP_TITLE"),content:o})})};BX.Voximplant.Transcript.prototype.load=function(o){var n={sessid:BX.bitrix_sessid(),action:"getTranscript",params:{callId:this.callId}};o=BX.type.isFunction(o)?o:BX.DoNothing;BX.ajax({url:t,method:"POST",dataType:"html",data:n,onsuccess:function(t){o(t)},onfailure:function(){console.log("Something gone wrong")}})};BX.Voximplant.Transcript.prototype.showPopup=function(t){var o=this;this.popup=new BX.PopupWindow(this.popupId,this.bindNode,{closeIcon:true,closeByEsc:true,autoHide:false,titleBar:t.title,content:t.content,contentColor:"white",contentNoPaddings:true,draggable:{restrict:true},resizable:{minWidth:560,minHeight:400},width:560,height:400,overlay:{color:"gray",opacity:30},events:{onPopupClose:function(){this.destroy()},onPopupDestroy:function(){o.popup=null}}});this.rootNode=this.popup.contentContainer;this.popup.show();this.bindEvents()};BX.Voximplant.Transcript.prototype.bindEvents=function(){var t=this.getNode("dialog");if(t){var o=t.querySelectorAll(".vox-transcript-line-container");for(var n=0;n<o.length;n++){this.messages.push({_node:o[n],text:o[n].dataset.text})}}var i=this.getNode("input-filter");if(i){BX.bind(i,"bxchange",this._onFilterChange.bind(this))}};BX.Voximplant.Transcript.prototype._onFilterChange=function(t){var o=t.target.value.toLowerCase();var n=this;this.messages.forEach(function(t){var i=t.text.toLowerCase();if(i.indexOf(o)===-1){n._hide(t._node)}else{n._show(t._node)}})};BX.Voximplant.Transcript.prototype._hide=function(t){t.style.display="none"};BX.Voximplant.Transcript.prototype._show=function(t){t.style.removeProperty("display")}})();
//# sourceMappingURL=transcript.map.js