You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
While editing a javascript code to adapt the behavior of an addthis
button I got something unexpected...
Checkout this JS code and thing about web2py template code:
var addthis_share = {
templates: { twitter: 'check out {{title}} @ {{url}}' }
}
First try:
templates: { twitter: 'check out '{{="{{title}} @ {{url}}"}}' }
if real parsing was going on here, this should work but probably the
template engine just uses regular expressions to find the ending
{{ mark after the beginning {{ and ignores everything else. So, it is
a fail...
Second try:
templates: { twitter: 'check out
'{{=chr(123)+chr(123)+'title'+chr(125)+chr(125)+' @
'+chr(123)+chr(123)+'url'+chr(125)+chr(125)}}' }
ok, this is sort of hacking the own framework but it works. It's ugly
but it works
Can we make it prettier without throwing this to a javascript file?
Vasile Ermicioi
unread,
Jul 18, 2011, 9:29:01 PM7/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message