Author: lombardot
Date: 2010-05-25 16:51:26 +0200 (Tue, 25 May 2010)
New Revision: 29620
Modified:
plugins/sfDatagridPlugin/lib/sfDatagrid.class.php
plugins/sfDatagridPlugin/lib/sfDatagridFormatter.class.php
Log:
[sfDatagridPlugin] Error on reset sort with renderDirect
Modified: plugins/sfDatagridPlugin/lib/sfDatagrid.class.php
===================================================================
--- plugins/sfDatagridPlugin/lib/sfDatagrid.class.php 2010-05-25 13:25:34 UTC
(rev 29619)
+++ plugins/sfDatagridPlugin/lib/sfDatagrid.class.php 2010-05-25 14:51:26 UTC
(rev 29620)
@@ -66,8 +66,12 @@
// Get the sorting options
$this->sortBy = $this->request->getParameter(self::P_SORT,
null);
- $this->sortOrder = $this->request->getParameter(self::P_ORDER,
null);
-
+ $this->sortOrder = $this->request->getParameter(self::P_ORDER,
null);
+ if(substr($this->sortOrder,0,3)=='asc')
+ $this->sortOrder='asc';
+ else
+ $this->sortOrder='desc';
+
$this->search = $this->request->getParameter('search');
// Get the page number
Modified: plugins/sfDatagridPlugin/lib/sfDatagridFormatter.class.php
===================================================================
--- plugins/sfDatagridPlugin/lib/sfDatagridFormatter.class.php 2010-05-25
13:25:34 UTC (rev 29619)
+++ plugins/sfDatagridPlugin/lib/sfDatagridFormatter.class.php 2010-05-25
14:51:26 UTC (rev 29620)
@@ -188,8 +188,8 @@
$gridTotals.=
$this->traduct(sfDatagrid::getConfig('text_numberofrecords')) . ' : ' .
$pager->getNbResults();
}
- $url = $moduleAction . '?' . $this->P_PAGE . '=1' .
$suffixWithSorting;
- $url2 = $moduleAction.'?' . $this->P_PAGE .
'=1'.$suffixWithDefaultSorting;
+ $url = $moduleAction . '?' . $this->P_PAGE . '=1&' .
$suffixWithSorting;
+ $url2 = $moduleAction.'?' . $this->P_PAGE .
'=1&'.$suffixWithDefaultSorting;
if($renderSearch)
{
$searchHtml.= content_tag('button', content_tag('span',
$this->traduct(sfDatagrid::getConfig('text_search'))), array('type' =>
'button', 'class' => 'button', 'name' => 'search_btn', 'onclick' =>
'dg_send(\'' . $datagridName . '-form\', \'' . $datagridName . '\', \'search\',
\'' . url_for($url) . '\')'));
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.