Current Path : /var/www/u0635749/data/www/hobbyclick.ru/public/hobbyclick/bitrix/js/sale/ |
Current File : /var/www/u0635749/data/www/hobbyclick.ru/public/hobbyclick/bitrix/js/sale/vk_section_edit.min.js |
(function(){"use strict";BX.ready(function(){var e=BX.findChild(BX("table_EXPORT_PROFILES"),{class:"vk_export__profile_id"},true,true);e.forEach(function(e){var i=e.getAttribute("value");window["vkExportSections_"+i]=new t(i)})});var t=function(t){this.exportId=t;this.sectionId=null;this.items={};this.init()};t.prototype={init:function(){var t=this.exportId;this.items.vkExportInherit=BX("vk_export_inherit_"+t);this.items.vkExportEnable=BX("vk_export_enable_"+t);this.items.vkExportEnableParent=BX("vk_export_enable_parent_"+t);this.items.vkExportToAlbumCurrent=BX("vk_export_to_album_current_"+t);this.items.vkExportToAlbum=BX("vk_export_to_album_"+t);this.items.vkExportToAlbumParent=BX("vk_export_to_album_parent_"+t);this.items.vkExportToAlbumAlias=BX("vk_export_to_album_alias_"+t);this.items.vkExportToAlbumAliasParent=BX("vk_export_to_album_alias_parent_"+t);this.items.vkExportToAlbumAliasContainer=BX("vk_export_to_album_alias_container_"+t);this.items.vkExportIncludeChilds=BX("vk_export_include_childs_"+t);this.items.vkExportIncludeChildsParent=BX("vk_export_include_childs_parent_"+t);this.items.vkExportVkCategory=BX("vk_export_vk_category_"+t);this.items.vkExportVkCategoryParent=BX("vk_export_vk_category_parent_"+t);this.sectionId=this.items.vkExportToAlbumCurrent.value;BX.bind(this.items.vkExportInherit,"change",BX.delegate(this.onInheritClick,this));BX.bind(this.items.vkExportEnable,"change",BX.delegate(this.onEnableClick,this));BX.bind(this.items.vkExportToAlbum,"change",BX.delegate(this.onToAlbumChange,this))},onToAlbumChange:function(){var t=this.items;if(!(t.vkExportToAlbum.value==this.sectionId&&t.vkExportToAlbum.value>0)){BX.hide(t.vkExportToAlbumAliasContainer)}else{var e=t.vkExportToAlbumAlias.value;if(!e){var i=this.items.vkExportToAlbum.options[this.items.vkExportToAlbum.options.selectedIndex];i=i.text.replace(/^(\. )+/,"");t.vkExportToAlbumAlias.value=i}BX.show(t.vkExportToAlbumAliasContainer)}BX.adjust(t.vkExportIncludeChilds,{props:{disabled:t.vkExportToAlbum.value>0?false:true}})},onEnableClick:function(){this.checkSettingsVisible()},onInheritClick:function(){this.checkSettingsVisible()},checkSettingsVisible:function(){var t=this.items;if(t.vkExportInherit.checked){BX.adjust(t.vkExportEnable,{props:{disabled:true}});this.hideSettings(t);this.setParentValues(t)}else{BX.adjust(t.vkExportEnable,{props:{disabled:false}});if(!t.vkExportEnable.checked){this.hideSettings(t)}else{BX.adjust(t.vkExportToAlbum,{props:{disabled:false}});BX.adjust(t.vkExportVkCategory,{props:{disabled:false}});this.onToAlbumChange(t)}}},setParentValues:function(){var t=this.items;BX.adjust(t.vkExportEnable,{props:{checked:t.vkExportEnableParent.value}});BX.adjust(t.vkExportIncludeChilds,{props:{checked:t.vkExportIncludeChildsParent.value}});t.vkExportToAlbum.value=t.vkExportToAlbumParent.value;t.vkExportToAlbumAlias.value=t.vkExportToAlbumAliasParent.value;t.vkExportVkCategory.value=t.vkExportVkCategoryParent.value},hideSettings:function(){var t=this.items;BX.adjust(t.vkExportToAlbum,{props:{disabled:true}});BX.hide(t.vkExportToAlbumAliasContainer);BX.adjust(t.vkExportIncludeChilds,{props:{disabled:true}});BX.adjust(t.vkExportVkCategory,{props:{disabled:true}})}}})(); //# sourceMappingURL=vk_section_edit.map.js