From ed8249023fb7c0d429b9278c63b51ac071700987 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 26 Nov 2014 04:18:21 +0100 Subject: introduce revised views, port over changes from multiple_views branch --- web/src/js/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'web/src/js/app.js') diff --git a/web/src/js/app.js b/web/src/js/app.js index 736072dc..4ee35d60 100644 --- a/web/src/js/app.js +++ b/web/src/js/app.js @@ -1,4 +1,8 @@ $(function () { - Connection.init(); - app = React.renderComponent(ProxyApp, document.body); + window.app = React.renderComponent(ProxyApp, document.body); + var UpdateConnection = new Connection("/updates"); + UpdateConnection.onmessage = function (message) { + var m = JSON.parse(message.data); + AppDispatcher.dispatchServerAction(m); + }; }); \ No newline at end of file -- cgit v1.2.3 From 38bf34ebd9826c6f69d97906282632fbd5cff06b Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 27 Nov 2014 01:38:30 +0100 Subject: web++ --- web/src/js/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/src/js/app.js') diff --git a/web/src/js/app.js b/web/src/js/app.js index 4ee35d60..b5d50d34 100644 --- a/web/src/js/app.js +++ b/web/src/js/app.js @@ -1,5 +1,7 @@ $(function () { - window.app = React.renderComponent(ProxyApp, document.body); + ReactRouter.run(routes, function (Handler) { + React.render(, document.body); + }); var UpdateConnection = new Connection("/updates"); UpdateConnection.onmessage = function (message) { var m = JSON.parse(message.data); -- cgit v1.2.3 From 14a8d2f5b83a1ea28abbb490f6c94c43b4e1f960 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 9 Dec 2014 18:18:14 +0100 Subject: always use the app dispatcher --- web/src/js/app.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'web/src/js/app.js') diff --git a/web/src/js/app.js b/web/src/js/app.js index b5d50d34..5146cb46 100644 --- a/web/src/js/app.js +++ b/web/src/js/app.js @@ -1,10 +1,7 @@ $(function () { + window.ws = new Connection("/updates"); + ReactRouter.run(routes, function (Handler) { React.render(, document.body); }); - var UpdateConnection = new Connection("/updates"); - UpdateConnection.onmessage = function (message) { - var m = JSON.parse(message.data); - AppDispatcher.dispatchServerAction(m); - }; }); \ No newline at end of file -- cgit v1.2.3