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 ):
return self.checkAll(list_selection_name, uids, REQUEST=REQUEST, query_string=query_string)
# PlanningBox related methods
security.declareProtected(ERP5Permissions.View, 'setZoomLevel')
def setZoomLevel(self, uids=None, REQUEST=None, form_id=None, query_string=None):
"""
......@@ -706,7 +705,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None:
params = selection.getParams()
zoom_start = request.form.get('zoom_start')
zoom_start = request.form.get('zoom_start',0)
params['zoom_start'] = zoom_start
selection.edit(params= params)
if REQUEST is not None:
......@@ -724,7 +723,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None:
params = selection.getParams()
zoom_start = params.get('zoom_start')
zoom_start = params.get('zoom_start',0)
params['zoom_start'] = int(zoom_start) + 1
selection.edit(params= params)
if REQUEST is not None:
......@@ -742,7 +741,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None:
params = selection.getParams()
zoom_start = params.get('zoom_start')
zoom_start = params.get('zoom_start',0)
params['zoom_start'] = int(zoom_start) - 1
selection.edit(params= params)
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