cvs: pear /HTML_Progress/Progress/generator HTMLPage.php default.php
| From: | Laurent Laville | Date: | Mon, 25 Jul 2005 13:00:38 +0000 |
| Subject: | cvs: pear /HTML_Progress/Progress/generator HTMLPage.php default.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33306@lists.php.net to get a copy of this message | ||
farell Mon Jul 25 09:00:38 2005 EDT
Modified files:
/pear/HTML_Progress/Progress/generator default.php HTMLPage.php
Log:
- Updates headers comment block
- Removes HTML_CSS package dependency
http://cvs.php.net/diff.php/pear/HTML_Progress/Progress/generator/default.php?r1=1.3&r2=1.4&ty=u Index: pear/HTML_Progress/Progress/generator/default.php diff -u pear/HTML_Progress/Progress/generator/default.php:1.3 pear/HTML_Progress/Progress/generator/default.php:1.4 --- pear/HTML_Progress/Progress/generator/default.php:1.3 Sat Jul 3 10:48:31 2004 +++ pear/HTML_Progress/Progress/generator/default.php Mon Jul 25 09:00:37 2005 @@ -1,65 +1,94 @@ <?php -// +----------------------------------------------------------------------+ -// | PEAR :: HTML :: Progress | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2004 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Laurent Laville <pear@laurent-laville.org> | -// +----------------------------------------------------------------------+ -// -// $Id: default.php,v 1.3 2004/07/03 14:48:31 farell Exp $ - /** * The ActionDisplay class provides the default form rendering. * - * @version 1.2.0 + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML + * @package HTML_Progress + * @subpackage Progress_UI * @author Laurent Laville <pear@laurent-laville.org> - * @access public + * @copyright 1997-2005 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: default.php,v 1.4 2005/07/25 13:00:37 farell Exp $ + * @link http://pear.php.net/package/HTML_Progress + */ + +/** + * The ActionDisplay class provides the default form rendering. + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML * @package HTML_Progress * @subpackage Progress_UI + * @author Laurent Laville <pear@laurent-laville.org> + * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: @package_version@ + * @link http://pear.php.net/package/HTML_Progress */ class ActionDisplay extends HTML_QuickForm_Action_Display { - function _renderForm(&$page) + function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice ($page->controller->_tabs, -2, 1); - $css = new HTML_CSS(); - $css->setStyle('body', 'background-color', '#7B7B88'); - $css->setStyle('body', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('body', 'font-size', '10pt'); - $css->setStyle('h1', 'color', '#FFC'); - $css->setStyle('h1', 'text-align', 'center'); - $css->setStyle('.maintable', 'width', '100%'); - $css->setStyle('.maintable', 'border-width', '0'); - $css->setStyle('.maintable', 'border-style', 'thin dashed'); - $css->setStyle('.maintable', 'border-color', '#D0D0D0'); - $css->setStyle('.maintable', 'background-color', '#EEE'); - $css->setStyle('.maintable', 'cellspacing', '2'); - $css->setStyle('.maintable', 'cellspadding', '3'); - $css->setStyle('th', 'text-align', 'center'); - $css->setStyle('th', 'color', '#FFC'); - $css->setStyle('th', 'background-color', '#AAA'); - $css->setStyle('th', 'white-space', 'nowrap'); - $css->setStyle('input', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('input.flat', 'border-style', 'solid'); - $css->setStyle('input.flat', 'border-width', '2px 2px 0px 2px'); - $css->setStyle('input.flat', 'border-color', '#996'); - -$header = ' + $header = ' <style type="text/css"> <!-- +body { + background-color: #7B7B88; + font-family: Verdana, Arial, helvetica; + font-size: 10pt; +} + +h1 { + color: #FFC; + text-align: center; +} + +.maintable { + width: 100%; + border-width: 0; + border-style: thin dashed; + border-color: #D0D0D0; + background-color: #EEE; + cellspacing: 2; + cellspadding: 3; +} + +th { + text-align: center; + color: #FFC; + background-color: #AAA; + white-space: nowrap; +} + +input { + font-family: Verdana, Arial, helvetica; +} + +input.flat { + border-style: solid; + border-width: 2px 2px 0 2px; + border-color: #996; +} + {%style%} // --> </style> @@ -67,6 +96,8 @@ // on preview tab, add progress bar javascript and stylesheet if ($pageName == $tabPreview[0][0]) { $bar = $page->controller->createProgressBar(); + $ui =& $bar->getUI(); + $ui->setTab(' '); $header .= ' <script type="text/javascript"> @@ -75,13 +106,15 @@ //--> </script> '; - $header = str_replace('{%style%}', $css->toString() . $bar->getStyle(), $header); - $header = str_replace('{%javascript%}', $bar->getScript(), $header); + $placeHolders = array('{%style%}', '{%javascript%}'); + $htmlElement = array( $bar->getStyle(), $bar->getScript() ); + + $header = str_replace($placeHolders, $htmlElement, $header); $barElement =& $page->getElement('progressBar'); $barElement->setText( $bar->toHtml() ); } else { - $header = str_replace('{%style%}', $css->toString(), $header); + $header = str_replace('{%style%}', '', $header); } $renderer =& $page->defaultRenderer(); http://cvs.php.net/diff.php/pear/HTML_Progress/Progress/generator/HTMLPage.php?r1=1.3&r2=1.4&ty=u Index: pear/HTML_Progress/Progress/generator/HTMLPage.php diff -u pear/HTML_Progress/Progress/generator/HTMLPage.php:1.3 pear/HTML_Progress/Progress/generator/HTMLPage.php:1.4 --- pear/HTML_Progress/Progress/generator/HTMLPage.php:1.3 Sat Jul 3 10:48:31 2004 +++ pear/HTML_Progress/Progress/generator/HTMLPage.php Mon Jul 25 09:00:37 2005 @@ -1,85 +1,120 @@ <?php -// +----------------------------------------------------------------------+ -// | PEAR :: HTML :: Progress | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2004 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Laurent Laville <pear@laurent-laville.org> | -// +----------------------------------------------------------------------+ -// -// $Id: HTMLPage.php,v 1.3 2004/07/03 14:48:31 farell Exp $ - /** * The ActionDisplay class provides a HTML_Page form rendering. * - * @version 1.2.0 - * @author Laurent Laville <pear@laurent-laville.org> - * @access public + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML * @package HTML_Progress * @subpackage Progress_UI + * @author Laurent Laville <pear@laurent-laville.org> + * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: HTMLPage.php,v 1.4 2005/07/25 13:00:37 farell Exp $ + * @link http://pear.php.net/package/HTML_Progress */ require_once 'HTML/Page.php'; +/** + * The ActionDisplay class provides a HTML_Page form rendering. + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML + * @package HTML_Progress + * @subpackage Progress_UI + * @author Laurent Laville <pear@laurent-laville.org> + * @copyright 1997-2005 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: @package_version@ + * @link http://pear.php.net/package/HTML_Progress + */ + class ActionDisplay extends HTML_QuickForm_Action_Display { - function _renderForm(&$page) + function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice ($page->controller->_tabs, -2, 1); + $tab = ' '; $p = new HTML_Page(array( 'lineend' => OS_WINDOWS ? 'win' : 'unix', + 'tab' => $tab, 'doctype' => "XHTML 1.0 Strict", 'language' => 'en', 'cache' => 'false' - )); + )); $p->disableXmlProlog(); $p->setTitle("PEAR::HTML_Progress - Generator"); $p->setMetaData("author", "Laurent Laville"); - $css = new HTML_CSS(); - $css->setStyle('body', 'background-color', '#7B7B88'); - $css->setStyle('body', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('body', 'font-size', '10pt'); - $css->setStyle('h1', 'color', '#FFC'); - $css->setStyle('h1', 'text-align', 'center'); - $css->setStyle('.maintable', 'width', '100%'); - $css->setStyle('.maintable', 'border-width', '0'); - $css->setStyle('.maintable', 'border-style', 'thin dashed'); - $css->setStyle('.maintable', 'border-color', '#D0D0D0'); - $css->setStyle('.maintable', 'background-color', '#EEE'); - $css->setStyle('.maintable', 'cellspacing', '2'); - $css->setStyle('.maintable', 'cellspadding', '3'); - $css->setStyle('th', 'text-align', 'center'); - $css->setStyle('th', 'color', '#FFC'); - $css->setStyle('th', 'background-color', '#AAA'); - $css->setStyle('th', 'white-space', 'nowrap'); - $css->setStyle('input', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('input.flat', 'border-style', 'solid'); - $css->setStyle('input.flat', 'border-width', '2px 2px 0px 2px'); - $css->setStyle('input.flat', 'border-color', '#996'); + $css = ' +body { + background-color: #7B7B88; + font-family: Verdana, Arial, helvetica; + font-size: 10pt; +} + +h1 { + color: #FFC; + text-align: center; +} + +.maintable { + width: 100%; + border-width: 0; + border-style: thin dashed; + border-color: #D0D0D0; + background-color: #EEE; + cellspacing: 2; + cellspadding: 3; +} + +th { + text-align: center; + color: #FFC; + background-color: #AAA; + white-space: nowrap; +} + +input { + font-family: Verdana, Arial, helvetica; +} + +input.flat { + border-style: solid; + border-width: 2px 2px 0px 2px; + border-color: #996; +} +'; // on preview tab, add progress bar javascript and stylesheet if ($pageName == $tabPreview[0][0]) { $bar = $page->controller->createProgressBar(); + $ui =& $bar->getUI(); + $ui->setTab($tab); - $p->addStyleDeclaration( $css->toString() . $bar->getStyle() ); + $p->addStyleDeclaration( $css . $bar->getStyle() ); $p->addScriptDeclaration( $bar->getScript() ); $barElement =& $page->getElement('progressBar'); $barElement->setText( $bar->toHtml() ); } else { - $p->addStyleDeclaration( $css->toString() ); + $p->addStyleDeclaration($css); } $renderer =& $page->defaultRenderer(); @@ -92,7 +127,7 @@ $page->accept($renderer); $p->addBodyContent( $renderer->toHtml() ); - $p->display(); + $p->display(); } } ?> \ No newline at end of file
http://cvs.php.net/diff.php/pear/HTML_Progress/Progress/generator/default.php?r1=1.3&r2=1.4&ty=u Index: pear/HTML_Progress/Progress/generator/default.php diff -u pear/HTML_Progress/Progress/generator/default.php:1.3 pear/HTML_Progress/Progress/generator/default.php:1.4 --- pear/HTML_Progress/Progress/generator/default.php:1.3 Sat Jul 3 10:48:31 2004 +++ pear/HTML_Progress/Progress/generator/default.php Mon Jul 25 09:00:37 2005 @@ -1,65 +1,94 @@ <?php -// +----------------------------------------------------------------------+ -// | PEAR :: HTML :: Progress | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2004 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Laurent Laville <pear@laurent-laville.org> | -// +----------------------------------------------------------------------+ -// -// $Id: default.php,v 1.3 2004/07/03 14:48:31 farell Exp $ - /** * The ActionDisplay class provides the default form rendering. * - * @version 1.2.0 + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML + * @package HTML_Progress + * @subpackage Progress_UI * @author Laurent Laville <pear@laurent-laville.org> - * @access public + * @copyright 1997-2005 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: default.php,v 1.4 2005/07/25 13:00:37 farell Exp $ + * @link http://pear.php.net/package/HTML_Progress + */ + +/** + * The ActionDisplay class provides the default form rendering. + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML * @package HTML_Progress * @subpackage Progress_UI + * @author Laurent Laville <pear@laurent-laville.org> + * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: @package_version@ + * @link http://pear.php.net/package/HTML_Progress */ class ActionDisplay extends HTML_QuickForm_Action_Display { - function _renderForm(&$page) + function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice ($page->controller->_tabs, -2, 1); - $css = new HTML_CSS(); - $css->setStyle('body', 'background-color', '#7B7B88'); - $css->setStyle('body', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('body', 'font-size', '10pt'); - $css->setStyle('h1', 'color', '#FFC'); - $css->setStyle('h1', 'text-align', 'center'); - $css->setStyle('.maintable', 'width', '100%'); - $css->setStyle('.maintable', 'border-width', '0'); - $css->setStyle('.maintable', 'border-style', 'thin dashed'); - $css->setStyle('.maintable', 'border-color', '#D0D0D0'); - $css->setStyle('.maintable', 'background-color', '#EEE'); - $css->setStyle('.maintable', 'cellspacing', '2'); - $css->setStyle('.maintable', 'cellspadding', '3'); - $css->setStyle('th', 'text-align', 'center'); - $css->setStyle('th', 'color', '#FFC'); - $css->setStyle('th', 'background-color', '#AAA'); - $css->setStyle('th', 'white-space', 'nowrap'); - $css->setStyle('input', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('input.flat', 'border-style', 'solid'); - $css->setStyle('input.flat', 'border-width', '2px 2px 0px 2px'); - $css->setStyle('input.flat', 'border-color', '#996'); - -$header = ' + $header = ' <style type="text/css"> <!-- +body { + background-color: #7B7B88; + font-family: Verdana, Arial, helvetica; + font-size: 10pt; +} + +h1 { + color: #FFC; + text-align: center; +} + +.maintable { + width: 100%; + border-width: 0; + border-style: thin dashed; + border-color: #D0D0D0; + background-color: #EEE; + cellspacing: 2; + cellspadding: 3; +} + +th { + text-align: center; + color: #FFC; + background-color: #AAA; + white-space: nowrap; +} + +input { + font-family: Verdana, Arial, helvetica; +} + +input.flat { + border-style: solid; + border-width: 2px 2px 0 2px; + border-color: #996; +} + {%style%} // --> </style> @@ -67,6 +96,8 @@ // on preview tab, add progress bar javascript and stylesheet if ($pageName == $tabPreview[0][0]) { $bar = $page->controller->createProgressBar(); + $ui =& $bar->getUI(); + $ui->setTab(' '); $header .= ' <script type="text/javascript"> @@ -75,13 +106,15 @@ //--> </script> '; - $header = str_replace('{%style%}', $css->toString() . $bar->getStyle(), $header); - $header = str_replace('{%javascript%}', $bar->getScript(), $header); + $placeHolders = array('{%style%}', '{%javascript%}'); + $htmlElement = array( $bar->getStyle(), $bar->getScript() ); + + $header = str_replace($placeHolders, $htmlElement, $header); $barElement =& $page->getElement('progressBar'); $barElement->setText( $bar->toHtml() ); } else { - $header = str_replace('{%style%}', $css->toString(), $header); + $header = str_replace('{%style%}', '', $header); } $renderer =& $page->defaultRenderer(); http://cvs.php.net/diff.php/pear/HTML_Progress/Progress/generator/HTMLPage.php?r1=1.3&r2=1.4&ty=u Index: pear/HTML_Progress/Progress/generator/HTMLPage.php diff -u pear/HTML_Progress/Progress/generator/HTMLPage.php:1.3 pear/HTML_Progress/Progress/generator/HTMLPage.php:1.4 --- pear/HTML_Progress/Progress/generator/HTMLPage.php:1.3 Sat Jul 3 10:48:31 2004 +++ pear/HTML_Progress/Progress/generator/HTMLPage.php Mon Jul 25 09:00:37 2005 @@ -1,85 +1,120 @@ <?php -// +----------------------------------------------------------------------+ -// | PEAR :: HTML :: Progress | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2004 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Laurent Laville <pear@laurent-laville.org> | -// +----------------------------------------------------------------------+ -// -// $Id: HTMLPage.php,v 1.3 2004/07/03 14:48:31 farell Exp $ - /** * The ActionDisplay class provides a HTML_Page form rendering. * - * @version 1.2.0 - * @author Laurent Laville <pear@laurent-laville.org> - * @access public + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML * @package HTML_Progress * @subpackage Progress_UI + * @author Laurent Laville <pear@laurent-laville.org> + * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: HTMLPage.php,v 1.4 2005/07/25 13:00:37 farell Exp $ + * @link http://pear.php.net/package/HTML_Progress */ require_once 'HTML/Page.php'; +/** + * The ActionDisplay class provides a HTML_Page form rendering. + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML + * @package HTML_Progress + * @subpackage Progress_UI + * @author Laurent Laville <pear@laurent-laville.org> + * @copyright 1997-2005 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: @package_version@ + * @link http://pear.php.net/package/HTML_Progress + */ + class ActionDisplay extends HTML_QuickForm_Action_Display { - function _renderForm(&$page) + function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice ($page->controller->_tabs, -2, 1); + $tab = ' '; $p = new HTML_Page(array( 'lineend' => OS_WINDOWS ? 'win' : 'unix', + 'tab' => $tab, 'doctype' => "XHTML 1.0 Strict", 'language' => 'en', 'cache' => 'false' - )); + )); $p->disableXmlProlog(); $p->setTitle("PEAR::HTML_Progress - Generator"); $p->setMetaData("author", "Laurent Laville"); - $css = new HTML_CSS(); - $css->setStyle('body', 'background-color', '#7B7B88'); - $css->setStyle('body', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('body', 'font-size', '10pt'); - $css->setStyle('h1', 'color', '#FFC'); - $css->setStyle('h1', 'text-align', 'center'); - $css->setStyle('.maintable', 'width', '100%'); - $css->setStyle('.maintable', 'border-width', '0'); - $css->setStyle('.maintable', 'border-style', 'thin dashed'); - $css->setStyle('.maintable', 'border-color', '#D0D0D0'); - $css->setStyle('.maintable', 'background-color', '#EEE'); - $css->setStyle('.maintable', 'cellspacing', '2'); - $css->setStyle('.maintable', 'cellspadding', '3'); - $css->setStyle('th', 'text-align', 'center'); - $css->setStyle('th', 'color', '#FFC'); - $css->setStyle('th', 'background-color', '#AAA'); - $css->setStyle('th', 'white-space', 'nowrap'); - $css->setStyle('input', 'font-family', 'Verdana, Arial, helvetica'); - $css->setStyle('input.flat', 'border-style', 'solid'); - $css->setStyle('input.flat', 'border-width', '2px 2px 0px 2px'); - $css->setStyle('input.flat', 'border-color', '#996'); + $css = ' +body { + background-color: #7B7B88; + font-family: Verdana, Arial, helvetica; + font-size: 10pt; +} + +h1 { + color: #FFC; + text-align: center; +} + +.maintable { + width: 100%; + border-width: 0; + border-style: thin dashed; + border-color: #D0D0D0; + background-color: #EEE; + cellspacing: 2; + cellspadding: 3; +} + +th { + text-align: center; + color: #FFC; + background-color: #AAA; + white-space: nowrap; +} + +input { + font-family: Verdana, Arial, helvetica; +} + +input.flat { + border-style: solid; + border-width: 2px 2px 0px 2px; + border-color: #996; +} +'; // on preview tab, add progress bar javascript and stylesheet if ($pageName == $tabPreview[0][0]) { $bar = $page->controller->createProgressBar(); + $ui =& $bar->getUI(); + $ui->setTab($tab); - $p->addStyleDeclaration( $css->toString() . $bar->getStyle() ); + $p->addStyleDeclaration( $css . $bar->getStyle() ); $p->addScriptDeclaration( $bar->getScript() ); $barElement =& $page->getElement('progressBar'); $barElement->setText( $bar->toHtml() ); } else { - $p->addStyleDeclaration( $css->toString() ); + $p->addStyleDeclaration($css); } $renderer =& $page->defaultRenderer(); @@ -92,7 +127,7 @@ $page->accept($renderer); $p->addBodyContent( $renderer->toHtml() ); - $p->display(); + $p->display(); } } ?> \ No newline at end of file