From e8a7db516a74f3d29a2851654bdb4ecc79055fad Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Mon, 17 May 2010 09:01:49 +0000
Subject: [PATCH] Use meaningful CSS ID selectors. Make km_custom.css override
 all other CSS files. Fix listbox CSS apperance. Now Settings contains sub
 menu items: "My Preferences" and "My Profile".

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35372 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../WebSite_viewNavigationMenuWidget.xml      | 16 ++++++++++++++-
 .../WebSite_viewUserInformationWidget.xml     | 20 +++++++------------
 .../erp5_km_theme/km_css/color.css.xml        |  4 ++--
 .../erp5_km_theme/km_css/gadget.css.xml       | 11 +++++++---
 .../erp5_km_theme/km_css/layout.css.xml       |  7 +++++--
 .../erp5_km_theme/km_css/listbox.css.xml      | 15 ++++++++------
 .../template_erp5_km_minimal.xml              |  2 +-
 bt5/erp5_km/bt/revision                       |  2 +-
 8 files changed, 48 insertions(+), 29 deletions(-)

diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewNavigationMenuWidget.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewNavigationMenuWidget.xml
index 1780b5a703..92ca3c62e5 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewNavigationMenuWidget.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewNavigationMenuWidget.xml
@@ -181,7 +181,21 @@
     </li>\n
   </tal:block>\n
 \n
-  <li tal:condition="not:is_anonymous"><a href="WebSite_redirectToUserPreference" i18n:translate="" i18n:domain="ui">Settings</a></li>\n
+  <li tal:condition="not:is_anonymous">\n
+    <a href="#" i18n:translate="" i18n:domain="ui">Settings</a>\n
+    <ul>\n
+      <li>\n
+        <a tal:attributes="href string:${portal_path}/WebSite_redirectToUserPerson"\n
+            i18n:translate="" \n
+            i18n:domain="ui">My Profile</a>\n
+      </li>\n
+      <li>\n
+      <a href="WebSite_redirectToUserPreference" \n
+         i18n:translate="" \n
+         i18n:domain="ui">My Preferences</a>\n
+      </li>\n
+    </ul>\n
+  </li>\n
 </ul>\n
 \n
 </tal:block>\n
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewUserInformationWidget.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewUserInformationWidget.xml
index bd4d1aed11..e224fa5eb6 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewUserInformationWidget.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewUserInformationWidget.xml
@@ -60,25 +60,19 @@
                        portal_path python:request.get(\'current_web_site_url\', current_web_site.absolute_url());">\n
 \n
 <tal:block tal:condition="not:here/portal_membership/isAnonymousUser">\n
-  <tal:block tal:define="person_object current_web_site/ERP5Site_getAuthenticatedMemberPersonValue">\n
-    <a tal:define="user_name python:person_object is not None and person_object.getTitle() or here.portal_membership.getAuthenticatedMember().getUserName()"\n
-      tal:attributes="href string:${portal_path}/WebSite_redirectToUserPerson">\n
-      <b tal:replace="user_name">\n
-        jp\n
-      </b>\n
-    </a>\n
-  </tal:block>\n
-  &nbsp;\n
-  <a id="n7" href="#" tal:attributes="href string:${portal_path}/WebSite_logout"\n
+  <a id="login-logout-link" \n
+     href="#" tal:attributes="href string:${portal_path}/WebSite_logout"\n
     i18n:translate="" i18n:domain="ui">\n
     Logout\n
   </a>\n
 </tal:block>\n
 \n
 <tal:block tal:condition="here/portal_membership/isAnonymousUser">\n
-  <a id="n7" href="#" tal:attributes="href string:${portal_path}/login_form"\n
-    i18n:translate="" i18n:domain="ui">\n
-    Login\n
+  <a id="login-logout-link" \n
+     href="#" \n
+     tal:attributes="href string:${portal_path}/login_form"\n
+     i18n:translate="" i18n:domain="ui">\n
+     Login\n
   </a>\n
 </tal:block>\n
 \n
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/color.css.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/color.css.xml
index 9c1570cd00..68e8f32578 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/color.css.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/color.css.xml
@@ -402,14 +402,14 @@ a.pub:link, a.pub:active, a.pub:visited, .pub { color:#45cb45; }\n
 \n
 }\n
 \n
-#menu #n7:link, #menu #n7:active, #menu #n7:visited {\n
+#menu #login-logout-link:link, #menu #login-logout-link:active, #menu #login-logout-link:visited {\n
 \n
 \tbackground: url(../km_img/login.gif) no-repeat transparent;\n
   background-position: 0 -3px;\n
 \n
 }\n
 \n
-#menu #n7:hover {\n
+#menu #login-logout-link:hover {\n
 \n
 \tbackground-position: 0 -23px;\n
 \n
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/gadget.css.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/gadget.css.xml
index d190ce8e41..919dd1e179 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/gadget.css.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/gadget.css.xml
@@ -15,7 +15,7 @@
         </item>
         <item>
             <key> <string>_EtagSupport__etag</string> </key>
-            <value> <string>ts73840454.02</string> </value>
+            <value> <string>ts74084052.19</string> </value>
         </item>
         <item>
             <key> <string>__name__</string> </key>
@@ -200,7 +200,12 @@ div.gadget-latest-documents{\n
 \n
 /* Gadget Documentation */\n
 div.gadget_documentation{\n
-  padding: 0.1em;\n
+  padding: 0.2em;\n
+}\n
+\n
+/* Gadget Advertisements */\n
+div.gadget_advertisement{\n
+  padding: 0.2em;\n
 }\n
 \n
 /*WEB*/\n
@@ -321,7 +326,7 @@ div.block fieldset label{\n
         </item>
         <item>
             <key> <string>size</string> </key>
-            <value> <int>4869</int> </value>
+            <value> <int>4944</int> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/layout.css.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/layout.css.xml
index be4192a4fb..d358af098e 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/layout.css.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/layout.css.xml
@@ -436,7 +436,7 @@ button, select, input {\n
 \n
 }\n
 \n
-#menu #n7:link, #menu #n7:active, #menu #n7:visited {\n
+#menu #login-logout-link:link, #menu #login-logout-link:active, #menu #login-logout-link:visited {\n
 \n
 \theight:20px;\n
 \tposition: relative;\n
@@ -1527,7 +1527,10 @@ div.extendedSearchBar{\n
 div.searchBar input, div.extendedSearchBar input {\n
   width: auto;\n
 }\n
-
+\n
+div.centeredInner {\n
+  text-align: center;\n
+}
 
 ]]></string> </value>
         </item>
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
index de1cfc3ccf..fe163f4d13 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
@@ -49,8 +49,8 @@
 #km_left {\n
   width:auto !important;\n
   min-width:75%;\n
-  background-color:#FFFFFF;\n
-  border:1px solid #D1D0C9;\n
+  /*background-color:#FFFFFF;\n
+  border:1px solid #D1D0C9;*/\n
 }\n
 \n
 /* Search popup fix*/\n
@@ -223,12 +223,12 @@ width:250px;\n
 \n
 /* Search bar */\n
 div.extendedSearchBar {\n
-  float:right;\n
+  float:left;\n
   margin-top:0;\n
-  padding:0;\n
-  right:5px;\n
+  padding:1em 0 0;\n
+  /*right:5px;\n
   text-align:right;\n
-  width:350px;\n
+  width:350px;*/\n
 }\n
 div.extendedSearchBar .button {\n
  background-image: url(\'./km_img/search_background.png\');\n
@@ -267,9 +267,12 @@ background-color:#EBEBE2;\n
 .listbox select {\n
   max-width: 145px;\n
 }\n
+\n
+/*\n
 .listbox input {\n
 width:96%;\n
 }\n
+*/\n
 \n
 button.sort_button_desc{\n
   background-image: url(\'./km_img/switch_desc.png\');\n
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/template_erp5_km_minimal.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/template_erp5_km_minimal.xml
index 0e955b7d2a..dbe03ae1b6 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/template_erp5_km_minimal.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/template_erp5_km_minimal.xml
@@ -119,8 +119,8 @@
                                     \'%s/km_css/pulldown.css\' % portal_path,\n
                                     \'%s/km_css/type.css\' % portal_path,\n
                                      \'%s/km_css/gadget.css\' % portal_path,\n
-                                     \'%s/km_custom.css\' % portal_path,\n
                                      \'%s/km_css/listbox.css\' % portal_path,\n
+                                     \'%s/km_custom.css\' % portal_path,\n
 ];\n
                              global js_list python:[\n
                                    \'%s/erp5_km_utils.js\' % portal_path,\n
diff --git a/bt5/erp5_km/bt/revision b/bt5/erp5_km/bt/revision
index 20888455bf..ca12c174d8 100644
--- a/bt5/erp5_km/bt/revision
+++ b/bt5/erp5_km/bt/revision
@@ -1 +1 @@
-1403
\ No newline at end of file
+1404
\ No newline at end of file
-- 
2.30.9