Commit f9204e12 authored by Rafael Monnerat's avatar Rafael Monnerat

Small fix for PlanningBox Zoom.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14422 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent be48e678
...@@ -671,7 +671,6 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -671,7 +671,6 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
return self.checkAll(list_selection_name, uids, REQUEST=REQUEST, query_string=query_string) return self.checkAll(list_selection_name, uids, REQUEST=REQUEST, query_string=query_string)
# PlanningBox related methods # PlanningBox related methods
security.declareProtected(ERP5Permissions.View, 'setZoomLevel') security.declareProtected(ERP5Permissions.View, 'setZoomLevel')
def setZoomLevel(self, uids=None, REQUEST=None, form_id=None, query_string=None): def setZoomLevel(self, uids=None, REQUEST=None, form_id=None, query_string=None):
""" """
...@@ -706,7 +705,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -706,7 +705,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST) selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None: if selection is not None:
params = selection.getParams() params = selection.getParams()
zoom_start = request.form.get('zoom_start') zoom_start = request.form.get('zoom_start',0)
params['zoom_start'] = zoom_start params['zoom_start'] = zoom_start
selection.edit(params= params) selection.edit(params= params)
if REQUEST is not None: if REQUEST is not None:
...@@ -724,7 +723,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -724,7 +723,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST) selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None: if selection is not None:
params = selection.getParams() params = selection.getParams()
zoom_start = params.get('zoom_start') zoom_start = params.get('zoom_start',0)
params['zoom_start'] = int(zoom_start) + 1 params['zoom_start'] = int(zoom_start) + 1
selection.edit(params= params) selection.edit(params= params)
if REQUEST is not None: if REQUEST is not None:
...@@ -742,7 +741,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -742,7 +741,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST) selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None: if selection is not None:
params = selection.getParams() params = selection.getParams()
zoom_start = params.get('zoom_start') zoom_start = params.get('zoom_start',0)
params['zoom_start'] = int(zoom_start) - 1 params['zoom_start'] = int(zoom_start) - 1
selection.edit(params= params) selection.edit(params= params)
if REQUEST is not None: if REQUEST is not 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