From 444fadf1d291a19ad3a83c5f9e4f4648afd9ee71 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Tue, 30 Jan 2018 16:34:24 +0000
Subject: [PATCH] [erp5_web_renderjs_ui] Display the active tab with the same
 background color than the page

---
 .../rjs_gadget_erp5_nojqm_css.css                | 16 ++++++++++++----
 .../rjs_gadget_erp5_nojqm_css.xml                |  4 ++--
 .../erp5_web_renderjs_ui/erp5css.less.txt        |  9 ++++++++-
 3 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
index 0932af3da1..51cf31bc82 100644
--- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
+++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
@@ -526,9 +526,13 @@ div[data-gadget-scope='panel'] ul li a {
   overflow: hidden;
   white-space: nowrap;
 }
-div[data-gadget-scope='panel'] ul li a:hover,
-div[data-gadget-scope='panel'] ul li a:active,
 div[data-gadget-scope='panel'] ul li a.active {
+  color: #1F1F1F;
+  background-color: #FFFFFF;
+}
+div[data-gadget-scope='panel'] ul li a:hover,
+div[data-gadget-scope='panel'] ul li a:active {
+  color: #FFFFFF;
   background-color: #2b2b2b;
 }
 div[data-gadget-scope='panel'] ul li a::before {
@@ -564,9 +568,13 @@ div[data-gadget-scope='panel'] dl dd a {
   white-space: nowrap;
   padding-left: 36pt;
 }
-div[data-gadget-scope='panel'] dl dd a:hover,
-div[data-gadget-scope='panel'] dl dd a:active,
 div[data-gadget-scope='panel'] dl dd a.active {
+  color: #1F1F1F;
+  background-color: #FFFFFF;
+}
+div[data-gadget-scope='panel'] dl dd a:hover,
+div[data-gadget-scope='panel'] dl dd a:active {
+  color: #FFFFFF;
   background-color: #2b2b2b;
 }
 div[data-gadget-scope='panel'] dl dd a::before {
diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
index 5df398f0ff..1d6b5e542c 100644
--- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
+++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
@@ -242,7 +242,7 @@
             </item>
             <item>
                 <key> <string>serial</string> </key>
-                <value> <string>965.9320.8079.11059</string> </value>
+                <value> <string>965.10742.13164.48827</string> </value>
             </item>
             <item>
                 <key> <string>state</string> </key>
@@ -260,7 +260,7 @@
                     </tuple>
                     <state>
                       <tuple>
-                        <float>1517244311.54</float>
+                        <float>1517329600.93</float>
                         <string>UTC</string>
                       </tuple>
                     </state>
diff --git a/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt b/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
index 195033f84a..d72d73ea12 100644
--- a/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
+++ b/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
@@ -655,7 +655,14 @@ div[data-gadget-scope='panel'] {
   .linkpanel() {
     color: @white;
     display: block;
-    &:hover, &:active, &.active {
+    // Define .active before :hover to ensure it hover is displayed
+    // for the .active entry
+    &.active {
+      color: @colorforeground;
+      background-color: @colorbackground;
+    }
+    &:hover, &:active {
+      color: @white;
       background-color: darken(@panelbackgroundcolor, 10%);
     }
   }
-- 
2.30.9