Sometimes we need fill color or change text color to emphasize particular information. For example, if states of documents have different colors, users will be easier to identify information that they need, like below picture:
There is a system property named "css" which could store item's style, but how to assign the style to property? The only thing we need to do is specify property name as a CSS class.
Here is an example to show how dynamically assign above style:
Create a method with above code, and then add with Server Event "onAfterGet" into ItemType that you want. Here we take "Document" as example.
Now we can see states of documents with color while searching "Document".
There is a system property named "css" which could store item's style, but how to assign the style to property? The only thing we need to do is specify property name as a CSS class.
Here is an example to show how dynamically assign above style:
Create a method with above code, and then add with Server Event "onAfterGet" into ItemType that you want. Here we take "Document" as example.
Now we can see states of documents with color while searching "Document".
Comments
Post a Comment