cvs: pear /HTML_Progress2 ChangeLog NEWS Progress2.php
| From: | Laurent Laville | Date: | Fri, 12 Jan 2007 16:13:15 +0000 |
| Subject: | cvs: pear /HTML_Progress2 ChangeLog NEWS Progress2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44205@lists.php.net to get a copy of this message | ||
farell Fri Jan 12 16:13:15 2007 UTC
Modified files:
/pear/HTML_Progress2 ChangeLog NEWS Progress2.php
Log:
- drop support of cell id mask identifier (begin private)
- new identification for progress bar widget (div), always most simple
http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/ChangeLog?r1=1.20&r2=1.21&diff_format=u Index: pear/HTML_Progress2/ChangeLog diff -u pear/HTML_Progress2/ChangeLog:1.20 pear/HTML_Progress2/ChangeLog:1.21 --- pear/HTML_Progress2/ChangeLog:1.20 Wed Jan 3 16:49:26 2007 +++ pear/HTML_Progress2/ChangeLog Fri Jan 12 16:13:15 2007 @@ -1,3 +1,12 @@ +2007-0m-dd Laurent Laville <pear@laurent-laville.org> + + * VERSION: Final version (alpha) 2.3.0a1 released. + + - drop support of cell id mask identifier (begin private) + style should be apply only by cell classname attribute + - a progress bar widget (div) is now identified only by {see HTML_Progress2::getIdent()} + rather than "tfrm" + {HTML_Progress2::getIdent()} + 2007-01-03 Laurent Laville <pear@laurent-laville.org> * VERSION: Final version (stable) 2.2.0 released. http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/NEWS?r1=1.11&r2=1.12&diff_format=u Index: pear/HTML_Progress2/NEWS diff -u pear/HTML_Progress2/NEWS:1.11 pear/HTML_Progress2/NEWS:1.12 --- pear/HTML_Progress2/NEWS:1.11 Wed Jan 3 16:49:26 2007 +++ pear/HTML_Progress2/NEWS Fri Jan 12 16:13:15 2007 @@ -1,3 +1,10 @@ +Changes since version 2.2.0 (2007-01-03) + + | 2007-01-12 Laurent Laville <pear@laurent-laville.org> + | + | * first alpha version of version 2.3.0 with AJAX progress bar support + | * code clean-up and drop support of cell identifier mask; see HTML_Progress2::setCellAttributes + Changes since version 2.1.1 (2006-12-22) | 2007-01-03 Laurent Laville <pear@laurent-laville.org> http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/Progress2.php?r1=1.33&r2=1.34&diff_format=u Index: pear/HTML_Progress2/Progress2.php diff -u pear/HTML_Progress2/Progress2.php:1.33 pear/HTML_Progress2/Progress2.php:1.34 --- pear/HTML_Progress2/Progress2.php:1.33 Wed Jan 3 16:44:05 2007 +++ pear/HTML_Progress2/Progress2.php Fri Jan 12 16:13:15 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.33 2007/01/03 16:44:05 farell Exp $ + * @version CVS: $Id: Progress2.php,v 1.34 2007/01/12 16:13:15 farell Exp $ * @link http://pear.php.net/package/HTML_Progress2 * @since File available since Release 2.0.0RC1 */ @@ -419,7 +419,6 @@ * * <code> * $cell = array( - * 'id' => 'pcel%01s', # cell identifier mask * 'class' => 'cell%s', # css class selector * 'active-color' => '#006600', # active color * 'inactive-color' => '#CCCCCC', # inactive color @@ -620,7 +619,6 @@ 'color' => '#000000' ); $this->cell = array( - 'id' => 'pcel%01s', 'class' => 'cell%s', 'active-color' => '#006600', 'inactive-color' => '#CCCCCC', @@ -2136,15 +2134,14 @@ function showCell(pCell, pIdent, pVisibility) { - var name = '%progressCell%' + pCell + pIdent; + var name = 'pcel' + pCell + pIdent; var cellElement = document.getElementById(name); cellElement.className = '%cellCN%' + pIdent + pVisibility; } function hideProgress(pIdent) { - var name = 'tfrm' + pIdent; - var tfrm = document.getElementById(name); + var tfrm = document.getElementById(pIdent); tfrm.style.visibility = "hidden"; } @@ -2181,16 +2178,17 @@ JS; $cellAttr = $this->getCellAttributes(); - $attr = array( - trim(sprintf($cellAttr['id'], ' ')), - trim(sprintf($cellAttr['class'], ' ')) - ); - $js = str_replace(array('%progressCell%', '%cellCN%'), $attr, $js); + $attr = + trim(sprintf($cellAttr['class'], ' ')); + $js = str_replace('%cellCN%', $attr, $js); if ($raw !== true) { - $js = '<script type="text/javascript">' . PHP_EOL - . '//<![CDATA[' . $js . '//]]>' . PHP_EOL - . '</script>' . PHP_EOL; + $js = '<script type="text/javascript">' + . PHP_EOL . '//<![CDATA[' + . PHP_EOL . $js + . PHP_EOL . '//]]>' + . PHP_EOL . '</script>' + . PHP_EOL; } return $js; } @@ -2693,7 +2691,7 @@ $_left = $this->frame['left']; } $strHtml .= $tabs - . '<div id="tfrm' . $this->ident . '" style="' + . '<div id="' . $this->ident . '" style="' . 'position:' . $progressAttr['position'] . ';' . 'top:' . $_top . 'px;' . 'left:' . $_left . 'px;' @@ -2706,7 +2704,7 @@ } else { $topshift = $leftshift = 0; $strHtml .= $tabs - . '<div id="tfrm' . $this->ident . '" style="' + . '<div id="' . $this->ident . '" style="' . 'position:' . $progressAttr['position'] . ';' . 'top:' . $progressAttr['top'] . 'px;' . 'left:' . $progressAttr['left'] . 'px;' @@ -3276,7 +3274,7 @@ $pos = $cellAttr['spacing']; for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $pos . 'px;' @@ -3292,7 +3290,7 @@ $pos = $cellAttr['spacing']; for ($i = $this->cellCount - 1; $i >= 0; $i--) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $pos . 'px;' @@ -3328,7 +3326,7 @@ $pos = $cellAttr['spacing']; for ($i = $this->cellCount - 1; $i >= 0; $i--) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $cellAttr['spacing'] . 'px;' @@ -3344,7 +3342,7 @@ $pos = $cellAttr['spacing']; for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $cellAttr['spacing'] . 'px;' @@ -3382,7 +3380,7 @@ $top = $coord[$i][0] * $cellAttr['width']; $left = $coord[$i][1] * $cellAttr['height']; $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $left . 'px;' @@ -3398,7 +3396,7 @@ $top = $coord[$c-$i][0] * $cellAttr['width']; $left = $coord[$c-$i][1] * $cellAttr['height']; $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $left . 'px;' @@ -3432,7 +3430,7 @@ if ($way_natural) { for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;left:0;top:0;' . '"><img src="' . $cellAttr[$i+1]['background-image'] @@ -3443,7 +3441,7 @@ } else { for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;left:0;top:0;' . '"><img src="' . $cellAttr[$i+1]['background-image']
http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/ChangeLog?r1=1.20&r2=1.21&diff_format=u Index: pear/HTML_Progress2/ChangeLog diff -u pear/HTML_Progress2/ChangeLog:1.20 pear/HTML_Progress2/ChangeLog:1.21 --- pear/HTML_Progress2/ChangeLog:1.20 Wed Jan 3 16:49:26 2007 +++ pear/HTML_Progress2/ChangeLog Fri Jan 12 16:13:15 2007 @@ -1,3 +1,12 @@ +2007-0m-dd Laurent Laville <pear@laurent-laville.org> + + * VERSION: Final version (alpha) 2.3.0a1 released. + + - drop support of cell id mask identifier (begin private) + style should be apply only by cell classname attribute + - a progress bar widget (div) is now identified only by {see HTML_Progress2::getIdent()} + rather than "tfrm" + {HTML_Progress2::getIdent()} + 2007-01-03 Laurent Laville <pear@laurent-laville.org> * VERSION: Final version (stable) 2.2.0 released. http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/NEWS?r1=1.11&r2=1.12&diff_format=u Index: pear/HTML_Progress2/NEWS diff -u pear/HTML_Progress2/NEWS:1.11 pear/HTML_Progress2/NEWS:1.12 --- pear/HTML_Progress2/NEWS:1.11 Wed Jan 3 16:49:26 2007 +++ pear/HTML_Progress2/NEWS Fri Jan 12 16:13:15 2007 @@ -1,3 +1,10 @@ +Changes since version 2.2.0 (2007-01-03) + + | 2007-01-12 Laurent Laville <pear@laurent-laville.org> + | + | * first alpha version of version 2.3.0 with AJAX progress bar support + | * code clean-up and drop support of cell identifier mask; see HTML_Progress2::setCellAttributes + Changes since version 2.1.1 (2006-12-22) | 2007-01-03 Laurent Laville <pear@laurent-laville.org> http://cvs.php.net/viewvc.cgi/pear/HTML_Progress2/Progress2.php?r1=1.33&r2=1.34&diff_format=u Index: pear/HTML_Progress2/Progress2.php diff -u pear/HTML_Progress2/Progress2.php:1.33 pear/HTML_Progress2/Progress2.php:1.34 --- pear/HTML_Progress2/Progress2.php:1.33 Wed Jan 3 16:44:05 2007 +++ pear/HTML_Progress2/Progress2.php Fri Jan 12 16:13:15 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.33 2007/01/03 16:44:05 farell Exp $ + * @version CVS: $Id: Progress2.php,v 1.34 2007/01/12 16:13:15 farell Exp $ * @link http://pear.php.net/package/HTML_Progress2 * @since File available since Release 2.0.0RC1 */ @@ -419,7 +419,6 @@ * * <code> * $cell = array( - * 'id' => 'pcel%01s', # cell identifier mask * 'class' => 'cell%s', # css class selector * 'active-color' => '#006600', # active color * 'inactive-color' => '#CCCCCC', # inactive color @@ -620,7 +619,6 @@ 'color' => '#000000' ); $this->cell = array( - 'id' => 'pcel%01s', 'class' => 'cell%s', 'active-color' => '#006600', 'inactive-color' => '#CCCCCC', @@ -2136,15 +2134,14 @@ function showCell(pCell, pIdent, pVisibility) { - var name = '%progressCell%' + pCell + pIdent; + var name = 'pcel' + pCell + pIdent; var cellElement = document.getElementById(name); cellElement.className = '%cellCN%' + pIdent + pVisibility; } function hideProgress(pIdent) { - var name = 'tfrm' + pIdent; - var tfrm = document.getElementById(name); + var tfrm = document.getElementById(pIdent); tfrm.style.visibility = "hidden"; } @@ -2181,16 +2178,17 @@ JS; $cellAttr = $this->getCellAttributes(); - $attr = array( - trim(sprintf($cellAttr['id'], ' ')), - trim(sprintf($cellAttr['class'], ' ')) - ); - $js = str_replace(array('%progressCell%', '%cellCN%'), $attr, $js); + $attr = + trim(sprintf($cellAttr['class'], ' ')); + $js = str_replace('%cellCN%', $attr, $js); if ($raw !== true) { - $js = '<script type="text/javascript">' . PHP_EOL - . '//<![CDATA[' . $js . '//]]>' . PHP_EOL - . '</script>' . PHP_EOL; + $js = '<script type="text/javascript">' + . PHP_EOL . '//<![CDATA[' + . PHP_EOL . $js + . PHP_EOL . '//]]>' + . PHP_EOL . '</script>' + . PHP_EOL; } return $js; } @@ -2693,7 +2691,7 @@ $_left = $this->frame['left']; } $strHtml .= $tabs - . '<div id="tfrm' . $this->ident . '" style="' + . '<div id="' . $this->ident . '" style="' . 'position:' . $progressAttr['position'] . ';' . 'top:' . $_top . 'px;' . 'left:' . $_left . 'px;' @@ -2706,7 +2704,7 @@ } else { $topshift = $leftshift = 0; $strHtml .= $tabs - . '<div id="tfrm' . $this->ident . '" style="' + . '<div id="' . $this->ident . '" style="' . 'position:' . $progressAttr['position'] . ';' . 'top:' . $progressAttr['top'] . 'px;' . 'left:' . $progressAttr['left'] . 'px;' @@ -3276,7 +3274,7 @@ $pos = $cellAttr['spacing']; for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $pos . 'px;' @@ -3292,7 +3290,7 @@ $pos = $cellAttr['spacing']; for ($i = $this->cellCount - 1; $i >= 0; $i--) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $pos . 'px;' @@ -3328,7 +3326,7 @@ $pos = $cellAttr['spacing']; for ($i = $this->cellCount - 1; $i >= 0; $i--) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $cellAttr['spacing'] . 'px;' @@ -3344,7 +3342,7 @@ $pos = $cellAttr['spacing']; for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $cellAttr['spacing'] . 'px;' @@ -3382,7 +3380,7 @@ $top = $coord[$i][0] * $cellAttr['width']; $left = $coord[$i][1] * $cellAttr['height']; $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $left . 'px;' @@ -3398,7 +3396,7 @@ $top = $coord[$c-$i][0] * $cellAttr['width']; $left = $coord[$c-$i][1] * $cellAttr['height']; $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;' . 'left:' . $left . 'px;' @@ -3432,7 +3430,7 @@ if ($way_natural) { for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;left:0;top:0;' . '"><img src="' . $cellAttr[$i+1]['background-image'] @@ -3443,7 +3441,7 @@ } else { for ($i = 0; $i < $this->cellCount; $i++) { $html .= $tabs . $tab - . '<div id="' . sprintf($cellAttr['id'], $i) . $this->ident . '"' + . '<div id="pcel' . $i . $this->ident . '"' . ' class="' . $cellCls . 'I"' . ' style="position:absolute;left:0;top:0;' . '"><img src="' . $cellAttr[$i+1]['background-image']