From: hickert Date: Tue, 13 Nov 2007 13:05:38 +0000 (+0000) Subject: Added POST variables X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cddb534e0d25487c62a3cf4b2a5493b0abfb8dcc;p=gosa.git Added POST variables git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7788 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ObjectListViewport.inc b/include/class_ObjectListViewport.inc index 966294243..355e3c0af 100644 --- a/include/class_ObjectListViewport.inc +++ b/include/class_ObjectListViewport.inc @@ -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 diff --git a/tests/ListTest/2/index.php b/tests/ListTest/2/index.php index d7043ab94..bbfb49161 100644 --- a/tests/ListTest/2/index.php +++ b/tests/ListTest/2/index.php @@ -1,3 +1,9 @@ + @@ -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); } diff --git a/tests/ListTest/2/tpl b/tests/ListTest/2/tpl index c377eccb8..5c92840bc 100644 --- a/tests/ListTest/2/tpl +++ b/tests/ListTest/2/tpl @@ -111,7 +111,7 @@
-
+
%LIST%
diff --git a/tests/ListTest/3/index.php b/tests/ListTest/3/index.php index 9ffc3c3c1..2e94d0a5b 100644 --- a/tests/ListTest/3/index.php +++ b/tests/ListTest/3/index.php @@ -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); diff --git a/tests/ListTest/ObjectListViewport.css b/tests/ListTest/ObjectListViewport.css index ef4b866fc..78cee6f33 100644 --- a/tests/ListTest/ObjectListViewport.css +++ b/tests/ListTest/ObjectListViewport.css @@ -2,7 +2,8 @@ .ObjectListViewport { width:100%; height:100%; - border-collapse:collapse; + border: solid 1px rgb(176, 176, 176);; + } .ObjectListViewport_Header_Table { diff --git a/tests/ListTest/ObjectListViewport.tpl b/tests/ListTest/ObjectListViewport.tpl index c5f96f7a5..b9352f2d1 100644 --- a/tests/ListTest/ObjectListViewport.tpl +++ b/tests/ListTest/ObjectListViewport.tpl @@ -11,8 +11,7 @@ + "ObjectListViewport_Entry_Checkbox_{$OLV_List_Id}_select_all");'> {/if} {foreach from=$OLV_Header key=key item=item} @@ -32,7 +31,7 @@ + name="{$OLV_List_Id}OLV_Entry_{$key}" value="1"> {/if} {foreach from=$item.cols key=key2 item=item2}