https://www.ilmax.by/local/components/aiolane/user.ilmax/templates/.default/script.js?17442657574205
1(function() { 2 'use strict'; 3 4 if(!!window.JCUserComponent) 5 return; 6 7 window.JCUserComponent = function(params) { 8 this.container = params.container; 9 this.isAuth = params.isAuth; 10 11 if(window.frameCacheVars !== undefined) 12 BX.addCustomEvent('onFrameDataReceived', BX.proxy(this.init, this)); 13 else 14 BX.ready(BX.proxy(this.init, this)); 15 }; 16 17 window.JCUserComponent.prototype = { 18 init: function() { 19 var obUser = BX(this.container); 20 if(!!obUser) { 21 if(!this.isAuth) { 22 BX.bind(obUser, 'click', BX.proxy(this.showSlidePanelLogin, this)); 23 } 24 } 25 26 BX.addCustomEvent(this, 'showSlidePanelLoginRequest', BX.proxy(this.showSlidePanelLoginRequest, this)); 27 }, 28 29 showSlidePanelLoginRequest: function(sPanelContent) { 30 31 BX.ajax({ 32 url: BX.message('SITE_DIR') + 'ajax/form_panel.php', 33 method: 'POST', 34 dataType: 'json', 35 timeout: 60, 36 data: { 37 action: 'login', 38 REQUEST_URI: window.location.pathname 39 }, 40 41 onsuccess: BX.delegate(function(result) { 42 if(!result.content || !result.JS) { 43 BX.cleanNode(sPanelContent); 44 sPanelContent.appendChild(BX.create('DIV', { 45 props: { 46 className: 'slide-panel__form' 47 }, 48 children: [ 49 BX.create('DIV', { 50 props: { 51 className: 'alert alert-error' 52 }, 53 html: BX.message('SLIDE_PANEL_UNDEFINED_ERROR') 54 }) 55 ] 56 })); 57 } else { 58 BX.ajax.processScripts( 59 BX.processHTML(result.JS).SCRIPT, 60 false, 61 BX.delegate(function() { 62 var processed = BX.processHTML(result.content); 63 64 sPanelContent.innerHTML = processed.HTML; 65 66 BX.ajax.processScripts(processed.SCRIPT); 67 }, this) 68 ); 69 } 70 71 // $(sPanelContent).scrollbar(); 72 }, this) 73 }); 74 }, 75 76 showSlidePanelLogin: function(e) { 77 var sPanel = document.body.querySelector('.form-panel'); 78 79 if(!!sPanel) { 80 81 var sPanelWrap=BX.create('DIV', { 82 props: { 83 className: 'form-panel__content-wrap' 84 }, 85 }) 86 87 88 sPanelWrap.appendChild( 89 BX.create('DIV', { 90 props: { 91 className: 'slide-panel__title-wrap' 92 }, 93 children: [ 94 BX.create('SPAN', { 95 props: { 96 className: 'slide-panel__title' 97 }, 98 html: BX.message('USER_SLIDE_PANEL_TITLE') 99 }), 100 BX.create('SPAN', { 101 props: { 102 className: 'slide-panel__close' 103 }, 104 html:'<label id="form_btn__close" class="form_btn-menu">\n' + 105 ' <span class="first"></span>\n' + 106 ' <span class="third"></span>\n' + 107 ' </label>' 108 }) 109 ] 110 }) 111 ); 112 113 sPanelWrap.appendChild( 114 BX.create('DIV', { 115 props: { 116 className: 'form-panel__content scrollbar-inner' 117 }, 118 children: [ 119 BX.create('DIV', { 120 props: { 121 className: 'slide-panel__loader' 122 }, 123 html: '<div><span> <div id="loader" class="loader displayN">loading</div></span></div>' 124 }), 125 126 ] 127 }) 128 ); 129 130 131 132 sPanel.appendChild(sPanelWrap); 133 134 var sPanelContent = sPanel.querySelector('.form-panel__content'); 135 if(!!sPanelContent) 136 BX.onCustomEvent(this, 'showSlidePanelLoginRequest', [sPanelContent]); 137 138 139 var btnClose = sPanel.querySelector('.form_btn-menu'); 140 if(!!btnClose){ 141 BX.bind(btnClose, 'click', BX.proxy(this.slidePanelClose, this)); 142 } 143 144 145 BX.addClass(document.body, 'slide-panel-active'); 146 BX.addClass(sPanel, 'active'); 147 148 document.body.appendChild( 149 BX.create('DIV', { 150 props: { 151 className: 'modal-backdrop slide-panel__backdrop fadeInBig' 152 } 153 }) 154 ); 155 156 e.stopPropagation(); 157 } 158 }, 159 160 slidePanelClose:function (){ 161 162 var sPanel = document.body.querySelector('.form-panel'); 163 164 sPanel.innerHTML='' 165 var slidePanelBack = document.body.querySelector('.slide-panel__backdrop'); 166 167 168 BX.removeClass(sPanel, 'active'); 169 170 BX.cleanNode(sPanel); 171 172 BX.removeClass(slidePanelBack, 'fadeInBig'); 173 BX.addClass(slidePanelBack, 'fadeOutBig'); 174 175 setTimeout(function() { 176 BX.remove(slidePanelBack); 177 }, 300); 178 179 BX.removeClass(document.body, 'slide-panel-active'); 180 } 181 }; 182})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.