Client libs: move backbone down into /libs (not backbone/backbone); Webpack: move to non-entry vendor bundling for libraries, clean up assoc.

This commit is contained in:
carlfeberhard
2015-11-05 12:04:52 -05:00
parent 84b40650ec
commit d80d74c888
40 changed files with 27383 additions and 195 deletions
+1 -5
View File
@@ -1,16 +1,12 @@
define([
'libs/underscore',
'libs/backbone/backbone',
'libs/backbone',
'mvc/base-mvc',
'mvc/user/user-model',
'utils/metrics-logger',
'utils/add-logging',
'utils/localization'
], function( _, Backbone, BASE_MVC, userModel, metricsLogger, addLogging, localize ){
console.debug( 'app-base id', jQuery.id );
if( !jQuery.id ){
jQuery.id = 'app-base';
}
// TODO: move into a singleton pattern and have dependents import Galaxy
// ============================================================================
+13 -2
View File
@@ -569,8 +569,7 @@ function init_refresh_on_change () {
.click( function() {
return confirm( $(this).attr("confirm") );
});
};
}
// jQuery plugin to prevent double submission of forms
// Ref: http://stackoverflow.com/questions/2830542/prevent-double-submission-of-forms-in-jquery
@@ -632,3 +631,15 @@ $(document).ready( function() {
});
});
// globals from this file
// TODO: move to not globals from this file
window.obj_length = obj_length;
window.make_popupmenu = make_popupmenu;
window.make_popup_menus = make_popup_menus;
window.replace_big_select_inputs = replace_big_select_inputs;
window.async_save_text = async_save_text;
window.commatize = commatize;
window.reset_tool_search = reset_tool_search;
window.GalaxyAsync = GalaxyAsync;
window.init_refresh_on_change = init_refresh_on_change;
+19 -9
View File
@@ -1,4 +1,14 @@
!function( exports, $ ){
// HACK: add these to global scope until we stop asking for them there...
// Via webpack: these are required here automatically by the provider plugin
// Via script tag: these are redundant (identities) since they're already global
window[ 'jQuery' ] = jQuery; // a weird form to prevent webpack from sub'ing 'window.jQuery' in the provider plugin
window.$ = jQuery;
window._ = _;
window.Backbone = Backbone;
window.Handlebars = Handlebars;
console.debug('globals loaded:', window.jQuery, window.Backbone, '...');
!function( exports ){
"use strict"
@@ -86,7 +96,7 @@ $.extend( Panel.prototype, {
}
},
force_panel: function( op ) {
if ( ( this.hidden && op == 'show' ) || ( ! this.hidden && op == 'hide' ) ) {
if ( ( this.hidden && op == 'show' ) || ( ! this.hidden && op == 'hide' ) ) {
this.do_toggle();
}
},
@@ -166,7 +176,7 @@ $.extend( Modal.prototype, {
// Body
var body = options.body;
if ( body == "progress" ) {
body = $("<div class='progress progress-striped active'><div class='progress-bar' style='width: 100%'></div></div>");
body = $("<div class='progress progress-striped active'><div class='progress-bar' style='width: 100%'></div></div>");
}
this.$body.html( body );
},
@@ -184,12 +194,12 @@ $.extend( Modal.prototype, {
this.$body.css( "min-width", this.$body.width() );
// Set max-height so that modal does not exceed window size and is in middle of page.
// TODO: this could perhaps be handled better using CSS.
this.$body.css( "max-height",
$(window).height() -
this.$footer.outerHeight() -
this.$body.css( "max-height",
$(window).height() -
this.$footer.outerHeight() -
this.$header.outerHeight() -
parseInt( this.$dialog.css( "padding-top" ), 10 ) -
parseInt( this.$dialog.css( "padding-bottom" ), 10 )
parseInt( this.$dialog.css( "padding-top" ), 10 ) -
parseInt( this.$dialog.css( "padding-bottom" ), 10 )
);
}
// Callback on init
@@ -284,4 +294,4 @@ exports.show_message = show_message;
exports.show_in_overlay = show_in_overlay;
exports.user_changed = user_changed;
}( window, window.jQuery );
}( window );
+1 -1
View File
@@ -15,7 +15,7 @@ require( './bootstrap' );
// MVC via backbone
var _ = require( './underscore' );
window._ = _;
var Backbone = require( './backbone/backbone' );
var Backbone = require( './backbone' );
window.Backbone = Backbone;
var Handlebars = require( './handlebars.runtime' );
window.Handlebars = Handlebars;
+1 -1
View File
@@ -1,6 +1,6 @@
define([
'libs/underscore',
'libs/backbone/backbone',
'libs/backbone',
'utils/add-logging',
'utils/localization'
], function( _, Backbone, addLogging, _l ){
+1 -1
View File
@@ -1,6 +1,6 @@
define([
'libs/underscore',
'libs/backbone/backbone',
'libs/backbone',
"mvc/base-mvc",
"utils/localization"
], function( _, Backbone, baseMVC, _l ){
+1 -1
View File
@@ -16,7 +16,7 @@ module.exports = function( grunt ){
'ravenjs': [ 'dist/raven.js', 'raven.js' ],
'underscore': [ 'underscore.js', 'underscore.js' ],
'handlebars': [ 'handlebars.runtime.js', 'handlebars.runtime.js' ],
'backbone': [ 'backbone.js', 'backbone/backbone.js' ],
'backbone': [ 'backbone.js', 'backbone.js' ],
'requirejs': [ 'require.js', 'require.js' ],
'd3': [ 'd3.js', 'd3.js' ],
'bib2json': [ 'Parser.js', 'bibtex.js' ],
+39 -10
View File
@@ -3,18 +3,35 @@ var webpack = require( 'webpack' ),
path = require( 'path' ),
scriptsBase = path.join( __dirname, 'galaxy/scripts' ),
libsBase = path.join( scriptsBase, 'libs' ),
// chunks
CommonsChunkPlugin = new webpack.optimize.CommonsChunkPlugin( 'common.js' );
// libraries used on almost every page
// TODO: reduce
commonLibs = [
// jquery et al
'jquery',
'libs/jquery/jquery.migrate',
'libs/jquery/select2',
'libs/jquery/jquery.event.hover',
'libs/jquery/jquery.form',
'libs/jquery/jquery.rating',
'libs/jquery.sparklines',
'libs/bootstrap',
// // mvc
'libs/underscore',
'libs/backbone',
'libs/handlebars.runtime',
// // all pages get these
'galaxy.base',
'galaxy.panels',
'galaxy.autocom_tagging'
];
module.exports = {
devtool : 'source-map',
entry : {
galaxy : './galaxy/scripts/apps/galaxy.js',
// remove when these are no longer needed from any pages
libs : './galaxy/scripts/apps/libs.js',
analysis : './galaxy/scripts/apps/analysis.js',
history : './galaxy/scripts/apps/history-app.js'
galaxy : './galaxy/scripts/apps/galaxy.js',
analysis: './galaxy/scripts/apps/analysis.js',
vendor : commonLibs
},
output : {
path : '../static/scripts/bundled',
@@ -28,14 +45,26 @@ module.exports = {
jquery : path.join( libsBase, 'jquery/jquery' ),
underscore : path.join( libsBase, 'underscore.js' ),
// we import these (for now) from the libs dir
'libs/underscore' : path.join( libsBase, 'underscore.js' ),
'libs/backbone/backbone': path.join( libsBase, 'backbone/backbone.js' ),
// TODO:?? needed?
'libs/underscore' : path.join( libsBase, 'underscore.js' ),
'libs/backbone' : path.join( libsBase, 'backbone.js' ),
// requirejs' i18n doesn't play well with webpack
// note: strangely, order does matter here - this must come before utils below
'utils/localization' : path.join( scriptsBase, 'utils/webpack-localization' ),
}
},
plugins : [
CommonsChunkPlugin
new webpack.optimize.CommonsChunkPlugin( 'vendor', 'vendor.bundled.js' ),
// this plugin allows using the following keys/globals in scripts (w/o req'ing them first)
// and webpack will automagically require them in the bundle for you
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
_: "underscore",
Backbone: 'libs/backbone',
Handlebars: 'libs/handlebars.runtime'
}),
// new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 })
]
};
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"galaxy-app-base.js","sources":["../src/galaxy-app-base.js"],"names":["define","_","Backbone","BASE_MVC","userModel","metricsLogger","addLogging","localize","GalaxyApp","options","bootstrapped","console","debug","self","this","_init","jQuery","id","DEBUGGING_KEY","NAMESPACE_KEY","localDebugging","localStorage","getItem","storageErr","log","prototype","extend","Events","logger","_processOptions","root","_initConfig","config","_patchGalaxy","window","Galaxy","_initLogger","loggerOptions","_initLocale","_initUser","user","_setUpListeners","trigger","defaultOptions","patchExisting","defaults","k","hasOwnProperty","patchWith","consoleLogger","consoleLevel","MetricsLogger","ALL","consoleNamespaceWhitelist","split","LoggableMixin","_l","userJSON","User","currUser","lastAjax","$","document","bind","ev","xhr","data","JSON","parse","err","url","location","href","slice","debugging","setting","undefined","setItem","removeItem","debuggingNamespaces","namespaces","csv","newSettings","toString","userEmail","get"],"mappings":"AAAAA,QACI,kBACA,yBACA,eACA,sBACA,uBACA,oBACA,sBACD,SAAUC,EAAGC,EAAUC,EAAUC,EAAWC,EAAeC,EAAYC,GAgB1E,QAASC,GAAWC,EAASC,GACzBC,QAAQC,MAAO,aAAcH,EAASC,EACtC,IAAIG,GAAOC,IACX,OAAOD,GAAKE,MAAON,MAAeC,OAlBlCC,QAAQC,MAAO,cAAeI,OAAOC,IAChCD,OAAOC,KACRD,OAAOC,GAAK,YAoB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UgB,gBAAkB,WAClC,GAAI5B,GAAOC,IAiBX,OAbAD,GAAK+C,YACLC,EAAGC,UAAWC,KAAM,WAAY,SAAUC,EAAIC,EAAKxD,GAC/C,GAAIyD,GAAOzD,EAAQyD,IACnB,KACIA,EAAOC,KAAKC,MAAOF,GACrB,MAAOG,IAETxD,EAAK+C,UACDU,IAAUC,SAASC,KAAKC,MAAO,EAAG,IAAOhE,EAAQ6D,IACjDJ,KAAUA,KAIXrD,GAIXL,EAAUiB,UAAUiD,UAAY,SAAqBC,GACjD,GAAI9D,GAAOC,IACX,KACI,GAAgB8D,SAAZD,EACA,MAAiD,SAA1CtD,aAAaC,QAASJ,EAEjC,IAAIyD,EAEA,MADAtD,cAAawD,QAAS3D,GAAe,IAC9B,CAGXG,cAAayD,WAAY5D,GAEzBL,EAAKkE,oBAAqB,MAE5B,MAAOxD,GACLZ,QAAQa,IAAKjB,EAAU,wDAE3B,OAAO,GASXC,EAAUiB,UAAUsD,oBAAsB,SAA+BC,GACrE,GAAInE,GAAOC,IACX,KACI,GAAmB8D,SAAfI,EAA0B,CAC1B,GAAIC,GAAM5D,aAAaC,QAASH,EAChC,OAAyB,gBAAZ,GAAsB8D,EAAI3B,MAAO,QACxB,OAAf0B,EACP3D,aAAayD,WAAY3D,GAEzBE,aAAawD,QAAS1D,EAAe6D,EAEzC,IAAIE,GAAcrE,EAAKkE,qBAIvB,OAHIlE,GAAKe,SACLf,EAAKe,OAAOnB,QAAQ4C,0BAA4B6B,GAE7CA,EACT,MAAO3D,GACLZ,QAAQa,IAAKjB,EAAU,+DAK/BC,EAAUiB,UAAU0D,SAAW,WAC3B,GAAIC,GAAYtE,KAAK0B,KAAQ1B,KAAK0B,KAAK6C,IAAK,UAAa,cAAkB,eAC3E,OAAO,aAAeD,EAAY,MAM9B5E,UAAYA"}
{"version":3,"file":"galaxy-app-base.js","sources":["../src/galaxy-app-base.js"],"names":["define","_","Backbone","BASE_MVC","userModel","metricsLogger","addLogging","localize","GalaxyApp","options","bootstrapped","console","debug","self","this","_init","jQuery","id","DEBUGGING_KEY","NAMESPACE_KEY","localDebugging","localStorage","getItem","storageErr","log","prototype","extend","Events","logger","_processOptions","root","_initConfig","config","_patchGalaxy","window","Galaxy","_initLogger","loggerOptions","_initLocale","_initUser","user","_setUpListeners","trigger","defaultOptions","patchExisting","defaults","k","hasOwnProperty","patchWith","consoleLogger","consoleLevel","MetricsLogger","ALL","consoleNamespaceWhitelist","split","LoggableMixin","_l","userJSON","User","currUser","lastAjax","$","document","bind","ev","xhr","data","JSON","parse","err","url","location","href","slice","debugging","setting","undefined","setItem","removeItem","debuggingNamespaces","namespaces","csv","newSettings","toString","userEmail","get"],"mappings":"AAAAA,QACI,kBACA,gBACA,eACA,sBACA,uBACA,oBACA,sBACD,SAAUC,EAAGC,EAAUC,EAAUC,EAAWC,EAAeC,EAAYC,GAgB1E,QAASC,GAAWC,EAASC,GACzBC,QAAQC,MAAO,aAAcH,EAASC,EACtC,IAAIG,GAAOC,IACX,OAAOD,GAAKE,MAAON,MAAeC,OAlBlCC,QAAQC,MAAO,cAAeI,OAAOC,IAChCD,OAAOC,KACRD,OAAOC,GAAK,YAoBpBX,EAAYE,EAAW,YAGvB,IAAIU,GAAgB,eAChBC,EAAgBD,EAAgB,cAChCE,GAAiB,CACrB,KACIA,EAA0D,QAAzCC,aAAaC,QAASJ,GACzC,MAAOK,GACLZ,QAAQa,IAAKjB,EAAU,wDAsNvB,MAlNJC,GAAUiB,UAAUV,MAAQ,SAAiBN,EAASC,GAClD,GAAIG,GAAOC,IA+BX,OA9BAb,GAAEyB,OAAQb,EAAMX,EAASyB,QACrBP,IACAP,EAAKe,OAASjB,SAGlBE,EAAKgB,gBAAiBpB,GACtBI,EAAKD,MAAO,sBAAuBC,EAAKJ,SAExCI,EAAKiB,KAAOrB,EAAQqB,MAAQ,IAE5BjB,EAAKkB,YAAatB,EAAQuB,QAAUtB,EAAasB,YACjDnB,EAAKD,MAAO,qBAAsBC,EAAKmB,QAEvCn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AqB,MAE5B,MAAOxD,GACLZ,QAAQa,IAAKjB,EAAU,wDAE3B,OAAO,GASXC,EAAUiB,UAAUsD,oBAAsB,SAA+BC,GACrE,GAAInE,GAAOC,IACX,KACI,GAAmB8D,SAAfI,EAA0B,CAC1B,GAAIC,GAAM5D,aAAaC,QAASH,EAChC,OAAyB,gBAAZ,GAAsB8D,EAAI3B,MAAO,QACxB,OAAf0B,EACP3D,aAAayD,WAAY3D,GAEzBE,aAAawD,QAAS1D,EAAe6D,EAEzC,IAAIE,GAAcrE,EAAKkE,qBAIvB,OAHIlE,GAAKe,SACLf,EAAKe,OAAOnB,QAAQ4C,0BAA4B6B,GAE7CA,EACT,MAAO3D,GACLZ,QAAQa,IAAKjB,EAAU,+DAK/BC,EAAUiB,UAAU0D,SAAW,WAC3B,GAAIC,GAAYtE,KAAK0B,KAAQ1B,KAAK0B,KAAK6C,IAAK,UAAa,cAAkB,eAC3E,OAAO,aAAeD,EAAY,MAM9B5E,UAAYA"}
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,"file":"common-libs.js","sources":["../../src/libs/common-libs.js"],"names":["jquery","require","window","jQuery","$","_","Backbone","Handlebars","exports"],"mappings":"AACA,GAAIA,QAASC,QAAS,SACtBC,QAAOC,OAASD,OAAOE,EAAIJ,OAC3BC,QAAS,2BAGTA,QAAS,oBACTA,QAAS,+BACTA,QAAS,wBACTA,QAAS,0BACTA,QAAS,uBAETA,QAAS,cAGT,IAAII,GAAIJ,QAAS,eACjBC,QAAOG,EAAIA,CACX,IAAIC,UAAWL,QAAS,sBACxBC,QAAOI,SAAWA,QAClB,IAAIC,YAAaN,QAAS,uBAC1BC,QAAOK,WAAaA,WAGpBN,QAAS,kBACTA,QAAS,oBACTA,QAAS,6BAETO,QAAQR,OAASA,OACjBQ,QAAQH,EAAIA,EACZG,QAAQF,SAAWA,SACnBE,QAAQD,WAAaA"}
{"version":3,"file":"common-libs.js","sources":["../../src/libs/common-libs.js"],"names":["jquery","require","window","jQuery","$","_","Backbone","Handlebars","exports"],"mappings":"AACA,GAAIA,QAASC,QAAS,SACtBC,QAAOC,OAASD,OAAOE,EAAIJ,OAC3BC,QAAS,2BAGTA,QAAS,oBACTA,QAAS,+BACTA,QAAS,wBACTA,QAAS,0BACTA,QAAS,uBAETA,QAAS,cAGT,IAAII,GAAIJ,QAAS,eACjBC,QAAOG,EAAIA,CACX,IAAIC,UAAWL,QAAS,aACxBC,QAAOI,SAAWA,QAClB,IAAIC,YAAaN,QAAS,uBAC1BC,QAAOK,WAAaA,WAGpBN,QAAS,kBACTA,QAAS,oBACTA,QAAS,6BAETO,QAAQR,OAASA,OACjBQ,QAAQH,EAAIA,EACZG,QAAQF,SAAWA,SACnBE,QAAQD,WAAaA"}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"user-model.js","sources":["../../../src/mvc/user/user-model.js"],"names":["define","_","Backbone","baseMVC","_l","logNamespace","User","Model","extend","LoggableMixin","_logNamespace","urlRoot","Galaxy","options","root","defaults","id","username","email","total_disk_usage","nice_total_disk_usage","quota_percent","is_admin","initialize","data","this","log","on","model","resp","changes","isAnonymous","get","isAdmin","loadFromApi","idOrCurrent","CURRENT_ID_STR","userFn","success","newModel","response","trigger","url","prototype","fetch","call","clearSessionStorage","key","sessionStorage","indexOf","removeItem","toString","userInfo","unshift","push","join","getCurrentUserFromApi","currentUser","Collection"],"mappings":"AAAAA,QACI,kBACA,yBACA,eACA,sBACD,SAAUC,EAAGC,EAAUC,EAASC,GAEnC,GAAIC,GAAe,OAKfC,EAAOJ,EAASK,MAAMC,OAAQL,EAAQM,eAAgBD,QAEtDE,cAAgBL,EAGhBM,QAAU,WAAY,MAAOC,QAAOC,QAAQC,KAAO,aAMnDC,UACIC,GAA0B,KAC1BC,SAA0B,IAAMb,EAAI,kBAAqB,IACzDc,MAA0B,GAC1BC,iBAA0B,EAC1BC,sBAA0B,GAC1BC,cAA0B,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MAAOC,QAAOC,QAAQC,KAAO,cAMvD,QACIR,KAAOA"}
{"version":3,"file":"user-model.js","sources":["../../../src/mvc/user/user-model.js"],"names":["define","_","Backbone","baseMVC","_l","logNamespace","User","Model","extend","LoggableMixin","_logNamespace","urlRoot","Galaxy","options","root","defaults","id","username","email","total_disk_usage","nice_total_disk_usage","quota_percent","is_admin","initialize","data","this","log","on","model","resp","changes","isAnonymous","get","isAdmin","loadFromApi","idOrCurrent","CURRENT_ID_STR","userFn","success","newModel","response","trigger","url","prototype","fetch","call","clearSessionStorage","key","sessionStorage","indexOf","removeItem","toString","userInfo","unshift","push","join","getCurrentUserFromApi","currentUser","Collection"],"mappings":"AAAAA,QACI,kBACA,gBACA,eACA,sBACD,SAAUC,EAAGC,EAAUC,EAASC,GAEnC,GAAIC,GAAe,OAKfC,EAAOJ,EAASK,MAAMC,OAAQL,EAAQM,eAAgBD,QAEtDE,cAAgBL,EAGhBM,QAAU,WAAY,MAAOC,QAAOC,QAAQC,KAAO,aAMnDC,UACIC,GAA0B,KAC1BC,SAA0B,IAAMb,EAAI,kBAAqB,IACzDc,MAA0B,GAC1BC,iBAA0B,EAC1BC,sBAA0B,GAC1BC,cAA0B,KAC1BC,UAA0B,GAM9BC,WAAa,SAAUC,GACnBC,KAAKC,IAAK,mBAAoBF,GAE9BC,KAAKE,GAAI,SAAU,SAAUC,EAAOC,GAAQJ,KAAKC,IAAKD,KAAO,eAAgBG,EAAOC,KACpFJ,KAAKE,GAAI,SAAU,SAAUC,EAAOJ,GAAQC,KAAKC,IAAKD,KAAO,gBAAiBG,EAAOJ,EAAKM,YAG9FC,YAAc,WACV,OAAUN,KAAKO,IAAK,UAGxBC,QAAU,WACN,MAASR,MAAKO,IAAK,aAUvBE,YAAc,SAAUC,EAAatB,GACjCsB,EAAcA,GAAe7B,EAAK8B,eAElCvB,EAAUA,KACV,IAAIe,GAAQH,KACRY,EAASxB,EAAQyB,OAYrB,OATAzB,GAAQyB,QAAU,SAAUC,EAAUC,GAClCZ,EAAMa,QAAS,SAAUF,EAAUC,GAC/BH,GAAUA,EAAQE,EAAUC,IAIhCL,IAAgB7B,EAAK8B,iBACrBvB,EAAQ6B,IAAMjB,KAAKd,QAAU,IAAML,EAAK8B,gBAErClC,EAASK,MAAMoC,UAAUC,MAAMC,KAAMpB,KAAMZ,IAKtDiC,oBAAsB,WAClB,IAAK,GAAIC,KAAOC,gBAGsB,IAA9BD,EAAIE,QAAS,YACbD,eAAeE,WAAYH,GAEZ,kBAARA,GACPC,eAAeE,WAAYH,IAMvCI,SAAW,WACP,GAAIC,IAAa3B,KAAKO,IAAK,YAK3B,OAJIP,MAAKO,IAAK,QACVoB,EAASC,QAAS5B,KAAKO,IAAK,OAC5BoB,EAASE,KAAM7B,KAAKO,IAAK,WAEtB,QAAUoB,EAASG,KAAM,KAAQ,MAKhDjD,GAAK8B,eAAiB,UAGtB9B,EAAKkD,sBAAwB,SAAU3C,GACnC,GAAI4C,GAAc,GAAInD,EAEtB,OADAmD,GAAYvB,YAAa5B,EAAK8B,eAAgBvB,GACvC4C,EAIUvD,GAASwD,WAAWlD,OAAQL,EAAQM,eAAgBD,QACrEoB,MAAUtB,EACVK,QAAU,WAAY,MAAOC,QAAOC,QAAQC,KAAO,cAMvD,QACIR,KAAOA"}
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
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
+104 -2
View File
@@ -1,2 +1,104 @@
define(["libs/underscore","libs/backbone/backbone","mvc/base-mvc","mvc/user/user-model","utils/metrics-logger","utils/add-logging","utils/localization"],function(a,b,c,d,e,f,g){function h(a,b){console.debug("GalaxyApp:",a,b);var c=this;return c._init(a||{},b||{})}console.debug("app-base id",jQuery.id),jQuery.id||(jQuery.id="app-base"),f(h,"GalaxyApp");var i="galaxy:debug",j=i+":namespaces",k=!1;try{k="true"==localStorage.getItem(i)}catch(l){console.log(g("localStorage not available for debug flag retrieval"))}return h.prototype._init=function(c,d){var e=this;return a.extend(e,b.Events),k&&(e.logger=console),e._processOptions(c),e.debug("GalaxyApp.options: ",e.options),e.root=c.root||"/",e._initConfig(c.config||d.config||{}),e.debug("GalaxyApp.config: ",e.config),e._patchGalaxy(window.Galaxy),e._initLogger(e.options.loggerOptions||{}),e.debug("GalaxyApp.logger: ",e.logger),e._initLocale(),e.debug("GalaxyApp.localize: ",e.localize),e.config=c.config||{},e.debug("GalaxyApp.config: ",e.config),e._initUser(c.user||{}),e.debug("GalaxyApp.user: ",e.user),e._setUpListeners(),e.trigger("ready",e),e},h.prototype.defaultOptions={patchExisting:!0,root:"/"},h.prototype._processOptions=function(a){var b=this,c=b.defaultOptions;b.debug("_processOptions: ",a),b.options={};for(var d in c)c.hasOwnProperty(d)&&(b.options[d]=a.hasOwnProperty(d)?a[d]:c[d]);return b},h.prototype._initConfig=function(a){var b=this;return b.debug("_initConfig: ",a),b.config=a,b.config.debug=k||b.config.debug,b},h.prototype._patchGalaxy=function(a){var b=this;if(b.options.patchExisting&&a){b.debug("found existing Galaxy object:",a);for(var c in a)a.hasOwnProperty(c)&&(b.debug(" patching in "+c+" to Galaxy"),b[c]=a[c])}},h.prototype._initLogger=function(a){var b=this;if(b.config.debug){a.consoleLogger=a.consoleLogger||console,a.consoleLevel=a.consoleLevel||e.MetricsLogger.ALL;try{a.consoleNamespaceWhitelist=localStorage.getItem(j).split(",")}catch(d){}}return b.debug("_initLogger:",a),b.logger=new e.MetricsLogger(a),b.config.debug&&(c.LoggableMixin.logger=b.logger),b},h.prototype._initLocale=function(a){var b=this;return b.debug("_initLocale:",a),b.localize=g,window._l=b.localize,b},h.prototype._initUser=function(a){var b=this;return b.debug("_initUser:",a),b.user=new d.User(a),b.user.logger=b.logger,b.currUser=b.user,b},h.prototype._setUpListeners=function(){var a=this;return a.lastAjax={},$(document).bind("ajaxSend",function(b,c,d){var e=d.data;try{e=JSON.parse(e)}catch(f){}a.lastAjax={url:location.href.slice(0,-1)+d.url,data:e}}),a},h.prototype.debugging=function(a){var b=this;try{if(void 0===a)return"true"===localStorage.getItem(i);if(a)return localStorage.setItem(i,!0),!0;localStorage.removeItem(i),b.debuggingNamespaces(null)}catch(c){console.log(g("localStorage not available for debug flag retrieval"))}return!1},h.prototype.debuggingNamespaces=function(a){var b=this;try{if(void 0===a){var c=localStorage.getItem(j);return"string"==typeof c?c.split(","):[]}null===a?localStorage.removeItem(j):localStorage.setItem(j,a);var d=b.debuggingNamespaces();return b.logger&&(b.logger.options.consoleNamespaceWhitelist=d),d}catch(e){console.log(g("localStorage not available for debug namespace retrieval"))}},h.prototype.toString=function(){var a=this.user?this.user.get("email")||"(anonymous)":"uninitialized";return"GalaxyApp("+a+")"},{GalaxyApp:h}});
//# sourceMappingURL=../maps/galaxy-app-base.js.map
define([ "libs/underscore", "libs/backbone", "mvc/base-mvc", "mvc/user/user-model", "utils/metrics-logger", "utils/add-logging", "utils/localization" ], function(_, Backbone, BASE_MVC, userModel, metricsLogger, addLogging, localize) {
function GalaxyApp(options, bootstrapped) {
console.debug("GalaxyApp:", options, bootstrapped);
var self = this;
return self._init(options || {}, bootstrapped || {});
}
addLogging(GalaxyApp, "GalaxyApp");
var DEBUGGING_KEY = "galaxy:debug", NAMESPACE_KEY = DEBUGGING_KEY + ":namespaces", localDebugging = !1;
try {
localDebugging = "true" == localStorage.getItem(DEBUGGING_KEY);
} catch (storageErr) {
console.log(localize("localStorage not available for debug flag retrieval"));
}
return GalaxyApp.prototype._init = function(options, bootstrapped) {
var self = this;
return _.extend(self, Backbone.Events), localDebugging && (self.logger = console),
self._processOptions(options), self.debug("GalaxyApp.options: ", self.options),
self.root = options.root || "/", self._initConfig(options.config || bootstrapped.config || {}),
self.debug("GalaxyApp.config: ", self.config), self._patchGalaxy(window.Galaxy),
self._initLogger(self.options.loggerOptions || {}), self.debug("GalaxyApp.logger: ", self.logger),
self._initLocale(), self.debug("GalaxyApp.localize: ", self.localize), self.config = options.config || {},
self.debug("GalaxyApp.config: ", self.config), self._initUser(options.user || {}),
self.debug("GalaxyApp.user: ", self.user), self._setUpListeners(), self.trigger("ready", self),
self;
}, GalaxyApp.prototype.defaultOptions = {
patchExisting: !0,
root: "/"
}, GalaxyApp.prototype._processOptions = function(options) {
var self = this, defaults = self.defaultOptions;
self.debug("_processOptions: ", options), self.options = {};
for (var k in defaults) defaults.hasOwnProperty(k) && (self.options[k] = options.hasOwnProperty(k) ? options[k] : defaults[k]);
return self;
}, GalaxyApp.prototype._initConfig = function(config) {
var self = this;
return self.debug("_initConfig: ", config), self.config = config, self.config.debug = localDebugging || self.config.debug,
self;
}, GalaxyApp.prototype._patchGalaxy = function(patchWith) {
var self = this;
if (self.options.patchExisting && patchWith) {
self.debug("found existing Galaxy object:", patchWith);
for (var k in patchWith) patchWith.hasOwnProperty(k) && (self.debug(" patching in " + k + " to Galaxy"),
self[k] = patchWith[k]);
}
}, GalaxyApp.prototype._initLogger = function(loggerOptions) {
var self = this;
if (self.config.debug) {
loggerOptions.consoleLogger = loggerOptions.consoleLogger || console, loggerOptions.consoleLevel = loggerOptions.consoleLevel || metricsLogger.MetricsLogger.ALL;
try {
loggerOptions.consoleNamespaceWhitelist = localStorage.getItem(NAMESPACE_KEY).split(",");
} catch (storageErr) {}
}
return self.debug("_initLogger:", loggerOptions), self.logger = new metricsLogger.MetricsLogger(loggerOptions),
self.config.debug && (BASE_MVC.LoggableMixin.logger = self.logger), self;
}, GalaxyApp.prototype._initLocale = function(options) {
var self = this;
return self.debug("_initLocale:", options), self.localize = localize, window._l = self.localize,
self;
}, GalaxyApp.prototype._initUser = function(userJSON) {
var self = this;
return self.debug("_initUser:", userJSON), self.user = new userModel.User(userJSON),
self.user.logger = self.logger, self.currUser = self.user, self;
}, GalaxyApp.prototype._setUpListeners = function() {
var self = this;
return self.lastAjax = {}, $(document).bind("ajaxSend", function(ev, xhr, options) {
var data = options.data;
try {
data = JSON.parse(data);
} catch (err) {}
self.lastAjax = {
url: location.href.slice(0, -1) + options.url,
data: data
};
}), self;
}, GalaxyApp.prototype.debugging = function(setting) {
var self = this;
try {
if (void 0 === setting) return "true" === localStorage.getItem(DEBUGGING_KEY);
if (setting) return localStorage.setItem(DEBUGGING_KEY, !0), !0;
localStorage.removeItem(DEBUGGING_KEY), self.debuggingNamespaces(null);
} catch (storageErr) {
console.log(localize("localStorage not available for debug flag retrieval"));
}
return !1;
}, GalaxyApp.prototype.debuggingNamespaces = function(namespaces) {
var self = this;
try {
if (void 0 === namespaces) {
var csv = localStorage.getItem(NAMESPACE_KEY);
return "string" == typeof csv ? csv.split(",") : [];
}
null === namespaces ? localStorage.removeItem(NAMESPACE_KEY) : localStorage.setItem(NAMESPACE_KEY, namespaces);
var newSettings = self.debuggingNamespaces();
return self.logger && (self.logger.options.consoleNamespaceWhitelist = newSettings),
newSettings;
} catch (storageErr) {
console.log(localize("localStorage not available for debug namespace retrieval"));
}
}, GalaxyApp.prototype.toString = function() {
var userEmail = this.user ? this.user.get("email") || "(anonymous)" : "uninitialized";
return "GalaxyApp(" + userEmail + ")";
}, {
GalaxyApp: GalaxyApp
};
});
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,2 +1,2 @@
var jquery=require("jquery");window.jQuery=window.$=jquery,require("./jquery/jquery.migrate"),require("./jquery/select2"),require("./jquery/jquery.event.hover"),require("./jquery/jquery.form"),require("./jquery/jquery.rating"),require("./jquery.sparklines"),require("./bootstrap");var _=require("./underscore");window._=_;var Backbone=require("./backbone/backbone");window.Backbone=Backbone;var Handlebars=require("./handlebars.runtime");window.Handlebars=Handlebars,require("../galaxy.base"),require("../galaxy.panels"),require("../galaxy.autocom_tagging"),exports.jquery=jquery,exports._=_,exports.Backbone=Backbone,exports.Handlebars=Handlebars;
var jquery=require("jquery");window.jQuery=window.$=jquery,require("./jquery/jquery.migrate"),require("./jquery/select2"),require("./jquery/jquery.event.hover"),require("./jquery/jquery.form"),require("./jquery/jquery.rating"),require("./jquery.sparklines"),require("./bootstrap");var _=require("./underscore");window._=_;var Backbone=require("./backbone");window.Backbone=Backbone;var Handlebars=require("./handlebars.runtime");window.Handlebars=Handlebars,require("../galaxy.base"),require("../galaxy.panels"),require("../galaxy.autocom_tagging"),exports.jquery=jquery,exports._=_,exports.Backbone=Backbone,exports.Handlebars=Handlebars;
//# sourceMappingURL=../../maps/libs/common-libs.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define(["libs/underscore","libs/backbone/backbone","mvc/base-mvc","utils/localization"],function(a,b,c,d){var e="user",f=b.Model.extend(c.LoggableMixin).extend({_logNamespace:e,urlRoot:function(){return Galaxy.options.root+"api/users"},defaults:{id:null,username:"("+d("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null,is_admin:!1},initialize:function(a){this.log("User.initialize:",a),this.on("loaded",function(a,b){this.log(this+" has loaded:",a,b)}),this.on("change",function(a,b){this.log(this+" has changed:",a,b.changes)})},isAnonymous:function(){return!this.get("email")},isAdmin:function(){return this.get("is_admin")},loadFromApi:function(a,c){a=a||f.CURRENT_ID_STR,c=c||{};var d=this,e=c.success;return c.success=function(a,b){d.trigger("loaded",a,b),e&&e(a,b)},a===f.CURRENT_ID_STR&&(c.url=this.urlRoot+"/"+f.CURRENT_ID_STR),b.Model.prototype.fetch.call(this,c)},clearSessionStorage:function(){for(var a in sessionStorage)0===a.indexOf("history:")?sessionStorage.removeItem(a):"history-panel"===a&&sessionStorage.removeItem(a)},toString:function(){var a=[this.get("username")];return this.get("id")&&(a.unshift(this.get("id")),a.push(this.get("email"))),"User("+a.join(":")+")"}});f.CURRENT_ID_STR="current",f.getCurrentUserFromApi=function(a){var b=new f;return b.loadFromApi(f.CURRENT_ID_STR,a),b};b.Collection.extend(c.LoggableMixin).extend({model:f,urlRoot:function(){return Galaxy.options.root+"api/users"}});return{User:f}});
define(["libs/underscore","libs/backbone","mvc/base-mvc","utils/localization"],function(a,b,c,d){var e="user",f=b.Model.extend(c.LoggableMixin).extend({_logNamespace:e,urlRoot:function(){return Galaxy.options.root+"api/users"},defaults:{id:null,username:"("+d("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null,is_admin:!1},initialize:function(a){this.log("User.initialize:",a),this.on("loaded",function(a,b){this.log(this+" has loaded:",a,b)}),this.on("change",function(a,b){this.log(this+" has changed:",a,b.changes)})},isAnonymous:function(){return!this.get("email")},isAdmin:function(){return this.get("is_admin")},loadFromApi:function(a,c){a=a||f.CURRENT_ID_STR,c=c||{};var d=this,e=c.success;return c.success=function(a,b){d.trigger("loaded",a,b),e&&e(a,b)},a===f.CURRENT_ID_STR&&(c.url=this.urlRoot+"/"+f.CURRENT_ID_STR),b.Model.prototype.fetch.call(this,c)},clearSessionStorage:function(){for(var a in sessionStorage)0===a.indexOf("history:")?sessionStorage.removeItem(a):"history-panel"===a&&sessionStorage.removeItem(a)},toString:function(){var a=[this.get("username")];return this.get("id")&&(a.unshift(this.get("id")),a.push(this.get("email"))),"User("+a.join(":")+")"}});f.CURRENT_ID_STR="current",f.getCurrentUserFromApi=function(a){var b=new f;return b.loadFromApi(f.CURRENT_ID_STR,a),b};b.Collection.extend(c.LoggableMixin).extend({model:f,urlRoot:function(){return Galaxy.options.root+"api/users"}});return{User:f}});
//# sourceMappingURL=../../../maps/mvc/user/user-model.js.map
+2 -4
View File
@@ -46,9 +46,8 @@
${h.js(
'libs/require',
'bundled/common',
## TODO: remove when all libs are required directly in modules
'bundled/libs.bundled'
'bundled/vendor.bundled',
)}
<script type="text/javascript">
@@ -83,9 +82,8 @@
"libs/underscore": {
exports: "_"
},
"libs/backbone/backbone": {
"libs/backbone": {
deps: [ 'jquery', 'libs/underscore' ],
// deps: [ 'libs/underscore' ],
exports: "Backbone"
}
},
+2 -4
View File
@@ -52,9 +52,8 @@
${h.js(
'libs/require',
'bundled/common',
## TODO: remove when all libs are required directly in modules
'bundled/libs.bundled'
'bundled/vendor.bundled'
)}
<script type="text/javascript">
@@ -91,9 +90,8 @@
"libs/underscore": {
exports: "_"
},
"libs/backbone/backbone": {
"libs/backbone": {
deps: [ 'jquery', 'libs/underscore' ],
// deps: [ 'libs/underscore' ],
exports: "Backbone"
}
},
+1 -3
View File
@@ -29,9 +29,7 @@
</head>
<body>
<script type="text/javascript" src="/static/scripts/bundled/common.js"></script>
## TODO: remove when all libs are required directly in modules
<script type="text/javascript" src="/static/scripts/bundled/libs.bundled.js"></script>
<script type="text/javascript" src="/static/scripts/bundled/vendor.bundled.js"></script>
<script type="text/javascript" src="/static/scripts/bundled/galaxy.bundled.js"></script>
<script type="text/javascript">
window.Galaxy = new GalaxyApp(
@@ -12,7 +12,7 @@
require.config({
baseUrl: "${h.url_for('/static/scripts')}",
shim: {
"libs/backbone/backbone": { exports: "Backbone" },
"libs/backbone": { exports: "Backbone" },
},
urlArgs: 'v=${app.server_starttime}'
});
@@ -11,7 +11,7 @@
require.config({
baseUrl: "${h.url_for('/static/scripts')}",
shim: {
"libs/backbone/backbone": { exports: "Backbone" },
"libs/backbone": { exports: "Backbone" },
},
urlArgs: 'v=${app.server_starttime}'
});
+41 -28
View File
@@ -25,16 +25,46 @@
self.galaxy_config.update(config)
%>
<%def name="stylesheets()">
## load default style
${h.css("base")}
## modify default style
<style type="text/css">
#center {
%if not self.galaxy_config['left_panel']:
left: 0 !important;
%endif
%if not self.galaxy_config['right_panel']:
right: 0 !important;
%endif
}
</style>
<style type="text/css">
%if self.galaxy_config['message_box']:
#left, #left-border, #center, #right-border, #right {
top: 64px;
}
%endif
</style>
</%def>
<%def name="javascripts()">
## load jscript libraries
${h.js(
'libs/jquery/jquery-ui',
'libs/d3',
'libs/require',
'bundled/common',
## TODO: remove when all libs are required directly in modules
'bundled/libs.bundled'
'bundled/vendor.bundled',
)}
<script type="text/javascript">
console.debug( 'jQuery:', jQuery )
</script>
${h.js(
'libs/jquery/jquery-ui',
'libs/d3',
'libs/require',
)}
## send errors to Sntry server if configured
@@ -62,27 +92,6 @@
};
</script>
## load default style
${h.css("base")}
## modify default style
<style type="text/css">
#center {
%if not self.galaxy_config['left_panel']:
left: 0 !important;
%endif
%if not self.galaxy_config['right_panel']:
right: 0 !important;
%endif
}
%if self.galaxy_config['message_box']:
#left, #left-border, #center, #right-border, #right
{
top: 64px;
}
%endif
</style>
## default script wrapper
<script type="text/javascript">
## configure require
@@ -92,14 +101,18 @@
baseUrl: "${h.url_for('/static/scripts') }",
shim: {
"libs/underscore": { exports: "_" },
"libs/backbone": {
deps: [ 'jquery', 'libs/underscore' ],
exports: "Backbone"
},
"libs/d3": { exports: "d3" },
"libs/backbone/backbone": { exports: "Backbone" },
},
urlArgs: 'v=${app.server_starttime}'
});
var galaxy_config = ${ h.dumps( self.galaxy_config ) };
</script>
</%def>
<%def name="javascript_app()">
@@ -170,7 +183,7 @@
## force IE to standards mode, and prefer Google Chrome Frame if the user has already installed it
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
## load scripts
${self.stylesheets()}
${self.javascripts()}
${self.javascript_app()}
</head>
@@ -7,13 +7,13 @@
<script type='text/javascript'>
$(function() {
// HACK: add bookmarks container and header.
$('#right > .unified-panel-body > div').append(
$('#right > .unified-panel-body > div').append(
$('<div/>').attr('id', 'bookmarks-container')
.append( $('<h4/>').text('Bookmarks') )
);
});
</script>
<!--[if lt IE 9]>
<script type='text/javascript' src="${h.url_for('/static/scripts/libs/IE/excanvas.js')}"></script>
<![endif]-->
@@ -21,7 +21,7 @@
<%def name="stylesheets()">
${parent.stylesheets()}
## Style changes needed for display.
<style type="text/css">
.page-body {
@@ -41,7 +41,7 @@
</%def>
<%def name="render_item_links( visualization )">
<a
<a
href="${h.url_for( controller='/visualization', action='imp', id=trans.security.encode_id( visualization.id ) )}"
class="icon-button import"
## Needed to overwide initial width so that link is floated left appropriately.
@@ -53,11 +53,11 @@
<div id="${trans.security.encode_id( visualization.id )}" class="unified-panel-body" style="overflow:none;top:0px;"></div>
<script type="text/javascript">
require.config({
require.config({
baseUrl: "${h.url_for('/static/scripts') }",
shim: {
"libs/underscore": { exports: "_" },
"libs/backbone/backbone": { exports: "Backbone" },
"libs/backbone": { exports: "Backbone" },
},
urlArgs: 'v=${app.server_starttime}'
});
@@ -65,13 +65,13 @@
// FIXME: deliberate global required for now due to requireJS integration.
view = null;
var ui = new (trackster.TracksterUI)( "${h.url_for('/')}" )
container_element = $("#${trans.security.encode_id( visualization.id )}");
$(function() {
var is_embedded = (container_element.parents(".item-content").length > 0);
// HTML setup.
if (is_embedded) {
container_element.css( { "position": "relative" } );
@@ -87,17 +87,17 @@
view = ui.create_visualization( {
container: container_element,
name: "${config.get('title') | h}",
vis_id: "${config.get('vis_id')}",
vis_id: "${config.get('vis_id')}",
dbkey: "${config.get('dbkey')}"
},
},
${ h.dumps( config.get( 'viewport', dict() ) ) },
${ h.dumps( config['tracks'] ) },
${ h.dumps( config.get('bookmarks') ) }
);
// Set up keyboard navigation.
ui.init_keyboard_nav(view);
// HACK: set viewport height because it cannot be set automatically. Currently, max height for embedded
// elts is 25em, so use 20em.
view.viewport_container.height("20em");
@@ -108,14 +108,14 @@
${h.templates( "tool_link", "panel_section", "tool_search", "tool_form" )}
${h.js( "libs/require", "libs/jquery/jquery-ui" )}
<script type="text/javascript">
require.config({
require.config({
baseUrl: "${h.url_for('/static/scripts')}",
shim: {
"libs/underscore": { exports: "_" },
"libs/d3": { exports: "d3" },
"libs/backbone/backbone": { exports: "Backbone" },
"libs/backbone": { exports: "Backbone" },
},
urlArgs: 'v=${app.server_starttime}'
});
@@ -123,8 +123,8 @@
require(["libs/d3", "viz/sweepster"], function(d3, sweepster) {
var viz;
$(function() {
// -- Viz set up. --
$(function() {
// -- Viz set up. --
var viz = new sweepster.SweepsterVisualization(
${ h.dumps( config )}
);