Files
galaxy/static/scripts/analysis.js
T

2 lines
2.5 KiB
JavaScript

var jQuery=require("jquery"),$=jQuery,GalaxyApp=require("galaxy").GalaxyApp,QUERY_STRING=require("utils/query-string-parsing"),PANEL=require("layout/panel"),ToolPanel=require("./tool-panel"),HistoryPanel=require("./history-panel"),PAGE=require("layout/page"),ToolForm=require("mvc/tool/tool-form"),UserPreferences=require("mvc/user/user-preferences");Tours=require("mvc/tours"),window.app=function(a,b){window.Galaxy=new GalaxyApp(a,b),Galaxy.debug("analysis app");var c=a.config,d=new ToolPanel({el:"#left",userIsAnonymous:Galaxy.user.isAnonymous(),toolbox:c.toolbox,toolbox_in_panel:c.toolbox_in_panel,stored_workflow_menu_entries:c.stored_workflow_menu_entries,nginx_upload_path:c.nginx_upload_path,ftp_upload_site:c.ftp_upload_site,default_genome:c.default_genome,default_extension:c.default_extension}),e=new PANEL.CenterPanel({el:"#center"}),f=new HistoryPanel({el:"#right",galaxyRoot:Galaxy.root,userIsAnonymous:Galaxy.user.isAnonymous(),allow_user_dataset_purge:c.allow_user_dataset_purge}),g=new PAGE.PageLayoutView(_.extend(a,{el:"body",left:d,center:e,right:f}));Galaxy.page=g,Galaxy.params=Galaxy.config.params,Galaxy.toolPanel=d.tool_panel,Galaxy.upload=d.uploadButton,Galaxy.currHistoryPanel=f.historyView,Galaxy.currHistoryPanel.listenToGalaxy(Galaxy),Galaxy.app={display:function(a){$(".select2-hidden-accessible").remove(),e.display(a)}},Galaxy.router=new(Backbone.Router.extend({initialize:function(a){this.options=a},execute:function(a,b,c){Galaxy.debug("router execute:",a,b,c);var d=QUERY_STRING.parse(b.pop());b.push(d),a&&a.apply(this,b)},routes:{"(/)":"home","(/)root*":"home","(/)tours(/)(:tour_id)":"show_tours","(/)users(/)":"show_users"},show_tours:function(a){a?Tours.giveTour(a):e.display(new Tours.ToursView)},show_users:function(){e.display(new UserPreferences.View)},home:function(a){a.tool_id||a.job_id?"upload1"===a.tool_id?(Galaxy.upload.show(),this._loadCenterIframe("welcome")):this._loadToolForm(a):this._loadCenterIframe(a.workflow_id?"workflow/run?id="+a.workflow_id:a.m_c?a.m_c+"/"+a.m_a:"welcome")},_loadToolForm:function(a){a.id=a.tool_id,e.display(new ToolForm.View(a))},_loadCenterIframe:function(a,b){b=b||Galaxy.root,a=b+a,e.$("#galaxy_main").prop("src",a)}}))(a),$(function(){g.render(),g.right.historyView.loadCurrentHistory(),Galaxy.listenTo(g.right.historyView,"history-size-change",function(){Galaxy.user.fetch({url:Galaxy.user.urlRoot()+"/"+(Galaxy.user.id||"current")})}),g.right.historyView.connectToQuotaMeter(g.masthead.quotaMeter),Backbone.history.start({root:Galaxy.root,pushState:!0})})};
//# sourceMappingURL=../maps/analysis.js.map