Issue Details (XML | Word | Printable)

Key: GLIFFY-1070
Type: Bug Bug
Status: Tested Tested
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Shannon Krebs
Reporter: Chris Kohlhardt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Gliffy

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

Created: 18/Dec/08 03:27 PM   Updated: 26/Jun/09 11:48 AM
Component/s: Confluence Plugin Integration
Affects Version/s: Gliffy Plugin for Confluence - 1.5.0
Fix Version/s: Gliffy Plugin for Confluence - 1.5.0
Security Level: Anyone may view


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Chris Kohlhardt added a comment - 18/Dec/08 03: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>


Shannon Krebs added a comment - 19/Dec/08 02: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.


Chris Kohlhardt added a comment - 19/Dec/08 04: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