Created
June 13, 2012 13:42
-
-
Save apanzerj/2924143 to your computer and use it in GitHub Desktop.
Row Coloration Based on Custom Field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$j(document).ready(function(){ | |
$j('.linked > td.<custom field id>').each(function(){ | |
if($j(this).text() == "high"){ | |
$j(this).parent().css('background-color', '#E89090'); | |
$j(this).html('<img src="https://github.com/apanzerj/images/raw/master/flag_mark_red.png" width="10" height="10">'); | |
} | |
if($j(this).text() == "medium"){ | |
$j(this).parent().css('background-color', '#E8E890'); | |
$j(this).html('<img src="https://github.com/apanzerj/images/raw/master/flag_mark_yellow.png" width="10" height="10">'); | |
} | |
if($j(this).text() == "low"){ | |
$j(this).parent().css('background-color', '#90E8A2'); | |
$j(this).html('<img src="https://github.com/apanzerj/images/raw/master/flag_mark_green.png" width="10" height="10">'); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment