Gliffy

When editor is configured to open in own window, 'Edit in Gliffy' links on attachment pages don't open editor in own window

Details

Activity

Hide
Chris Kohlhardt added a comment - 18/Dec/08 3:44 PM

Confluence does this using Javascript. Try something like:

<a href="/renderer/notationhelp.action" onClick="window.open('/renderer/notationhelp.action','notation_help','width=780, height=580, resizable, scrollbars'); return false;">Handbuch zur Notation</a>

Show
Chris Kohlhardt added a comment - 18/Dec/08 3:44 PM Confluence does this using Javascript. Try something like: <a href="/renderer/notationhelp.action" onClick="window.open('/renderer/notationhelp.action','notation_help','width=780, height=580, resizable, scrollbars'); return false;">Handbuch zur Notation</a>
Hide
Shannon Krebs added a comment - 19/Dec/08 2:47 PM

Its actually pretty easy to make this work, kinda like an SQL injection

We can just close the href attribute and add a target attribute. The problem now is that in the gliffy macro you the image map to make the up part of the window name. I don't see any way of getting that information atm.

Show
Shannon Krebs added a comment - 19/Dec/08 2:47 PM Its actually pretty easy to make this work, kinda like an SQL injection We can just close the href attribute and add a target attribute. The problem now is that in the gliffy macro you the image map to make the up part of the window name. I don't see any way of getting that information atm.
Hide
Chris Kohlhardt added a comment - 19/Dec/08 4:37 PM

Yeah, I see the problem.

Do you think we could use javascript to create the name? Would something like either of these work:

(invoke javascript to create random number between 0-1000000 as target name)
target="&{Math.floor(Math.random()*1000000)};"

OR

(invoke javascript to create a map name similar to how we do it in ConfluencePluginDiagramBiz, assuming we can get the attachment name. We should probably produce an exact match of what we do in ConfluencePluginDiagramBiz if we can)
target="&{ 'GLIFFY_MAP_' + $attachementName.replace(" ","_"); };"

Supposedly you can embed javascript in HTML attributes, tho I've never tried it myself:
http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/guide/embed.html

Show
Chris Kohlhardt added a comment - 19/Dec/08 4:37 PM Yeah, I see the problem. Do you think we could use javascript to create the name? Would something like either of these work: (invoke javascript to create random number between 0-1000000 as target name) target="&{Math.floor(Math.random()*1000000)};" OR (invoke javascript to create a map name similar to how we do it in ConfluencePluginDiagramBiz, assuming we can get the attachment name. We should probably produce an exact match of what we do in ConfluencePluginDiagramBiz if we can) target="&{ 'GLIFFY_MAP_' + $attachementName.replace(" ","_"); };" Supposedly you can embed javascript in HTML attributes, tho I've never tried it myself: http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/guide/embed.html

People

Dates

  • Created:
    18/Dec/08 3:27 PM
    Updated:
    26/Jun/09 11:48 AM
    Resolved:
    19/Dec/08 9:42 PM