From cb5cf25ef19553d098f35ad9363b85fcd621e5a1 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Sat, 28 Jan 2012 07:58:00 +0000 Subject: [PATCH] [demo/js][s]: minor bugfixes to demo re webstore dataset load. * change demo webstore url to one that works * fix up bug with non-hiding of graph on load of new dataset from e.g. the webstore --- demo/js/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/demo/js/app.js b/demo/js/app.js index a7cbff75..e421d894 100755 --- a/demo/js/app.js +++ b/demo/js/app.js @@ -16,6 +16,10 @@ $(function() { el: $el , model: dataset }); + // HACK (a bit). Issue is that Backbone will not trigger the route + // if you are already at that location so we have to make sure we genuinely switch + window.dataExplorer.router.navigate('graph'); + window.dataExplorer.router.navigate('', true); }); $('a.set-read-only').click(function() { window.dataExplorer.setReadOnly(); @@ -53,7 +57,7 @@ function demoDataset() { function setupLoadFromWebstore(callback) { // pre-populate webstore load form with an example url - var demoUrl = 'http://webstore.test.ckan.org/rufuspollock/demo/data'; + var demoUrl = 'http://webstore.thedatahub.org/rufuspollock/gold_prices/data'; $('form.webstore-load input[name="source"]').val(demoUrl); $('form.webstore-load').submit(function(e) { e.preventDefault();