projects
/
MosaicDocument.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Utilisation des png24 (et apng) pour l'affichage des boutons de déploiement de l...
[MosaicDocument.git]
/
skins
/
xml_nav_tree.py
diff --git
a/skins/xml_nav_tree.py
b/skins/xml_nav_tree.py
index
05967d9
..
79c069c
100644
(file)
--- a/
skins/xml_nav_tree.py
+++ b/
skins/xml_nav_tree.py
@@
-1,4
+1,4
@@
-##parameters=filter=''
+##parameters=
root_name='',expansion='',
filter=''
from ZTUtils import SimpleTreeMaker
stm = SimpleTreeMaker()
def replaceXMLEntities(text) :
from ZTUtils import SimpleTreeMaker
stm = SimpleTreeMaker()
def replaceXMLEntities(text) :
@@
-11,10
+11,12
@@
rmBadAttrChars = maketrans('<&"', ' ')
filter = filter.split(',')
filter = filter.split(',')
-root = context
+childs = list(context.listNearestFolderContents(contentFilter={'portal_type':filter}))
+childs.sort(lambda x, y : cmp(y.title_or_id().lower(), x.title_or_id().lower()))
+
context.REQUEST.RESPONSE.setHeader('content-type', 'text/xml; charset=utf-8')
print '<xml>'
context.REQUEST.RESPONSE.setHeader('content-type', 'text/xml; charset=utf-8')
print '<xml>'
-for ob in c
ontext.listNearestFolderContents(contentFilter={'portal_type':filter})
:
+for ob in c
hilds
:
icon = context.restrictedTraverse(ob.getIcon())
state = 0
if not getattr(ob, 'isPortalContent', False) :
icon = context.restrictedTraverse(ob.getIcon())
state = 0
if not getattr(ob, 'isPortalContent', False) :
@@
-33,5
+35,5
@@
for ob in context.listNearestFolderContents(contentFilter={'portal_type':filter}
print '</xml>'
print '</xml>'
-
+context.REQUEST.RESPONSE.setCookie('%s-state' % root_name, expansion, path='/')
return printed
\ No newline at end of file
return printed
\ No newline at end of file