%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.137.165.228
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/ui/accessrights/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/ui/accessrights/column.js
;(function () {

'use strict';

BX.namespace('BX.UI');

BX.UI.AccessRights.Column = function(options) {
	this.layout = {
		container: null
	};
	this.grid = options.grid ? options.grid : null;
	this.items = options.items ? options.items : [];
	this.userGroup = options.userGroup ? options.userGroup : null;
	this.accessCodes = options.accessCodes ? options.accessCodes : null;
	this.section = options.section ? options.section : null;
	this.headSection = options.headSection;
	this.newColumn = options.newColumn ? options.newColumn : null;
	this.openPopupEvent = options.grid.openPopupEvent ? options.grid.openPopupEvent : null;
	this.popupContainer = options.grid.popupContainer ? options.grid.popupContainer : null;
};

BX.UI.AccessRights.Column.prototype = {
	getItem: function(options)
	{
		options = options || {};

		var param = {};

		if (options.type === 'userGroupTitle')
		{
			param = {
				type: options.type,
				text: options.title,
				controller: options.controller
			}
		}

		if (options.type === 'title')
		{
			param = {
				id: options.id,
				type: options.type,
				hint: options.hint,
				text: options.title,
				controller: options.controller
			}
		}

		if (options.type === 'toggler')
		{
			param = {
				type: options.type,
				access: options.access
			}
		}

		if (options.type === 'variables')
		{
			param = {
				type: options.type,
				text: options.title,
				variables: options.variables,
				access: options.access
			}
		}

		if (options.type === 'role')
		{
			param = {
				type: options.type,
				text: options.title
			}
		}

		if (options.type === 'members')
		{
			var accessCodes = [];

			for(var item in options.members)
			{
				accessCodes[item] = options.members[item].type;
			}
			
			param = {
				type: options.type,
				accessCodes: accessCodes
			}
		}

		param.column = this;
		param.userGroup = this.userGroup;
		param.openPopupEvent = this.openPopupEvent;
		param.popupContainer = this.popupContainer;
		param.currentParam = null;

		param.grid = this.grid;

		if(options.type === 'variables' || options.type === 'toggler')
		{
			var accessId = param.access.id;
			var accessRights = param.userGroup.accessRights;

			for (var i = 0; i < accessRights.length; i++)
			{
				if (accessId === accessRights[i].id)
				{
					param.currentParam = accessRights[i].value;
				}
			}
		}

		return new BX.UI.AccessRights.ColumnItem(param);
	},

	getUserGroup: function()
	{
		return this.userGroup;
	},

	remove: function()
	{
		if(this.layout.container.classList.toggle('ui-access-rights-column-new'))
		{
			this.layout.container.classList.remove('ui-access-rights-column-new');
		}

		this.layout.container.classList.add('ui-access-rights-column-remove');
		this.layout.container.style.width = this.layout.container.offsetWidth + 'px';

		BX.bind(this.layout.container, 'animationend', function() {
			this.layout.container.style.minWidth = '0px';
			this.layout.container.style.maxWidth = '0px';
		}.bind(this));

		setTimeout(function() {
			this.layout.container.parentNode.removeChild(this.layout.container);
		}.bind(this), 500);
	},

	resetClassNew: function()
	{
		this.layout.container.classList.remove('ui-access-rights-column-new');
	},

	render: function()
	{
		if (!this.layout.container)
		{
			var itemsFragment = document.createDocumentFragment();

			if(this.headSection)
			{
				this.userGroup.type = 'role';
				itemsFragment.appendChild(this.getItem(this.userGroup).render());

				this.userGroup.type = 'members';
				itemsFragment.appendChild(this.getItem(this.userGroup).render());
			}

			this.items.map(function(data) {
				var item = this.getItem(data);
				itemsFragment.appendChild(item.render());
			}.bind(this));

			this.layout.container = BX.create('div', {
				props: {
					className: this.newColumn ? 'ui-access-rights-column ui-access-rights-column-new' : 'ui-access-rights-column'
				}
			});

			BX.addCustomEvent('BX.UI.AccessRights:refresh', this.resetClassNew.bind(this));

			this.layout.container.appendChild(itemsFragment);

			return this.layout.container;
		}
	}
};

})();

Youez - 2016 - github.com/yon3zu
LinuXploit