rem: var df = doc.createElement("span"); var field = doc.createElement("input"); field.type = "hidden"; df.appendChild(field); field.name = "f_st_" + name; field.value = color; var button = doc.createElement("span"); button.className = "buttonColor"; df.appendChild(button); var span = doc.createElement("span"); span.className = "chooser";  span.style.backgroundColor = color; button.appendChild(span); button.onmouseover = function() { if (!this.disabled) { this.className += " buttonColor-hilite"; }}; button.onmouseout = function() { if (!this.disabled) { this.className = "buttonColor"; }}; span.onclick = function() { if (this.parentNode.disabled) { return false; } editor._popupDialog("select_color.html", function(color) { if (color) { span.style.backgroundColor = "#" + color; field.value = "#" + color; } }, color); }; var span2 = doc.createElement("span"); span2.innerHTML = "&#x00d7;"; span2.className = "nocolor"; span2.title = TableOperations.I18N["Unset color"]; button.appendChild(span2); span2.onmouseover = function() { if (!this.parentNode.disabled) { this.className += " nocolor-hilite"; }}; span2.onmouseout = function() { if (!this.parentNode.disabled) { this.className = "nocolor"; }}; span2.onclick = function() { span.style.backgroundColor = ""; field.value = ""; }; return df; 
add: var df = doc.createElement("span"); var field = doc.createElement("input"); field.type = "hidden"; df.appendChild(field); field.name = "f_st_" + name; field.value = color; var button = doc.createElement("span"); button.className = "buttonColor"; df.appendChild(button); var span = doc.createElement("span"); span.className = "chooser";  span.style.backgroundColor = color; button.appendChild(span); button.onmouseover = function() { if (!this.disabled) { this.className += " buttonColor-hilite"; }}; button.onmouseout = function() { if (!this.disabled) { this.className = "buttonColor"; }}; span.onclick = function() { if (this.parentNode.disabled) { return false; } editor._popupDialog("select_color.php", function(color) { if (color) { span.style.backgroundColor = "#" + color; field.value = "#" + color; } }, color); }; var span2 = doc.createElement("span"); span2.innerHTML = "&#x00d7;"; span2.className = "nocolor"; span2.title = TableOperations.I18N["Unset color"]; button.appendChild(span2); span2.onmouseover = function() { if (!this.parentNode.disabled) { this.className += " nocolor-hilite"; }}; span2.onmouseout = function() { if (!this.parentNode.disabled) { this.className = "nocolor"; }}; span2.onclick = function() { span.style.backgroundColor = ""; field.value = ""; }; return df; 
context: TableOperations.createColorButton = function(doc, editor, color, name) {	if (!color) {		color = "";	} else if (!/#/.test(color)) {		color = HTMLArea._colorToRgb(color);	}	var df = doc.createElement("span"); 	var field = doc.createElement("input");	field.type = "hidden";	df.appendChild(field); 	field.name = "f_st_" + name;	field.value = color;	var button = doc.createElement("span");	button.className = "buttonColor";	df.appendChild(button);	var span = doc.createElement("span");	span.className = "chooser";	// span.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";	span.style.backgroundColor = color;	button.appendChild(span);	button.onmouseover = function() { if (!this.disabled) { this.className += " buttonColor-hilite"; }};	button.onmouseout = function() { if (!this.disabled) { this.className = "buttonColor"; }};	span.onclick = function() {		if (this.parentNode.disabled) {			return false;		}		editor._popupDialog("select_color.html", function(color) {			if (color) {				span.style.backgroundColor = "#" + color;				field.value = "#" + color;			}		}, color);	};	var span2 = doc.createElement("span");	span2.innerHTML = "&#x00d7;";	span2.className = "nocolor";	span2.title = TableOperations.I18N["Unset color"];	button.appendChild(span2);	span2.onmouseover = function() { if (!this.parentNode.disabled) { this.className += " nocolor-hilite"; }};	span2.onmouseout = function() { if (!this.parentNode.disabled) { this.className = "nocolor"; }};	span2.onclick = function() {		span.style.backgroundColor = "";		field.value = "";	};	return df;};
meta: 752	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/752/b95cfe0a8ebbc3a21a218afd124442c6ec979137/table-operations.js/buggy/lib/editor/plugins/TableOperations/table-operations.js