Hi Ryan,<div><br></div><div>Sorry that gbrowse2 broke your loading code. I will be happy to incorporate your patch into the distribution.</div><div><br></div><div>If you think you'll be making other improvements, Scott and I would be happy to add you to the developer list at github.</div>
<div><br></div><div>Lincoln<br><br><div class="gmail_quote">On Thu, Nov 17, 2011 at 6:40 AM, Ryan Doherty <span dir="ltr"><<a href="mailto:rdoherty@pcbi.upenn.edu">rdoherty@pcbi.upenn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
I am part of the <a href="http://eupathdb.org" target="_blank">eupathdb.org</a> project at the University of Pennsylvania. We are in the process of upgrading to GBrowse 2 and I have been tasked with ensuring the popups continue to work the way they always have. Previously we had been generating the content of the popups using a javascript function call (with parameters established during the original page load). I would like to continue to do it this way, but found that loading popup content via a javascript function was not supported in GBrowse 2 (if this is incorrect, please let me know).<br>
<br>
I patched our local code to enable this functionality and would love to pass it on so that it may be added to the next version of GBrowse 2.x. If I could be added as a project member on SourceForge, perhaps I could make the change myself. If not, please consider making the following change:<br>
<br>
Add the following lines at line 1067 of balloon.js:<br>
<br>
> // check if the contents are to be generated by javascript<br>
> if (caption.match(/^javascript:/)<u></u>) {<br>
> var jsFunctionCall = caption.split(':')[1];<br>
> caption = eval(jsFunctionCall);<br>
> }<br>
><br>
<br>
Doing this would allow users to customize the contents of a popup using a string like "javascript:getMyPopupContent(<u></u>)" when preferred. The full diff and new file (patched from version 2.39) are attached (with an additional minor nit). Please feel free to contact me with any questions.<br>
<br>
Thank you,<span class="HOEnZb"><font color="#888888"><br>
Ryan Doherty<br>
EuPathDb Team, University of Pennsylvania<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Lincoln D. Stein<br>Director, Informatics and Biocomputing Platform<br>Ontario Institute for Cancer Research<br>101 College St., Suite 800<br>Toronto, ON, Canada M5G0A3<br>
416 673-8514<br>Assistant: Renata Musa <<a href="mailto:Renata.Musa@oicr.on.ca">Renata.Musa@oicr.on.ca</a>><br>
</div>