Code

Updated server service.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Aug 2007 13:24:56 +0000 (13:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Aug 2007 13:24:56 +0000 (13:24 +0000)
Size service list correctly.
Added dhcp service - ACLs still missing.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7164 594d385d-05f5-0310-b6e9-bd551577e9d8

html/include/focus.js
plugins/admin/systems/class_divListSystemService.inc
plugins/admin/systems/class_servDHCP.inc
plugins/admin/systems/class_serverService.inc
plugins/admin/systems/servdhcp.tpl

index 082061988a997e5cf43695c8b4741ca379d6172e..615c211f9174e8b0a1ff35d732001d45e4bc8310 100644 (file)
@@ -346,17 +346,25 @@ function absTop(e) {
 }
 
 // Automatic resize (width) of divlists
-function adjust_width(e) {
-       if (!e) e=window.event;
+function adjust_width(e) 
+{
+       
+       /* Get event ... it seems to be unused here ...*/
+       if (!e) {
+               e=window.event;
+       }
 
        // Known to not work with IE
        if(document.defaultView && document.getElementById("t_scrolltable")) {
-               // Resize the div
-               var div_width=parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable"),"").getPropertyValue('width'));
+
+               // Get current width of divlist 
+               var div_width   =       parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable"),"").getPropertyValue('width'));
+       
+               // Get window width
                var width= parseInt(window.innerWidth);
 
-               // Resize the body cells
-               var diff= width-div_width-470;
+               // Resize the body cells, 470 represents the info box and the navigation part 
+               var diff= width -       div_width       -       470;
                
                // window has been upscaled
                if(div_width+diff>=600) {
index 7f86a278bd4881c916530dd20610dd5faabd1663..d48a3858df88c56443fac98905fa5d6767588727 100644 (file)
@@ -30,7 +30,7 @@ class divListSystemService extends MultiSelectWindow
     $this->AddHeader(array("string"=>_("Service name")));
     $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:100px;border-right:0px;'"));
     $this->HideFilterPart();
-    $this->SetHeight(500);
+    $this->SetHeadpageMode();
   }
 
   function GenHeader()
index fbb7b727e6007f350e053d25a84262f0c7069d21..6272754830d40e8123a47e0fd04e9a43cb67dd9a 100644 (file)
@@ -1,11 +1,11 @@
 <?php
 
-class servdhcp extends plugin
+class servdhcp extends goService
 {
   /* attribute list for save action */
   var $attributes= array("dhcpServiceDN");
   var $objectclasses= array("dhcpServer");
-
+  var $conflicts        = array("servdhcp");
   var $dhcpServiceDN= "";
 
   /* Section storage */
@@ -26,6 +26,8 @@ class servdhcp extends plugin
     $this->serviceDN = "cn=dhcp,".$dn;
     $this->orig_dn = $dn;
 
+    $this->DisplayName = _("DHCP service");
+
     $this->types= array(  "dhcpLog" => _("Logging"),
             "dhcpService" => _("Global options"),
             "dhcpClass" => _("Class"),
@@ -570,6 +572,14 @@ class servdhcp extends plugin
     ));
   }
 
+  function getListEntry()
+  {
+    $fields               = goService::getListEntry();
+    $fields['Message']    = _("DHCP service");
+    $fields['AllowEdit']  = true;
+    return($fields);
+  }
+
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 65da3963fa78dc231d1403da2e270e7e15815628..e417b38fe2faf9701274875dd6611be513c3adcf 100644 (file)
@@ -50,9 +50,6 @@ class ServerService extends plugin
       }
     }
     $this->divList = new divListSystemService($config,$this);
-
-
-
        }
 
   function set_acl_base($base)
@@ -234,7 +231,7 @@ class ServerService extends plugin
       }
     }
     $this->divList -> setEntries($list);
-    return($this->divList->Draw());
+    return("<table style='width:100%;'><tr><td>".$this->divList->Draw()."</td></tr></table>");
   }
 
 
index 4961b501714a000d4268f03943a5e2e8172b929b..25c8682dfafefecd362ac77208dc35402dfb4296 100644 (file)
@@ -7,3 +7,10 @@
        </td>
 </tr>
 </table>
+<p class='seperator'>&nbsp;</p>
+<div style="width:100%; text-align:right;padding-top:10px;padding-bottom:3px;">
+    <input type='submit' name='SaveService' value='{t}Save{/t}'>
+    &nbsp;
+    <input type='submit' name='CancelService' value='{t}Cancel{/t}'>
+</div>
+