Page 2 of 2

Color list Items according to DB value

Posted: Sun Oct 12, 2014 11:41 am
by Hawk

That worked for the background color. I tried to change the font color of a lable called "header" inside the grid. The label already has a class "MsgTitle" (sepcified in properties panel). So I updated my code in mapping to the following:

preif(value.MSG_status === 'Unread') {
$(element).find('[name="mobilegrid_284_325"]').addClass('highlighted-red');
$(".MsgTitle").css("color", "red");
}
/pre

However, this did not work. Is the way I specify the class css here wrong?


Color list Items according to DB value

Posted: Mon Oct 13, 2014 11:32 am
by Evgene Karachevtsev

Hello Hawk,

Could you please try the same as for grid:
pre$(".MsgTitle").addClass('highlighted-red');/pre
and in the css for this class according style with the mark
pre!important: background-color: red !important;/pre


Color list Items according to DB value

Posted: Mon Oct 13, 2014 12:07 pm
by Hawk

Hi Evgene,

Unfortunately it did not work.

This is my CSS:

pretable.highlighted-red tbody tr td div.cell-wrapper {
background-color: #00674e !important;
color: #ffffff !important;
}/pre

And this is mapped to mobileitemlist_272:

preif(value.MSG_status === 'Unread') {
$(element).find('[name="mobilegrid_284_325"]').addClass('highlighted-red');
$(".MsgTitle").addClass('highlighted-red');
}/pre

and I tried the following as well
preif(value.MSG_status === 'Unread') {
$(element).find('[name="mobilegrid_284_325"]').addClass('highlighted-red');
$(element).find('[name="MsgTitle"]').addClass('highlighted-red');
}/pre

The font color of the lable "MsgTitle" remained green


Color list Items according to DB value

Posted: Mon Oct 13, 2014 12:20 pm
by Evgene Karachevtsev

Hawk,

And where do you have a css style under the label with added class?
pre.MsgTitle.highlighted-red {
color: red !important;
}/pre