[#19,demo][s]: fix up secondarily load of webstore table in demo.
* Had been broken by f176979f5bd39e78e0c66c27dced3f7c8b2dc49b with its change to use passed in element to DataExplorer rather than internal generation of element.
This commit is contained in:
parent
a369c63812
commit
b008eba4ec
@ -1,20 +1,21 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
// do not like all these window globals ...
|
var $el = $('<div />');
|
||||||
// window.$container = $('.container .right-panel');
|
$el.appendTo($('.data-explorer-here'));
|
||||||
window.$container = $('.data-explorer-here');
|
|
||||||
var dataset = demoDataset();
|
var dataset = demoDataset();
|
||||||
window.dataExplorer = new recline.View.DataExplorer({
|
window.dataExplorer = new recline.View.DataExplorer({
|
||||||
el: window.$container
|
el: $el
|
||||||
, model: dataset
|
, model: dataset
|
||||||
});
|
});
|
||||||
Backbone.history.start();
|
Backbone.history.start();
|
||||||
setupLoadFromWebstore(function(dataset) {
|
setupLoadFromWebstore(function(dataset) {
|
||||||
window.dataExplorer.remove();
|
window.dataExplorer.remove();
|
||||||
|
var $el = $('<div />');
|
||||||
|
$el.appendTo($('.data-explorer-here'));
|
||||||
window.dataExplorer = null;
|
window.dataExplorer = null;
|
||||||
window.dataExplorer = new recline.View.DataExplorer({
|
window.dataExplorer = new recline.View.DataExplorer({
|
||||||
model: dataset,
|
el: $el
|
||||||
|
, model: dataset
|
||||||
});
|
});
|
||||||
window.$container.append(window.dataExplorer.el);
|
|
||||||
});
|
});
|
||||||
$('a.set-read-only').click(function() {
|
$('a.set-read-only').click(function() {
|
||||||
window.dataExplorer.setReadOnly();
|
window.dataExplorer.setReadOnly();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user