cvs: pear /HTML_Progress2 ChangeLog Progress2.php

From: Date: Fri, 12 Jan 2007 18:01:47 +0000
Subject: cvs: pear /HTML_Progress2 ChangeLog Progress2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44207@lists.php.net to get a copy of this message
farell Fri Jan 12 18:01:47 2007 UTC Modified files: /pear/HTML_Progress2 ChangeLog Progress2.php Log: - Improve Javascript function call to setElementStyle() and removed unecessary arguments NOTE : This function come from HTML_Progress_Lite and requires more args http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/ChangeLog?r1=1.22&r2=1.23&diff_format=u Index: pear/HTML_Progress2/ChangeLog diff -u pear/HTML_Progress2/ChangeLog:1.22 pear/HTML_Progress2/ChangeLog:1.23 --- pear/HTML_Progress2/ChangeLog:1.22 Fri Jan 12 17:12:54 2007 +++ pear/HTML_Progress2/ChangeLog Fri Jan 12 18:01:47 2007 @@ -8,6 +8,8 @@ rather than "tfrm" + {HTML_Progress2::getIdent()} - Default progress bar identifier (without prefix "tfrm") cannot be numeric (xhtml compliant) - Improve Javascript function setProgress() which does not need anymore the third parameter. + - Improve Javascript function call to setElementStyle() and removed unecessary arguments + TIP: this function allow to build smooth progress bar (without cell: HTML_Progress2::setCellCount(0) 2007-01-03 Laurent Laville <pear@laurent-laville.org> http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/Progress2.php?r1=1.35&r2=1.36&diff_format=u Index: pear/HTML_Progress2/Progress2.php diff -u pear/HTML_Progress2/Progress2.php:1.35 pear/HTML_Progress2/Progress2.php:1.36 --- pear/HTML_Progress2/Progress2.php:1.35 Fri Jan 12 17:12:54 2007 +++ pear/HTML_Progress2/Progress2.php Fri Jan 12 18:01:47 2007 @@ -15,7 +15,7 @@ * @author Laurent Laville <pear@laurent-laville.org> * @copyright 2005-2007 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: Progress2.php,v 1.35 2007/01/12 17:12:54 farell Exp $ + * @version CVS: $Id: Progress2.php,v 1.36 2007/01/12 18:01:47 farell Exp $ * @link http://pear.php.net/package/HTML_Progress2 * @since File available since Release 2.0.0RC1 */ @@ -2155,9 +2155,9 @@ document.getElementById(name).firstChild.nodeValue = pText; } -function setElementStyle(pPrefix, pName, pIdent, pStyles) +function setElementStyle(pIdent, pStyles) { - var name = pPrefix + pName + pIdent; + var name = 'pbar' + pIdent; var styles = pStyles.split(';'); styles.pop(); for (var i = 0; i < styles.length; i++) { @@ -3252,7 +3252,7 @@ } $cssText .= 'height:' . $position['height'] . 'px;'; } - $bar .= $this->_changeElementStyle('pbar', '', $cssText); + $bar .= $this->_changeElementStyle($cssText); } echo $bar . PHP_EOL; ob_start(); @@ -3662,19 +3662,17 @@ * Sends a DOM command (emulate cssText attribute) through a javascript function * to change styles of a progress bar's element. * - * @param string $prefix prefix identifier of the element - * @param string $element element name (label id.) * @param string $styles styles of a DOM element * * @return string * @since 2.0.0 * @access private */ - function _changeElementStyle($prefix, $element, $styles) + function _changeElementStyle($styles) { $cmd = '<script type="text/javascript">' . 'setElementStyle' - . '("' . $prefix . '","' . $element . '","' . $this->ident . '","' . $styles . '");' + . '("' . $this->ident . '","' . $styles . '");' . '</script>'; return $cmd;

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