%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.14.251.248
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/asd.iblock/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/asd.iblock/admin/elementuilist.js
AsdIblockElementUiList = (function() {
	/** @param {{
	* 		resultDiv: string
		}} params
	 */
	var AsdIblockElementUiListDescr = function(params) {
		this.resultDiv = null;

		this.resultDivId = '';

		if (BX.type.isPlainObject(params)) {
			if (BX.type.isNotEmptyString(params.resultDiv))
				this.resultDivId = params.resultDiv;
		}

		BX.ready(BX.proxy(this.init, this));
	};

	AsdIblockElementUiListDescr.prototype.init = function() {
		if (this.resultDivId.length > 0) {
			this.resultDiv = BX(this.resultDivId);
			if (BX.type.isElementNode(this.resultDiv)) {
				BX.bindDelegate(this.resultDiv, 'keydown', { tagName: 'input'  }, BX.proxy(function(event){ this.handlerKeyDown(event); }, this));
				BX.bindDelegate(this.resultDiv, 'keydown', { tagName: 'select' }, BX.proxy(function(event){ this.handlerKeyDown(event); }, this));
				BX.bindDelegate(this.resultDiv, 'keydown', { tagName: 'textarea' }, BX.proxy(function(event){ this.handlerKeyDown(event); }, this));
			}
		}

	};

	AsdIblockElementUiListDescr.prototype.destroy = function() {
		if (BX.type.isElementNode(this.resultDiv)) {
			BX.unbindAll(this.resultDiv);
		}
	};

	AsdIblockElementUiListDescr.prototype.handlerKeyDown = function(event) {
		var target = BX.proxy_context,
			cell,
			row,
			list,
			xCoord,
			yCoord,
			filter,
			found = false,
			i,
			newCell,
			newTarget;

		if ((!event.ctrlKey && !event.metaKey) || !BX.util.in_array(event.keyCode, [37, 38, 39, 40])) {
			return;
		}
		if (!this.isAllowedElement(target)) {
			return;
		}
		cell = BX.findParent(target, this.getCellFilter(), this.resultDiv);

		if (!BX.type.isElementNode(cell)) {
			return;
		}
		row = cell.parentNode;
		xCoord = cell.cellIndex;

		switch (event.keyCode) {
			case 37:
			case 39:
				filter = this.getHorizontalFilter();
				if (event.keyCode === 37) {
					if (xCoord > 0) {
						for (i = xCoord - 1; i >= 0; i--) {
							newTarget = BX.findChild(row.cells[i], filter, true, false);
							if (BX.type.isElementNode(newTarget)) {
								newCell = row.cells[i];
								found = true;
								break;
							}
						}
					}
				} else {
					if (xCoord < (row.cells.length - 1)) {
						for (i = xCoord + 1; i < row.cells.length; i++) {
							newTarget = BX.findChild(row.cells[i], filter, true, false);
							if (BX.type.isElementNode(newTarget)) {
								newCell = row.cells[i];
								found = true;
								break;
							}
						}
					}
				}
				break;
			case 38:
			case 40:
				list = row.parentNode;
				yCoord = row.sectionRowIndex;
				filter = this.getVerticalFilter(target);
				if (event.keyCode === 38) {
					if (yCoord > 0) {
						for (i = yCoord - 1; i >= 0; i--) {
							newTarget = BX.findChild(list.rows[i].cells[xCoord], filter, true, false);
							if (BX.type.isElementNode(newTarget)) {
								newCell = list.rows[i].cells[xCoord];
								found = true;
								break;
							}
						}
					}
				} else {
					if (yCoord < (list.rows.length - 1)) {
						for (i = yCoord + 1; i < list.rows.length; i++) {
							newTarget = BX.findChild(list.rows[i].cells[xCoord], filter, true, false);
							if (BX.type.isElementNode(newTarget)) {
								newCell = list.rows[i].cells[xCoord];
								found = true;
								break;
							}
						}
					}
				}
				filter = null;
				list = null;
				break;
		}
		if (found) {
			BX.focus(newTarget);
			return BX.PreventDefault(event);
		}

		newTarget = null;
		newCell = null;

		row = null;
		cell = null;
	};

	AsdIblockElementUiListDescr.prototype.isAllowedElement = function(node) {
		var attr;
		if (node.tagName === 'INPUT') {
			attr = node.getAttribute('type');
			if (attr === null) {
				return true;
			}
			if (BX.type.isNotEmptyString(attr) && attr.toLowerCase() === 'text') {
				return true;
			}
		} else if (node.tagName === 'SELECT' || node.tagName === 'TEXTAREA') {
			return true;
		}
		return false;
	};

	AsdIblockElementUiListDescr.prototype.getVerticalFilter = function(node) {
		var attr;
		if (node.tagName === 'INPUT') {
			attr = node.getAttribute('type');
			if (attr === null) {
				return { tagName: node.tagName };
			}
			if (BX.type.isNotEmptyString(attr) && attr.toLowerCase() === 'text') {
				return { tagName: node.tagName, attr: { 'type': 'text' } };
			}
		} else if (node.tagName === 'SELECT' || node.tagName === 'TEXTAREA') {
			return { tagName: node.tagName };
		}
		return null;
	};

	AsdIblockElementUiListDescr.prototype.getHorizontalFilter = function() {
		return {
			'callback': this.isAllowedElement
		};
	};

	AsdIblockElementUiListDescr.prototype.getCellFilter = function() {
		return { tagName: 'TD', className: 'main-grid-cell' }
	};

	return AsdIblockElementUiListDescr;
})();

Youez - 2016 - github.com/yon3zu
LinuXploit