Re: [Zope] tree plus/minus url
Hi, Ragnar Beer wrote: > > Too late, I already posted it before I went on holiday :( May be its possible to update the posting? > Ragnar > > >Ragnar Beer wrote: > >> > >> I found quite an easy solution for Zope 2.1.6: > >> > >> In lib/python/TreeDisplay/TreeTag.py you have to replace the "old > >> code" with the "new code". (Blame me - I forgot to make a copy > >> beforehands which keeps me from using diff.) > >> > >> The idea is to "export" the piece of code that puts together the url > >> to treeData['tree-item-clickurl'] so that you can access it with > >> within your tree-tag. I haven't checked > >> this for unwanted side effects. Perhaps someone more familiar with > >> the zope code could do that? For me it works fine! > > > >Would you mind including an alias for tree-item-clickurl which reads > >tree_item_clickurl before posting it to the collector? > > > >I hope we can make all this ugly hypenation variables go away someday... > > > >Regards > >Tino Wildenhain > >_[_['sequence-item']] avoidance taskforce. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] tree plus/minus url
Ragnar Beer wrote: > > I found quite an easy solution for Zope 2.1.6: > > In lib/python/TreeDisplay/TreeTag.py you have to replace the "old > code" with the "new code". (Blame me - I forgot to make a copy > beforehands which keeps me from using diff.) > > The idea is to "export" the piece of code that puts together the url > to treeData['tree-item-clickurl'] so that you can access it with > within your tree-tag. I haven't checked > this for unwanted side effects. Perhaps someone more familiar with > the zope code could do that? For me it works fine! Would you mind including an alias for tree-item-clickurl which reads tree_item_clickurl before posting it to the collector? I hope we can make all this ugly hypenation variables go away someday... Regards Tino Wildenhain _[_['sequence-item']] avoidance taskforce. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] tree plus/minus url
Ragnar Beer wrote: > The idea is to "export" the piece of code that puts together the url > to treeData['tree-item-clickurl'] so that you can access it with > within your tree-tag. I haven't checked > this for unwanted side effects. Perhaps someone more familiar with > the zope code could do that? For me it works fine! Sounds cool, maybe post it in the collector? cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] tree plus/minus url
I found quite an easy solution for Zope 2.1.6: In lib/python/TreeDisplay/TreeTag.py you have to replace the "old code" with the "new code". (Blame me - I forgot to make a copy beforehands which keeps me from using diff.) The idea is to "export" the piece of code that puts together the url to treeData['tree-item-clickurl'] so that you can access it with within your tree-tag. I haven't checked this for unwanted side effects. Perhaps someone more familiar with the zope code could do that? For me it works fine! Ragnar Line 372: # Mostly inline encode_seq for speed s=compress(str(diff)) if len(s) > 57: s=encode_str(s) else: s=b2a_base64(s)[:-1] l=find(s,'=') if l >= 0: s=s[:l] s=translate(s, tplus) script=md['SCRIPT_NAME'] # old code #if exp: #treeData['tree-item-expanded']=1 #output('' # '' % # (id, root_url, s, id, script)) #else: #output('' # '' % # (id, root_url, s, id, script)) # end of old code # New code if exp: treeData['tree-item-clickurl']= '%s?tree-c=%s#%s' % (root_url, s, id) treeData['tree-item-expanded']=1 output('' '' % (id, treeData['tree-item-clickurl'], script)) else: treeData['tree-item-clickurl']= '%s?tree-e=%s#%s' % (root_url, s, id) output('' '' % (id, treeData['tree-item-clickurl'], script)) # end of new code output('\n') else: if level > 2: output(_td_colspan % level) elif level > 0: output(_td_single * level) output(_td_single) output('\n') >Ragnar Beer wrote: >> >> Howdy! >> >> I've been experimenting with trees for a while and discovered that >> almost all innocent first time clickers were clicking on the text >> _behind_ the plus and minus images instead on the images themselves. >> So I decided to make the text a link with the same url as the image >> has but I can't find the right variable. Where is that url stored? >> Can anybody help? > >Your best bet is to look in the source for the tree tag and see how it's >done there: >/lib/python/TreeDisplay/TreeTag.py > >cheers, > >Chris > >PS: Please post back to the list if you find out how ;-) > >___ >Zope maillist - [EMAIL PROTECTED] >http://lists.zope.org/mailman/listinfo/zope >** No cross posts or HTML encoding! ** >(Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] tree plus/minus url
Ragnar Beer wrote: > > Howdy! > > I've been experimenting with trees for a while and discovered that > almost all innocent first time clickers were clicking on the text > _behind_ the plus and minus images instead on the images themselves. > So I decided to make the text a link with the same url as the image > has but I can't find the right variable. Where is that url stored? > Can anybody help? Your best bet is to look in the source for the tree tag and see how it's done there: /lib/python/TreeDisplay/TreeTag.py cheers, Chris PS: Please post back to the list if you find out how ;-) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] tree plus/minus url
Howdy! I've been experimenting with trees for a while and discovered that almost all innocent first time clickers were clicking on the text _behind_ the plus and minus images instead on the images themselves. So I decided to make the text a link with the same url as the image has but I can't find the right variable. Where is that url stored? Can anybody help? Ragnar ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )