Skip to content

Instantly share code, notes, and snippets.

@spacemunkay
Created May 27, 2013 04:04
Show Gist options
  • Save spacemunkay/5655147 to your computer and use it in GitHub Desktop.
Save spacemunkay/5655147 to your computer and use it in GitHub Desktop.
app/components/bosses/javascripts/init_component.js
{
initComponent: function(){
//your init component
},
colorBlock: function(value){
return Ext.String.format('<div style="display:inline-block">{1}</div><div style="background-color:#{0};width:50px;height:10px;display:inline-block;margin:0 5px 0 5px;border:solid;border-color:gray;border-width:1px;"></div>', value, value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment