mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Etemplate - color widget - use white as an empty value instead of showing black
This commit is contained in:
parent
5f4045d6b9
commit
4d858234ab
@ -39,14 +39,23 @@ var et2_color = (function(){ "use strict"; return et2_inputWidget.extend(
|
||||
this.input = this.$node = jQuery("<input type='color' class='et2_color'/>");
|
||||
|
||||
this.setDOMNode(this.$node[0]);
|
||||
this.set_value(this.options.value);
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
return this.$node.val();
|
||||
var value = this.$node.val();
|
||||
if(value === '#FFFFFF' || value === '#ffffff')
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
||||
set_value: function(color) {
|
||||
|
||||
if(!color)
|
||||
{
|
||||
color = '#ffffff';
|
||||
}
|
||||
this.$node.val(color);
|
||||
}
|
||||
});}).call(this);
|
||||
|
Loading…
Reference in New Issue
Block a user