if (row.getAttribute("state") == "-1") {
var stateLink = document.createElement("A");
stateLink.href = ".";
+ stateLink.setAttribute("name", row.getAttribute("name"));
var stateImg = document.createElement("IMG");
stateImg.src = this.baseImgUrl + "pl.gif";
stateImg.border = "0";
##parameters=filter=''
-
+from ZTUtils import SimpleTreeMaker
+stm = SimpleTreeMaker()
def replaceXMLEntities(text) :
for c, ent in (('<', '<'), ('>', '>'), ('&', '&')) :
text = text.replace(c, ent)
state = 0
if not getattr(ob, 'isPortalContent', False) :
state = ob.listNearestFolderContents(contentFilter={'portal_type':filter}) and "-1" or "0"
- row = '<row id="%(id)s" url="%(url)s" icon="%(icon)s" height="%(height)d" width="%(width)d" state="%(state)s" description="%(description)s">%(title)s</row>' % {
- 'id' : ob.getId(),
+ row = '<row name="%(name)s" url="%(url)s" icon="%(icon)s" height="%(height)d" width="%(width)d" state="%(state)s" description="%(description)s">%(title)s</row>' % {
+ 'name' : stm.node(ob).id,
'url' : ob.absolute_url(),
'title' : ' '+replaceXMLEntities(ob.title_or_id()),
'description' : ob.Description().translate(rmBadAttrChars),