Open links to galaxy screencasts in pages in an overlay.

This commit is contained in:
Jeremy Goecks
2010-02-16 17:05:12 -05:00
parent c4f5ac7644
commit b0aaa5b772
+34 -12
View File
@@ -35,18 +35,40 @@
${h.js( "galaxy.base", "jquery", "json2", "jquery.autocomplete", "autocomplete_tagging" )}
<script type="text/javascript">
//
// Handle click on community tag.
//
function community_tag_click(tag_name, tag_value)
{
<% controller_name = get_controller_name( item ) %>
var href = '${h.url_for ( controller='/' + controller_name , action='list_published')}';
href = href + "?f-tags=" + tag_name;
if (tag_value != null && tag_value != "")
href = href + ":" + tag_value;
self.location = href;
}
//
// Handle click on community tag.
//
function community_tag_click(tag_name, tag_value)
{
<% controller_name = get_controller_name( item ) %>
var href = '${h.url_for ( controller='/' + controller_name , action='list_published')}';
href = href + "?f-tags=" + tag_name;
if (tag_value != null && tag_value != "")
href = href + ":" + tag_value;
self.location = href;
}
$(document).ready( function()
{
// Set links to Galaxy screencasts to open in overlay.
$(this).find("a[href^='http://screencast.g2.bx.psu.edu/']").each( function()
{
$(this).click( function()
{
var href = $(this).attr('href');
options =
{
url: href,
width: 640,
height: 480,
scroll: 'no'
};
show_in_overlay(options);
return false;
});
});
});
</script>
</%def>