Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/kanban/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/kanban/utils.min.js |
(function(){"use strict";BX.namespace("BX.Kanban");BX.Kanban.Utils={getKeyDownName:function(t){switch(t){case 27:return"Escape";default:return false}},isValidId:function(t){return BX.type.isNumber(t)||BX.type.isNotEmptyString(t)},getClass:function(t){if(!BX.type.isNotEmptyString(t)){return null}var e=null;var r=window;var n=t.split(".");for(var a=0;a<n.length;a++){var i=n[a];if(!r[i]){return null}r=r[i];e=r}return e},isEmptyObject:function(t){for(var e in t){return false}return true},isValidColor:function(t){return BX.type.isNotEmptyString(t)&&t.match(/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)},getDefaultColors:function(){return["00c4fb","47d1e2","75d900","ffab00","ff5752","468ee5","1eae43"]},isDarkColor:function(t){if(!this.isValidColor(t)){return false}if(t.length===3){t=t.replace(/([a-f0-9])/gi,"$1$1")}t=t.toLowerCase();var e=this.getDefaultColors();if(BX.util.in_array(t,e)){return true}var r=parseInt(t,16);var n=r>>16&255;var a=r>>8&255;var i=r&255;var o=(n*299+a*587+i*114)/1e3;return o<128},showErrorDialog:function(t,e){if(!BX.type.isNotEmptyString(t)){return}var r=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"});r.setContent(t);r.setButtons([new BX.PopupWindowButton({text:e===true?BX.message("MAIN_KANBAN_RELOAD"):BX.message("MAIN_KANBAN_ERROR_CLOSE"),className:"popup-window-button-accept",events:{click:function(){if(e===true){BX.reload()}this.popupWindow.close()}}})]);r.show();return r}}})(); //# sourceMappingURL=utils.map.js