1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/4db68bf05fbf/ Changeset: 4db68bf05fbf User: jeremy goecks Date: 2014-03-09 14:43:08 Summary: Charts and scatterplot: ensure they work with non-Web-root installations by using web helpers and url_for. Affected #: 2 files diff -r 341a68a7084879a631343b66db4f89883ce48702 -r 4db68bf05fbf11f413b441544c77772a22a868b1 config/plugins/visualizations/charts/templates/charts.mako --- a/config/plugins/visualizations/charts/templates/charts.mako +++ b/config/plugins/visualizations/charts/templates/charts.mako @@ -1,12 +1,4 @@ <% - scripts = [ 'jquery/jquery.js', - 'jquery/select2.js', - 'bootstrap.js', - 'require.js', - 'underscore.js', - 'backbone/backbone.js', - 'd3.js'] - root = h.url_for( "/" ) app_root = root + "plugins/visualizations/charts/static/" %> @@ -18,19 +10,23 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>${hda.name} | ${visualization_name}</title> - %for v in scripts: - <script type="text/javascript" charset="utf-8" src="${root}static/scripts/libs/${v}" ></script> - %endfor + ${h.js( 'libs/jquery/jquery', + 'libs/jquery/select2', + 'libs/bootstrap', + 'libs/require', + 'libs/underscore', + 'libs/backbone/backbone', + 'libs/d3' )} ## css - <link type="text/css" rel="Stylesheet" media="screen" href="${root}static/style/base.css"> + ${h.css( 'base' )} ## install nv.d3 module - <script type="text/javascript" charset="utf-8" src="${app_root}plugins/nv.d3.js" ></script> - <link type="text/css" rel="Stylesheet" media="screen" href="${app_root}plugins/nv.d3.css"> + ${h.javascript_link( app_root + "plugins/nv.d3.js" )} + ${h.stylesheet_link( app_root + "plugins/nv.d3.css" )} ## load merged/minified code - <script type="text/javascript" charset="utf-8" src="${app_root}build-app.js" ></script> + ${h.javascript_link( app_root + "build-app.js" )} </head><body> diff -r 341a68a7084879a631343b66db4f89883ce48702 -r 4db68bf05fbf11f413b441544c77772a22a868b1 config/plugins/visualizations/scatterplot/templates/scatterplot.mako --- a/config/plugins/visualizations/scatterplot/templates/scatterplot.mako +++ b/config/plugins/visualizations/scatterplot/templates/scatterplot.mako @@ -6,6 +6,9 @@ # optionally bootstrap data from dprov ##data = list( hda.datatype.dataset_column_dataprovider( hda, limit=10000 ) ) + + # Use root for resource loading. + root = h.url_for( '/' ) %> ## ---------------------------------------------------------------------------- @@ -16,25 +19,24 @@ <title>${title or default_title} | ${visualization_display_name}</title> ## ---------------------------------------------------------------------------- -<link type="text/css" rel="Stylesheet" media="screen" href="/static/style/base.css"> -<link type="text/css" rel="Stylesheet" media="screen" href="/static/style/jquery-ui/smoothness/jquery-ui.css"> -<link type="text/css" rel="Stylesheet" media="screen" href="/plugins/visualizations/scatterplot/static/scatterplot.css"> +${h.css( 'base', 'jquery-ui/smoothness/jquery-ui')} +${h.stylesheet_link( root + 'plugins/visualizations/scatterplot/static/scatterplot.css' )} ## ---------------------------------------------------------------------------- -<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.js"></script> -<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.migrate.js"></script> -<script type="text/javascript" src="/static/scripts/libs/jquery/jquery-ui.js"></script> -<script type="text/javascript" src="/static/scripts/libs/bootstrap.js"></script> -<script type="text/javascript" src="/static/scripts/libs/underscore.js"></script> -<script type="text/javascript" src="/static/scripts/libs/backbone/backbone.js"></script> -<script type="text/javascript" src="/static/scripts/libs/handlebars.runtime.js"></script> -<script type="text/javascript" src="/static/scripts/libs/d3.js"></script> +${h.js( 'libs/jquery/jquery', + 'libs/jquery/jquery.migrate', + 'libs/jquery/jquery-ui', + 'libs/bootstrap', + 'libs/require', + 'libs/underscore', + 'libs/backbone/backbone', + 'libs/d3', + 'libs/handlebars.runtime', + 'mvc/base-mvc', + 'mvc/ui', + 'mvc/visualization/visualization-model' )} -<script type="text/javascript" src="/static/scripts/mvc/base-mvc.js"></script> -<script type="text/javascript" src="/static/scripts/mvc/ui.js"></script> -<script type="text/javascript" src="/static/scripts/mvc/visualization/visualization-model.js"></script> - -<script type="text/javascript" src="/plugins/visualizations/scatterplot/static/scatterplot-edit.js"></script> +${h.javascript_link( root + 'plugins/visualizations/scatterplot/static/scatterplot-edit.js' )} </head> ## ---------------------------------------------------------------------------- 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.