%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.21.246.168 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/field/ |
Upload File : |
;(function() { "use strict"; BX.namespace("BX.Landing.UI.Field"); BX.Landing.UI.Field.DynamicImage = function(options) { BX.Landing.UI.Field.BaseField.apply(this, arguments); BX.addClass(this.layout, "landing-ui-field-dynamic-image"); BX.remove(this.input); this.reference = options.reference; this.linkField = options.linkField; this.dropdownField = new BX.Landing.UI.Field.Dropdown({ title: options.title, items: options.dropdownItems, content: BX.type.isPlainObject(options.value) ? options.value.id : undefined }); this.checkboxField = new BX.Landing.UI.Field.Checkbox({ title: BX.Landing.Loc.getMessage('LANDING_BLOCK__DYNAMIC_LINK_ACTION_FIElD_LABEL'), items: [ { name: BX.Landing.Loc.getMessage('LANDING_BLOCK__DYNAMIC_IMAGE_MAKE_LINK_TO_DETAIL'), value: true, checked: (function() { if (BX.type.isPlainObject(options.value)) { return [true, "true"].includes(options.value.link); } return false; })() } ], multiple: false }); BX.remove(this.dropdownField.header); BX.remove(this.checkboxField.header); this.grid = this.createGrid(); this.dropdownContainer = this.grid.children[0]; this.checkboxContainer = this.grid.children[1]; this.layout.appendChild(this.grid); this.dropdownContainer.appendChild(this.dropdownField.layout); if (!options.hideCheckbox) { this.checkboxContainer.appendChild(this.checkboxField.layout); } if (BX.type.isPlainObject(options.value)) { this.setValue(options.value); } }; BX.Landing.UI.Field.DynamicImage.prototype = { constructor: BX.Landing.UI.Field.DynamicImage, __proto__: BX.Landing.UI.Field.BaseField.prototype, createGrid: function() { return BX.create({ tag: "div", props: {className: "landing-ui-field-dynamic-image-grid"}, children: [ BX.create({ tag: "div", props: {className: "landing-ui-field-dynamic-image-grid-reference"} }), BX.create({ tag: "div", props: {className: "landing-ui-field-dynamic-image-grid-link"} }) ] }) }, getValue: function() { return { id: this.dropdownField.getValue(), link: this.checkboxField.getValue() }; }, setValue: function(value) { if (BX.type.isPlainObject(value)) { this.dropdownField.setValue(value.id); this.checkboxField.setValue(value.link); } } }; })();