Ok, I&#39;ve committed this version.<div><br></div><div>Lincoln<br><br><div class="gmail_quote">On Tue, Nov 22, 2011 at 6:06 AM, Ryan Doherty <span dir="ltr">&lt;<a href="mailto:rdoherty@pcbi.upenn.edu">rdoherty@pcbi.upenn.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Lincoln,<br>
    <br>
    Sorry to do this but I already found a bug in my own code (in cases
    where the javascript contains a &#39;:&#39; character).  The following diff
    is better.<br>
    <br>
    Thanks,<br>
    Ryan<br>
    <br>
    <br>
    *** balloon.js.v2.39    2011-11-16 16:02:55.000000000 -0500<br>
    --- balloon.js    2011-11-16 17:24:47.000000000 -0500<br>
    ***************<br>
    *** 1065,1070 ****<br>
    --- 1065,1076 ----<br>
          this.loadedFromElement = true;<br>
        }<br>
      <br>
    +   // check if the contents are to be generated by javascript<br>
    +   if (caption.match(/^<a>javascript:/</a>)) {<br>
    +     var jsFunctionCall = caption.substring(11);<br>
    +     caption = eval(jsFunctionCall);<br>
    +   }<br>
    + <br>
        // check if iframes are allowed<br>
        if (caption.match(/\&lt;\s*iframe/i) &amp;&amp;
    !this.allowIframes) {<br>
          alert(&#39;Sorry: iframe elements &#39;+notAllowed);<br>
    ***************<br>
    *** 1087,1093 ****<br>
        this.currentHelpText = this.getContents(caption);<br>
        this.loadedFromElement = false;<br>
        <br>
    !   return this.currentHelpText;;<br>
      }<br>
      <br>
      <br>
    --- 1093,1099 ----<br>
        this.currentHelpText = this.getContents(caption);<br>
        this.loadedFromElement = false;<br>
        <br>
    !   return this.currentHelpText;<div class="im"><br>
      }<br>
      <br>
      <br>
    <br>
    <br>
    <br>
    <br>
    On 11/16/11 7:32 PM, Lincoln Stein wrote:
    </div><div><div class="h5"><blockquote type="cite">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&#39;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">&lt;<a href="mailto:rdoherty@pcbi.upenn.edu" target="_blank">rdoherty@pcbi.upenn.edu</a>&gt;</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>
            &gt;   // check if the contents are to be generated by
            javascript<br>
            &gt;   if (caption.match(/^<a>javascript:/</a>)) {<br>
            &gt;     var jsFunctionCall = caption.split(&#39;:&#39;)[1];<br>
            &gt;     caption = eval(jsFunctionCall);<br>
            &gt;   }<br>
            &gt;<br>
            <br>
            Doing this would allow users to customize the contents of a
            popup using a string like <a>&quot;javascript:getMyPopupContent()&quot;</a>
            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><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>
        <a href="tel:416%20673-8514" value="+14166738514" target="_blank">416 673-8514</a><br>
        Assistant: Renata Musa &lt;<a href="mailto:Renata.Musa@oicr.on.ca" target="_blank">Renata.Musa@oicr.on.ca</a>&gt;<br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</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 &lt;<a href="mailto:Renata.Musa@oicr.on.ca">Renata.Musa@oicr.on.ca</a>&gt;<br>
</div>