Skip to content

Commit

Permalink
Modified python templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerdinacan committed Nov 10, 2018
1 parent 4ed27cf commit d4ab893
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 27 deletions.
8 changes: 0 additions & 8 deletions templates/base.mako
Expand Up @@ -66,14 +66,6 @@
'bundled/extended.bundled'
)}
<script type="text/javascript">
## global configuration object
## TODO: remove
window.Galaxy = window.Galaxy || {};
window.Galaxy.root = '${h.url_for( "/" )}';
window.Galaxy.config = {};
</script>
%if not form_input_auto_focus is UNDEFINED and form_input_auto_focus:
<script type="text/javascript">
$(document).ready( function() {
Expand Down
17 changes: 11 additions & 6 deletions templates/galaxy_client_app.mako
Expand Up @@ -14,14 +14,19 @@ ${ h.dumps( dictionary, indent=( 2 if trans.debug else 0 ) ) }
);
%endfor
window.Galaxy = new window.top.bundleEntries.GalaxyApp({
root : '${h.url_for( "/" )}',
config : ${ render_json( get_config_dict() )},
user : ${ render_json( get_user_dict() )},
session_csrf_token : '${ trans.session_csrf_token }'
}, bootstrapped );
var options = {
root: '${h.url_for( "/" )}',
config: ${ render_json( get_config_dict() )},
user: ${ render_json( get_user_dict() )},
session_csrf_token: '${ trans.session_csrf_token }'
};
window.bundleEntries.setGalaxyInstance(function(GalaxyApp) {
return new GalaxyApp(options, bootstrapped);
});
%if app:
console.warn("Does app ever run? Is it ever not-named app?");
require([ '${app}' ]);
%endif
Expand Down
6 changes: 0 additions & 6 deletions templates/js-app.mako
Expand Up @@ -63,12 +63,6 @@
</script>
%endif
<script type="text/javascript">
// this is needed *before* the app code is loaded - many MVC access Galaxy.root for their url
// TODO: change this by using a common Backbone.Model base class and url fn
window.Galaxy = { root: '${ options[ "root" ] }' };
</script>
%if not form_input_auto_focus is UNDEFINED and form_input_auto_focus:
<script type="text/javascript">
$(document).ready( function() {
Expand Down
3 changes: 0 additions & 3 deletions templates/webapps/galaxy/galaxy.masthead.mako
Expand Up @@ -37,9 +37,6 @@
## load the frame manager
<script type="text/javascript">
if( !window.Galaxy ){
Galaxy = {};
}
// if we're in an iframe, create styles that hide masthead/messagebox, and reset top for panels
// note: don't use a link to avoid roundtrip request
Expand Down
5 changes: 1 addition & 4 deletions templates/webapps/galaxy/galaxy.panels.mako
Expand Up @@ -52,10 +52,7 @@
</%def>
<%def name="javascripts()">
<script>
window.Galaxy = window.Galaxy || {};
window.Galaxy.root = '${h.url_for( "/" )}';
</script>
## Send errors to Sentry server if configured
%if app.config.sentry_dsn:
${h.js( "libs/raven" )}
Expand Down

0 comments on commit d4ab893

Please sign in to comment.