%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.135.203.142
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/panel/formsettingspanel/content/crm/src/internal/orderfield/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/panel/formsettingspanel/content/crm/src/internal/orderfield//orderfield.js
import {Dom, Tag} from 'main.core';
import {BaseField} from 'landing.ui.field.basefield';
import {Button} from 'ui.buttons';
import {Loc} from 'landing.loc';

import './css/style.css';

type OrderFieldOptions = {
	title: string,
	selector: string,
};

export default class OrderField extends BaseField
{
	constructor(options: OrderFieldOptions)
	{
		super(options);

		Dom.replace(this.input, this.getWrapper());
	}

	getDropdown(): BX.Landing.UI.Field.Dropdown
	{
		return this.cache.remember('dropdown', () => {
			return new BX.Landing.UI.Field.Dropdown({
				items: this.options.items,
			});
		});
	}

	getButton(): Button
	{
		return this.cache.remember('button', () => {
			return new Button({
				text: Loc.getMessage('LANDING_FORM_SETTINGS_ORDER_SETTINGS_BUTTON_LABEL'),
				color: Button.Color.LIGHT_BORDER,
				size: Button.Size.MEDIUM,
				events: {
					click: this.onButtonClick.bind(this),
				},
			});
		});
	}

	onButtonClick()
	{
		const companyId = this.getDropdown().getValue();
		const url = `/crm/company/details/${companyId}/?init_mode=edit`;
		window.open(url, '_blank');
	}

	getWrapper(): HTMLDivElement
	{
		return this.cache.remember('wrapper', () => {
			return Tag.render`
				<div class="landing-ui-field-order-wrapper">
					${this.getDropdown().getLayout()}
					${this.getButton().render()}
				</div>
			`;
		});
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit