From 9bece0393d655db536b9cb93990af6f503f6eab5 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 29 Oct 2009 13:36:59 +0000 Subject: [PATCH] Updated size behaviour git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14705 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/include/focus.js | 33 ++++++++++++++------- gosa-core/include/class_listing.inc | 1 + gosa-core/plugins/admin/users/user-list.tpl | 1 + gosa-core/plugins/admin/users/user-list.xml | 2 +- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/gosa-core/html/include/focus.js b/gosa-core/html/include/focus.js index aab47d898..6ade45d20 100644 --- a/gosa-core/html/include/focus.js +++ b/gosa-core/html/include/focus.js @@ -395,23 +395,36 @@ function adjust_width(e) var width= parseInt(window.innerWidth); // Resize the body cells, 470 represents the info box and the navigation part - var diff= width - div_width - 470; + var save= 470; if(document.getElementById('d_save')) { - diff= width - div_width - document.getElementById('d_save').value; + save= document.getElementById('d_save').value; } - + var space= 600; + if(document.getElementById('d_space')) { + space= document.getElementById('d_space').value; + } + var diff= width - div_width - save; + // window has been upscaled - if(div_width+diff>=600) { - document.getElementById('d_scrollbody').style.width=div_width+diff+"px"; - document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px"; + if(div_width+diff>=space) { + if (width - save > space) { + document.getElementById('d_scrollbody').style.width=div_width+diff+"px"; + document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px"; - // Resize the Header cells (only the relative-width ones) - document.getElementById('t_scrollhead').style.width=div_width+diff+"px"; + // Resize the Header cells (only the relative-width ones) + document.getElementById('t_scrollhead').style.width=div_width+diff+"px"; + } else { + document.getElementById('d_scrollbody').style.width=div_width+"px"; + document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; + + // Resize the Header cells (only the relative-width ones) + document.getElementById('t_scrollhead').style.width=div_width+"px"; + } // window has been downscaled, we must reset the div to 600px - } else if (width < 930) { + } else if (width < 1200) { // Reset layout (set width to 600px) - div_width=600; + div_width=space; document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 464f0a0dd..aaf50515d 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -555,6 +555,7 @@ class listing { $layout= preg_replace("/^\|/", "", $layout); $layout= preg_replace("/\|$/", "", $layout); $cols= split("\|", $layout); + foreach ($cols as $index => $config) { if ($config != "") { $res= ""; diff --git a/gosa-core/plugins/admin/users/user-list.tpl b/gosa-core/plugins/admin/users/user-list.tpl index dfa5b8362..b233c5874 100644 --- a/gosa-core/plugins/admin/users/user-list.tpl +++ b/gosa-core/plugins/admin/users/user-list.tpl @@ -19,6 +19,7 @@ + {$LIST} diff --git a/gosa-core/plugins/admin/users/user-list.xml b/gosa-core/plugins/admin/users/user-list.xml index 39be2da31..f7dd62b2b 100644 --- a/gosa-core/plugins/admin/users/user-list.xml +++ b/gosa-core/plugins/admin/users/user-list.xml @@ -30,7 +30,7 @@ - |20px||120px|120px|150px|170px;r| + |16px||120px|120px|150px|170px;r| %{filter:objectType(dn,objectClass)} -- 2.30.2