Commit 44a0d064 authored by Sebastien Robin's avatar Sebastien Robin

setListboxDispalyMode should not redirect, only setFlatListMode, setDomain...


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2651 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b999ca18
...@@ -633,7 +633,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -633,7 +633,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
return 'FlatListMode' return 'FlatListMode'
security.declareProtected(ERP5Permissions.View, 'setListboxDisplayMode') security.declareProtected(ERP5Permissions.View, 'setListboxDisplayMode')
def setListboxDisplayMode(self, REQUEST,listbox_display_mode, selection_name=None): def setListboxDisplayMode(self, REQUEST,listbox_display_mode, selection_name=None,redirect=0):
""" """
Toogle display of the listbox Toogle display of the listbox
""" """
...@@ -667,6 +667,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -667,6 +667,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
if 'where_expression' in params: del params['where_expression'] if 'where_expression' in params: del params['where_expression']
selection.edit(params = params) selection.edit(params = params)
if redirect:
referer = request['HTTP_REFERER'] referer = request['HTTP_REFERER']
referer = referer.replace('noreset=', 'reset=') referer = referer.replace('noreset=', 'reset=')
referer = referer.replace('noreset:int=', 'reset:int=') referer = referer.replace('noreset:int=', 'reset:int=')
...@@ -681,7 +682,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -681,7 +682,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
Set display of the listbox to FlatList mode Set display of the listbox to FlatList mode
""" """
return self.setListboxDisplayMode(REQUEST=REQUEST, listbox_display_mode='FlatListMode', selection_name=selection_name) return self.setListboxDisplayMode(REQUEST=REQUEST, listbox_display_mode='FlatListMode', selection_name=selection_name,redirect=1)
security.declareProtected(ERP5Permissions.View, 'setDomainTreeMode') security.declareProtected(ERP5Permissions.View, 'setDomainTreeMode')
...@@ -690,7 +691,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -690,7 +691,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
Set display of the listbox to DomainTree mode Set display of the listbox to DomainTree mode
""" """
return self.setListboxDisplayMode(REQUEST=REQUEST,listbox_display_mode='DomainTreeMode', selection_name=selection_name) return self.setListboxDisplayMode(REQUEST=REQUEST,listbox_display_mode='DomainTreeMode', selection_name=selection_name,redirect=1)
security.declareProtected(ERP5Permissions.View, 'setReportTreeMode') security.declareProtected(ERP5Permissions.View, 'setReportTreeMode')
...@@ -699,7 +700,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -699,7 +700,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
Set display of the listbox to ReportTree mode Set display of the listbox to ReportTree mode
""" """
return self.setListboxDisplayMode(REQUEST=REQUEST,listbox_display_mode='ReportTreeMode',selection_name=selection_name) return self.setListboxDisplayMode(REQUEST=REQUEST,listbox_display_mode='ReportTreeMode',selection_name=selection_name,redirect=1)
security.declareProtected(ERP5Permissions.View, 'getSelectionSelectedValueList') security.declareProtected(ERP5Permissions.View, 'getSelectionSelectedValueList')
def getSelectionSelectedValueList(self, selection_name, REQUEST=None, selection_method=None, context=None): def getSelectionSelectedValueList(self, selection_name, REQUEST=None, selection_method=None, context=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment