Topic
  • 12 replies
  • Latest Post - ‏2013-01-14T09:17:54Z by P.Heath
SystemAdmin
SystemAdmin
5842 Posts

Pinned topic Help with Stylizing Maximo Field Background Color

‏2013-01-09T00:49:34Z |
I'm trying to change the background color of the date fields in the change application version IBM Tivoli Change Management 7.2.1.1 Build 201101211159 DB Build V7211-03. I tried adding "cssclass="bgyellow" on the xml tag as specified on this link:

https://www.ibm.com/developerworks/wikis/display/maximo/Stylize+a+label+or+text+control+to+draw+attention+to+a+field+or+value?focusedCommentId=240124212#comment-240124212

How can I change the background color of fields without having to apply any conditions? I just simply want a different background color.
Updated on 2013-01-14T09:17:54Z at 2013-01-14T09:17:54Z by P.Heath
  • P.Heath
    P.Heath
    200 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-09T08:12:00Z  
    Use cssclass="bgyellow" on the xml tag (NOT "cssclass="bgyellow")

    Best regards,
    Paul Heath Armengol

    Methodology Consultant & Maximo/Rational Tools Administrator
    COSTAISA S.A.
    Barcelona, Spain
  • SystemAdmin
    SystemAdmin
    5842 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-09T18:08:26Z  
    • P.Heath
    • ‏2013-01-09T08:12:00Z
    Use cssclass="bgyellow" on the xml tag (NOT "cssclass="bgyellow")

    Best regards,
    Paul Heath Armengol

    Methodology Consultant & Maximo/Rational Tools Administrator
    COSTAISA S.A.
    Barcelona, Spain
    I did but it doesn't work. It's not changing the background color. Here's what I changed it to:

    <textbox dataattribute="targstartdate" id="main_grid10_1_1_grid12_1" lookup="datelookup" title="Target Start" cssclass="bgorange"/>

    Am I doing something wrong? I see that there are several sections that have the Target Start date and I changed it on the Main Grid section.
  • SystemAdmin
    SystemAdmin
    5842 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-09T23:18:55Z  
    I did but it doesn't work. It's not changing the background color. Here's what I changed it to:

    <textbox dataattribute="targstartdate" id="main_grid10_1_1_grid12_1" lookup="datelookup" title="Target Start" cssclass="bgorange"/>

    Am I doing something wrong? I see that there are several sections that have the Target Start date and I changed it on the Main Grid section.
    Here is what I have tried so far:

    1. Per this link --> http://www.ibm.com/developerworks/wikis/display/maximo/Stylize+a+label+or+text+control+to+draw+attention+to+a+field+or+value
    I tried changing the XML tag as follows:

    <textbox dataattribute="targstartdate" id="main_grid10_1_1_grid12_1" lookup="datelookup" title="Target Start" cssclass="bgorange"/>

    This did not work. I even restarted the application server and cleared app server cache but nothing seemed to get it to work.

    2. So I followed the instructions on this link --> http://maximodev.blogspot.com/2012/03/change-color-field-conditional.html but that didn't work either. I even created a new signature option and condition (always true condition) than the one suggested on these intructions but that didn't work either.

    Any suggestions?????
  • P.Heath
    P.Heath
    200 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-10T12:25:32Z  
    Here is what I have tried so far:

    1. Per this link --> http://www.ibm.com/developerworks/wikis/display/maximo/Stylize+a+label+or+text+control+to+draw+attention+to+a+field+or+value
    I tried changing the XML tag as follows:

    <textbox dataattribute="targstartdate" id="main_grid10_1_1_grid12_1" lookup="datelookup" title="Target Start" cssclass="bgorange"/>

    This did not work. I even restarted the application server and cleared app server cache but nothing seemed to get it to work.

    2. So I followed the instructions on this link --> http://maximodev.blogspot.com/2012/03/change-color-field-conditional.html but that didn't work either. I even created a new signature option and condition (always true condition) than the one suggested on these intructions but that didn't work either.

    Any suggestions?????
    I copied your XML tag in activity.xml on my test env and it works.

    So your environment probably has some other problem... Which versions are you using? Have you checked the content of your maximo.css? Do you have any other visual changes that work?

    Best regards,
    Paul Heath Armengol

    Methodology Consultant & Maximo/Rational Tools Administrator
    COSTAISA S.A.
    Barcelona, Spain
  • scottsd
    scottsd
    121 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-10T17:48:21Z  
    Here is what I have tried so far:

    1. Per this link --> http://www.ibm.com/developerworks/wikis/display/maximo/Stylize+a+label+or+text+control+to+draw+attention+to+a+field+or+value
    I tried changing the XML tag as follows:

    <textbox dataattribute="targstartdate" id="main_grid10_1_1_grid12_1" lookup="datelookup" title="Target Start" cssclass="bgorange"/>

    This did not work. I even restarted the application server and cleared app server cache but nothing seemed to get it to work.

    2. So I followed the instructions on this link --> http://maximodev.blogspot.com/2012/03/change-color-field-conditional.html but that didn't work either. I even created a new signature option and condition (always true condition) than the one suggested on these intructions but that didn't work either.

    Any suggestions?????
    Hi Alicia, the background color of form elements has a special meaning so cannot be easily overridden using the cssclass property. In Tpae, input elements use a background image property in the CSS class for our field to indicate "normal" versus "readonly" fields, that's dynamically added based on the metadata about this field.

    There's a default css class applied to all "normal" input fields called "ib" Use Firebug on Firefox to see it. If you turn off the "background-image" property of this class in Firebug, your background color will then show.

    If you define a new css class in the extended css that blanks out the background-image property and then also add it to the cssclass attribute for this field, you probably can get the behavior your want.

    Thanks,
    Scott
  • scottsd
    scottsd
    121 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-10T18:00:14Z  
    • scottsd
    • ‏2013-01-10T17:48:21Z
    Hi Alicia, the background color of form elements has a special meaning so cannot be easily overridden using the cssclass property. In Tpae, input elements use a background image property in the CSS class for our field to indicate "normal" versus "readonly" fields, that's dynamically added based on the metadata about this field.

    There's a default css class applied to all "normal" input fields called "ib" Use Firebug on Firefox to see it. If you turn off the "background-image" property of this class in Firebug, your background color will then show.

    If you define a new css class in the extended css that blanks out the background-image property and then also add it to the cssclass attribute for this field, you probably can get the behavior your want.

    Thanks,
    Scott
    By the way, we changed the approach that I described and limitation that Alicia has hit so that in Tpae 7.5 the simple background-color property override using cssclass will work the way that you desire, Alicia.

    Paul this is probably why you were able to get it working.

    Thanks,
    Scott
  • SystemAdmin
    SystemAdmin
    5842 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-10T18:53:17Z  
    • scottsd
    • ‏2013-01-10T17:48:21Z
    Hi Alicia, the background color of form elements has a special meaning so cannot be easily overridden using the cssclass property. In Tpae, input elements use a background image property in the CSS class for our field to indicate "normal" versus "readonly" fields, that's dynamically added based on the metadata about this field.

    There's a default css class applied to all "normal" input fields called "ib" Use Firebug on Firefox to see it. If you turn off the "background-image" property of this class in Firebug, your background color will then show.

    If you define a new css class in the extended css that blanks out the background-image property and then also add it to the cssclass attribute for this field, you probably can get the behavior your want.

    Thanks,
    Scott
    Hi Scott,

    Can you provide an example of how you would define a new css class in the extended css that blanks out the background-image property??? Once this is done, would I have to redeploy the ear file?

    Thanks!

    Alicia
  • scottsd
    scottsd
    121 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-11T02:34:27Z  
    Hi Scott,

    Can you provide an example of how you would define a new css class in the extended css that blanks out the background-image property??? Once this is done, would I have to redeploy the ear file?

    Thanks!

    Alicia
    Sure no problem, add this example class to the extended.css file in the webclient/css directory of your SMP maximo

    
    .scott_bgorange 
    { background-image:none !important; background-color:#FFA500 !important; 
    }
    


    Then copy that extended.css to this path
    webclient\skins\tivoli09\css

    Then use cssclass="scott_bgorange" in your presentation xml.

    Thanks,
    Scott
  • P.Heath
    P.Heath
    200 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-11T07:29:57Z  
    • scottsd
    • ‏2013-01-10T18:00:14Z
    By the way, we changed the approach that I described and limitation that Alicia has hit so that in Tpae 7.5 the simple background-color property override using cssclass will work the way that you desire, Alicia.

    Paul this is probably why you were able to get it working.

    Thanks,
    Scott
    Hi Scott,

    We use version 7.2 (not 7.5) and the simple background-color property override using cssclass works, just so you know.

    Best regards,
    Paul Heath Armengol

    Methodology Consultant & Maximo/Rational Tools Administrator
    COSTAISA S.A.
    Barcelona, Spain
  • SystemAdmin
    SystemAdmin
    5842 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-11T22:42:03Z  
    • scottsd
    • ‏2013-01-11T02:34:27Z
    Sure no problem, add this example class to the extended.css file in the webclient/css directory of your SMP maximo

    <pre class="jive-pre"> .scott_bgorange { background-image:none !important; background-color:#FFA500 !important; } </pre>

    Then copy that extended.css to this path
    webclient\skins\tivoli09\css

    Then use cssclass="scott_bgorange" in your presentation xml.

    Thanks,
    Scott
    Scott,

    You are awesome! This worked. Thanks for all your help!

    Have a fantastic weekend!

    Alicia
  • SystemAdmin
    SystemAdmin
    5842 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-11T22:50:19Z  
    • P.Heath
    • ‏2013-01-11T07:29:57Z
    Hi Scott,

    We use version 7.2 (not 7.5) and the simple background-color property override using cssclass works, just so you know.

    Best regards,
    Paul Heath Armengol

    Methodology Consultant & Maximo/Rational Tools Administrator
    COSTAISA S.A.
    Barcelona, Spain
    Paul,

    The version that we use is IBM Tivoli Change Management 7.2.1.1 Build 201101211159 DB Build V7211-03. I think what Scott was trying to say is that it works for the regular Maximo Enterprise Asset Management but not for ours. We have all the ITSM applications so it's Maximo CCMDB (Change and Configuration Management Database), TSRM (Tivoli Service Request Manager), and TAMIT (Tivoli Asset Management for IT). Scott's solution to add a new css class in the extended.css worked.

    Thanks for your help and have a great weekend!

    Alicia
  • P.Heath
    P.Heath
    200 Posts

    Re: Help with Stylizing Maximo Field Background Color

    ‏2013-01-14T09:17:54Z  
    Paul,

    The version that we use is IBM Tivoli Change Management 7.2.1.1 Build 201101211159 DB Build V7211-03. I think what Scott was trying to say is that it works for the regular Maximo Enterprise Asset Management but not for ours. We have all the ITSM applications so it's Maximo CCMDB (Change and Configuration Management Database), TSRM (Tivoli Service Request Manager), and TAMIT (Tivoli Asset Management for IT). Scott's solution to add a new css class in the extended.css worked.

    Thanks for your help and have a great weekend!

    Alicia
    Alicia,

    Just to clarify, I am also ussing TSRM not MAM, your problem stems from the fact that you are using tivoli09 skin instead of the standard one.

    Glad to hear that you solved your problem.

    Best regards,
    Paul Heath Armengol

    Methodology Consultant & Maximo/Rational Tools Administrator
    COSTAISA S.A.
    Barcelona, Spain