Ajout select option de tri.
[Portfolio.git] / skins / remove_to_lightbox.py
1 ##parameters=uid,ajax=''
2 uid = int(uid)
3 sd = context.session_data_manager.getSessionData(create = 1)
4 lightboxpath = sd.get('lightboxpath', None)
5 if lightboxpath is not None and lightboxpath == context.getPhysicalPath() :
6 selection = sd.get('objects_selection', [])
7 selDict = sd.get('objects_selection_dict', {})
8 if selDict.has_key(uid) :
9 del selDict[uid]
10 selection.remove(uid)
11 sd['objects_selection'] = selection
12 sd['objects_selection_dict'] = selDict
13
14 context.remove(uid)
15
16 return context.setRedirect(context, 'object/view', ajax=ajax)