Okay
  Public Ticket #990599
Conditional formatting combined with non-default table colours
Closed

Comments

  •  2
    Marco started the conversation

    Hi wpdatatable people,

    Thanks a lot for making your WpDataTables plugin available, it does a great job  so far. I recently ran into an issue.

    I want a nicely formatted table, and highlight certain cells that contain values that require attention.

    So, with the Settings --> Color and Font settings --> Odd row background colour and with Even row background colour, I have defined a nice readable table format.

    Now when I apply conditional formatting, it does not mark the cells. When turning back to default Color and Font settings everything is fine.

    I tried this in your Sandbox. See the attached screenshot. The behavior is exactly the same so I'm pretty sure that it is not a theme, WP, server or other-plugin-related issue.

    It seems that the colour settings of the table override the colours assigned by conditional formatting.

    Is this something that you/I/we can fix ?

    I need to demo to my customer in the beginning of January and it would be very nice to have this solved by then.

    Best regards,

    Marco

  • [deleted] replied

    Hi Marco,
    Thank you for your purchase.

    That is something that can be fixed. I think that we fixed this in newest version of the plugin. What version are you currently using?

  •  2
    Marco replied

    Hi Milos,

    Thanks for your reply. I use version 1.7.

    The example that I showed in the attachment was taken from the Sandbox yesterday. 
    I don't know what version the Sandbox has but it behaves the same as mine.

    Hope this helps.

    Met vriendelijke groet,

    Marco van Steen

  • [deleted] replied

    Hi Marco,

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check PRIVATE so nobody can see it except us.


  •  2
    Marco replied

    Sorry, I hope you can understand that I prefer to not give you temporary credentials at this moment, mainly because I believe it's not necessary, since the problem is also reproducible in your own Sandbox site. Besides that, you will understand that I prefer not to run this production site with a unique, one-off, patched, copy of the plugin.

    I hope you can try to reproduce and fix it first on your own development or sandbox install. 

    So to be 100% sure that we're on the same page regarding this issue, I will describe a quick way to reproduce it step by step using your sandbox install.

    1) check http://sandbox.wpdatatables.com/conditional-formatting-demo/ and note the colorful display.

    2) log in into backend, click wpdatatables --> settings ( http://sandbox.wpdatatables.com/wp-admin/admin.php?page=wpdatatables-settings

    3) select 2nd tab 'Color and font settings' --> change 'Odd row background color' to some color (purple?)

    4) change 'Even row background color' to some other color (grey?)

    5) now check the front-end again http://sandbox.wpdatatables.com/conditional-formatting-demo/  and note that all red/green/yellow marks have disappeared/been overridden by the 'settings' colors (grey and purple).

    Can you try that?

    The behaviour my site needs is that all cells that change colours because of conditional formatting rules in a row, will show these conditional colors regardless of how the background color was set by the plugins settings. 

    I'm not that experienced at CSS and wp/plugin-inner-guts myself, but let me know if there's anything I can try for you.

    I'm curious to hear about your findings.

    What do you think, can you approach the problem this way?

  • [deleted] replied

    Hi Marco,

    In file ../wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js

    find:

    $cell.css( 'background-color', setVal );

    and replace it with:

    $cell.css("cssText", "background-color: " + setVal + " !important");

     After that minify this JavaScript file and replace ../wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.min.js with new minified file or if you don't what to minify file and use wpdatatables.js instead of wpdatatables.min.js just uncheck Use minified wpDataTables Javascript on wpDataTables settings page.

  •  2
    Marco replied

    Thanks a lot for your help.

    Your instructions solve the problem for me! Looks great, I expect it will certainly please my customer.

    BTW: I appreciate your fast response a lot. I do know about your office hours, so I will not count on you to stay up late next time :-) . 

    Keep up the good work.

    Best regards,

    Marco

  • [deleted] replied

    Hi Marco,

    You are welcome. We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks!