commit/galaxy-central: guerler: Fix links in masterhead
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/e262ddfe44c3/ Changeset: e262ddfe44c3 User: guerler Date: 2013-10-02 19:34:52 Summary: Fix links in masterhead Affected #: 1 file diff -r 99e18f8868470f48a6a5d91070019d9bfc801f7e -r e262ddfe44c34200bac86dfab64c7acbdc5c54a3 templates/webapps/galaxy/galaxy.masthead.mako --- a/templates/webapps/galaxy/galaxy.masthead.mako +++ b/templates/webapps/galaxy/galaxy.masthead.mako @@ -51,7 +51,7 @@ <ul class="nav navbar-nav" border="0" cellspacing="0"> - <%def name="tab( id, display, href, target='_parent', visible=True, extra_class='', menu_options=None )"> + <%def name="tab( id, display, href, onclick=False, target='_parent', visible=True, extra_class='', menu_options=None )"> ## Create a tab at the top of the panels. menu_options is a list of 2-elements lists of [name, link] ## that are options in the menu. @@ -61,8 +61,6 @@ extra = "" if extra_class: cls += " " + extra_class - ##if self.active_view == id: - ## cls += " active" if menu_options: cls += " dropdown" a_cls += " dropdown-toggle" @@ -88,7 +86,11 @@ ${menu_item[0]} %elif len ( menu_item ) == 2: <% name, link = menu_item %> - <a href="${link}">${name}</a> + %if onclick: + <a href="${link}" onclick="Galaxy.frame_manager.frame_new({title: '${name}', type: 'url', content: '${link}'}); return false;">${name}</a> + %else: + <a href="${link}">${name}</a> + %endif %else: <% name, link, target = menu_item %><a target="${target}" href="${link}">${name}</a> @@ -105,7 +107,7 @@ ${tab( "analysis", _("Analyze Data"), h.url_for( controller='/root', action='index' ) )} ## Workflow tab. - ${tab( "workflow", _("Workflow"), "javascript:Galaxy.frame_manager.frame_new({title: 'Workflow', type: 'url', content: '" + h.url_for( controller='/workflow', action='index' ) + "'});")} + ${tab( "workflow", _("Workflow"), h.url_for( controller='/workflow', action='index' ) )} ## 'Shared Items' or Libraries tab. <% @@ -135,10 +137,10 @@ ## Visualization menu. <% menu_options = [ - [_('New Track Browser'), "javascript:Galaxy.frame_manager.frame_new({title: 'Trackster', type: 'url', content: '" + h.url_for( controller='/visualization', action='trackster' ) + "'});"], - [_('Saved Visualizations'), "javascript:Galaxy.frame_manager.frame_new({ type: 'url', content : '" + h.url_for( controller='/visualization', action='list' ) + "'});" ] + [_('New Track Browser'), h.url_for( controller='/visualization', action='trackster' )], + [_('Saved Visualizations'), h.url_for( controller='/visualization', action='list' )] ] - tab( "visualization", _("Visualization"), "javascript:Galaxy.frame_manager.frame_new({title: 'Trackster', type: 'url', content: '" + h.url_for( controller='/visualization', action='list' ) + "'});", menu_options=menu_options ) + tab( "visualization", _("Visualization"), h.url_for( controller='/visualization', action='list' ), menu_options=menu_options, onclick=True ) %> ## Cloud menu. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org