Code

Added POST variables
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 13:05:38 +0000 (13:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 13:05:38 +0000 (13:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7788 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ObjectListViewport.inc
tests/ListTest/2/index.php
tests/ListTest/2/tpl
tests/ListTest/3/index.php
tests/ListTest/ObjectListViewport.css
tests/ListTest/ObjectListViewport.tpl

index 96629424345da8abb41d1646e952e82659fe59e7..355e3c0af5e5ebaffd9b3e67bfc58543bdc7d0c4 100644 (file)
@@ -188,11 +188,11 @@ class ObjectListViewport extends GOsaGuiElement {
     /* Apply current filter */
     $entries = "";
     $objects= new ObjectListFilterIterator($this->objects->getIterator());
-    foreach ($objects as $value){
-      $entries[] = $this->renderEntry($value);
+    foreach ($objects as $key =>  $value){
+      $entries[$key] = $this->renderEntry($value);
+      $this->createVariable("OLV_Entry_".$key);
     }
 
-
     #Fabian: _POST/_GET Variablen bitte mit $this->createVariable('name');
     #        erstellen.
     #        Damit kann das von der übergreifenden Funktion extrahiert werden
index d7043ab94e8dd35a386aea36ee36d83aa135bb05..bbfb491613ecef328fefa41cafdde643dd1c503e 100644 (file)
@@ -1,3 +1,9 @@
+<?php
+
+require_once("../../../include/autoload.inc");
+restore_error_handler();
+session_start();
+?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
@@ -37,7 +43,6 @@
 /* This is good for testing... */
 error_reporting (E_ALL | E_STRICT);
 
-
 function get_smarty()
 {
     echo "Smarty fake in each ./tests/ListTest[1-9]/index.php";
@@ -61,8 +66,6 @@ function normalizePreg($input)
 
 
 /* Initiate autoloader... */
-require_once("../../../include/autoload.inc");
-restore_error_handler();
 try {
 
        /* Get new test instance of the Configuration */
@@ -70,7 +73,10 @@ try {
        $cr->load("../../../gosa.conf");
 
        /* Get a new test instance of ObjectListViewports */
-       $vp= new ObjectListViewport("plugin/sample");
+       if(!isset($_SESSION['vp'])){
+               $_SESSION['vp'] = new ObjectListViewport("plugin/sample");
+       }
+       $vp = $_SESSION['vp'];
        if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
                $vp->enableFooter(FALSE);
        }
index c377eccb8f8b1ec4bc422429002ed7a6602297ab..5c92840bc3423c64909b954c8e4f44ba68225067 100644 (file)
                        </div>
                        <div style='height:4px;'>
                        </div>
-                       <div class="contentboxb" style="border-top:1px solid #B0B0B0;height:500px;">
+                       <div style="height:500px;">
                                %LIST%
                        </div>
                </td>
index 9ffc3c3c1e79ad5de6f0c6bc07498dbe05d102a6..2e94d0a5b1c964d2cf9868be9bc5331312a0f4a0 100644 (file)
@@ -37,6 +37,7 @@
 /* This is good for testing... */
 error_reporting (E_ALL | E_STRICT);
 
+session_start();
 
 function get_smarty()
 {
@@ -70,8 +71,14 @@ try {
        $cr->load("../../../gosa.conf");
 
        /* Get a new test instance of ObjectListViewports */
-       $vp1= new ObjectListViewport("plugin/sample");
-       $vp2= new ObjectListViewport("plugin/sample");
+
+       if(!isset($_SESSION['vp1'])){
+               $_SESSION['vp1'] = new ObjectListViewport("plugin/sample");
+               $_SESSION['vp2'] = new ObjectListViewport("plugin/sample");
+       }
+       $vp1 = $_SESSION['vp1'];
+       $vp2 = $_SESSION['vp2'];
+
        if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
                $vp1->enableFooter(FALSE);
                $vp2->enableFooter(FALSE);
index ef4b866fc496f06fcd2394e525f741752240d70c..78cee6f33c861a362d934ce38c76a7789446b25b 100644 (file)
@@ -2,7 +2,8 @@
 .ObjectListViewport {
     width:100%;
     height:100%;
-    border-collapse:collapse;
+    border: solid 1px rgb(176, 176, 176);;
+       
 }
 
 .ObjectListViewport_Header_Table {
index c5f96f7a53cf41cba751f1f33518028b08947925..b9352f2d1d2c16170bcd9305731ad466e462988e 100644 (file)
@@ -11,8 +11,7 @@
                     <input class="ObjectListViewport_Entry_Checkbox" type="checkbox" 
                       id="ObjectListViewport_Entry_Checkbox_{$OLV_List_Id}_select_all"
                       onclick='toggle_all_("^ObjectListViewport_Entry_Checkbox_{$OLV_List_Id}_.*$",
-                        "ObjectListViewport_Entry_Checkbox_{$OLV_List_Id}_select_all");'
-                      name="ObjectListViewportEntry_{$OLV_List_Id}_{$key}" value="1">
+                        "ObjectListViewport_Entry_Checkbox_{$OLV_List_Id}_select_all");'>
                   </td> 
                 {/if}                
                 {foreach from=$OLV_Header key=key item=item}
@@ -32,7 +31,7 @@
                       <td class="ObjectListViewport_Entry_Cell" style='width:24px;text-align:center;'>
                         <input class="ObjectListViewport_Entry_Checkbox" type="checkbox"
                           id="ObjectListViewport_Entry_Checkbox_{$OLV_List_Id}_{$key}"  
-                          name="ObjectListViewportEntry_{$OLV_List_Id}_{$key}" value="1">
+                          name="{$OLV_List_Id}OLV_Entry_{$key}" value="1">
                       </td> 
                     {/if}                
                     {foreach from=$item.cols key=key2 item=item2}