cvs: pear /HTML_Progress/examples/templates itxstatic.html itxstatic.php

From: Date: Mon, 25 Jul 2005 11:53:59 +0000
Subject: cvs: pear /HTML_Progress/examples/templates itxstatic.html itxstatic.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33298@lists.php.net to get a copy of this message
farell Mon Jul 25 07:53:59 2005 EDT Modified files: /pear/HTML_Progress/examples/templates itxstatic.html itxstatic.php Log: Prepare examples to be removed from main package and moved into the optional package http://cvs.php.net/diff.php/pear/HTML_Progress/examples/templates/itxstatic.html?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/templates/itxstatic.html diff -u pear/HTML_Progress/examples/templates/itxstatic.html:1.1 pear/HTML_Progress/examples/templates/itxstatic.html:1.2 --- pear/HTML_Progress/examples/templates/itxstatic.html:1.1 Sat Jul 24 05:37:45 2004 +++ pear/HTML_Progress/examples/templates/itxstatic.html Mon Jul 25 07:53:55 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Template ITX static </span></h1> -<p align="right">$Date: 2004/07/24 09:37:45 $</p> +<p align="right">$Date: 2005/07/25 11:53:55 $</p> <div class="toc">&nbsp;Table of contents </div> <ul> @@ -32,10 +32,10 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 15).</li> +<li>PEAR::HTML_Progress 1.2.2 or better (see source at line 15).</li> <li>PEAR::HTML_QuickForm 3.1.1 or better.</li> <li>PEAR::HTML_Template_IT 1.1 or better.</li> </ul> @@ -44,17 +44,17 @@ <hr/> <p><b>This example will run a progress meter embedded into a template file.</b></p> -<p>Template engine is <a href="http://pear.php.net/package/HTML_Template_IT">IT(X)</a>, +<p>Template engine is <a href="http://pear.php.net/package/HTML_Template_IT">IT(X)</a>, but you could use any others template engine.</p> <p>On lines 17 thru 32, there is your user-callback (function <b>myFunctionHandler</b>), where you do what you want. This callback is attached on progress bar at line 80.</p> -<p>Inside this callback, we will show a custom string (build at line 31) +<p>Inside this callback, we will show a custom string (build at line 31) at 25% (lines 22 to 24), at 50% (lines 25 to 27), at 100% (lines 28 to 30).</p> -<p>As for all demos, to smooth animation, i've added a <b>sleep</b> method at line 19. -Delay depends on value set by <b>setAnimSpeed</b> method at line 75. In real world, +<p>As for all demos, to smooth animation, i've added a <b>sleep</b> method at line 19. +Delay depends on value set by <b>setAnimSpeed</b> method at line 75. In real world, you have to do a long task, so delay (sleep) is unnecesary.</p> <p><b>Tips</b>: to build custom string, you don't forget to set lines 78 and 79.</p> @@ -68,7 +68,7 @@ </ul> <p>Before to run the progress meter at line 107.</p> -<p><b>Note</b>: usage of quickform is only to show you how to dynamic change look and feel +<p><b>Note</b>: usage of quickform is only to show you how to dynamic change look and feel of progress meter.</p> <p>[<a href="#top">Top</a>]</p> @@ -110,7 +110,7 @@ <p><img src="../screenshots/itxstatic.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/>&nbsp;PHP source syntax highlight</h2> @@ -126,4 +126,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/templates/itxstatic.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/templates/itxstatic.php diff -u pear/HTML_Progress/examples/templates/itxstatic.php:1.1 pear/HTML_Progress/examples/templates/itxstatic.php:1.2 --- pear/HTML_Progress/examples/templates/itxstatic.php:1.1 Sat Jul 24 05:37:45 2004 +++ pear/HTML_Progress/examples/templates/itxstatic.php Mon Jul 25 07:53:55 2005 @@ -1,12 +1,12 @@ -<?php -@include '../include_path.php'; +<?php /** - * Display a horizontal progress meter - * embedded into a ITX template system file. - * - * @version $Id: itxstatic.php,v 1.1 2004/07/24 09:37:45 farell Exp $ + * Display a horizontal progress meter + * embedded into a ITX template system file. + * + * @version $Id: itxstatic.php,v 1.2 2005/07/25 11:53:55 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/QuickForm.php'; @@ -16,7 +16,7 @@ function myFunctionHandler($progressValue, &$bar) { - $bar->sleep(); + $bar->sleep(); $str = ' '; if ($progressValue > 25) { @@ -33,8 +33,8 @@ $tpl = new HTML_Template_ITX('.'); $tpl->loadTemplateFile('installing.html'); - -$vars = array ( + +$vars = array ( "L_SETUP_APP_TITLE" => "SW4P", "L_APPNAME" => basename(__FILE__), "L_APPCOPYRIGHT" => "&copy 2003 SW4P Team ", @@ -45,11 +45,11 @@ $form->addElement('submit', 'launch', 'Launch', 'style="width:100px;"'); $styles = array('none' => 'none', - 'solid' => 'solid', - 'dashed' => 'dashed', - 'dotted' => 'dotted', - 'inset' => 'inset', - 'outset' => 'outset' + 'solid' => 'solid', + 'dashed' => 'dashed', + 'dotted' => 'dotted', + 'inset' => 'inset', + 'outset' => 'outset' ); $form->addElement('select','border','border style:',$styles); @@ -82,16 +82,16 @@ $ui =& $bar->getUI(); $ui->setCellAttributes('active-color=#7B7B88 inactive-color=#D0D0D0 width=10'); $ui->setBorderAttributes(array( - 'width' => 2, - 'color' => $color, - 'style' => $border + 'width' => 2, + 'color' => $color, + 'style' => $border )); $ui->setStringAttributes(array( - 'width' => 320, - 'font-size' => 10, - 'align' => 'left', - 'valign' => 'bottom', - 'background-color' => '#D0D0D0' // make it transparent, see style #MainWindow + 'width' => 320, + 'font-size' => 10, + 'align' => 'left', + 'valign' => 'bottom', + 'background-color' => '#D0D0D0' // make it transparent, see style #MainWindow )); $ui->setProgressAttributes('width=320'); @@ -105,7 +105,5 @@ $tpl->show(); $bar->run(); - -echo '<p>&lt;&lt; <a href="../index.html">Back examples TOC</a></p>'; - +$bar->display(); // to display the last custom string ?> \ No newline at end of file

« previous php.pear.cvs (#33298) next »