Code

Added styles from currently used list.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Nov 2007 09:00:33 +0000 (09:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Nov 2007 09:00:33 +0000 (09:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7751 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa.conf
include/class_ObjectList.inc
include/class_ObjectListViewport.inc
test.php

index e30c923c2f84423e0757dc52ff247b5f3c10fd31..ca705aa794a61e9dbfc07e12b374075c6f414864 100644 (file)
--- a/gosa.conf
+++ b/gosa.conf
@@ -119,6 +119,6 @@ kiosk-path = "/var/spool/kiosk"
 ppd-path = "/var/spool/ppds"
 
 [plugin/sample]
-headline= "|{18px}|{:L}Name|{100px:R}Actions|"
+headline= "|{18px}|{:L}Name|{160px:R}Actions|"
 footer= "Statistics with no information currently"
 entryFormat= "|{_icon}|{cn} ({_filter(uppercase,{cn})})|{_actions}|"
index 4763933b31aef4fc1712257d53d927af3149e0ab..f9f7dd3bd6686e5e39795f507dc1ddf0a4523a4a 100644 (file)
@@ -68,282 +68,292 @@ class ObjectList implements IteratorAggregate {
          defined filter modules. Handles sorting, too.
         */
        private function load(){
-# Crap filling
+  
+    $icon = 
+'<img src="images/editcut.png" alt="">&nbsp;'.
+'<img src="images/editcopy.png" alt="">&nbsp;'.
+'<img src="images/edit.png" alt="">&nbsp;'.
+'<img src="images/list_password.png" alt="">&nbsp;'.
+'<img src="images/restore.png" alt="">&nbsp;'.
+'<img src="images/snapshot.png" alt="">&nbsp;'.
+'<img src="images/edittrash.png" alt="">';
+
+    # Crap filling
     $this->objects= array(
 
  array("dn" => "cn=1aherbertskiste,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "1aherbertskiste",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=72:9c:13:e9:72:2b,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "72:9c:13:e9:72:2b",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=8f:9c:d0:d5:42:c0,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "8f:9c:d0:d5:42:c0",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=a.b_c,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "a.b_c",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=a5:35:77:86:ff:ca,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "a5:35:77:86:ff:ca",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=cl1--141,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "cl1--141",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=d9:57:9d:08:2c:65,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "d9:57:9d:08:2c:65",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=dyn-111,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "dyn-111",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=e3:b4:43:51:f6:13,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "e3:b4:43:51:f6:13",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=f2:d7:ef:92:e6:43,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "f2:d7:ef:92:e6:43",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=f9:fa:4e:f8:1a:40,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "f9:fa:4e:f8:1a:40",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=hu_ber-test.gonicus.de,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "hu_ber-test.gonicus.de",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=loghost-01,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "loghost-01",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=ntp.jp.,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "ntp.jp.",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=phone-1.gonicus.de.,ou=phones,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "phone-1.gonicus.de.",
               "_icon" => "select_phone.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=printer.222,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "printer.222",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=printer,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "printer",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=shares.jp.,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "shares.jp. [Share server]",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=terminal.jp.,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "terminal.jp.",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=test.test.etst,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "test.test.etst",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=tester,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "tester",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=vserver-04.intranet.gonicus.de,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "vserver-04.",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=workstation,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "workstation",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
  array("dn" => "cn=1aherbertskiste,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "1aherbertskiste",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=72:9c:13:e9:72:2b,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "72:9c:13:e9:72:2b",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=8f:9c:d0:d5:42:c0,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "8f:9c:d0:d5:42:c0",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=a.b_c,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "a.b_c",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=a5:35:77:86:ff:ca,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "a5:35:77:86:ff:ca",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=cl1--141,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "cl1--141",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=d9:57:9d:08:2c:65,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "d9:57:9d:08:2c:65",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=dyn-111,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "dyn-111",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=e3:b4:43:51:f6:13,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "e3:b4:43:51:f6:13",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=f2:d7:ef:92:e6:43,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "f2:d7:ef:92:e6:43",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=f9:fa:4e:f8:1a:40,ou=incoming,o=Landeshauptstadt München,c=de",
               "cn" => "f9:fa:4e:f8:1a:40",
               "_icon" => "select_newsystem.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=hu_ber-test.gonicus.de,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "hu_ber-test.gonicus.de",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=loghost-01,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "loghost-01",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=ntp.jp.,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "ntp.jp.",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=phone-1.gonicus.de.,ou=phones,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "phone-1.gonicus.de.",
               "_icon" => "select_phone.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=printer.222,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "printer.222",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=printer,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "printer",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=shares.jp.,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "shares.jp. [Share server]",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=terminal.jp.,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "terminal.jp.",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=test.test.etst,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "test.test.etst",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=tester,ou=printers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "tester",
               "_icon" => "select_printer.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=vserver-04.intranet.gonicus.de,ou=servers,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "vsernicus.de",
               "_icon" => "select_server.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation')),
 
  array("dn" => "cn=workstation,ou=workstations,ou=systems,o=Landeshauptstadt München,c=de",
               "cn" => "workstation",
               "_icon" => "select_workstation.png",
-              "_actions" => "CPSREDX",
+              "_actions" => $icon,
               "objectClass" => array('gotoWorkstation'))
 
         );
index 3d55843e450931e1a84e30ef3eaf8a0fa1c4619f..693e424c187ace3e761b94494359dd80c0ef5f72 100644 (file)
@@ -92,9 +92,9 @@ class ObjectListViewport {
     $buffer ="<table class='ObjectListViewport_Header_Table'>\n";
     $buffer.="<tr>\n";
     foreach($this->headline as $key => $value){
-      $buffer .= "<td  style='".$value['style']."'>".$value['name']."</td>\n";
+      $buffer .= "<td class='ObjectListViewport_Header_Cell' style='".$value['style']."'>".$value['name']."</td>\n";
     }
-    $buffer.="<td style='width:13px;'>&nbsp;</td>";
+    $buffer.="<td class='ObjectListViewport_Header_Cell' style='border-right:0px;width:14px;'>&nbsp;</td>";
     $buffer.="</tr>\n";
     $buffer.="</table>\n";
     return $buffer;
@@ -160,18 +160,11 @@ class ObjectListViewport {
 
     $buffer="<tr>\n";
     foreach($tmp as $key => $value){
-
-      if(1 || empty($this->headline[$key]['width']) || preg_match("/\%/",$this->headline[$key]['width'])){
         $buffer .= "<td class='ObjectListViewport_Entry_Cell' style='".$this->headline[$key]['style']."'>".
-          "<div style='overflow:hidden;".$this->headline[$key]['style']."'>".
+          "<div style='width:100%;overflow:hidden;".$this->headline[$key]['style']."'>".
             $value.
           "</div>".
           "</td>\n";
-      }else{
-        $buffer .= "<td class='ObjectListViewport_Entry_Cell' style='".$this->headline[$key]['style']."'>".
-          $value.
-          "</td>\n";
-      }
     }
     $buffer.="</tr>\n";
 
@@ -294,7 +287,7 @@ class ObjectListViewport {
         /* Get width */
         $s_width = preg_replace("/^([^:]*).*$/","\\1",$s_format);
         if(!empty($s_width)){
-          $s_style = "width: ".$s_width.";";
+          $s_style.= "width: ".$s_width.";";
         }
       }
       $cell_formats[$key] = array("name" => $s_name, "width" => $s_width, "alignment" => $s_alignment,"style" => $s_style);
index 9979820e69f3234984394bc716ffea68f0d0de54..070e26adeab3231a346bf1de8262c848759cec5c 100644 (file)
--- a/test.php
+++ b/test.php
        height:100px;
 }
 .ObjectListViewport_Entry_Cell {
-       border-left: solid 1px;
-       font-size:10px;
-       height:12px;
+       background-color: white;
+    background-image: none;
+    background-repeat: repeat;
+    background-attachment: scroll;
+    -x-background-x-position: 0%;
+    -x-background-y-position: 0%;
+    -moz-background-clip: -moz-initial;
+    -moz-background-origin: -moz-initial;
+    -moz-background-inline-policy: -moz-initial;
+    border-right-width: 1px;
+    border-right-style: solid;
+    border-right-color: rgb(192, 192, 192);
+    padding-top: 3px;
+    padding-right-value: 3px;
+    padding-bottom: 3px;
+    padding-left-value: 3px;
+    padding-left-ltr-source: physical;
+    padding-left-rtl-source: physical;
+    padding-right-ltr-source: physical;
+    padding-right-rtl-source: physical;
+    height: 22px;
+}
+
+.ObjectListViewport_Footer_Cell {
+
+    background-color: rgb(240, 240, 240);
+    background-image: none;
+    background-repeat: repeat;
+    background-attachment: scroll;
+    -x-background-x-position: 0%;
+    -x-background-y-position: 0%;
+    -moz-background-clip: -moz-initial;
+    -moz-background-origin: -moz-initial;
+    -moz-background-inline-policy: -moz-initial;
+    font-weight: bold;
+    border-top-width: 1px;
+    border-top-style: solid;
+    border-top-color: rgb(170, 170, 170);
+    padding-top: 3px;
+    padding-right-value: 3px;
+    padding-bottom: 3px;
+    padding-left-value: 3px;
+    padding-left-ltr-source: physical;
+    padding-left-rtl-source: physical;
+    padding-right-ltr-source: physical;
+    padding-right-rtl-source: physical;
+    height: 22px;
+}
+
+.ObjectListViewport_Header_Cell {
+    background-color: rgb(240, 240, 240);
+    background-image: none;
+    background-repeat: repeat;
+    background-attachment: scroll;
+    -x-background-x-position: 0%;
+    -x-background-y-position: 0%;
+    -moz-background-clip: -moz-initial;
+    -moz-background-origin: -moz-initial;
+    -moz-background-inline-policy: -moz-initial;
+    font-weight: bold;
+    border-right-width: 1px;
+    border-right-style: solid;
+    border-right-color: rgb(170, 170, 170);
+    border-bottom-width: 1px;
+    border-bottom-style: solid;
+    border-bottom-color: rgb(170, 170, 170);
+    padding-top: 3px;
+    padding-right-value: 3px;
+    padding-bottom: 3px;
+    padding-left-value: 3px;
+    padding-left-ltr-source: physical;
+    padding-left-rtl-source: physical;
+    padding-right-ltr-source: physical;
+    padding-right-rtl-source: physical;
+    height: 22px;
 }
 </style>
 </head>
@@ -168,8 +240,8 @@ $a5 = shell_exec("./test");
 $a6 = shell_exec("./test");
 ?>
 <input type='text' id='debug' value="" style='width:100%;'>
-    <table style='height:90%;width:90%;background-color:#DDDDDD; border: solid 1px;'
-        cellspacing=2 cellpadding=2>
+    <table style='height:90%;width:90%;background-color: rgb(170, 170, 170);'
+        cellspacing=1 cellpadding=0>
         <tr>
             <td style='width:30%;height:30%;'>
                 <?php echo $a1; ?>