From: <var...@us...> - 2009-03-27 10:07:31
|
Revision: 6724 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6724&view=rev Author: vargenau Date: 2009-03-27 10:07:24 +0000 (Fri, 27 Mar 2009) Log Message: ----------- jsFlipAll Javascript code was inserted inside the table, leading to invalid XHTML code. Better use a separate Javascript file. Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2009-03-27 09:23:18 UTC (rev 6723) +++ trunk/lib/PageList.php 2009-03-27 10:07:24 UTC (rev 6724) @@ -1423,12 +1423,6 @@ $table->pushContent(HTML::caption(array('align'=>'top'), $caption)); } - //Warning: This is quite fragile. It depends solely on a private variable - // in ->_addColumn() - if (!empty($this->_columns_seen['checkbox'])) { - $table->pushContent($this->_jsFlipAll()); - } - $row = HTML::tr(); $table_summary = array(); $i = 1; // start with 1! @@ -1470,21 +1464,6 @@ } } - function _jsFlipAll() { - return JavaScript(" -function flipAll(formObj) { - var isFirstSet = -1; - for (var i=0; i < formObj.length; i++) { - fldObj = formObj.elements[i]; - if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,2) == 'p[')) { - if (isFirstSet == -1) - isFirstSet = (fldObj.checked) ? true : false; - fldObj.checked = (isFirstSet) ? false : true; - } - } -}"); - } - /* recursive stack for private sublist options (azhead, cols) */ function _saveOptions($opts) { $stack = array('pages' => $this->_pages); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |