File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/components/bitrix/sale.crm.site.master/wizard/template/script.min.js
Back
function strip_tags(t){return t.replace(/<\/?[^>]+>/gi,"")}function CAjaxWizardForm(t,e,r){var n=document.forms[t];if(!n)n=document.getElementById(t);this.nextStep=n.elements[r];this.nextStepStage=n.elements[r+"Stage"];this.iframe=document.getElementById(e);this.form=n;this.form.target=e;var o=this;if(this.iframe.attachEvent)this.iframe.attachEvent("onload",function(){o.AjaxHandler()});else this.iframe.onload=function(){o.AjaxHandler()};this.percent=null;this.progressBar=null;this.result=null;this.description=null}CAjaxWizardForm.prototype.AjaxHandler=function(){if(this.iframe.contentWindow&&this.iframe.contentWindow.location.href.indexOf("http")!==0)return;var t;if(this.iframe.contentDocument)t=this.iframe.contentDocument;else t=this.iframe.contentWindow.document;var e=t.body.innerHTML;if(e.length===0||t.getElementById("bitrix_install_template")||e.indexOf("[Error]")!==-1){this.ShowError("Connection error. Empty response.");return}var r=new RegExp("\\[response\\]","i");var n=new RegExp("\\[/response\\]","i");var o=e.match(r);if(o===null){this.ShowError(e);return}var i=o.index+o[0].length;var a=e.search(n);if(a===-1){this.ShowError(e);return}e=e.substr(i,a-i);window.eval(e)};CAjaxWizardForm.prototype.ShowError=function(t){var e=document.getElementById("error_container");var r=document.getElementById("error_text");if(!e||!r)return;e.style.display="block";r.innerHTML=t;var n=document.getElementById("error_retry_button");var o=this;var i=this.nextStep.value;var a=this.nextStepStage.value;n.onclick=function(){o.HideError();o.Post(i,a)}};CAjaxWizardForm.prototype.HideError=function(){var t=document.getElementById("error_container");var e=document.getElementById("error_text");if(!t||!e)return;while(e.firstChild)e.removeChild(e.firstChild);t.style.display="none"};CAjaxWizardForm.prototype.Post=function(t,e){if(t)this.nextStep.value=t;this.nextStepStage.value=e;if(t==="finish"){this.FinishStatus()}else{this.form.submit()}};CAjaxWizardForm.prototype.StopAjax=function(){this.iframe.onload=null;this.form.target="_self"};CAjaxWizardForm.prototype.SetStatus=function(t){if(!this.percent)this.percent=document.getElementById("progressBar_percent");this.percent.innerHTML=t;if(!this.progressBar)this.progressBar=document.getElementById("progressBar");this.progressBar.style.width=t+"%"};CAjaxWizardForm.prototype.FinishStatus=function(){if(!this.result)this.result=document.getElementById("result");if(!!this.result.classList&&!this.result.classList.contains("complete")){this.result.classList.add("complete")}document.getElementById("button_submit_wrap").style.display="block";this.AutoSubmitTimer()};CAjaxWizardForm.prototype.AutoSubmitTimer=function(){if(!this.description)this.description=document.getElementById("progress_description");var t=BX.message("SALE_CSM_WIZARD_MODULEINSTALLSTEP_INSTALL_WAIT3");var e=10;var r=setInterval(function(t,n){if(e===0){clearInterval(r);n.form.submit()}n.description.innerHTML=t.replace("#COUNT_TIME#",e);e--},1e3,t,this)};function CAjaxForm(t,e,r){var n=document.forms[t];if(!n)n=document.getElementById(t);this.nextStep=n.elements[r];this.nextStepStage=n.elements[r+"Stage"];this.iframe=document.getElementById(e);this.form=n;this.form.target=e;var o=this;if(this.iframe.attachEvent)this.iframe.attachEvent("onload",function(){o.AjaxHandler()});else this.iframe.onload=function(){o.AjaxHandler()}}CAjaxForm.prototype.AjaxHandler=function(){if(this.iframe.contentWindow&&this.iframe.contentWindow.location.href.indexOf("http")!==0)return;var t;if(this.iframe.contentDocument)t=this.iframe.contentDocument;else t=this.iframe.contentWindow.document;var e=t.body.innerHTML;if(e.length===0||t.getElementById("bitrix_install_template")){this.ShowError("Connection error. Empty response.");return}var r=new RegExp("\\[response\\]","i");var n=new RegExp("\\[/response\\]","i");var o=e.match(r);if(o===null){this.ShowError(e);return}var i=o.index+o[0].length;var a=e.search(n);if(a===-1){this.ShowError(e);return}e=e.substr(i,a-i);window.eval(e)};CAjaxForm.prototype.ShowError=function(t){var e=document.getElementById("error_container");var r=document.getElementById("error_text");if(!e||!r)return;var n=document.getElementById("wait");if(n)n.style.display="none";e.style.display="block";r.innerHTML=strip_tags(t);var o=document.getElementById("error_retry_button");var i=document.getElementById("error_skip_button");var a=this;var s=this.nextStep.value;var l=this.nextStepStage.value;o.onclick=function(){a.HideError();a.Post(s,l,"")};if(s==="main")i.onclick=function(){a.HideError();a.Post(s,l,"")};else i.onclick=function(){a.HideError();a.Post(s,"skip","")}};CAjaxForm.prototype.HideError=function(){var t=document.getElementById("error_container");var e=document.getElementById("error_text");if(!t||!e)return;while(e.firstChild)e.removeChild(e.firstChild);t.style.display="none";var r=document.getElementById("wait");if(r)r.style.display="block"};CAjaxForm.prototype.Post=function(t,e,r){if(t)this.nextStep.value=t;if(e)this.nextStepStage.value=e;this.form.submit()};CAjaxForm.prototype.StopAjax=function(){this.UnsetEventBeforeUnloadWindow();this.iframe.onload=null;this.form.target="_self"};CAjaxForm.prototype.SetStatus=function(t){};CAjaxForm.prototype.OnBeforeUnloadWindow=function(t){var e=BX.message("SALE_CSM_WIZARD_DATAINSTALLSTEP_CLOSE_CONFIRMATION");(t||window.event).returnValue=e;return e};CAjaxForm.prototype.SetEventBeforeUnloadWindow=function(){window.addEventListener("beforeunload",this.OnBeforeUnloadWindow)};CAjaxForm.prototype.UnsetEventBeforeUnloadWindow=function(){window.removeEventListener("beforeunload",this.OnBeforeUnloadWindow)}; //# sourceMappingURL=script.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.28 |
proxy
|
phpinfo
|
Settings