Skip to content

Instantly share code, notes, and snippets.

@jechlin
Created September 27, 2013 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jechlin/6730220 to your computer and use it in GitHub Desktop.
Save jechlin/6730220 to your computer and use it in GitHub Desktop.
highlight based on label colours in dashboard
(function ($) {
$(function () {
AJS.$("iframe").contents().find("a.lozenge[title='status-green']").closest("div.tr").css("background-color", "rgba(0, 128, 0, 0.03)");
AJS.$("iframe").contents().find("a.lozenge[title='status-green']").closest("tr").css("background-color", "rgba(0, 128, 0, 0.1)");
AJS.$("iframe").contents().find("a.lozenge[title='status-amber']").closest("div.tr").css("background-color", "rgba(255, 165, 0, 0.03)");
AJS.$("iframe").contents().find("a.lozenge[title='status-amber']").closest("tr").css("background-color", "rgba(255, 165, 0, 0.16)");
AJS.$("iframe").contents().find("a.lozenge[title='status-red']").closest("div.tr").css("background-color", "rgba(255, 0, 0, 0.03)");
AJS.$("iframe").contents().find("a.lozenge[title='status-red']").closest("tr").css("background-color", "rgba(255, 0, 0, 0.13)");
});
})(AJS.$);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment