AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.15.2.133
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/bizproc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/bizproc//starter.min.js
(function(){"use strict";BX.namespace("BX.Bizproc");if(BX.Bizproc.Starter){return}var t=0;var e=function(){window.alert(BX.message("BIZPROC_JS_BP_STARTER_REQUEST_FAILURE"))};var i={instances:[],put:function(t){this.instances.push(t);return this},findSimilar:function(t){var e=[t];for(var i=0;i<this.instances.length;++i){var o=this.instances[i];if(o!==t&&o.moduleId===t.moduleId&&o.entity===t.entity&&o.documentType===t.documentType){e.push(o)}}return e},fireEvent:function(t,e,i){var o=this.findSimilar(t);for(var n=0;n<o.length;++n){BX.onCustomEvent(o[n],e,i)}}};var o=function(e){this.id=++t;this.templates=e.templates||null;this.moduleId=e.moduleId;this.entity=e.entity;this.documentType=e.documentType;this.documentId=e.documentId;this.ajaxUrl=e.ajaxUrl||"/bitrix/components/bitrix/bizproc.workflow.start/ajax.php";i.put(this)};o.singleStart=function(t,e){var i=new o(t);if(BX.type.isFunction(e)){BX.addCustomEvent(i,"onAfterStartWorkflow",e)}if(t.hasParameters){i.showParametersPopup(t.templateId,{title:t.templateName})}else{i.startWorkflow(t.templateId)}};o.prototype={showTemplatesMenu:function(t){if(this.templates===null){this.loadTemplates(this.showTemplatesPopupMenu.bind(this,t))}else{this.showTemplatesPopupMenu(t)}},showTemplatesPopupMenu:function(t){var e=this,i,o,n,s=[];var a=function(t,i){this.popupWindow.close();t.preventDefault();e.onTemplateMenuItemClick(i.template)};for(i=0;i<this.templates.length;++i){o=this.templates[i];n={text:BX.util.htmlspecialchars(o["name"]),template:o,title:o["description"],onclick:a};s.push(n)}if(!s.length){this.showEmptyTemplatesHint(t)}else{BX.PopupMenu.show("bp-starter-tpl-menu-"+this.id,t,s,{closeByEsc:true,zIndex:200,autoHide:true})}},showEmptyTemplatesHint:function(t){var e=BX.message("BIZPROC_JS_BP_STARTER_NO_TEMPLATES");var i=new BX.PopupWindow("bp-starter-tpl-empty"+this.id,t,{lightShadow:true,autoHide:true,darkMode:true,offsetLeft:40,angle:{position:"top",offset:40},bindOptions:{position:"bottom"},zIndex:1100,events:{onPopupClose:function(){this.destroy()}},content:BX.create("div",{attrs:{style:"padding-right: 5px; width: 200px;"},text:e})});i.show()},loadTemplates:function(t){var e=this;this.callAction("get_templates",{},(function(i){e.templates=i.templates;t(i)}))},onTemplateMenuItemClick:function(t){if(!t.hasParameters){this.startWorkflow(t["id"])}else{this.showParametersPopup(t["id"],{title:t["name"]})}},startWorkflow:function(t){var e=this;this.callAction("start_workflow",{template_id:t},(function(t){i.fireEvent(e,"onAfterStartWorkflow",t)}))},showParametersPopup:function(t,e){var o=this;if(!BX.type.isPlainObject(e)){e={}}this.loadParametersHtml({template_id:t},(function(n){var s,a=BX.create("div",{html:n});var r=a.querySelector('[data-role="bizproc-start-form"]');var u;if(r){o.prepareParametersForm(r,t);var p=r.querySelector('[data-role="bizproc-form-buttons"]');if(p){BX.remove(p)}u=new BX.PopupWindowButton({text:BX.message("BIZPROC_JS_BP_STARTER_START"),className:"popup-window-button-accept",events:{click:function(t){BX.fireEvent(r,"submit")}}});BX.bind(r,"submit",(function(t){t.preventDefault();u.addClassName("popup-window-button-wait");o.submitParametersForm(r,(function(t){u.removeClassName("popup-window-button-wait");if(t.success){s.close();i.fireEvent(o,"onAfterStartWorkflow",t.data)}}))}))}s=new BX.PopupWindow("bp-starter-parameters-popup-"+o.id,null,{content:a,width:600,closeIcon:true,titleBar:e.title?BX.Text.decode(e.title):"",closeByEsc:true,draggable:{restrict:false},events:{onPopupClose:function(t){t.destroy()}},buttons:[u,new BX.PopupWindowButtonLink({text:BX.message("BIZPROC_JS_BP_STARTER_CANCEL"),className:"popup-window-button-link-cancel",events:{click:function(t){s.close()}}})]});s.show()}))},showAutoStartParametersPopup:function(t,e){var i=this;if(!BX.type.isPlainObject(e)){e={}}var o=function(t){var o;if(BX.type.isDomNode(t)){o=t.firstChild}else{o=BX.create("div",{html:t})}var n=o.querySelector('[data-role="bizproc-start-form"]');i.prepareParametersForm(n,null,"check_parameters");var s=new BX.PopupWindowButton({text:BX.message("BIZPROC_JS_BP_STARTER_SAVE"),className:"popup-window-button-accept",events:{click:function(t){BX.fireEvent(n,"submit")}}});var a=new BX.PopupWindow("bp-starter-parameters-popup-"+i.id,null,{content:o,width:600,closeIcon:true,titleBar:e.title||BX.message("BIZPROC_JS_BP_STARTER_AUTOSTART"),closeByEsc:true,draggable:{restrict:false},events:{onPopupClose:function(t){t.destroy()}},buttons:[s,new BX.PopupWindowButtonLink({text:BX.message("BIZPROC_JS_BP_STARTER_CANCEL"),className:"popup-window-button-link-cancel",events:{click:function(t){a.close()}}})]});BX.bind(n,"submit",(function(t){t.preventDefault();s.addClassName("popup-window-button-wait");i.submitParametersForm(n,(function(t){s.removeClassName("popup-window-button-wait");if(t.success){a.close();if(e.callback){e.callback(t.data)}}}))}));a.show()};if(e.contentNode){o(e.contentNode)}else{this.loadParametersHtml({auto_execute_type:t},o.bind(this))}},loadParametersHtml:function(t,i){t["sessid"]=BX.bitrix_sessid();t["site_id"]=BX.message("SITE_ID");t["module_id"]=this.moduleId;t["entity"]=this.entity;t["document_type"]=this.documentType;if(this.documentId){t["document_id"]=this.documentId}BX.ajax({method:"POST",dataType:"html",url:"/bitrix/components/bitrix/bizproc.workflow.start/popup.php",data:t,onsuccess:function(t){i(t)},onfailure:e})},prepareParametersForm:function(t,e,i){if(e){t.appendChild(BX.create("input",{attrs:{type:"hidden",name:"template_id",value:e}}))}t.appendChild(BX.create("input",{attrs:{type:"hidden",name:"module_id",value:this.moduleId}}));t.appendChild(BX.create("input",{attrs:{type:"hidden",name:"entity",value:this.entity}}));t.appendChild(BX.create("input",{attrs:{type:"hidden",name:"ajax_action",value:i?i:"start_workflow"}}));t.action=this.ajaxUrl},submitParametersForm:function(t,i){if(t.__requestInProgress){return}t.__requestInProgress=true;var o=new FormData(t);BX.ajax({method:"POST",dataType:"json",url:this.ajaxUrl,data:o,preparePost:false,onsuccess:function(e){delete t.__requestInProgress;if(!e.success){window.alert(e.errors.join("\n"))}if(i){i(e)}},onfailure:e})},callAction:function(t,i,o){i["sessid"]=BX.bitrix_sessid();i["site"]=BX.message("SITE_ID");i["ajax_action"]=t;i["module_id"]=this.moduleId;i["entity"]=this.entity;i["document_type"]=this.documentType;i["document_id"]=this.documentId;BX.ajax({method:"POST",dataType:"json",url:this.ajaxUrl,data:i,onsuccess:function(t){if(t.success){o(t.data,t)}else{window.alert(t.errors.join("\n"))}},onfailure:e})}};BX.Bizproc.Starter=o})();
//# sourceMappingURL=starter.map.js

Anon7 - 2022
AnonSec Team