diff --git a/api/js/etemplate/et2_widget_color.js b/api/js/etemplate/et2_widget_color.js index 5fce6968f6..edeeb30dcf 100644 --- a/api/js/etemplate/et2_widget_color.js +++ b/api/js/etemplate/et2_widget_color.js @@ -39,14 +39,23 @@ var et2_color = (function(){ "use strict"; return et2_inputWidget.extend( this.input = this.$node = jQuery(""); 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);