Code

Updated size behaviour
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Oct 2009 13:36:59 +0000 (13:36 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Oct 2009 13:36:59 +0000 (13:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14705 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/include/focus.js
gosa-core/include/class_listing.inc
gosa-core/plugins/admin/users/user-list.tpl
gosa-core/plugins/admin/users/user-list.xml

index aab47d898ce5fe904a819050b8c0a98975259cbd..6ade45d20b410747c990c79de7a3296855b52a40 100644 (file)
@@ -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";
        
index 464f0a0dd38d7db327cf755abca375cbc25a3f52..aaf50515d420a3077e3e3381d76c0ffad2fb7c7f 100644 (file)
@@ -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= "";
index dfa5b83620c94e6a920d69258f71b43f39a37bb1..b233c5874c0a4d5101b80258c2d6c3e5687d5be6 100644 (file)
@@ -19,6 +19,7 @@
       </div>
       
       <input type="hidden" id="d_save" value="450">
+      <input type="hidden" id="d_space" value="760">
       {$LIST}
     </td>
     <td style='vertical-align:top'>
index 39be2da318d19554efccc916d2486b12286444ab..f7dd62b2b799af7a994d71fa6c5099c5fab6afc9 100644 (file)
@@ -30,7 +30,7 @@
   </definition>
 
   <table>
-    <layout>|20px||120px|120px|150px|170px;r|</layout>
+    <layout>|16px||120px|120px|150px|170px;r|</layout>
 
     <department>
       <value>%{filter:objectType(dn,objectClass)}</value>