Current Path : /var/www/u0635749/data/www/hobbyclick.ru/www.hobbyclick.ru/www/bitrix/js/sender/page/ |
Current File : /var/www/u0635749/data/www/hobbyclick.ru/www.hobbyclick.ru/www/bitrix/js/sender/page/script.min.js |
(function(e){BX.namespace("BX.Sender");if(BX.Sender.Page){return}function n(){}n.prototype.initButtonPanel=function(){var e="sender-ui-button-panel-";var n=BX(e+"save");var i=BX(e+"cancel");BX.bind(n,"click",function(){BX.addClass(n,"ui-btn-wait");setTimeout(function(){n.disabled=true},100)});if(this.slider.isInSlider()){var t=this;BX.bind(i,"click",function(e){t.slider.close();e.preventDefault();e.stopPropagation()})}};n.prototype.initButtons=function(){var e=BX("SENDER_BUTTON_ADD");if(e){this.slider.bindOpen(e)}this.initButtonPanel()};n.prototype.reloadGrid=function(e){if(!BX.Main||!BX.Main.gridManager){return}if(!e&&BX.Main.gridManager.data){var n=BX.Main.gridManager.data;e=n.length>0?n[0].id:null}if(!e){return}var i=BX.Main.gridManager.getById(e);if(!i||!BX.height(i.instance.getTable())){return}i.instance.reload()};n.prototype.changeGridLoaderShowing=function(e,n){var i=BX.Main.gridManager.getById(e);if(!i||!i.instance){return}n?i.instance.tableFade():i.instance.tableUnfade()};n.prototype.open=function(e,n,i){this.slider.open(e,n,i)};n.prototype.redirect=function(n){e.open(n,"_blank")};n.prototype.slider={init:function(e){if(!this.isSupported()){return}if(typeof BX.Bitrix24!=="undefined"&&typeof BX.Bitrix24.PageSlider!=="undefined"){BX.Bitrix24.PageSlider.bindAnchors({rules:[{condition:e.condition,loader:e.loader,stopParameters:[],options:e.options}]})}},getSlider:function(){if(!this.isSupported()){return null}return BX.SidePanel.Instance},isInSlider:function(){return top!==e&&top.BX&&this.isSupported()},isSupported:function(){return BX.SidePanel&&BX.SidePanel.Instance||this.isInSlider()},bindOpen:function(e){if(!this.isSupported()){return}BX.bind(e,"click",this.openHref.bind(this,e))},openHref:function(e,n){if(!this.isSupported()){return}n.preventDefault();n.stopPropagation();var i=e.getAttribute("href");if(!i){return}this.open(i)},open:function(n,i,t){if(!this.isSupported()){e.location.href=n;return}t=t||{};if(!BX.type.isBoolean(t.cacheable)){t.cacheable=false}this.getSlider().open(n,t);if(i){if(!this.getSlider().iframe){return}BX.addCustomEvent(this.getSlider().iframe.contentWindow,"BX.Bitrix24.PageSlider:onClose",function(){if(BX.type.isBoolean(i)){e.location.reload()}else if(BX.type.isFunction(i)){i()}})}else{BX.addCustomEvent(BX.SidePanel.Instance.getTopSlider(),"SidePanel.Slider:onReload",function(){BX.Sender.Page.reloadGrid()})}},close:function(){if(!this.isSupported()){return null}this.getSlider().close()}};BX.Sender.Page=new n;BX.Sender.Page.slider.init({condition:["/marketing/config/role/","/marketing/config.php"],options:{cacheable:false,events:{onOpen:function(){var e=BX.Main.interfaceButtonsManager;for(var n in e.data){e.data[n].closeSubmenu()}}}}})})(window); //# sourceMappingURL=script.map.js