matrix bug fixes

This commit is contained in:
Yung Han Khoe 2008-12-12 12:20:54 +00:00
parent 8fa164200a
commit 80d7ac6ae1
4 changed files with 16 additions and 6 deletions

View file

@ -20,11 +20,19 @@ YAHOO.util.Event.addListener(window, "load", function() {
elCell.innerHTML = sData + "<div class='wg-hoverhelp'>" + oRecord.getData("description") +"</div>";
}
};
this.formatColors = function(elCell, oRecord, oColumn, sData) {
if(oRecord.getData("fieldType") != 'category'){
var color = oRecord.getData("compareColor");
if(color){
Dom.setStyle(elCell.parentNode, "background-color", color);
}
elCell.innerHTML = sData;
}
};
var myColumnDefs = [
{key:"stickied",formatter:this.formatStickied,label:""},
{key:"label",formatter:this.formatLabel,label:""},
{key:"value",label:""}
{key:"value",label:"",formatter:this.formatColors}
];
this.myDataSource = new YAHOO.util.DataSource("?");
@ -32,7 +40,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
this.myDataSource.connXhrMode = "queueRequests";
this.myDataSource.responseSchema = {
resultsList: "ResultSet.Result",
fields: ["label","value","attributeId","fieldType","checked","description"]
fields: ["label","value","attributeId","fieldType","checked","description","compareColor"]
};
var uri = "func=getAttributes";