From 1352a55239650c688be5bffa60230dc15d9983af Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 29 Aug 2007 13:24:56 +0000 Subject: [PATCH] Updated server service. 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 | 20 +++++++++++++------ .../systems/class_divListSystemService.inc | 2 +- plugins/admin/systems/class_servDHCP.inc | 14 +++++++++++-- plugins/admin/systems/class_serverService.inc | 5 +---- plugins/admin/systems/servdhcp.tpl | 7 +++++++ 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/html/include/focus.js b/html/include/focus.js index 082061988..615c211f9 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -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) { diff --git a/plugins/admin/systems/class_divListSystemService.inc b/plugins/admin/systems/class_divListSystemService.inc index 7f86a278b..d48a3858d 100644 --- a/plugins/admin/systems/class_divListSystemService.inc +++ b/plugins/admin/systems/class_divListSystemService.inc @@ -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() diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index fbb7b727e..627275483 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -1,11 +1,11 @@ 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: diff --git a/plugins/admin/systems/class_serverService.inc b/plugins/admin/systems/class_serverService.inc index 65da3963f..e417b38fe 100644 --- a/plugins/admin/systems/class_serverService.inc +++ b/plugins/admin/systems/class_serverService.inc @@ -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("
".$this->divList->Draw()."
"); } diff --git a/plugins/admin/systems/servdhcp.tpl b/plugins/admin/systems/servdhcp.tpl index 4961b5017..25c8682df 100644 --- a/plugins/admin/systems/servdhcp.tpl +++ b/plugins/admin/systems/servdhcp.tpl @@ -7,3 +7,10 @@ +

 

+
+ +   + +
+ -- 2.30.2