Commit e5368cdc authored by 's avatar

Merged sorting change from 2.3 branch

parent 236463ec
...@@ -34,7 +34,7 @@ td { ...@@ -34,7 +34,7 @@ td {
</td> </td>
</tr> </tr>
</table> </table>
<dtml-tree sort=id nowrap=1> <dtml-tree nowrap=1>
<dtml-if icon> <dtml-if icon>
<a href="<dtml-var tree-item-url fmt=url-quote>/manage_workspace" <a href="<dtml-var tree-item-url fmt=url-quote>/manage_workspace"
target="manage_main"><img src="&dtml-BASEPATH1;/&dtml-icon;" border="0" target="manage_main"><img src="&dtml-BASEPATH1;/&dtml-icon;" border="0"
......
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
############################################################################## ##############################################################################
__doc__="""Object Manager __doc__="""Object Manager
$Id: ObjectManager.py,v 1.121 2001/01/11 21:29:41 chrism Exp $""" $Id: ObjectManager.py,v 1.122 2001/01/17 16:18:02 brian Exp $"""
__version__='$Revision: 1.121 $'[11:-2] __version__='$Revision: 1.122 $'[11:-2]
import App.Management, Acquisition, Globals, CopySupport, Products import App.Management, Acquisition, Globals, CopySupport, Products
import os, App.FactoryDispatcher, ts_regex, Products import os, App.FactoryDispatcher, ts_regex, Products
...@@ -475,16 +475,24 @@ class ObjectManager( ...@@ -475,16 +475,24 @@ class ObjectManager(
# Return a list of subobjects, used by tree tag. # Return a list of subobjects, used by tree tag.
r=[] r=[]
if hasattr(aq_base(self), 'tree_ids'): if hasattr(aq_base(self), 'tree_ids'):
for id in self.tree_ids: tree_ids=self.tree_ids
try: tree_ids=list(tree_ids)
except TypeError:
pass
if hasattr(tree_ids, 'sort'):
tree_ids.sort()
for id in tree_ids:
if hasattr(self, id): if hasattr(self, id):
r.append(self._getOb(id)) r.append(self._getOb(id))
else: else:
obj_ids=self.objectIds()
obj_ids.sort()
for id in obj_ids:
for id in self._objects: for id in self._objects:
o=self._getOb(id['id']) o=self._getOb(id)
try: if hasattr(o, 'isPrincipiaFolderish') and \
if o.isPrincipiaFolderish: r.append(o) o.isPrincipiaFolderish:
except: pass r.append(o)
return r return r
def manage_exportObject(self, id='', download=None, toxml=None, def manage_exportObject(self, id='', download=None, toxml=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