From b008eba4ecbd2e1458c342406bdc30270bfd4fa8 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Sun, 15 Jan 2012 19:06:10 +0000 Subject: [PATCH] [#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. --- demo/js/app.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/demo/js/app.js b/demo/js/app.js index 33431f4f..a7cbff75 100755 --- a/demo/js/app.js +++ b/demo/js/app.js @@ -1,20 +1,21 @@ $(function() { - // do not like all these window globals ... - // window.$container = $('.container .right-panel'); - window.$container = $('.data-explorer-here'); + var $el = $('
'); + $el.appendTo($('.data-explorer-here')); var dataset = demoDataset(); window.dataExplorer = new recline.View.DataExplorer({ - el: window.$container + el: $el , model: dataset }); Backbone.history.start(); setupLoadFromWebstore(function(dataset) { window.dataExplorer.remove(); + var $el = $('
'); + $el.appendTo($('.data-explorer-here')); window.dataExplorer = null; window.dataExplorer = new recline.View.DataExplorer({ - model: dataset, + el: $el + , model: dataset }); - window.$container.append(window.dataExplorer.el); }); $('a.set-read-only').click(function() { window.dataExplorer.setReadOnly();