Commit e76cb6aa authored by Sebastien Robin's avatar Sebastien Robin

added the method updateSelectionCheckedUidList


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@520 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 255d239c
...@@ -194,6 +194,17 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -194,6 +194,17 @@ class SelectionTool( UniqueObject, SimpleItem ):
selection_object = Selection(checked_uids=checked_uids) selection_object = Selection(checked_uids=checked_uids)
self.setSelectionFor(selection_name, selection_object, REQUEST) self.setSelectionFor(selection_name, selection_object, REQUEST)
def updateSelectionCheckedUidList(self, selection_name, listbox_uid, uids, REQUEST=None):
"""
Sets the selection params for a given selection_name
"""
if listbox_uid is None:
listbox_uid = []
if uids is None:
uids = []
self.uncheckAll(selection_name,listbox_uid,REQUEST=REQUEST)
self.checkAll(selection_name,uids,REQUEST=REQUEST)
security.declareProtected(ERP5Permissions.View, 'getSelectionCheckedUidsFor') security.declareProtected(ERP5Permissions.View, 'getSelectionCheckedUidsFor')
def getSelectionCheckedUidsFor(self, selection_name, REQUEST=None): def getSelectionCheckedUidsFor(self, selection_name, REQUEST=None):
""" """
...@@ -201,7 +212,8 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -201,7 +212,8 @@ class SelectionTool( UniqueObject, SimpleItem ):
""" """
selection_object = self.getSelectionFor(selection_name, REQUEST) selection_object = self.getSelectionFor(selection_name, REQUEST)
if selection_object: if selection_object:
return selection_object.selection_checked_uids #return selection_object.selection_checked_uids
return selection_object.getSelectionCheckedUids()
return [] return []
security.declareProtected(ERP5Permissions.View, 'checkAll') security.declareProtected(ERP5Permissions.View, 'checkAll')
......
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