Quickie: Changing background-color of table view cells depending on content
For security reasons AppGini filters out CSS styles if injected into HTML code using PHP hook function. In this article you will find an easy-to-use, depencdency-free javascript fuction for changing background-color of table view cells depending on cell’s value. Common function Place the following function in <script>…</script> tags in hooks/header-extras.php, for example, so you can re-use it in any table view later on. Usage For a specific table view, create a javascript hooks file named /hooks/TABLENAME-tv.js, if not already exists. In there call the function shown above. Parameters: column name (string) object having states (as keys) and background-colors (as values). …