Styles not working in master mode after navigate to another record
Description
Consider the attached 2Pack
It creates a Style and applies it to Sales Order > Document Status
The style shows the docstatus field in Yellow for Drafted orders and green for the rest.
The style works when opening the window, and if you keep navigating to records with the same status as the first navigated when opening the window.
But just after you navigate to a different status, the style disappears.
Example: Opened the Sales Order window in a Drafted order -> style yellow - perfect Navigated to second record also Draft -> style still yellow - perfect Navigated to third record In Progress status -> style disappears and after that it doesn't work anymore
Checked the style in chrome developer tool - after navigating to that record the style is stick to width, even if the program sets the style correctly - green or yellow - when rendering at the end the style that appears is something like "width: 249px;"
My guess is that something is overwriting the style after navigating a record, but I could not find the cause.
Environment
None
Attachments
5
Activity
Show:
Vinicius H Moraes February 12, 2018 at 5:58 PM
Hi hiep, even with the !important my css had not work.
but i found a modified style in my css file that was interrupting the background css, then i deleted then and your tip works!
Thank you!
Hiep Lq February 9, 2018 at 2:33 PM
hi , you miss "!important;" please look my example
Vinicius H Moraes February 8, 2018 at 11:52 AM
hi @Carlos Ruiz , can you explain how you made it work?
i added this style in my theme.css.dsp
and I created a css style with a style line with inline style value equals:
@sclass=my-style
but didn't work. I have also tried with !important, and I got the same result
Carlos Ruiz January 24, 2018 at 12:57 PM
Thanks , it worked fine with sclass
Hiep Lq January 23, 2018 at 4:19 PM
hi . background of textbox (input) on before zk8.5 is setting by class ".z-combobox-disabled *" with value "background: #f0f0f0!important;" so to override have to use other "!important" value.
class "docstatus-draft" is apply to span and textbox will inheritance it, but "!important" is exception.
Consider the attached 2Pack
It creates a Style and applies it to Sales Order > Document Status
The style shows the docstatus field in Yellow for Drafted orders and green for the rest.
The style works when opening the window, and if you keep navigating to records with the same status as the first navigated when opening the window.
But just after you navigate to a different status, the style disappears.
Example:
Opened the Sales Order window in a Drafted order -> style yellow - perfect
Navigated to second record also Draft -> style still yellow - perfect
Navigated to third record In Progress status -> style disappears and after that it doesn't work anymore
Checked the style in chrome developer tool - after navigating to that record the style is stick to width, even if the program sets the style correctly - green or yellow - when rendering at the end the style that appears is something like "width: 249px;"
My guess is that something is overwriting the style after navigating a record, but I could not find the cause.