Use backbone routing for a tours URL, since there's no serverside endpoint.

This commit is contained in:
Dannon Baker
2016-02-04 10:21:49 -05:00
parent 61f168d34b
commit 33ebeb801d
10 changed files with 37 additions and 26 deletions
+7 -1
View File
@@ -7,7 +7,8 @@ var jQuery = require( 'jquery' ),
ToolPanel = require( './tool-panel' ),
HistoryPanel = require( './history-panel' ),
PAGE = require( 'layout/page' ),
ToolForm = require( 'mvc/tool/tool-form' );
ToolForm = require( 'mvc/tool/tool-form' ),
Tours = require( 'mvc/tours' );
/** define the 'Analyze Data'/analysis/main/home page for Galaxy
* * has a masthead
@@ -99,6 +100,11 @@ window.app = function app( options, bootstrapped ){
'(/)' : 'home',
// TODO: remove annoying 'root' from root urls
'(/)root*' : 'home',
'(/)tours' : 'show_tours',
},
show_tours : function( params ){
centerPanel.display( new Tours.ToursView() );
},
/** */
+7 -2
View File
@@ -144,8 +144,13 @@ var Collection = Backbone.Collection.extend({
target : '_blank'
},{
title : 'Interactive Tours',
onclick : function(c){
Galaxy.app.display(new Tours.ToursView());
onclick : function(){
if (Galaxy.app){
Galaxy.app.display(new Tours.ToursView());
} else {
// Redirect and use clientside routing to go to tour index
window.location = Galaxy.root + "#/tours";
}
},
target : 'galaxy_main'
}]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
webpackJsonp([4],[function(e,r,n){(function(e){var r=n(1),a=r,i=n(59).GalaxyApp,o=n(10),t=n(5),l=n(61);window.app=function(n,c){window.Galaxy=new i(n,c),Galaxy.debug("login app");var d=encodeURI(n.redirect);if(!n.show_welcome_with_login){var w=r.param({use_panels:"True",redirect:d});return void(window.location.href=Galaxy.root+"user/login?"+w)}var p=new l.PageLayoutView(e.extend(n,{el:"body",center:new o.CenterPanel({el:"#center"}),right:new o.RightPanel({title:t("Login required"),el:"#right"})}));a(function(){var e=r.param({redirect:d}),a=Galaxy.root+"user/login?"+e;p.render(),p.center.$("#galaxy_main").prop("src",n.welcome_url),p.right.$(".unified-panel-body").css("overflow","hidden").html('<iframe src="'+a+'" frameborder="0" style="width: 100%; height: 100%;"/>')})}}).call(r,n(3))}]);
webpackJsonp([4],[function(e,r,n){(function(e){var r=n(1),a=r,i=n(60).GalaxyApp,o=n(10),t=n(5),l=n(62);window.app=function(n,c){window.Galaxy=new i(n,c),Galaxy.debug("login app");var d=encodeURI(n.redirect);if(!n.show_welcome_with_login){var w=r.param({use_panels:"True",redirect:d});return void(window.location.href=Galaxy.root+"user/login?"+w)}var p=new l.PageLayoutView(e.extend(n,{el:"body",center:new o.CenterPanel({el:"#center"}),right:new o.RightPanel({title:t("Login required"),el:"#right"})}));a(function(){var e=r.param({redirect:d}),a=Galaxy.root+"user/login?"+e;p.render(),p.center.$("#galaxy_main").prop("src",n.welcome_url),p.right.$(".unified-panel-body").css("overflow","hidden").html('<iframe src="'+a+'" frameborder="0" style="width: 100%; height: 100%;"/>')})}}).call(r,n(3))}]);
//# sourceMappingURL=login.bundled.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long