Fix left/right panel hiding

This commit is contained in:
guerler
2017-06-20 22:26:03 -04:00
parent 9b9e2aa227
commit 490d738ba4
8 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast
if ( panel ) {
panel.render();
} else {
self.center.$el.css( panel_id, 0 );
self.$( '#center' ).css( panel_id, 0 );
self.$( '#' + panel_id ).hide();
}
});
+1 -1
View File
@@ -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","remove","renderMessageBox","renderInactivityBox","renderPanels","_checkCommunicationServerOnline","content","level","addClass","toggle","show","removeClass","hide","verificationLink","root","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,KAAK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c,aAIrDgB,MAAO,WAEJN,EAAmBV,IAAK,aAAc,YAG1CU,EAAmBV,IAAK,aAAc,YAKlD,QAASlE,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","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","remove","renderMessageBox","renderInactivityBox","renderPanels","_checkCommunicationServerOnline","content","level","addClass","toggle","show","removeClass","hide","verificationLink","root","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,KA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,OAAOO,wBAA0B,GAChD6C,EAAmB/B,EAAG,QAASH,KAAM,OAAQV,OAAO6C,KAAO,4BAA6BC,KAAM,sBAClGvD,MAAKkB,IAAI8B,SAAU,sBACnBhD,KAAK2B,aACAP,KAAM0B,EAAU,KAChBtB,OAAQ6B,GACRJ,SAAUH,GACVI,WAELlD,MAAKkB,IAAIiC,YAAa,sBACtBnD,KAAK2B,aAAayB,MAEtB,OAAOpD,OAIX4C,aAAe,WACX,GAAI7C,GAAOC,IAUX,OATAE,GAAE2B,KAAM7B,KAAKJ,UAAW,SAAUkC,GAC9B,GAAI0B,GAAQzD,EAAK6B,OAAQE,EACpB0B,GACDA,EAAMhB,UAENzC,EAAKuB,EAAG,WAAYmC,IAAK3B,EAAU,GACnC/B,EAAKuB,EAAG,IAAMQ,GAAWsB,UAG1BpD,MAIXqB,UAAW,WACP,OACI,wBACI,yBACA,uBACA,yBACA,yDACA,oBACA,sCACA,qBACJ,SACA,0BACFqC,KAAK,KAGXrB,SAAW,WAAa,MAAO,kBAG/BQ,gCAAiC,WAC7B,GAAIc,GAAOC,OAAOnD,OAAOR,OAAO4D,0BAC5BC,EAAOF,OAAOnD,OAAOR,OAAO8D,0BAC5BC,EAAcJ,OAAOnD,OAAOwD,KAAKC,WAAWF,YAC5CG,EAAqB7C,EAAG,oBAEvB0C,IAA8E,KAA7D,IAAK,QAASI,QAASJ,EAAYK,sBAErD/C,EAAEgD,MACEC,IAAKZ,EAAO,IAAMG,IAErBU,QAAS,WAE4B,OAA1BZ,OAAOnD,OAAOwD,KAAK1B,IAC4B,WAA3C4B,EAAmBV,IAAK,eACxBU,EAAmBV,IAAK,aAAc,aAIrDgB,MAAO,WAEJN,EAAmBV,IAAK,aAAc,YAG1CU,EAAmBV,IAAK,aAAc,YAKlD,QAASlE,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
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["webpack:///login.bundled.js","webpack:///./galaxy/scripts/apps/login.js"],"names":["webpackJsonp","module","exports","__webpack_require__","Backbone","_","jQuery","$","GalaxyApp","_l","Page","window","app","options","bootstrapped","Galaxy","debug","redirect","encodeURI","show_welcome_with_login","params","param","use_panels","location","href","root","LoginPage","View","extend","initialize","page","this","model","Model","title","setElement","_template","render","prop","welcome_url","login_url","Right","call"],"mappings":"AAAAA,cAAc,IAER,SAAUC,EAAQC,EAASC,ICFjC,SAAAC,EAAAC,GAAA,GAAIC,GAASH,EAAS,GAClBI,EAAID,EACJE,EAAYL,EAAS,IAAWK,UAChCC,EAAKN,EAAS,GACdO,EAAOP,EAAS,GAEpBQ,QAAOC,IAAM,SAAcC,EAASC,GAChCH,OAAOI,OAAS,GAAIP,GAAWK,EAASC,GACxCC,OAAOC,MAAO,YACd,IAAIC,GAAWC,UAAWL,EAAQI,SAIlC,KAAKJ,EAAQM,wBAAyB,CAClC,GAAIC,GAASd,EAAOe,OAAQC,WAAa,OAAQL,SAAWA,GAE5D,aADAN,OAAOY,SAASC,KAAOT,OAAOU,KAAO,cAAgBL,GAIzD,GAAIM,GAAYtB,EAASuB,KAAKC,QAC1BC,WAAY,SAAUC,GAClBC,KAAKD,KAAOA,EACZC,KAAKC,MAAQ,GAAI5B,GAAS6B,OAAQC,MAAQzB,EAAI,oBAC9CsB,KAAKI,WAAYJ,KAAKK,cAE1BC,OAAQ,WACJN,KAAKD,KAAKvB,EAAG,gBAAiB+B,KAAM,MAAOzB,EAAQ0B,cAEvDH,UAAY,WACR,GAAII,GAAY3B,EAAQY,KAAO,cAAgBlB,EAAEc,OAASJ,SAAWA,GACrE,OAAO,gBAAkBuB,EAAY,2DAI7CjC,GAAE,WACEQ,OAAOe,KAAO,GAAIpB,GAAKiB,KAAMtB,EAAEuB,OAAQf,GACnC4B,MAAQf,UDQUgB,KAAKxC,EAASC,EAAoB,GAAIA,EAAoB","file":"login.bundled.js","sourcesContent":["webpackJsonp([5],[\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(Backbone, _) {var jQuery = __webpack_require__(1),\n\t $ = jQuery,\n\t GalaxyApp = __webpack_require__(33).GalaxyApp,\n\t _l = __webpack_require__(5),\n\t Page = __webpack_require__(34);\n\t\n\twindow.app = function app(options, bootstrapped) {\n\t window.Galaxy = new GalaxyApp(options, bootstrapped);\n\t Galaxy.debug('login app');\n\t var redirect = encodeURI(options.redirect);\n\t\n\t // TODO: remove iframe for user login (at least) and render login page from here\n\t // then remove this redirect\n\t if (!options.show_welcome_with_login) {\n\t var params = jQuery.param({ use_panels: 'True', redirect: redirect });\n\t window.location.href = Galaxy.root + 'user/login?' + params;\n\t return;\n\t }\n\t\n\t var LoginPage = Backbone.View.extend({\n\t initialize: function (page) {\n\t this.page = page;\n\t this.model = new Backbone.Model({ title: _l('Login required') });\n\t this.setElement(this._template());\n\t },\n\t render: function () {\n\t this.page.$('#galaxy_main').prop('src', options.welcome_url);\n\t },\n\t _template: function () {\n\t var login_url = options.root + 'user/login?' + $.param({ redirect: redirect });\n\t return '<iframe src=\"' + login_url + '\" frameborder=\"0\" style=\"width: 100%; height: 100%;\"/>';\n\t }\n\t });\n\t\n\t $(function () {\n\t Galaxy.page = new Page.View(_.extend(options, {\n\t Right: LoginPage\n\t }));\n\t });\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2)))\n\n/***/ })\n]);\n\n\n// WEBPACK FOOTER //\n// login.bundled.js","var jQuery = require( 'jquery' ),\n $ = jQuery,\n GalaxyApp = require( 'galaxy' ).GalaxyApp,\n _l = require( 'utils/localization' ),\n Page = require( 'layout/page' );\n\nwindow.app = function app( options, bootstrapped ){\n window.Galaxy = new GalaxyApp( options, bootstrapped );\n Galaxy.debug( 'login app' );\n var redirect = encodeURI( options.redirect );\n\n // TODO: remove iframe for user login (at least) and render login page from here\n // then remove this redirect\n if( !options.show_welcome_with_login ){\n var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n window.location.href = Galaxy.root + 'user/login?' + params;\n return;\n }\n\n var LoginPage = Backbone.View.extend({\n initialize: function( page ) {\n this.page = page;\n this.model = new Backbone.Model({ title : _l( 'Login required' ) } );\n this.setElement( this._template() );\n },\n render: function() {\n this.page.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n },\n _template : function() {\n var login_url = options.root + 'user/login?' + $.param( { redirect : redirect } );\n return '<iframe src=\"' + login_url + '\" frameborder=\"0\" style=\"width: 100%; height: 100%;\"/>';\n }\n });\n\n $(function(){\n Galaxy.page = new Page.View( _.extend( options, {\n Right : LoginPage\n } ) );\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/apps/login.js"],"sourceRoot":""}
{"version":3,"sources":["webpack:///login.bundled.js","webpack:///./galaxy/scripts/apps/login.js"],"names":["webpackJsonp","module","exports","__webpack_require__","Backbone","_","jQuery","$","GalaxyApp","_l","Page","window","app","options","bootstrapped","Galaxy","debug","redirect","encodeURI","show_welcome_with_login","params","param","use_panels","location","href","root","LoginPage","View","extend","initialize","page","this","model","Model","title","setElement","_template","render","prop","welcome_url","login_url","Right","call"],"mappings":"AAAAA,cAAc,IAER,SAASC,EAAQC,EAASC,ICFhC,SAAAC,EAAAC,GAAA,GAAIC,GAASH,EAAS,GAClBI,EAAID,EACJE,EAAYL,EAAS,IAAWK,UAChCC,EAAKN,EAAS,GACdO,EAAOP,EAAS,GAEpBQ,QAAOC,IAAM,SAAcC,EAASC,GAChCH,OAAOI,OAAS,GAAIP,GAAWK,EAASC,GACxCC,OAAOC,MAAO,YACd,IAAIC,GAAWC,UAAWL,EAAQI,SAIlC,KAAKJ,EAAQM,wBAAyB,CAClC,GAAIC,GAASd,EAAOe,OAAQC,WAAa,OAAQL,SAAWA,GAE5D,aADAN,OAAOY,SAASC,KAAOT,OAAOU,KAAO,cAAgBL,GAIzD,GAAIM,GAAYtB,EAASuB,KAAKC,QAC1BC,WAAY,SAAUC,GAClBC,KAAKD,KAAOA,EACZC,KAAKC,MAAQ,GAAI5B,GAAS6B,OAAQC,MAAQzB,EAAI,oBAC9CsB,KAAKI,WAAYJ,KAAKK,cAE1BC,OAAQ,WACJN,KAAKD,KAAKvB,EAAG,gBAAiB+B,KAAM,MAAOzB,EAAQ0B,cAEvDH,UAAY,WACR,GAAII,GAAY3B,EAAQY,KAAO,cAAgBlB,EAAEc,OAASJ,SAAWA,GACrE,OAAO,gBAAkBuB,EAAY,2DAI7CjC,GAAE,WACEQ,OAAOe,KAAO,GAAIpB,GAAKiB,KAAMtB,EAAEuB,OAAQf,GACnC4B,MAAQf,UDQUgB,KAAKxC,EAASC,EAAoB,GAAIA,EAAoB","file":"login.bundled.js","sourcesContent":["webpackJsonp([5],[\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(Backbone, _) {var jQuery = __webpack_require__(1),\n\t $ = jQuery,\n\t GalaxyApp = __webpack_require__(33).GalaxyApp,\n\t _l = __webpack_require__(5),\n\t Page = __webpack_require__(34);\n\t\n\twindow.app = function app(options, bootstrapped) {\n\t window.Galaxy = new GalaxyApp(options, bootstrapped);\n\t Galaxy.debug('login app');\n\t var redirect = encodeURI(options.redirect);\n\t\n\t // TODO: remove iframe for user login (at least) and render login page from here\n\t // then remove this redirect\n\t if (!options.show_welcome_with_login) {\n\t var params = jQuery.param({ use_panels: 'True', redirect: redirect });\n\t window.location.href = Galaxy.root + 'user/login?' + params;\n\t return;\n\t }\n\t\n\t var LoginPage = Backbone.View.extend({\n\t initialize: function (page) {\n\t this.page = page;\n\t this.model = new Backbone.Model({ title: _l('Login required') });\n\t this.setElement(this._template());\n\t },\n\t render: function () {\n\t this.page.$('#galaxy_main').prop('src', options.welcome_url);\n\t },\n\t _template: function () {\n\t var login_url = options.root + 'user/login?' + $.param({ redirect: redirect });\n\t return '<iframe src=\"' + login_url + '\" frameborder=\"0\" style=\"width: 100%; height: 100%;\"/>';\n\t }\n\t });\n\t\n\t $(function () {\n\t Galaxy.page = new Page.View(_.extend(options, {\n\t Right: LoginPage\n\t }));\n\t });\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2)))\n\n/***/ }\n]);\n\n\n// WEBPACK FOOTER //\n// login.bundled.js","var jQuery = require( 'jquery' ),\n $ = jQuery,\n GalaxyApp = require( 'galaxy' ).GalaxyApp,\n _l = require( 'utils/localization' ),\n Page = require( 'layout/page' );\n\nwindow.app = function app( options, bootstrapped ){\n window.Galaxy = new GalaxyApp( options, bootstrapped );\n Galaxy.debug( 'login app' );\n var redirect = encodeURI( options.redirect );\n\n // TODO: remove iframe for user login (at least) and render login page from here\n // then remove this redirect\n if( !options.show_welcome_with_login ){\n var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n window.location.href = Galaxy.root + 'user/login?' + params;\n return;\n }\n\n var LoginPage = Backbone.View.extend({\n initialize: function( page ) {\n this.page = page;\n this.model = new Backbone.Model({ title : _l( 'Login required' ) } );\n this.setElement( this._template() );\n },\n render: function() {\n this.page.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n },\n _template : function() {\n var login_url = options.root + 'user/login?' + $.param( { redirect : redirect } );\n return '<iframe src=\"' + login_url + '\" frameborder=\"0\" style=\"width: 100%; height: 100%;\"/>';\n }\n });\n\n $(function(){\n Galaxy.page = new Page.View( _.extend( options, {\n Right : LoginPage\n } ) );\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/apps/login.js"],"sourceRoot":""}
+1 -1
View File
@@ -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()},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.$el.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){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()},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