'use strict'; var VD = "/Fdv_probit/Analize"; var VD_S = "/s"; var VD_C = "/c"; var VD_A = "/a/"; var gAPI = VD+ VD_S + "/api/g"; var sAPI = VD + VD_S + "/api/s"; var fAPI = sAPI + "/f"; var dAPI = VD + VD_S + "/api/d"; var API = VD + VD_S + "/api"; var cdnAPI = API + "/cdn"; var TEMPS = VD+VD_C+"/pb5/js/template"; var DVIEWS = VD+VD_C+"/pb5/js/views"; var CVIEWS = VD+VD_C+"/pb5/js/common/views"; var GOLOGIN = VD+ VD_A; var LOCALS = VD + VD_C + "/pb5/js/locals"; var cPATH = VD + VD_C; var imgPATH = VD + VD_C + "/pb5/img"; var S_DASH="315"; var L_DASH="660"; var C_APP_VER = "1.50.2"; var C_APP_DATE = "2023.09.04 06:12:07"; var GOOGLE_CLIENT_ID = "250927688592-30pvd3qh99tntahh2uhkq81vdet52f72.apps.googleusercontent.com"; var GOOGLE_API_KEY = "AIzaSyD3sPA7ohA8fMzP8V2-VGTcIEcaeIKfTaY"; var C_DECIMAL_PLACES = 2; var C_DECIMAL_SEPARATOR = ','; //var C_DECIMAL_THOUSANDS_SEPARATOR = '.'; var C_DATETIME_FORMAT_MOMENT = "DD.MM.YYYY HH:mm:ss"; var C_DATE_FORMAT_MOMENT = "DD.MM.YYYY"; var C_TIME_FORMAT_MOMENT = "HH:mm:ss"; var C_DATE_MONTH_FORMAT_MOMENT = "MM.YYYY"; var R_NUMERIC = /^[-]?[0-9]+(\,[0-9]+)?$/; var showFormWarning = true; //var DT_ISO8601 = "YYYY-MM-DDTHH:mm:ss";//"'%Y-%m-%dT%H:%M:%SZ'" 2014-07-22T07:01:37Z var C_FORMATS = { "DATETIME":{ "ISO8601":"YYYY-MM-DDTHH:mm:ssZ", "SL_SI_STANDARD":"DD.MM.YYYY HH:mm" }, "DATE":{ "ISO8601":"YYYY-MM-DD", "SL_SI_STANDARD":"DD.MM.YYYY" } }; var LDAP_DIRECT_AUTH = false; var MAX_FILE_SIZE = 20480; var C_DIALOG_STATUS = { "OK":"ok", "CANCEL":"cancel" }; var UNIQUE_DESCRIPTOR = "FDVProd"; var COMPANY_APP_NAME = ""; var IS_FAYE = "True"==="False"?false:true; var PUBSUB_URL = "https://pbb.pro4erp.com:3020"==="False"?false:"https://pbb.pro4erp.com:3020"; var COMPANION_SERVER_URL = "https://localhost:7775"; var HOST_NAME = "secure.fdv.uni-lj.si"; var SUPPORT_LINK = "https://pbapp.pro4erp.com/pb/s/api/sendtask/0be2cee1-dc49-4f63-91e7-2fc1cf7331ee/39deeae2-5617-4a62-9836-77210ab1f8ae/sl_SI"; function findByKeyInCollection(collection, key, value){ for(var i=0;i HEX value (with hash) for example: #80ff00 type -> where this method is used (on calendar or browse view, ...) */ function setTextColor(backgroundColor, type) { if(type==undefined) type = 'other' var ok = new RegExp("^#[0-9A-F]{6}$", 'i').test(backgroundColor); if (!ok) { // not valid HEX color if (type == 'calendar') { return '#ffffff'; } else { return '#000000'; } } // convert from HEX to RGB backgroundColor = backgroundColor.replace('#', ''); var r = parseInt(backgroundColor.substring(0, 2), 16); var g = parseInt(backgroundColor.substring(2, 4), 16); var b = parseInt(backgroundColor.substring(4, 6), 16); var o = Math.round(((parseInt(r) * 299) + (parseInt(g) * 587) + (parseInt(b) * 114)) / 1000); if (o > 125) { return '#000000'; } else { return '#ffffff'; } }