cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid-datasource dbquery.xml mdb2.xml xml.xml
/en/package/structures/structures-datagrid/structures-datagrid-renderer checkablehtmltable.xml csv.xml flexy.xml htmleditform.xml htmlsortform.xml
htmltable.xml pager.xml smarty.xml xul.xml

From: Date: Sun, 08 Jul 2007 15:36:49 +0000
Subject: cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid-datasource dbquery.xml mdb2.xml xml.xml
/en/package/structures/structures-datagrid/structures-datagrid-renderer checkablehtmltable.xml csv.xml flexy.xml htmleditform.xml htmlsortform.xml
htmltable.xml pager.xml smarty.xml xul.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9885@lists.php.net to get a copy of this message
wiesemann Sun Jul 8 15:36:49 2007 UTC Modified files: /peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer htmlsortform.xml smarty.xml pager.xml xul.xml flexy.xml htmltable.xml checkablehtmltable.xml htmleditform.xml csv.xml /peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource mdb2.xml xml.xml dbquery.xml Log: - sync recent source code changes / additions / documentation improvements

http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmlsortform.xml?r1=1.7&r2=1.8&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmlsortform.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmlsortform.xml:1.7 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmlsortform.xml:1.8 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmlsortform.xml:1.7 Sat Dec 9 17:46:32 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmlsortform.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.htmlsortform"> <refnamediv> <refname>Structures_DataGrid_Renderer_HTMLSortForm</refname> @@ -132,6 +132,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml?r1=1.9&r2=1.10&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml:1.9 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml:1.10 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml:1.9 Fri Jun 15 10:17:27 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.smarty"> <refnamediv> <refname>Structures_DataGrid_Renderer_Smarty</refname> @@ -26,7 +26,7 @@ </row> <row> <entry>Output Buffering</entry> - <entry>no</entry> + <entry>yes</entry> </row> <row> <entry>Direct Rendering</entry> @@ -133,6 +133,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> @@ -150,6 +170,14 @@ <entry>Whether sorting HTTP queries reset paging.</entry> <entry>true</entry> </row> + <row> + <entry>varPrefix</entry> + <entry>string</entry> + <entry>Prefix for smarty variables and functions assigned by this driver. + Can be used in conjunction with Structure_DataGrid::setRequestPrefix() + for displaying several grids on a single page.</entry> + <entry>''</entry> + </row> </tbody> </tgroup> </table> @@ -157,12 +185,21 @@ <refsect1 id="package.structures.structures-datagrid.structures-datagrid-renderer.smarty.notes"> <title>General notes</title> <para> - This driver does not support the render() method, it only is able to &quot;fill&quot; - a Smarty object, by calling Smarty::assign() and Smarty::register_function(). + To use this driver you need the Smarty template engine from + http://smarty.php.net + </para> + <para> + This driver does not support the render() method, it is only able to: + </para> + <para> + Either fill() a Smarty object by assigning variables and registering + the {getPaging} smarty function. It's up to you to call Smarty::display() + after the Smarty object has been filled. </para> <para> - It's up to you to called Smarty::display() after the Smarty object has been - filled. + Or return all variables as a PHP array from getOutput(), for maximum + flexibility, so that you can assign them the way you like to your Smarty + instance. </para> <para> This driver assigns the following Smarty variables: @@ -175,6 +212,8 @@ 'label' =&gt; column label, 'link' =&gt; sorting link, 'attributes' =&gt; attributes string, + 'direction' =&gt; 'ASC', 'DESC' or '', + 'onclick' =&gt; jsHandler call ), ... ) @@ -188,63 +227,88 @@ - $firstRecord: first record number (starting from 1) - $lastRecord: last record number (starting from 1) - $currentSort: array with column names and the directions used for sorting +- $datagrid: a reference that you can pass to {getPaging} </programlisting> </para> <para> This driver also registers a Smarty custom function named getPaging that can be called from Smarty templates with {getPaging} in order - to print paging links. This function accepts any of the Pager::factory() - options as parameters. + to print paging links. This function accepts the same parameters as the + pagerOptions option of Structures_DataGrid_Renderer_Pager. </para> <para> - Template example, featuring sorting and paging: + {getPaging} also accepts an optional &quot;datagrid&quot; parameter + which you can pass the $datagrid variable, to display paging for an + arbitrary datagrid (useful with multiple dynamic datagrids on a single page). </para> - <para> - <programlisting> -&lt;!-- Show paging links using the custom getPaging function --&gt; -{getPaging prevImg=&quot;&lt;&lt;&quot; nextImg=&quot;&gt;&gt;&quot; separator=&quot; | &quot; delta=&quot;5&quot;} + </refsect1> + <refsect1 id="package.structures.structures-datagrid.structures-datagrid-renderer.smarty.examples"> + <title>Examples</title> + <example> + <title>Using the Smarty renderer</title> + <programlisting role="php"> +<![CDATA[ +<?php +require_once 'Structures/DataGrid.php'; +require_once 'Smarty.class.php'; + +$datagrid =& new Structures_DataGrid(10); +$options = array('dsn' => 'mysql://username@localhost/mydatabase'); +$datagrid->bind("SELECT * FROM mytable", $options); + +$smarty = new Smarty(); +$datagrid->fill($smarty); +$smarty->display('smarty-simple.tpl'); +?> -&lt;p&gt;Showing records {$firstRecord} to {$lastRecord} -from {$totalRecordsNum}, page {$currentPage} of {$pagesNum}&lt;/p&gt; +]]> + </programlisting> + </example> + <example> + <title>Smarty template with sorting and paging (smarty-simple.tpl)</title> + <programlisting role="php"> +<![CDATA[ + +<!-- Show paging links using the custom getPaging function --> +{getPaging prevImg="<<" nextImg=">>" separator=" | " delta="5"} -&lt;table cellspacing=&quot;0&quot;&gt; - &lt;!-- Build header --&gt; - &lt;tr&gt; +<p>Showing records {$firstRecord} to {$lastRecord} +from {$totalRecordsNum}, page {$currentPage} of {$pagesNum}</p> + +<table cellspacing="0"> + <!-- Build header --> + <tr> {section name=col loop=$columnSet} - &lt;th {$columnSet[col].attributes}&gt; - &lt;!-- Check if the column is sortable --&gt; - {if $columnSet[col].link != &quot;&quot;} - &lt;a href=&quot;{$columnSet[col].link}&quot;&gt;{$columnSet[col].label}&lt;/a&gt; + <th {$columnSet[col].attributes}> + <!-- Check if the column is sortable --> + {if $columnSet[col].link != ""} + <a href="{$columnSet[col].link}">{$columnSet[col].label}</a> + <!-- Show the current ordering with an arrow --> + {if $columnSet[col].direction == "ASC"} + &darr; + {elseif $columnSet[col].direction == "DESC"} + &uarr; + {/if} {else} {$columnSet[col].label} {/if} - &lt;/th&gt; + </th> {/section} - &lt;/tr&gt; - - &lt;!-- Build body --&gt; + </tr> + + <!-- Build body --> {section name=row loop=$recordSet} - &lt;tr {if $smarty.section.row.iteration is even}bgcolor=&quot;#EEEEEE&quot;{/if}&gt; + <tr {if $smarty.section.row.iteration is even}bgcolor="#EEEEEE"{/if}> {section name=col loop=$recordSet[row]} - &lt;td {$columnSet[col].attributes}&gt;{$recordSet[row][col]}&lt;/td&gt; + <td {$columnSet[col].attributes}>{$recordSet[row][col]}</td> {/section} - &lt;/tr&gt; + </tr> {/section} -&lt;/table&gt; - </programlisting> - </para> - <para> - This template can be used with code similar to this prototype: - </para> - <para> - <programlisting> -$smarty = new Smarty(...); -$datagrid =&amp; new Structures_DataGrid(...); -$datagrid-&gt;bind(...); -$datagrid-&gt;fill($smarty); -$smarty-&gt;display(PATH TO YOUR TEMPLATE); +</table> + +]]> </programlisting> - </para> + </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/pager.xml?r1=1.9&r2=1.10&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/pager.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/pager.xml:1.9 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/pager.xml:1.10 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/pager.xml:1.9 Thu Dec 28 13:09:47 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/pager.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.pager"> <refnamediv> <refname>Structures_DataGrid_Renderer_Pager</refname> @@ -129,6 +129,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml?r1=1.9&r2=1.10&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml:1.9 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml:1.10 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml:1.9 Fri Jun 15 19:40:02 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.xul"> <refnamediv> <refname>Structures_DataGrid_Renderer_XUL</refname> @@ -118,6 +118,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/flexy.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/flexy.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/flexy.xml:1.1 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/flexy.xml:1.2 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/flexy.xml:1.1 Sun Mar 11 15:45:45 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/flexy.xml Sun Jul 8 15:36:49 2007 @@ -1,10 +1,18 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.flexy"> <refnamediv> <refname>Structures_DataGrid_Renderer_Flexy</refname> <refpurpose>Flexy Rendering Driver</refpurpose> </refnamediv> + <refsect1 id="package.structures.structures-datagrid.structures-datagrid-renderer.flexy.release"> + <title>Availability</title> + <para> + This driver is <emphasis>experimental</emphasis> + and has not been officially released yet. + It is <emphasis>only available from CVS</emphasis>. + </para> + </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid-renderer.flexy.modes"> <title>Supported operations modes</title> <para> @@ -158,6 +166,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmltable.xml?r1=1.6&r2=1.7&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmltable.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmltable.xml:1.6 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmltable.xml:1.7 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmltable.xml:1.6 Sat Dec 9 17:15:11 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmltable.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.htmltable"> <refnamediv> <refname>Structures_DataGrid_Renderer_HTMLTable</refname> @@ -160,6 +160,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> @@ -202,6 +222,73 @@ </tgroup> </table> </refsect1> + <refsect1 id="package.structures.structures-datagrid.structures-datagrid-renderer.htmltable.examples"> + <title>Examples</title> + <example> + <title>Simple AJAX support using the Prototype framework</title> + <programlisting role="php"> +<![CDATA[ +<?php +require_once 'PEAR.php'; +require_once 'Structures/DataGrid.php'; + +$datagrid =& new Structures_DataGrid(10); + +$options['dsn'] = 'mysql://username@localhost/mydatabase'; +$datagrid->bind("SELECT * FROM mytable", $options); + +// Set the javascript handler function for onclick events +$datagrid->setRendererOption('jsHandler', 'updateGrid', true); + +// Handle table AJAX requests +if (@$_GET['ajax'] == 'table') { + $datagrid->render(); + exit(); +} + +// Handle pager AJAX requests +if (@$_GET['ajax'] == 'pager') { + // Warning: require Pager CVS or above 2.4.3 + $datagrid->render('Pager'); + exit(); +} + +// No AJAX request, render the initial content.. +?> +<html> + +<head> +<!-- Require the Prototype JS framework from http://www.prototypejs.org --> +<script type="text/javascript" src="prototype.js"></script> +<script type="text/javascript"> +function updateGrid(info) +{ + var url = '<?=$_SERVER['PHP_SELF']?>'; + var pars = 'page=' + info.page; + if (info.sort.length > 0) { + pars += '&orderBy=' + info.sort[0].field + '&direction=' + info.sort[0].direction; + } + + new Ajax.Updater( 'grid', url, { method: 'get', parameters: pars + '&ajax=table' }); + new Ajax.Updater( 'pager', url, { method: 'get', parameters: pars + '&ajax=pager' }); + + // Important: return false to void href links + return false; +} +</script> +</head> + +<body> +Pages: <span id="pager"><?php $datagrid->render('Pager'); ?></span> +<div id="grid"><? $datagrid->render(); ?></div> +</body> + +</html> + +]]> + </programlisting> + </example> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/checkablehtmltable.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/checkablehtmltable.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/checkablehtmltable.xml:1.1 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/checkablehtmltable.xml:1.2 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/checkablehtmltable.xml:1.1 Fri Jun 15 10:17:27 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/checkablehtmltable.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.checkablehtmltable"> <refnamediv> <refname>Structures_DataGrid_Renderer_CheckableHTMLTable</refname> @@ -187,6 +187,26 @@ <entry>'checkedItems'</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmleditform.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmleditform.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmleditform.xml:1.3 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmleditform.xml:1.4 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmleditform.xml:1.3 Fri Jun 15 10:17:27 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/htmleditform.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.htmleditform"> <refnamediv> <refname>Structures_DataGrid_Renderer_HTMLEditForm</refname> @@ -126,6 +126,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>numberAlign</entry> <entry>bool</entry> <entry>Whether to right-align numeric values.</entry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/csv.xml?r1=1.10&r2=1.11&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/csv.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/csv.xml:1.10 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/csv.xml:1.11 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/csv.xml:1.10 Sat Apr 21 14:56:00 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/csv.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.csv"> <refnamediv> <refname>Structures_DataGrid_Renderer_CSV</refname> @@ -137,6 +137,26 @@ <entry>array()</entry> </row> <row> + <entry>jsHandler</entry> + <entry>string</entry> + <entry>Name of a Javascript function to call on onClick/onSubmit events. + This function receives a single object argument of the form: { page: + &lt;page&gt;, sort: [{field: &lt;field&gt;, direction: + &lt;direction&gt;}, ...], data: &lt;user_data&gt; }. Remark: setting this + option doesn't remove the href attribute, you should return false from + your handler function to void it (eg: for AJAX, etc..).</entry> + <entry>null</entry> + </row> + <row> + <entry>jsHandlerData</entry> + <entry>string</entry> + <entry>User data passed in the &quot;data&quot; member of the object + argument passed to jsHandler. No JSON serialization is performed, this is + assigned as a raw string to the &quot;data&quot; attribute. It's up to + you to add quotes, slashes, etc...</entry> + <entry>''</entry> + </row> + <row> <entry>lineBreak</entry> <entry>string</entry> <entry>The character(s) to use for line breaks</entry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/mdb2.xml?r1=1.9&r2=1.10&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/mdb2.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/mdb2.xml:1.9 peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/mdb2.xml:1.10 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/mdb2.xml:1.9 Sun Mar 11 14:46:30 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/mdb2.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-datasource.mdb2"> <refnamediv> <refname>Structures_DataGrid_DataSource_MDB2</refname> @@ -63,6 +63,13 @@ <entry>''</entry> </row> <row> + <entry>db_options</entry> + <entry>array</entry> + <entry>Options for the created database object. This option is only used + when the 'dsn' option is given.</entry> + <entry>array()</entry> + </row> + <row> <entry>dbc</entry> <entry>object</entry> <entry>A PEAR::MDB2 instance that will be used by this driver. Either http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/xml.xml?r1=1.7&r2=1.8&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/xml.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/xml.xml:1.7 peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/xml.xml:1.8 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/xml.xml:1.7 Fri Dec 15 14:39:03 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/xml.xml Sun Jul 8 15:36:49 2007 @@ -1,14 +1,16 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-datasource.xml"> <refnamediv> <refname>Structures_DataGrid_DataSource_XML</refname> - <refpurpose>XML data source driver</refpurpose> + <refpurpose>XML DataSource driver</refpurpose> </refnamediv> <refsect1 id="package.structures.structures-datagrid.structures-datagrid-datasource.xml.desc"> <title>Description</title> <para> - This driver accepts the following options: + This class is a DataSource driver for XML data. It accepts strings + and filenames. An XPath expression can be specified to extract a + subset from the given XML data. </para> </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid-datasource.xml.modes"> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/dbquery.xml?r1=1.9&r2=1.10&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/dbquery.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/dbquery.xml:1.9 peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/dbquery.xml:1.10 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/dbquery.xml:1.9 Sun Mar 11 14:46:30 2007 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/dbquery.xml Sun Jul 8 15:36:49 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-datasource.dbquery"> <refnamediv> <refname>Structures_DataGrid_DataSource_DBQuery</refname> @@ -63,6 +63,13 @@ <entry>''</entry> </row> <row> + <entry>db_options</entry> + <entry>array</entry> + <entry>Options for the created database object. This option is only used + when the 'dsn' option is given.</entry> + <entry>array()</entry> + </row> + <row> <entry>dbc</entry> <entry>object</entry> <entry>A PEAR::DB instance that will be used by this driver. Either this
« previous php.pear.doc (#9885) next »