Skip to content

Instantly share code, notes, and snippets.

@kalenjordan
Last active August 29, 2015 13:57
Show Gist options
  • Save kalenjordan/9358270 to your computer and use it in GitHub Desktop.
Save kalenjordan/9358270 to your computer and use it in GitHub Desktop.
Gray out rows in a grid if a status column is inactive
// Drop this javascript in the page where your grid is - maybe using a .phtml
// in before_body_end or whatever.
var statuses = document.querySelectorAll(".admin-autoemail-adminhtml-rule-index td");
[].forEach.call(statuses, function (status) {
if (status.textContent.indexOf("Inactive") > -1) {
status.up('tr').style.color = "#aaa";
status.up('tr').down('a').style.color = "#aaa";
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment