commit/galaxy-central: guerler: UI: Fix load order of masthead
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/efe68bbfec73/ Changeset: efe68bbfec73 User: guerler Date: 2013-11-12 17:51:36 Summary: UI: Fix load order of masthead Affected #: 1 file diff -r 5e4174bee7de7e29eb6021b2097568a4c8f597b9 -r efe68bbfec73e8367314c7751cfe24d8c515b778 templates/webapps/galaxy/galaxy.masthead.mako --- a/templates/webapps/galaxy/galaxy.masthead.mako +++ b/templates/webapps/galaxy/galaxy.masthead.mako @@ -72,38 +72,40 @@ $('<link href="' + galaxy_config.root + 'static/style/galaxy.frame.masthead.css" rel="stylesheet">').appendTo('head'); ## load galaxy js-modules - require(['galaxy.masthead', 'galaxy.menu', 'galaxy.modal', 'galaxy.frame', 'galaxy.upload'], - function(mod_masthead, mod_menu, mod_modal, mod_frame, mod_upload) - { - ## check if masthead is available - if (Galaxy.masthead) - return; + $(function() { + require(['galaxy.masthead', 'galaxy.menu', 'galaxy.modal', 'galaxy.frame', 'galaxy.upload'], + function(mod_masthead, mod_menu, mod_modal, mod_frame, mod_upload) + { + ## check if masthead is available + if (Galaxy.masthead) + return; - ## get configuration - var masthead_config = ${ h.to_json_string( masthead_config ) }; + ## get configuration + var masthead_config = ${ h.to_json_string( masthead_config ) }; - ## set up the quota meter (And fetch the current user data from trans) - Galaxy.currUser = new User(masthead_config.user.json); + ## set up the quota meter (And fetch the current user data from trans) + Galaxy.currUser = new User(masthead_config.user.json); - ## load global galaxy objects - Galaxy.masthead = new mod_masthead.GalaxyMasthead(masthead_config); - Galaxy.modal = new mod_modal.GalaxyModal(); - Galaxy.frame = new mod_frame.GalaxyFrame(); + ## load global galaxy objects + Galaxy.masthead = new mod_masthead.GalaxyMasthead(masthead_config); + Galaxy.modal = new mod_modal.GalaxyModal(); + Galaxy.frame = new mod_frame.GalaxyFrame(); - ## construct default menu options - Galaxy.menu = new mod_menu.GalaxyMenu({ - masthead: Galaxy.masthead, - config: masthead_config + ## construct default menu options + Galaxy.menu = new mod_menu.GalaxyMenu({ + masthead: Galaxy.masthead, + config: masthead_config + }); + + ## add upload plugin + ##Galaxy.upload = new mod_upload.GalaxyUpload(); + + ## add quota meter to masthead + Galaxy.quotaMeter = new UserQuotaMeter({ + model : Galaxy.currUser, + el : $(Galaxy.masthead.el).find('.quota-meter-container') + }).render(); }); - - ## add upload plugin - ##Galaxy.upload = new mod_upload.GalaxyUpload(); - - ## add quota meter to masthead - Galaxy.quotaMeter = new UserQuotaMeter({ - model : Galaxy.currUser, - el : $(Galaxy.masthead.el).find('.quota-meter-container') - }).render(); }); </script></%def> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org