From 527ee6674d0b82747b9cd39a530bc8f23522c304 Mon Sep 17 00:00:00 2001 From: thlo Date: Wed, 26 Dec 2012 21:58:29 +0100 Subject: Fixes and improvements of initial widget configuration. --- smarttv-client/Javascript/Main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'smarttv-client/Javascript/Main.js') diff --git a/smarttv-client/Javascript/Main.js b/smarttv-client/Javascript/Main.js index ef92172..fa3c863 100755 --- a/smarttv-client/Javascript/Main.js +++ b/smarttv-client/Javascript/Main.js @@ -38,8 +38,6 @@ var Main = { }; Main.onLoad = function() { - -// Config.init("http://192.168.1.122:8000/widget.conf"); Network.init(); Display.init(); @@ -55,6 +53,7 @@ Main.onLoad = function() { }; // Called by Config, when done +// TODO: Send sendReadyEvent early and show a splash screen during startup Main.init = function () { alert("Main.init()"); if ( Player.init() && Audio.init() && Server.init() ) { @@ -77,7 +76,7 @@ Main.init = function () { document.getElementById("splashScreen").style.display="none"; - widgetAPI.sendReadyEvent(); + widgetAPI.sendReadyEvent(); } else { alert("Failed to initialise"); @@ -86,7 +85,10 @@ Main.init = function () { }; Main.log = function (msg) { - var XHRObj = new XMLHttpRequest(); + if (Config.serverUrl == "" ) + return; + + var XHRObj = new XMLHttpRequest(); XHRObj.open("POST", Config.serverUrl + "/log", true); XHRObj.send("CLOG: " + msg); }; -- cgit v1.2.3