Revise panel/iframe handling, align naming, rely on empty to trigger removal of previous view

Repack

Move inline styles, use consistent naming
This commit is contained in:
guerler
2017-06-19 15:48:28 -04:00
parent 050ff3b159
commit 659c039601
20 changed files with 62 additions and 70 deletions
+2 -3
View File
@@ -19,18 +19,19 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast
Galaxy.display = this.display = function( view ) { 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();
// build page template
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' );
// build panels
this.center = new Panel.CenterPanel();
this.panels = {};
_.each( this._panelids, function( panel_id ) {
var panel_class_name = panel_id.charAt( 0 ).toUpperCase() + panel_id.slice( 1 );
@@ -98,8 +99,6 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast
/** Render panels */
renderPanels : function() {
var self = this;
this.center.setElement( '#center' );
this.center.render();
_.each( this._panelids, function( panel_id ) {
var panel = self.panels[ panel_id ];
if ( panel ) {
+19 -45
View File
@@ -189,29 +189,20 @@ define( [ 'jquery', 'libs/underscore', 'libs/backbone' ], function( $, _, Backbo
var CenterPanel = Backbone.View.extend({
initialize : function( options ){
/** previous view contained in the center panel - cached for removal later */
this.prev = null;
this.setElement( $( this.template() ) );
this.$frame = this.$( '.center-frame' );
this.$panel = this.$( '.center-panel' );
this.$frame.on( 'load', _.bind( this._iframeChangeHandler, this ) );
},
render : function(){
this.$el.html( this.template() );
// ?: doesn't work/listen in events map
this.$( '#galaxy_main' ).on( 'load', _.bind( this._iframeChangeHandler, this ) );
},
/** */
_iframeChangeHandler : function( ev ){
/** Display iframe if its target url changes, hide center panel */
_iframeChangeHandler : function( ev ) {
var iframe = ev.currentTarget;
var location = iframe.contentWindow && iframe.contentWindow.location;
if( location && location.host ){
// show the iframe and hide MVCview div, remove any views in the MVCview div
if( location && location.host ) {
$( iframe ).show();
if( this.prev ){
this.prev.remove();
}
this.$( '#center-panel' ).hide();
// TODO: move to Galaxy
Galaxy.trigger( 'galaxy_main:load', {
this.$panel.empty().hide();
Galaxy.trigger( 'center-frame:load', {
fullpath: location.pathname + location.search + location.hash,
pathname: location.pathname,
search : location.search,
@@ -220,43 +211,26 @@ define( [ 'jquery', 'libs/underscore', 'libs/backbone' ], function( $, _, Backbo
}
},
/** */
/** Display a view in the center panel, hide iframe */
display: function( view ) {
// we need to display an MVC view: hide the iframe and show the other center panel
// first checking for any onbeforeunload handlers on the iframe
var contentWindow = this.$( '#galaxy_main' )[ 0 ].contentWindow || {};
var contentWindow = this.$frame[ 0 ].contentWindow || {};
var message = contentWindow.onbeforeunload && contentWindow.onbeforeunload();
if ( !message || confirm( message ) ) {
contentWindow.onbeforeunload = undefined;
// remove any previous views
if( this.prev ){
this.prev.remove();
}
this.prev = view;
this.$( '#galaxy_main' ).attr( 'src', 'about:blank' ).hide();
this.$( '#center-panel' ).scrollTop( 0 ).append( view.$el ).show();
this.$frame.attr( 'src', 'about:blank' ).hide();
this.$panel.empty().scrollTop( 0 ).append( view.$el ).show();
Galaxy.trigger( 'center-panel:load', view );
} else {
if( view ){
view.remove();
}
}
},
template: function(){
return [
//TODO: remove inline styling
'<div style="position: absolute; width: 100%; height: 100%">',
'<iframe name="galaxy_main" id="galaxy_main" frameborder="0" ',
'style="position: absolute; width: 100%; height: 100%;"/>',
'<div id="center-panel" ',
'style="display: none; position: absolute; width: 100%; height: 100%; padding: 10px; overflow: auto;"/>',
'</div>'
].join('');
template: function() {
return '<div class="center-container">' +
'<iframe id="galaxy_main" name="galaxy_main" frameborder="0" class="center-frame" />' +
'<div class="center-panel" />' +
'</div>';
},
toString : function(){ return 'CenterPanel' }
toString : function() { return 'CenterPanel' }
});
return {
@@ -338,7 +338,7 @@ var CurrentHistoryView = _super.extend(/** @lends CurrentHistoryView.prototype *
// compare the url to the following list and if there's a match
// pull the id from url and indicate in the history view that
// the dataset with that id is the 'current'ly active dataset
'galaxy_main:load': function( data ){
'center-frame:load': function( data ){
var pathToMatch = data.fullpath;
var hdaId = null;
var useToURLRegexMap = {
@@ -27,12 +27,13 @@ define( [ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view
/** Wait for deferred build processes before removal */
remove: function() {
window.console.log( 'destroy' );
var self = this;
this.$el.hide();
this.deferred.execute( function() {
/*this.deferred.execute( function() {
FormBase.prototype.remove.call( self );
Galaxy.emit.debug( 'tool-form-base::remove()', 'Destroy view.' );
});
});*/
},
/** Build form */
+18
View File
@@ -143,6 +143,24 @@ body {
right: 250 + @border-default-color_padding;
overflow: hidden;
z-index: 1;
.center-container {
position: absolute;
width: 100%;
height: 100%;
.center-panel {
display: none;
position: absolute;
width: 100%;
height: 100%;
padding: 10px;
overflow: auto;
}
.center-frame {
position: absolute;
width: 100%;
height: 100%;
}
}
}
#right-border {
right: 250px;
+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","$el","attr","html","_template","$","replaceWith","append","frame","$messagebox","$inactivebox","CenterPanel","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","setElement","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,kBAA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,SACA,0BACFuC,KAAK,KAGXtB,SAAW,WAAa,MAAO,kBAG/BQ,gCAAiC,WAC7B,GAAIe,GAAOC,OAAOpD,OAAOR,OAAO6D,0BAC5BC,EAAOF,OAAOpD,OAAOR,OAAO+D,0BAC5BC,EAAcJ,OAAOpD,OAAOyD,KAAKC,WAAWF,YAC5CG,EAAqB/C,EAAG,oBAEvB4C,IAA8E,KAA7D,IAAK,QAASI,QAASJ,EAAYK,sBAErDjD,EAAEkD,MACEC,IAAKZ,EAAO,IAAMG,IAErBU,QAAS,WAE4B,OAA1BZ,OAAOpD,OAAOyD,KAAK3B,IAC4B,WAA3C6B,EAAmBV,IAAK,eACxBU,EAAmBV,IAAK,aAAc,aAIrDgB,MAAO,WAEJN,EAAmBV,IAAK,aAAc,YAG1CU,EAAmBV,IAAK,aAAc,YAKlD,QAASnE,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,YAC9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G,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"}
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"panel.js","sources":["../../src/layout/panel.js"],"names":["define","$","_","Backbone","MIN_PANEL_WIDTH","MAX_PANEL_WIDTH","SidePanel","View","extend","initialize","options","this","view","hidden","saved_size","hiddenByTool","$center","$el","siblings","$toggleButton","render","self","panel","components","model","attributes","html","_templatePanel","id","each","buttons","button","append","addClass","cls","escape","title","_templateHeader","_templateBody","_templateFooter","join","events","mousedown .unified-panel-footer > .drag","click .unified-panel-footer > .panel-collapse","_mousedownDragHandler","ev","move","e","delta","pageX","prevX","oldWidth","width","newWidth","draggingLeft","Math","min","max","resize","show","on","one","hide","off","newSize","css","animation","whichSide","animate","removeClass","toggle","handle_minwidth_hint","hint","space","force_panel","op","toString","LeftPanel","RightPanel","CenterPanel","prev","template","bind","_iframeChangeHandler","iframe","currentTarget","location","contentWindow","host","remove","Galaxy","trigger","fullpath","pathname","search","hash","display","message","onbeforeunload","confirm","undefined","attr","scrollTop"],"mappings":"AAAAA,QAAU,SAAU,kBAAmB,iBAAmB,SAAUC,EAAGC,EAAGC,GACtE,YAEA,IAAIC,GAAkB,IAClBC,EAAkB,IAGlBC,EAAYH,EAASI,KAAKC,QAE1BC,WAAY,SAAUC,GAClBC,KAAKC,KAAOF,EAAQE,KACpBD,KAAKE,QAAS,EACdF,KAAKG,WAAa,KAClBH,KAAKI,cAAe,GAGxBC,QAAU,WACN,MAAOL,MAAKM,IAAIC,SAAU,YAG9BC,cAA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c5E,EAASI,KAAKC,QAE5BC,WAAa,WAETE,KAAKqE,KAAO,MAGhB5D,OAAS,WACLT,KAAKM,IAAIS,KAAMf,KAAKsE,YAEpBtE,KAAKV,EAAG,gBAAiB2D,GAAI,OAAQ1D,EAAEgF,KAAMvE,KAAKwE,qBAAsBxE,QAI5EwE,qBAAuB,SAAUtC,GAC7B,GAAIuC,GAASvC,EAAGwC,cACZC,EAAWF,EAAOG,eAAiBH,EAAOG,cAAcD,QACxDA,IAAYA,EAASE,OAErBvF,EAAGmF,GAASzB,OACRhD,KAAKqE,MACLrE,KAAKqE,KAAKS,SAEd9E,KAAKV,EAAG,iBAAkB6D,OAE1B4B,OAAOC,QAAS,oBACZC,SAAUN,EAASO,SAAWP,EAASQ,OAASR,EAASS,KACzDF,SAAUP,EAASO,SACnBC,OAAUR,EAASQ,OACnBC,KAAUT,EAASS,SAM/BC,QAAS,SAAUpF,GAGf,GAAI2E,GAAgB5E,KAAKV,EAAG,gBAAkB,GAAIsF,kBAC9CU,EAAUV,EAAcW,gBAAkBX,EAAcW,kBACtDD,GAAWE,QAASF,IACtBV,EAAcW,eAAiBE,OAE3BzF,KAAKqE,MACLrE,KAAKqE,KAAKS,SAEd9E,KAAKqE,KAAOpE,EACZD,KAAKV,EAAG,gBAAiBoG,KAAM,MAAO,eAAgBvC,OACtDnD,KAAKV,EAAG,iBAAkBqG,UAAW,GAAItE,OAAQpB,EAAKK,KAAM0C,OAC5D+B,OAAOC,QAAS,oBAAqB/E,IAGjCA,GACAA,EAAK6E,UAKjBR,SAAU,WACN,OAEI,8DACI,+DACQ,2DACR,0BACK,yGACT,UACFzC,KAAK,KAGXoC,SAAW,WAAY,MAAO,gBAGlC,QACItE,UAAYA,EACZuE,UAAYA,EACZC,WAAaA,EACbC,YAAcA"}
{"version":3,"file":"panel.js","sources":["../../src/layout/panel.js"],"names":["define","$","_","Backbone","MIN_PANEL_WIDTH","MAX_PANEL_WIDTH","SidePanel","View","extend","initialize","options","this","view","hidden","saved_size","hiddenByTool","$center","$el","siblings","$toggleButton","render","self","panel","components","model","attributes","html","_templatePanel","id","each","buttons","button","append","addClass","cls","escape","title","_templateHeader","_templateBody","_templateFooter","join","events","mousedown .unified-panel-footer > .drag","click .unified-panel-footer > .panel-collapse","_mousedownDragHandler","ev","move","e","delta","pageX","prevX","oldWidth","width","newWidth","draggingLeft","Math","min","max","resize","show","on","one","hide","off","newSize","css","animation","whichSide","animate","removeClass","toggle","handle_minwidth_hint","hint","space","force_panel","op","toString","LeftPanel","RightPanel","CenterPanel","setElement","template","$frame","$panel","bind","_iframeChangeHandler","iframe","currentTarget","location","contentWindow","host","empty","Galaxy","trigger","fullpath","pathname","search","hash","display","message","onbeforeunload","confirm","undefined","attr","scrollTop"],"mappings":"AAAAA,QAAU,SAAU,kBAAmB,iBAAmB,SAAUC,EAAGC,EAAGC,GACtE,YAEA,IAAIC,GAAkB,IAClBC,EAAkB,IAGlBC,EAAYH,EAASI,KAAKC,QAE1BC,WAAY,SAAUC,GAClBC,KAAKC,KAAOF,EAAQE,KACpBD,KAAKE,QAAS,EACdF,KAAKG,WAAa,KAClBH,KAAKI,cAAe,GAGxBC,QAAU,WACN,MAAOL,MAAKM,IAAIC,SAAU,YAG9BC,cAAgB,WACZ,MAAOR,MAAKV,EAAG,4CAGnBmB,OAAQ,WACJ,GAAIC,GAAOV,KACPW,EAAQX,KAAKC,KACbW,EAAaZ,KAAKC,KAAKY,MAAMC,cACjCd,MAAKM,IAAIS,KAAMf,KAAKgB,eAAgBhB,KAAKiB,KACzC1B,EAAE2B,KAAMN,EAAWO,QAAS,SAAUC,GAClCV,EAAKpB,EAAG,yBAA0B+B,OAAQD,EAAOd,OAErDN,KAAKM,IAAIgB,SAAUV,EAAWW,KAC9BvB,KAAKV,EAAG,sBAAuByB,KAAMxB,EAAEiC,OAAQZ,EAAWa,QAC1DzB,KAAKV,EAAG,uBAAwB+B,OAAQV,EAAML,KAC9CK,EAAMF,UAIVO,eAAgB,WACZ,OACIhB,K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EAASS,KACzDF,SAAUP,EAASO,SACnBC,OAAUR,EAASQ,OACnBC,KAAUT,EAASS,SAM/BC,QAAS,SAAUtF,GACf,GAAI6E,GAAgB9E,KAAKuE,OAAQ,GAAIO,kBACjCU,EAAUV,EAAcW,gBAAkBX,EAAcW,mBACtDD,GAAWE,QAASF,MACtBV,EAAcW,eAAiBE,OAC/B3F,KAAKuE,OAAOqB,KAAM,MAAO,eAAgBzC,OACzCnD,KAAKwE,OAAOQ,QAAQa,UAAW,GAAIxE,OAAQpB,EAAKK,KAAM0C,OACtDiC,OAAOC,QAAS,oBAAqBjF,KAI7CqE,SAAU,WACN,MAAQ,uJAMZL,SAAW,WAAa,MAAO,gBAGnC,QACItE,UAAYA,EACZuE,UAAYA,EACZC,WAAaA,EACbC,YAAcA"}
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
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.$el.attr("scroll","no"),this.$el.html(this._template()),this.$("#masthead").replaceWith(this.masthead.$el),this.$el.append(this.masthead.frame.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox"),this.center=new b.CenterPanel,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 this.center.setElement("#center"),this.center.render(),_.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.$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}});
//# sourceMappingURL=../../maps/layout/page.js.map
+1 -1
View File
@@ -1,2 +1,2 @@
define(["jquery","libs/underscore","libs/backbone"],function(a,b,c){"use strict";var d=160,e=800,f=c.View.extend({initialize:function(a){this.view=a.view,this.hidden=!1,this.saved_size=null,this.hiddenByTool=!1},$center:function(){return this.$el.siblings("#center")},$toggleButton:function(){return this.$(".unified-panel-footer > .panel-collapse")},render:function(){var a=this,c=this.view,d=this.view.model.attributes||{};this.$el.html(this._templatePanel(this.id)),b.each(d.buttons,function(b){a.$(".panel-header-buttons").append(b.$el)}),this.$el.addClass(d.cls),this.$(".panel-header-text").html(b.escape(d.title)),this.$(".unified-panel-body").append(c.$el),c.render()},_templatePanel:function(){return[this._templateHeader(),this._templateBody(),this._templateFooter()].join("")},_templateHeader:function(){return['<div class="unified-panel-header" unselectable="on">','<div class="unified-panel-header-inner">','<div class="panel-header-buttons" style="float: right"/>','<div class="panel-header-text"/>',"</div>","</div>"].join("")},_templateBody:function(){return'<div class="unified-panel-body"/>'},_templateFooter:function(){return['<div class="unified-panel-footer">','<div class="panel-collapse ',b.escape(this.id),'"/>','<div class="drag"/>',"</div>"].join("")},events:{"mousedown .unified-panel-footer > .drag":"_mousedownDragHandler","click .unified-panel-footer > .panel-collapse":"toggle"},_mousedownDragHandler:function(b){function c(a){var b=a.pageX-h;h=a.pageX;var c=f.$el.width(),i=g?c+b:c-b;i=Math.min(e,Math.max(d,i)),f.resize(i)}var f=this,g="left"===this.id,h=b.pageX;a("#dd-helper").show().on("mousemove",c).one("mouseup",function(){a(this).hide().off("mousemove",c)})},resize:function(a){return this.$el.css("width",a),this.$center().css(this.id,a),this},show:function(){if(this.hidden){var a=this,b={},c=this.id;return b[c]=0,a.$el.css(c,-this.saved_size).show().animate(b,"fast",function(){a.resize(a.saved_size)}),a.hidden=!1,a.$toggleButton().removeClass("hidden"),this}},hide:function(){if(!this.hidden){var a={},b=this.id;return this.saved_size=this.$el.width(),a[b]=-this.saved_size,this.$el.animate(a,"fast"),this.$center().css(b,0),this.hidden=!0,this.$toggleButton().addClass("hidden"),this}},toggle:function(){return this.hidden?this.show():this.hide(),this.hiddenByTool=!1,this},handle_minwidth_hint:function(a){var b=this.$center().width()-(this.hidden?this.saved_size:0);return a>b?this.hidden||(this.toggle(),this.hiddenByTool=!0):this.hiddenByTool&&(this.toggle(),this.hiddenByTool=!1),self},force_panel:function(a){return"show"==a?this.show():"hide"==a?this.hide():self},toString:function(){return"SidePanel("+this.id+")"}}),g=f.extend({id:"left"}),h=f.extend({id:"right"}),i=c.View.extend({initialize:function(){this.prev=null},render:function(){this.$el.html(this.template()),this.$("#galaxy_main").on("load",b.bind(this._iframeChangeHandler,this))},_iframeChangeHandler:function(b){var c=b.currentTarget,d=c.contentWindow&&c.contentWindow.location;d&&d.host&&(a(c).show(),this.prev&&this.prev.remove(),this.$("#center-panel").hide(),Galaxy.trigger("galaxy_main:load",{fullpath:d.pathname+d.search+d.hash,pathname:d.pathname,search:d.search,hash:d.hash}))},display:function(a){var b=this.$("#galaxy_main")[0].contentWindow||{},c=b.onbeforeunload&&b.onbeforeunload();!c||confirm(c)?(b.onbeforeunload=void 0,this.prev&&this.prev.remove(),this.prev=a,this.$("#galaxy_main").attr("src","about:blank").hide(),this.$("#center-panel").scrollTop(0).append(a.$el).show(),Galaxy.trigger("center-panel:load",a)):a&&a.remove()},template:function(){return['<div style="position: absolute; width: 100%; height: 100%">','<iframe name="galaxy_main" id="galaxy_main" frameborder="0" ','style="position: absolute; width: 100%; height: 100%;"/>','<div id="center-panel" ','style="display: none; position: absolute; width: 100%; height: 100%; padding: 10px; overflow: auto;"/>',"</div>"].join("")},toString:function(){return"CenterPanel"}});return{SidePanel:f,LeftPanel:g,RightPanel:h,CenterPanel:i}});
define(["jquery","libs/underscore","libs/backbone"],function(a,b,c){"use strict";var d=160,e=800,f=c.View.extend({initialize:function(a){this.view=a.view,this.hidden=!1,this.saved_size=null,this.hiddenByTool=!1},$center:function(){return this.$el.siblings("#center")},$toggleButton:function(){return this.$(".unified-panel-footer > .panel-collapse")},render:function(){var a=this,c=this.view,d=this.view.model.attributes||{};this.$el.html(this._templatePanel(this.id)),b.each(d.buttons,function(b){a.$(".panel-header-buttons").append(b.$el)}),this.$el.addClass(d.cls),this.$(".panel-header-text").html(b.escape(d.title)),this.$(".unified-panel-body").append(c.$el),c.render()},_templatePanel:function(){return[this._templateHeader(),this._templateBody(),this._templateFooter()].join("")},_templateHeader:function(){return['<div class="unified-panel-header" unselectable="on">','<div class="unified-panel-header-inner">','<div class="panel-header-buttons" style="float: right"/>','<div class="panel-header-text"/>',"</div>","</div>"].join("")},_templateBody:function(){return'<div class="unified-panel-body"/>'},_templateFooter:function(){return['<div class="unified-panel-footer">','<div class="panel-collapse ',b.escape(this.id),'"/>','<div class="drag"/>',"</div>"].join("")},events:{"mousedown .unified-panel-footer > .drag":"_mousedownDragHandler","click .unified-panel-footer > .panel-collapse":"toggle"},_mousedownDragHandler:function(b){function c(a){var b=a.pageX-h;h=a.pageX;var c=f.$el.width(),i=g?c+b:c-b;i=Math.min(e,Math.max(d,i)),f.resize(i)}var f=this,g="left"===this.id,h=b.pageX;a("#dd-helper").show().on("mousemove",c).one("mouseup",function(){a(this).hide().off("mousemove",c)})},resize:function(a){return this.$el.css("width",a),this.$center().css(this.id,a),this},show:function(){if(this.hidden){var a=this,b={},c=this.id;return b[c]=0,a.$el.css(c,-this.saved_size).show().animate(b,"fast",function(){a.resize(a.saved_size)}),a.hidden=!1,a.$toggleButton().removeClass("hidden"),this}},hide:function(){if(!this.hidden){var a={},b=this.id;return this.saved_size=this.$el.width(),a[b]=-this.saved_size,this.$el.animate(a,"fast"),this.$center().css(b,0),this.hidden=!0,this.$toggleButton().addClass("hidden"),this}},toggle:function(){return this.hidden?this.show():this.hide(),this.hiddenByTool=!1,this},handle_minwidth_hint:function(a){var b=this.$center().width()-(this.hidden?this.saved_size:0);return a>b?this.hidden||(this.toggle(),this.hiddenByTool=!0):this.hiddenByTool&&(this.toggle(),this.hiddenByTool=!1),self},force_panel:function(a){return"show"==a?this.show():"hide"==a?this.hide():self},toString:function(){return"SidePanel("+this.id+")"}}),g=f.extend({id:"left"}),h=f.extend({id:"right"}),i=c.View.extend({initialize:function(){this.setElement(a(this.template())),this.$frame=this.$(".center-frame"),this.$panel=this.$(".center-panel"),this.$frame.on("load",b.bind(this._iframeChangeHandler,this))},_iframeChangeHandler:function(b){var c=b.currentTarget,d=c.contentWindow&&c.contentWindow.location;d&&d.host&&(a(c).show(),this.$panel.empty().hide(),Galaxy.trigger("center-frame:load",{fullpath:d.pathname+d.search+d.hash,pathname:d.pathname,search:d.search,hash:d.hash}))},display:function(a){var b=this.$frame[0].contentWindow||{},c=b.onbeforeunload&&b.onbeforeunload();(!c||confirm(c))&&(b.onbeforeunload=void 0,this.$frame.attr("src","about:blank").hide(),this.$panel.empty().scrollTop(0).append(a.$el).show(),Galaxy.trigger("center-panel:load",a))},template:function(){return'<div class="center-container"><iframe id="galaxy_main" name="galaxy_main" frameborder="0" class="center-frame" /><div class="center-panel" /></div>'},toString:function(){return"CenterPanel"}});return{SidePanel:f,LeftPanel:g,RightPanel:h,CenterPanel:i}});
//# sourceMappingURL=../../maps/layout/panel.js.map
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