Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/yandex.market/ui/admin/massiveedit/ |
Upload File : |
this.BX=this.BX||{},this.BX.YandexMarket=this.BX.YandexMarket||{},this.BX.YandexMarket.Ui=this.BX.YandexMarket.Ui||{},function(t){"use strict";class e{constructor(t){this.tableId=t}getSelectedIds(){}isForAllChecked(){}reload(){}showError(t){}}class s extends e{constructor(t){super(t),this.grid=BX.Main.gridManager.getById(t).instance}getSelectedIds(){return this.grid.getRows().getSelectedIds()}isForAllChecked(){const t=this.grid.getActionsPanel();if(null==t)return!1;const e=t.getForAllCheckbox();return null!==e&&e.checked}reload(){this.grid.reload()}showError(t){this.grid.arParams.MESSAGES=[{TYPE:"ERROR",TEXT:t}],BX.onCustomEvent(window,"BX.Main.grid:paramsUpdated",[])}}class i extends e{getSelectedIds(){const t=[],e=this.adminList().FORM;for(const s of e.querySelectorAll('input[type="checkbox"][name="ID[]"]'))s.checked&&t.push(s.value);return t}isForAllChecked(){const t=this.adminList().ACTION_TARGET;return t&&t.checked}reload(){const t=this.adminList(),e=t.FORM;BX.showWait(e),t.GetAdminList(window.location.href,(()=>{BX.closeWait(e)}))}showError(t){alert(t)}adminList(){return window[this.tableId]}}class o{static open(t,e,o={}){const n=class{static make(t,e){return"Ui"===t?new s(e):new i(e)}}.make(t,e);new this(n,o).show()}constructor(t,e={}){this.onWindowClose=()=>{this.unbind(),this.releaseModal()},this.onActionDone=()=>{this.unbind(),this.closeModal(),this.grid.reload()},this.grid=t,this.options=Object.assign({},this.constructor.defaults,e)}show(){try{this.createModal().Show(),this.bind()}catch(t){this.grid.showError(t.message)}}bind(){this.handleModalClose(!0),this.handleActionDone(!0)}unbind(){this.handleActionDone(!1),this.handleModalClose(!1)}handleModalClose(t){null!=this._modal&&BX[t?"addCustomEvent":"removeCustomEvent"](this._modal,"onWindowClose",this.onWindowClose)}handleActionDone(t){BX[t?"addCustomEvent":"removeCustomEvent"]("onYandexMarketMassiveEditDone",this.onActionDone)}releaseModal(){this._modal=null}closeModal(){null!=this._modal&&(BX.closeWait(),this._modal.Close(),this._modal=null)}createModal(){return null==this._modal&&(this._modal=new BX.CAdminDialog({title:this.options.lang.MODAL_TITLE,content_url:this.options.url,content_post:{SELECTED:this.selectedRows(),IBLOCK_ID:this.options.iblockId},width:720,height:800,resizable:!0,buttons:[BX.CAdminDialog.btnSave,BX.CAdminDialog.btnCancel]})),this._modal}selectedRows(){if(this.grid.isForAllChecked())throw new Error(this.options.lang.FOR_ALL_NOT_SUPPORTED);const t=this.grid.getSelectedIds(),e=this.options.prefixSelected;return null!=e?t.map((t=>`${e}${t}`)):t}}o.defaults={url:null,iblockId:null,prefixSelected:null,lang:{}},t.MassiveEdit=o}(this.BX.YandexMarket.Ui.Admin=this.BX.YandexMarket.Ui.Admin||{}); //# sourceMappingURL=bundle.js.map