mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-10 02:45:08 +00:00
@@ -1,3 +1,16 @@
|
||||
2.3.4 (YYYY-MM-DD)
|
||||
------------------
|
||||
|
||||
New features
|
||||
-
|
||||
|
||||
Enhancements
|
||||
-
|
||||
|
||||
|
||||
Bug fixes
|
||||
- JavaScript exception when printing events from calendars with no assigned color (#3203)
|
||||
|
||||
2.3.3a (2015-11-18)
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -440,17 +440,23 @@ function onAjaxRequestStateChange(http) {
|
||||
|
||||
/* taken from Lightning */
|
||||
function getContrastingTextColor(bgColor) {
|
||||
var calcColor = bgColor.substring(1);
|
||||
var red = parseInt(calcColor.substring(0, 2), 16);
|
||||
var green = parseInt(calcColor.substring(2, 4), 16);
|
||||
var blue = parseInt(calcColor.substring(4, 6), 16);
|
||||
var textColor = "black";
|
||||
if (bgColor) {
|
||||
var calcColor = bgColor.substring(1);
|
||||
var red = parseInt(calcColor.substring(0, 2), 16);
|
||||
var green = parseInt(calcColor.substring(2, 4), 16);
|
||||
var blue = parseInt(calcColor.substring(4, 6), 16);
|
||||
|
||||
// Calculate the brightness (Y) value using the YUV color system.
|
||||
var brightness = (0.299 * red) + (0.587 * green) + (0.114 * blue);
|
||||
// Calculate the brightness (Y) value using the YUV color system.
|
||||
var brightness = (0.299 * red) + (0.587 * green) + (0.114 * blue);
|
||||
|
||||
// Consider all colors with less than 56% brightness as dark colors and
|
||||
// use white as the foreground color, otherwise use black.
|
||||
return ((brightness < 144) ? "white" : "black");
|
||||
// Consider all colors with less than 56% brightness as dark colors and
|
||||
// use white as the foreground color, otherwise use black.
|
||||
if (brightness < 144)
|
||||
textColor = "white";
|
||||
}
|
||||
|
||||
return textColor;
|
||||
}
|
||||
|
||||
function triggerAjaxRequest(url, callback, userdata, content, headers, attempt) {
|
||||
|
||||
Reference in New Issue
Block a user