mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Support for applying window title on display() of views.
This commit is contained in:
@@ -16,7 +16,12 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast
|
||||
|
||||
// attach global objects, build mastheads
|
||||
Galaxy.modal = this.modal = new Modal.View();
|
||||
Galaxy.display = this.display = function( view ) { self.center.display( view ) };
|
||||
Galaxy.display = this.display = function( view ) {
|
||||
if (view.title){
|
||||
window.document.title = view.title;
|
||||
}
|
||||
self.center.display( view );
|
||||
};
|
||||
Galaxy.router = this.router = options.Router && new options.Router( self, options );
|
||||
this.masthead = new Masthead.View( this.config );
|
||||
this.center = new Panel.CenterPanel();
|
||||
@@ -166,4 +171,4 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast
|
||||
});
|
||||
|
||||
return { View: View }
|
||||
});
|
||||
});
|
||||
|
||||
@@ -137,7 +137,7 @@ define( [ "libs/toastr", "mvc/tag", "mvc/workflow/workflow-model" ], function(
|
||||
|
||||
/** View of the main workflow list page */
|
||||
var WorkflowListView = Backbone.View.extend({
|
||||
|
||||
title: "Galaxy Workflows",
|
||||
initialize: function() {
|
||||
this.setElement( '<div/>' );
|
||||
_.bindAll(this, 'adjustActiondropdown')
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"page.js","sources":["../../src/layout/page.js"],"names":["define","Masthead","Panel","Modal","View","Backbone","extend","el","className","_panelids","initialize","options","self","this","config","_","defaults","message_box_visible","message_box_content","message_box_class","show_inactivity_warning","inactivity_box_content","Galaxy","modal","display","view","center","router","Router","masthead","CenterPanel","$el","attr","html","_template","$","replaceWith","append","frame","$messagebox","$inactivebox","panels","each","panel_id","panel_class_name","charAt","toUpperCase","slice","panel_class","panel_instance","toString","SidePanel","id","render","history","start","root","pushState","remove","renderMessageBox","renderInactivityBox","renderPanels","_checkCommunicationServerOnline","content","level","addClass","toggle","show","removeClass","hide","verificationLink","text","panel","css","join","host","window","communication_server_host","port","communication_server_port","preferences","user","attributes","$chat_icon_element","indexOf","communication_server","ajax","url","success","error"],"mappings":"AAAAA,QAAU,kBAAmB,eAAgB,mBAAqB,SAAUC,EAAUC,EAAOC,GACzF,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,GAAK,OACLC,UAAY,eACZC,WAAc,OAAQ,SAEtBC,WAAa,SAAUC,GACnB,GAAIC,GAAOC,IACXA,MAAKC,OAASC,EAAEC,SAAUL,EAAQG,YAC9BG,qBAA0B,EAC1BC,oBAA0B,GAC1BC,kBAA0B,OAC1BC,yBAA0B,EAC1BC,uBAA0B,KAI9BC,OAAOC,MAAQV,KAAKU,MAAQ,GAAIpB,GAAMC,KACtCkB,OAAOE,QAAUX,KAAKW,QAAU,SAAUC,GAASb,EAAKc,OAAOF,QAASC,IACxEH,OAAOK,OAASd,KAAKc,OAAShB,EAAQiB,QAAU,GAAIjB,GAAQiB,OAAQhB,EAAMD,GAC1EE,KAAKgB,SAAW,GAAI5B,GAASG,KAAMS,KAAKC,QACxCD,KAAKa,OAAS,GAAIxB,GAAM4B,YAGxBjB,KAAKkB,IAAIC,KAAM,SAAU,MACzBnB,KAAKkB,IAAIE,KAAMpB,KAAKqB,aACpBrB,KAAKsB,EAAG,aAAcC,YAAavB,KAAKgB,SAASE,KACjDlB,KAAKsB,EAAG,WAAYE,OAAQxB,KAAKa,OAAOK,KACxClB,KAAKkB,IAAIM,OAAQxB,KAAKgB,SAASS,MAAMP,KACrClB,KAAKkB,IAAIM,OAAQxB,KAAKU,MAAMQ,KAC5BlB,KAAK0B,YAAc1B,KAAKsB,EAAG,eAC3BtB,KAAK2B,aAAe3B,KAAKsB,EAAG,gBAG5BtB,KAAK4B,UACL1B,EAAE2B,KAAM7B,KAAKJ,UAAW,SAAUkC,GAC9B,GAAIC,GAAmBD,EAASE,OAAQ,GAAIC,cAAgBH,EAASI,MAAO,GACxEC,EAAcrC,EAASiC,EAC3B,IAAKI,EAAc,CACf,G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B,GACDA,EAAMnB,UAENzC,EAAKuB,EAAG,WAAYsC,IAAK9B,EAAU,GACnC/B,EAAKuB,EAAG,IAAMQ,GAAW0B,UAG1BxD,MAIXqB,UAAW,WACP,OACI,wBACI,yBACA,uBACA,yBACA,yDACA,oBACA,sCACA,qBACJ,SACA,0BACFwC,KAAK,KAGXxB,SAAW,WAAa,MAAO,kBAG/BY,gCAAiC,WAC7B,GAAIa,GAAOC,OAAOtD,OAAOR,OAAO+D,0BAC5BC,EAAOF,OAAOtD,OAAOR,OAAOiE,0BAC5BC,EAAcJ,OAAOtD,OAAO2D,KAAKC,WAAWF,YAC5CG,EAAqBhD,EAAG,oBAEvB6C,IAA8E,KAA7D,IAAK,QAASI,QAASJ,EAAYK,sBAErDlD,EAAEmD,MACEC,IAAKZ,EAAO,IAAMG,IAErBU,QAAS,WAE4B,OAA1BZ,OAAOtD,OAAO2D,KAAK7B,IAC4B,WAA3C+B,EAAmBV,IAAK,eACxBU,EAAmBV,IAAK,aAAc,aAIrDgB,MAAO,WAEJN,EAAmBV,IAAK,aAAc,YAG1CU,EAAmBV,IAAK,aAAc,YAKlD,QAASrE,KAAMA"}
|
||||
{"version":3,"file":"page.js","sources":["../../src/layout/page.js"],"names":["define","Masthead","Panel","Modal","View","Backbone","extend","el","className","_panelids","initialize","options","self","this","config","_","defaults","message_box_visible","message_box_content","message_box_class","show_inactivity_warning","inactivity_box_content","Galaxy","modal","display","view","title","window","document","center","router","Router","masthead","CenterPanel","$el","attr","html","_template","$","replaceWith","append","frame","$messagebox","$inactivebox","panels","each","panel_id","panel_class_name","charAt","toUpperCase","slice","panel_class","panel_instance","toString","SidePanel","id","render","history","start","root","pushState","remove","renderMessageBox","renderInactivityBox","renderPanels","_checkCommunicationServerOnline","content","level","addClass","toggle","show","removeClass","hide","verificationLink","text","panel","css","join","host","communication_server_host","port","communication_server_port","preferences","user","attributes","$chat_icon_element","indexOf","communication_server","ajax","url","success","error"],"mappings":"AAAAA,QAAU,kBAAmB,eA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IAAK9B,EAAU,GACnClC,EAAK0B,EAAG,IAAMQ,GAAW0B,UAG1B3D,MAIXwB,UAAW,WACP,OACI,wBACI,yBACA,uBACA,yBACA,yDACA,oBACA,sCACA,qBACJ,SACA,0BACFwC,KAAK,KAGXxB,SAAW,WAAa,MAAO,kBAG/BY,gCAAiC,WAC7B,GAAIa,GAAOnD,OAAOL,OAAOR,OAAOiE,0BAC5BC,EAAOrD,OAAOL,OAAOR,OAAOmE,0BAC5BC,EAAcvD,OAAOL,OAAO6D,KAAKC,WAAWF,YAC5CG,EAAqB/C,EAAG,oBAEvB4C,IAA8E,KAA7D,IAAK,QAASI,QAASJ,EAAYK,sBAErDjD,EAAEkD,MACEC,IAAKX,EAAO,IAAME,IAErBU,QAAS,WAE4B,OAA1B/D,OAAOL,OAAO6D,KAAK5B,IAC4B,WAA3C8B,EAAmBT,IAAK,eACxBS,EAAmBT,IAAK,aAAc,aAIrDe,MAAO,WAEJN,EAAmBT,IAAK,aAAc,YAG1CS,EAAmBT,IAAK,aAAc,YAKlD,QAASxE,KAAMA"}
|
||||
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,2 +1,2 @@
|
||||
define(["layout/masthead","layout/panel","mvc/ui/ui-modal"],function(a,b,c){var d=Backbone.View.extend({el:"body",className:"full-content",_panelids:["left","right"],initialize:function(d){var e=this;this.config=_.defaults(d.config||{},{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""}),Galaxy.modal=this.modal=new c.View,Galaxy.display=this.display=function(a){e.center.display(a)},Galaxy.router=this.router=d.Router&&new d.Router(e,d),this.masthead=new a.View(this.config),this.center=new b.CenterPanel,this.$el.attr("scroll","no"),this.$el.html(this._template()),this.$("#masthead").replaceWith(this.masthead.$el),this.$("#center").append(this.center.$el),this.$el.append(this.masthead.frame.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox"),this.panels={},_.each(this._panelids,function(a){var c=a.charAt(0).toUpperCase()+a.slice(1),f=d[c];if(f){var g=new f(e,d);e[g.toString()]=g,e.panels[a]=new b.SidePanel({id:a,el:e.$("#"+a),view:g})}}),this.render(),this.router&&Backbone.history.start({root:Galaxy.root,pushState:!0})},render:function(){return $(".select2-hidden-accessible").remove(),this.masthead.render(),this.renderMessageBox(),this.renderInactivityBox(),this.renderPanels(),this._checkCommunicationServerOnline(),this},renderMessageBox:function(){if(this.config.message_box_visible){var a=this.config.message_box_content||"",b=this.config.message_box_class||"info";this.$el.addClass("has-message-box"),this.$messagebox.attr("class","panel-"+b+"-message").html(a).toggle(!!a).show()}else this.$el.removeClass("has-message-box"),this.$messagebox.hide();return this},renderInactivityBox:function(){if(this.config.show_inactivity_warning){var a=this.config.inactivity_box_content||"",b=$("<a/>").attr("href",Galaxy.root+"user/resend_verification").text("Resend verification");this.$el.addClass("has-inactivity-box"),this.$inactivebox.html(a+" ").append(b).toggle(!!a).show()}else this.$el.removeClass("has-inactivity-box"),this.$inactivebox.hide();return this},renderPanels:function(){var a=this;return _.each(this._panelids,function(b){var c=a.panels[b];c?c.render():(a.$("#center").css(b,0),a.$("#"+b).hide())}),this},_template:function(){return['<div id="everything">','<div id="background"/>','<div id="masthead"/>','<div id="messagebox"/>','<div id="inactivebox" class="panel-warning-message" />','<div id="left" />','<div id="center" class="inbound" />','<div id="right" />',"</div>",'<div id="dd-helper" />'].join("")},toString:function(){return"PageLayoutView"},_checkCommunicationServerOnline:function(){var a=window.Galaxy.config.communication_server_host,b=window.Galaxy.config.communication_server_port,c=window.Galaxy.user.attributes.preferences,d=$("#show-chat-online");c&&-1!=["1","true"].indexOf(c.communication_server)?$.ajax({url:a+":"+b}).success(function(){null!==window.Galaxy.user.id&&"hidden"===d.css("visibility")&&d.css("visibility","visible")}).error(function(){d.css("visibility","hidden")}):d.css("visibility","hidden")}});return{View:d}});
|
||||
define(["layout/masthead","layout/panel","mvc/ui/ui-modal"],function(a,b,c){var d=Backbone.View.extend({el:"body",className:"full-content",_panelids:["left","right"],initialize:function(d){var e=this;this.config=_.defaults(d.config||{},{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""}),Galaxy.modal=this.modal=new c.View,Galaxy.display=this.display=function(a){a.title&&(window.document.title=a.title),e.center.display(a)},Galaxy.router=this.router=d.Router&&new d.Router(e,d),this.masthead=new a.View(this.config),this.center=new b.CenterPanel,this.$el.attr("scroll","no"),this.$el.html(this._template()),this.$("#masthead").replaceWith(this.masthead.$el),this.$("#center").append(this.center.$el),this.$el.append(this.masthead.frame.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox"),this.panels={},_.each(this._panelids,function(a){var c=a.charAt(0).toUpperCase()+a.slice(1),f=d[c];if(f){var g=new f(e,d);e[g.toString()]=g,e.panels[a]=new b.SidePanel({id:a,el:e.$("#"+a),view:g})}}),this.render(),this.router&&Backbone.history.start({root:Galaxy.root,pushState:!0})},render:function(){return $(".select2-hidden-accessible").remove(),this.masthead.render(),this.renderMessageBox(),this.renderInactivityBox(),this.renderPanels(),this._checkCommunicationServerOnline(),this},renderMessageBox:function(){if(this.config.message_box_visible){var a=this.config.message_box_content||"",b=this.config.message_box_class||"info";this.$el.addClass("has-message-box"),this.$messagebox.attr("class","panel-"+b+"-message").html(a).toggle(!!a).show()}else this.$el.removeClass("has-message-box"),this.$messagebox.hide();return this},renderInactivityBox:function(){if(this.config.show_inactivity_warning){var a=this.config.inactivity_box_content||"",b=$("<a/>").attr("href",Galaxy.root+"user/resend_verification").text("Resend verification");this.$el.addClass("has-inactivity-box"),this.$inactivebox.html(a+" ").append(b).toggle(!!a).show()}else this.$el.removeClass("has-inactivity-box"),this.$inactivebox.hide();return this},renderPanels:function(){var a=this;return _.each(this._panelids,function(b){var c=a.panels[b];c?c.render():(a.$("#center").css(b,0),a.$("#"+b).hide())}),this},_template:function(){return['<div id="everything">','<div id="background"/>','<div id="masthead"/>','<div id="messagebox"/>','<div id="inactivebox" class="panel-warning-message" />','<div id="left" />','<div id="center" class="inbound" />','<div id="right" />',"</div>",'<div id="dd-helper" />'].join("")},toString:function(){return"PageLayoutView"},_checkCommunicationServerOnline:function(){var a=window.Galaxy.config.communication_server_host,b=window.Galaxy.config.communication_server_port,c=window.Galaxy.user.attributes.preferences,d=$("#show-chat-online");c&&-1!=["1","true"].indexOf(c.communication_server)?$.ajax({url:a+":"+b}).success(function(){null!==window.Galaxy.user.id&&"hidden"===d.css("visibility")&&d.css("visibility","visible")}).error(function(){d.css("visibility","hidden")}):d.css("visibility","hidden")}});return{View:d}});
|
||||
//# sourceMappingURL=../../maps/layout/page.js.map
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user