mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +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);
|
this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
doLoadingFinished: function() {
|
||||||
|
this.set_color(this.options.color);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If anyone asks, return the content node, so content goes inside
|
* 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)
|
set_color: function(color)
|
||||||
{
|
{
|
||||||
|
this.options.color = color;
|
||||||
this.header.css("backgroundColor", 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);
|
this.content.css("backgroundColor", color);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user