mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
define(["mvc/toolshed/shed-list-view","mvc/toolshed/categories-view","mvc/toolshed/repositories-view","mvc/toolshed/repository-view","mvc/toolshed/repository-queue-view","mvc/toolshed/repo-status-view","mvc/toolshed/workflows-view"],function(a,b,c,d,e,f,g){var h=Backbone.Router.extend({initialize:function(){this.routesHit=0,Backbone.history.on("route",function(){this.routesHit++},this),this.bind("route",this.trackPageview)},routes:{"":"toolsheds",sheds:"toolsheds",queue:"queue",workflows:"workflows","status/r/:repositories":"status",status:"status","categories/s/:tool_shed":"categories","category/s/:tool_shed/c/:cateory_id":"repositories","repository/s/:tool_shed/r/:repository_id":"repository"},back:function(){this.routesHit>1?window.history.back():this.navigate("#",{trigger:!0,replace:!0})}}),i=Backbone.View.extend({app_config:{known_views:["toolsheds","queue","status","categories","repositories","repoository"]},initialize:function(){Galaxy.admintoolshedapp=this,this.admin_toolshed_router=new h,this.admin_toolshed_router.on("route:queue",function(){Galaxy.admintoolshedapp.adminRepoQueueView?Galaxy.admintoolshedapp.adminRepoQueueView.reDraw():Galaxy.admintoolshedapp.adminRepoQueueView=new e.RepoQueueView}),this.admin_toolshed_router.on("route:toolsheds",function(){Galaxy.admintoolshedapp.adminShedListView?Galaxy.admintoolshedapp.adminShedListView.reDraw():Galaxy.admintoolshedapp.adminShedListView=new a.ShedListView}),this.admin_toolshed_router.on("route:categories",function(a){Galaxy.admintoolshedapp.adminShedCategoriesView?Galaxy.admintoolshedapp.adminShedCategoriesView.reDraw({tool_shed:a.replace(/\//g,"%2f")}):Galaxy.admintoolshedapp.adminShedCategoriesView=new b.CategoryView({tool_shed:a.replace(/\//g,"%2f")})}),this.admin_toolshed_router.on("route:repositories",function(a,b){Galaxy.admintoolshedapp.adminShedCategoryView?Galaxy.admintoolshedapp.adminShedCategoryView.reDraw({tool_shed:a.replace(/\//g,"%2f"),category_id:b}):Galaxy.admintoolshedapp.adminShedCategoryView=new c.Category({tool_shed:a.replace(/\//g,"%2f"),category_id:b})}),this.admin_toolshed_router.on("route:repository",function(a,b){Galaxy.admintoolshedapp.adminRepositoryView?Galaxy.admintoolshedapp.adminRepositoryView.reDraw({tool_shed:a.replace(/\//g,"%2f"),repository_id:b}):Galaxy.admintoolshedapp.adminRepositoryView=new d.RepoDetails({tool_shed:a.replace(/\//g,"%2f"),repository_id:b})}),this.admin_toolshed_router.on("route:status",function(a){Galaxy.admintoolshedapp.adminRepoStatusView?Galaxy.admintoolshedapp.adminRepoStatusView.reDraw({repositories:a.split("|")}):Galaxy.admintoolshedapp.adminRepoStatusView=new f.RepoStatus({repositories:a.split("|")})}),this.admin_toolshed_router.on("route:workflows",function(){Galaxy.admintoolshedapp.adminWorkflowsView?Galaxy.admintoolshedapp.adminWorkflowsView.reDraw():Galaxy.admintoolshedapp.adminWorkflowsView=new g.Workflows}),Backbone.history.start({pushState:!1})}});return{GalaxyApp:i}});
|
|
//# sourceMappingURL=../maps/admin.toolshed.js.map
|