cvs: pear /HTML_OOH_Form/layoutmanager form_gridlayout.php
| From: | Ulf Wendel | Date: | Sat, 03 Nov 2001 23:44:29 +0000 |
| Subject: | cvs: pear /HTML_OOH_Form/layoutmanager form_gridlayout.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1250@lists.php.net to get a copy of this message | ||
uw Sat Nov 3 18:44:29 2001 EDT
Modified files:
/pear/HTML_OOH_Form/layoutmanager form_gridlayout.php
Log:
Bugfix, celladressing did'nt work
Index: pear/HTML_OOH_Form/layoutmanager/form_gridlayout.php
diff -u pear/HTML_OOH_Form/layoutmanager/form_gridlayout.php:1.4
pear/HTML_OOH_Form/layoutmanager/form_gridlayout.php:1.5
--- pear/HTML_OOH_Form/layoutmanager/form_gridlayout.php:1.4 Thu Nov 1 00:01:13 2001
+++ pear/HTML_OOH_Form/layoutmanager/form_gridlayout.php Sat Nov 3 18:44:28 2001
@@ -16,7 +16,7 @@
// | Authors: Ulf Wendel <ulf.wendel@phpdoc.de> |
// +----------------------------------------------------------------------+
//
-// $Id: form_gridlayout.php,v 1.4 2001/11/01 05:01:13 uw Exp $
+// $Id: form_gridlayout.php,v 1.5 2001/11/03 23:44:28 uw Exp $
require_once('HTML_OOH_Form/layoutmanager/form_layoutmanager.php');
@@ -27,7 +27,7 @@
* All you do is define a grid and assign items to each cell.
*
* @access public
-* @version $Id: form_gridlayout.php,v 1.4 2001/11/01 05:01:13 uw Exp $
+* @version $Id: form_gridlayout.php,v 1.5 2001/11/03 23:44:28 uw Exp $
*/
class gridlayout extends layoutmanager {
@@ -69,18 +69,20 @@
function get() {
- $ret = '<table border="0" cellspacing="0"
cellpadding="0">';
+ $ret = '<table border="1" cellspacing="0"
cellpadding="0">';
reset($this->items);
while (list($row, $cols) = each($this->items)) {
$ret .= '<tr>';
$size = round(100 / count($cols));
+
+ ksort($cols);
reset($cols);
while (list($col, $data) = each($cols)) {
if (is_array($data))
$data = $this->callMethod($data['method'], &$data['obj'],
$data['params']);
-
+
#$ret .= sprintf('<td align="left" valign="top"
width="%d%%">%s</td>', $size, $data);
$ret .= sprintf('<td align="left"
valign="top">%s</td>', $data);
}
@@ -127,7 +129,7 @@
list($row, $col) = $this->getCell($cell);
$this->items[$row][$col] = $content;
-
+
} // end func addContent