diff -C 5 lib/python/OFS/PropertyManager.py lib.tmp/python/OFS/PropertyManager.py *** lib/python/OFS/PropertyManager.py Mon Dec 13 13:32:04 1999 --- lib.tmp/python/OFS/PropertyManager.py Mon Feb 14 12:29:50 2000 *************** *** 353,360 **** --- 353,383 ---- if REQUEST is not None: return self.manage_propertiesForm(self, REQUEST) + def manage_firstProperties(self, ids = None, REQUEST = None): + """Move the specified properties to the top of the collection.""" + if ids is None: + message = 'No properties were selected to be made first.' + elif len(ids) == len(self._properties): + message = 'Making all properties first has no effect.' + else: + self._properties = tuple( + filter(lambda property, ids = ids: + property['id'] in ids, + self._properties) + + + filter(lambda property, ids = ids: + property['id'] not in ids, + self._properties) + ) + message = 'Properties rearranged as requested.' + + if REQUEST is not None: + return self.manage_propertiesForm(self, REQUEST, + manage_tabs_message = message) + + Globals.default__class_init__(PropertyManager) diff -C 5 lib/python/OFS/PropertySheets.py lib.tmp/python/OFS/PropertySheets.py *** lib/python/OFS/PropertySheets.py Mon May 24 17:35:42 1999 --- lib.tmp/python/OFS/PropertySheets.py Mon Feb 14 12:30:40 2000 *************** *** 445,454 **** --- 445,476 ---- for id in ids: self._delProperty(id) if REQUEST is not None: return self.manage(self, REQUEST) + def manage_firstProperties(self, ids = None, REQUEST = None): + """Move the specified properties to the top of the collection.""" + if ids is None: + message = 'No properties were selected to be made first.' + elif len(ids) == len(self._properties): + message = 'Making all properties first has no effect.' + else: + self._properties = tuple( + filter(lambda property, ids = ids: + property['id'] in ids, + self._properties) + + + filter(lambda property, ids = ids: + property['id'] not in ids, + self._properties) + ) + message = 'Properties rearranged as requested.' + + if REQUEST is not None: + return self.manage(self, REQUEST, manage_tabs_message = message) + + class Virtual: def __init__(self): pass diff -C 5 lib/python/OFS/properties.dtml lib.tmp/python/OFS/properties.dtml *** lib/python/OFS/properties.dtml Thu Nov 4 20:46:27 1999 --- lib.tmp/python/OFS/properties.dtml Mon Feb 14 12:31:26 2000 *************** *** 112,121 **** --- 112,122 ---- + Common subdirectories: lib/python/OFS/www and lib.tmp/python/OFS/www