Hi Tuan,
I have fiddled about trying to find a way to add this myself; I got a bit of code over at
stackoverflow.com
and proceeded by changing
to
Code:
<tr id="bg_status">
at line 120 in mysite.com\components\com_eventbooking\views\event\tmpl\default.php
added the following styles to mysite.com\components\com_eventbooking\assets\js\greybox\gb_styles.css
Code:
.lowerthan20{
background-color:orange;
color:white;
}
.between20and59{
background-color:green;
color:white;
}
.above60{
background-color:red;
color :black;
}
And have been trying numerous ways to add this:
Code:
var cell_status = $('tr.bg_status td');
cell_status.each(function() {
var cell_value = $(this).html();
if ((cell_value >= 0) && (cell_value <=19)) {
$(this).addClass("lowerthan20");
} else if ((cell_value >= 20) && (cell_value <=59)) {
$(this).addClass("between20and59");
} else if (cell_value >= 60) {
$(this).addClass("above60");
}
});
by adding a separate .js-file, by injecting it into the head of the template, by using plugins MetaMod, Custom JavaScript and jQuery Easy.
But I can't get it working at all... :blink:
I hope you can take a look at it once you have the time as agreed above.
Best Regards
Petter