%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.118.20.148
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/components/bitrix/main.field.url/templates/main.view/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/components/bitrix/main.field.url/templates/main.view/src/mobile.js
import {Loc} from 'main.core';

let
	BX = window.BX,
	BXMobileApp = window.BXMobileApp;

let nodeUrl = (function ()
{
	let nodeUrl = function (node, container)
	{
		this.node = node;
		this.container = container;
		this.nodeLink = this.node.previousElementSibling;
		this.click = BX.delegate(this.click, this);
		this.callback = BX.delegate(this.callback, this);
		BX.bind(this.container, 'click', this.click);
	};
	nodeUrl.prototype = {
		click(e)
		{
			if (e.toElement.tagName !== 'A')
			{
				this.show();
				return BX.PreventDefault(e);
			}
		},
		show()
		{
			window.app.exec('showPostForm', {
				attachButton: {items: []},
				attachFileSettings: {},
				attachedFiles: [],
				extraData: {},
				mentionButton: {},
				smileButton: {},
				message: {
					text: BX.util.htmlspecialcharsback(this.nodeLink.value)
				},
				okButton: {
					callback: this.callback,
					name: Loc.getMessage('interface_form_save')
				},
				cancelButton: {
					callback: function ()
					{
					},
					name: Loc.getMessage('interface_form_cancel')
				}
			});
		},
		callback(data)
		{
			data.text = (BX.util.htmlspecialchars(data.text) || '');
			if (data.text === '')
			{
				this.node.textContent = this.nodeLink.getAttribute('placeholder');
				this.node.setAttribute('href', '#');
			}
			else
			{
				this.node.textContent = data.text;
				if (this.checkUrl(data.text))
				{
					this.node.setAttribute('href', data.text);
				}
				else
				{
					this.node.setAttribute('href', 'http://'+data.text);
				}
			}
			this.nodeLink.value = data.text;
			BX.onCustomEvent(this, 'onChange', [this, this.nodeLink]);
		},
		checkUrl(url)
		{
			return /^(callto:|mailto:|https:\/\/|http:\/\/)/i.test(url);
		}
	};
	return nodeUrl;
})();

window.app.exec('enableCaptureKeyboard', true);

BX.Mobile.Field.Url = function (params)
{
	this.init(params);
};

BX.Mobile.Field.Url.prototype = {
	__proto__: BX.Mobile.Field.prototype,
	bindElement: function (node)
	{
		let result = null;
		if (BX(node))
		{
			result = new nodeUrl(node, node.parentElement);
		}
		return result;
	}
};

Youez - 2016 - github.com/yon3zu
LinuXploit