Static Page JS Protocol
To solve some testing issues, there is a new procedure for hard coded links that go from hgwdev --> hgwbeta --> RR and for those that go from hgdownload-test --> hgdownload.
Starting with the first scenario:
hgwdev --> hgwbeta --> RR
There are cases where it is necessary to have the RR hardcoded in the link like the link below:
^this link can't be relative
This becomes problematic especially when you are testing on hgwdev because the files that this links is referring to aren't on the RR.
To solve this problem I wrote/found some jquery code (/js/staticDoc.js) that will find hard coded "http://genome.ucsc.edu" links and rewrite them to be whatever their current host name is for easy testing.
For this to work you there are a few things you need to do:
1) You need to refer for the jquery code by placing the code below between the <head></head> tags at the top of the page or the page that the file is included in. Ex: <head>
<script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript" src="/js/staticDoc.js"></script>
</head>
2) If the hard coded link is after an "=" sign then you will need to add class="insideLink" to the to link (see below)
<a class="insideLink" href="../../cgi-bin/hgTracks?org=human&position=chr22&hgt.customText=http://genome.ucsc.edu/goldenPath/help/examples/ct_example4.txt"
With this class added the link on hgwdev is now:
Please note: the <a href=""></a> must be in lower case for this to work.
When you push it to hgwbeta, the url after the "=" sign will reflect the current host name.
3) If there is a rare case where you have to have a hard coded link instead of a relative link, then you will need to add class="change" (see below)
<a class="change" TARGET=_BLANK href="http://genome.ucsc.edu/goldenPath/help/ct_description.txt">
On hwdev this link looks like this:
http://hgwdev.cse.ucsc.edu/goldenPath/help/ct_description.txt
Please note: the <a href=""></a> must be in lower case for this to work.