Skip to content

Commit

Permalink
Fix panel hiding options
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Feb 11, 2018
1 parent 6b21b25 commit a109ca9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions client/galaxy/scripts/layout/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ var View = Backbone.View.extend({
var panel_class = options[panel_class_name];
if (panel_class) {
var panel_instance = new panel_class(self, options);
var panel_el = self.$(`#${panel_id}`);
self[panel_instance.toString()] = panel_instance;
self.panels[panel_id] = new Panel.SidePanel({
id: panel_id,
el: self.$(`#${panel_id}`),
el: panel_el,
view: panel_instance
});
if (this.config.hide_masthead) {
panel_el.css("top", 0);
}
}
});
}
Expand All @@ -86,17 +90,19 @@ var View = Backbone.View.extend({
render: function() {
// TODO: Remove this line after select2 update
$(".select2-hidden-accessible").remove();
!this.config.hide_panels && this.masthead.render();
this.renderMessageBox();
this.renderInactivityBox();
if (!this.config.hide_masthead) {
this.masthead.render();
this.renderMessageBox();
this.renderInactivityBox();
}
this.renderPanels();
this._checkCommunicationServerOnline();
return this;
},

/** Render message box */
renderMessageBox: function() {
if (!this.config.hide_panels && this.config.message_box_visible) {
if (this.config.message_box_visible) {
var content = this.config.message_box_content || "";
var level = this.config.message_box_class || "info";
this.$el.addClass("has-message-box");
Expand All @@ -114,7 +120,7 @@ var View = Backbone.View.extend({

/** Render inactivity warning */
renderInactivityBox: function() {
if (!this.config.hide_panels && this.config.show_inactivity_warning) {
if (this.config.show_inactivity_warning) {
var content = this.config.inactivity_box_content || "";
var verificationLink = $("<a/>")
.attr("href", `${Galaxy.root}user/resend_verification`)
Expand Down

0 comments on commit a109ca9

Please sign in to comment.