Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Highlighting rows in the DOM?


Go to End


829 Views

Avatar
bummzack

Community Member, 904 Posts

13 October 2010 at 9:24pm

Edited: 13/10/2010 9:25pm

Hello all

I was wondering if there's a way to highlight rows in the DOM, given some criteria.
Example:
I have a DataObject which may only have a limited amount of text. I'd like to highlight DataObjects that have too much text in the DOM. Something like:
Text is short enough => Row has a green background.
Text is between short and too long => Row has an orange background.
Text is too long => Row has a red background.

I know, this whole case could be avoided by limiting the text-input to a given amount of characters, but my use-case is slightly more complicated

Any hints/pointers are most welcome.

Edit: Formatting