Skip to content

Commit

Permalink
Bundle sweepster.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Dec 13, 2017
1 parent a3b25a3 commit f028957
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
4 changes: 3 additions & 1 deletion client/galaxy/scripts/apps/extended.js
Expand Up @@ -3,6 +3,7 @@ import WorkflowView from "mvc/workflow/workflow-view";
import Trackster from "viz/trackster";
import Circster from "viz/circster";
import Phyloviz from "viz/phyloviz";
import Sweepster from "viz/sweepster";
import GalaxyLibrary from "galaxy.library";
import AdminToolshed from "admin.toolshed";
import Masthead from "layout/masthead";
Expand Down Expand Up @@ -173,10 +174,11 @@ export const bundleEntries = {
history: historyEntry,
History: History.History,
HistoryContents: HistoryContents.HistoryContents,
SweepsterVisualization: Sweepster.SweepsterVisualization,
SweepsterVisualizationView: Sweepster.SweepsterVisualizationView,
HistoryCopyDialog,
HistoryViewAnnotated,
Trackster
};

console.debug(bundleEntries);
window.bundleEntries = bundleEntries;
32 changes: 7 additions & 25 deletions templates/webapps/galaxy/visualization/sweepster.mako
Expand Up @@ -109,31 +109,13 @@
${h.js( "libs/jquery/jquery-ui" )}
<script type="text/javascript">
// require.config({
// baseUrl: "${h.url_for('/static/scripts') }",
// shim: {
// "libs/underscore": { exports: "_" },
// "libs/backbone": {
// deps: [ 'jquery', 'libs/underscore' ],
// exports: "Backbone"
// },
// "libs/d3": { exports: "d3" },
// },
// // cache buster based on templated server (re)start time
// urlArgs: 'v=${app.server_starttime}'
// });
require(["viz/sweepster"], function(sweepster) {
var viz;
$(function() {
// -- Viz set up. --
var viz = new sweepster.default.SweepsterVisualization(
${ h.dumps( config )}
);
var viz_view = new sweepster.default.SweepsterVisualizationView({ model: viz });
viz_view.render();
});
$(function() {
// -- Viz set up. --
var viz = new window.bundleEntries.SweepsterVisualization(
${ h.dumps( config )}
);
var viz_view = new window.bundleEntries.SweepsterVisualizationView({ model: viz });
viz_view.render();
});
</script>
</%def>
Expand Down

0 comments on commit f028957

Please sign in to comment.