Commit 93415096 authored by Jonathan Loriette's avatar Jonathan Loriette

add setZoom function used by PlanningBox


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3360 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 16350f8a
......@@ -521,6 +521,28 @@ class SelectionTool( UniqueObject, SimpleItem ):
self.uncheckAll(selection_name, listbox_uid)
return self.checkAll(selection_name, uids, REQUEST=REQUEST)
security.declareProtected(ERP5Permissions.View, 'setZoom')
def setZoom(self, uids=None, REQUEST=None):
"""
Set graphic zoom in PlanningBox
"""
if uids is None: uids = []
request = REQUEST
zoom=request.get('zoom')
selection_name=request.list_selection_name
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None:
params = selection.getParams()
params['zoom'] = zoom
selection.edit(params= params)
referer = request['HTTP_REFERER']
referer = referer.replace('reset=', 'noreset=')
referer = referer.replace('reset:int=', 'noreset:int=')
return request.RESPONSE.redirect(referer)
security.declareProtected(ERP5Permissions.View, 'setDomainRoot')
def setDomainRoot(self, REQUEST):
"""
......
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