Commit fbe474e8 authored by Romain Courteaud's avatar Romain Courteaud

Sort skin folder by ID and then by priority.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35729 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6009673e
......@@ -231,6 +231,9 @@ def registerSkinFolder(skin_tool, skin_folder):
if (skin_folder_id not in selection_list):
selection_list.insert(0, skin_folder_id)
if reorder_skin_selection:
# Sort by skin ID
selection_list.sort()
# Sort by skin priority
selection_list.sort(
key=lambda x: x in skin_tool.objectIds() and skin_tool[x].getProperty(
'business_template_skin_layer_priority', skin_tool[x].meta_type == 'Filesystem Directory View' and -1 or 0) or 0, reverse=True)
......
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