[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
This commit is contained in:
@@ -16,6 +16,10 @@ $(function() {
|
|||||||
el: $el
|
el: $el
|
||||||
, model: dataset
|
, 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() {
|
$('a.set-read-only').click(function() {
|
||||||
window.dataExplorer.setReadOnly();
|
window.dataExplorer.setReadOnly();
|
||||||
@@ -53,7 +57,7 @@ function demoDataset() {
|
|||||||
|
|
||||||
function setupLoadFromWebstore(callback) {
|
function setupLoadFromWebstore(callback) {
|
||||||
// pre-populate webstore load form with an example url
|
// 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 input[name="source"]').val(demoUrl);
|
||||||
$('form.webstore-load').submit(function(e) {
|
$('form.webstore-load').submit(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user