From f62ecb1157718b631001bdd37812b29ca0221236 Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Thu, 6 Jan 2011 13:16:32 +0000
Subject: [PATCH] refactor style of listbox DomainTree

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42049 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_web_ung_theme/ung_js/ung.js.xml           | 14 +++++++++++++-
 .../erp5_web_ung_theme/ung_theme.css.xml           |  7 +++++--
 bt5/erp5_web_ung_theme/bt/revision                 |  2 +-
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml
index 3590ef77cb..d148ba5f2e 100644
--- a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml
+++ b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml
@@ -148,7 +148,7 @@ $(document).ready(function(){\n
   });\n
   $("tbody tr td.listbox-table-domain-tree-cell a").each(function(){\n
      if ($(this).text().length == 16){\n
-       $(this).css("padding-right", "101px")\n
+       $(this).css("padding-right", "82px")\n
      }\n
      if ($(this).text().length > 16){\n
        $(this).css("padding-right", "35px")\n
@@ -162,6 +162,18 @@ $(document).ready(function(){\n
      if ($(this).text() == "Trash")\n
        $(this).html($(this).text() + createBlankSpace(13));\n
    })\n
+   var listboxTreeHeight = $("div.listbox-tree").css("height").replace("px", "");\n
+   var domainTreeHeight = $("div.listbox-domain-tree-container").css("height").replace("px", "");\n
+   if (parseInt(listboxTreeHeight) > parseInt(domainTreeHeight)){\n
+     window.onload = function() {\n
+       $("div.listbox-tree").css("height", $("div.listbox-domain-tree-container").css("height"));\n
+     }\n
+   }\n
+   if (parseInt(domainTreeHeight) > 233) {\n
+     window.onload = function() {\n
+       $("div.listbox-tree").css("overflow-y", "scroll");\n
+     }\n
+   }\n
    $("body").css("overflow", "hidden");\n
    var navigation_html = $("div.listbox-footer div.listbox-page-navigation").html();\n
    $("div.listbox-footer div.listbox-page-navigation").remove();\n
diff --git a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_theme.css.xml b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_theme.css.xml
index f162dc58c3..66029f77c5 100644
--- a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_theme.css.xml
+++ b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_theme.css.xml
@@ -822,7 +822,10 @@ div.listbox-domain-tree-container select {\n
 \n
 div.listbox-tree {\n
   font-size: 13px;\n
-  width: 103%;\n
+  width: 98.7%;\n
+  overflow-y: hidden;\n
+  overflow-x: hidden;\n
+  height: 233px;\n
 }\n
 \n
 div.listbox-tree-mode-selection {\n
@@ -835,7 +838,7 @@ table.listbox-table-domain-tree {\n
 \n
 td.listbox-table-domain-tree-cell a {\n
   padding-bottom: 3px;\n
-  padding-right: 102px;\n
+  padding-right: 69px;\n
   padding-top: 3px;\n
 }\n
 \n
diff --git a/bt5/erp5_web_ung_theme/bt/revision b/bt5/erp5_web_ung_theme/bt/revision
index 4701cc7931..c663e4d093 100644
--- a/bt5/erp5_web_ung_theme/bt/revision
+++ b/bt5/erp5_web_ung_theme/bt/revision
@@ -1 +1 @@
-150
\ No newline at end of file
+151
\ No newline at end of file
-- 
2.30.9