[Erp5-report] r38582 kazuhiko - /erp5/trunk/products/ERP5Form/ListBox.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 23 11:57:31 CEST 2010
Author: kazuhiko
Date: Thu Sep 23 11:57:28 2010
New Revision: 38582
URL: http://svn.erp5.org?rev=38582&view=rev
Log:
make shorter url for empty selection_name case.
Modified:
erp5/trunk/products/ERP5Form/ListBox.py
Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=38582&r1=38581&r2=38582&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py [utf8] Thu Sep 23 11:57:28 2010
@@ -2426,16 +2426,21 @@ class ListBoxHTMLRendererLine(ListBoxRen
error = sys.exc_info())
else:
try:
- url = '%s/view?ignore_layout:int=%s&reset:int=1' % (
+ url = '%s/view' % (
# brain.absolute_url() is slow because it invokes
# _aq_dynamic() every time to get brain.REQUEST,
# so we call request.physicalPathToURL() directly
# instead of brain.absolute_url().
- request.physicalPathToURL(brain.getPath()),
- ignore_layout)
+ request.physicalPathToURL(brain.getPath()),)
+ params = []
+ if ignore_layout:
+ params.append('ignore_layout:int=1')
if selection_name:
- url += '&selection_index=%s&selection_name=%s' % (
- self.index, selection_name)
+ params.extend(('selection_name=%s' % selection_name,
+ 'selection_index=%s' % self.index,
+ 'reset:int=1'))
+ if params:
+ url = '%s?%s' % (url, '&'.join(params))
except AttributeError:
pass
More information about the Erp5-report
mailing list