mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
Change portlet header text color to contrast with selected color
This commit is contained in:
parent
fd5ccdbf63
commit
d5225a8338
@ -162,6 +162,10 @@ var et2_portlet = (function(){ "use strict"; return et2_valueWidget.extend(
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
doLoadingFinished: function() {
|
||||
this.set_color(this.options.color);
|
||||
},
|
||||
|
||||
/**
|
||||
* If anyone asks, return the content node, so content goes inside
|
||||
*/
|
||||
@ -364,7 +368,9 @@ var et2_portlet = (function(){ "use strict"; return et2_valueWidget.extend(
|
||||
*/
|
||||
set_color: function(color)
|
||||
{
|
||||
this.options.color = color;
|
||||
this.header.css("backgroundColor", color);
|
||||
this.header.css('color', jQuery.Color(this.header.css("backgroundColor")).lightness() > 0.5 ? 'black':'white');
|
||||
this.content.css("backgroundColor", color);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user