From 460a32a61e07e989f71f895b66ea2e64ebef63a2 Mon Sep 17 00:00:00 2001 From: brianjjones Date: Thu, 22 May 2014 14:52:40 -0700 Subject: [PATCH] Fixes for IVI-3190 - To get things to render normally Change-Id: I4b05317ce6164e7853c313d3efcffbeb58afd151 --- css/car/car.js | 6 +++--- css/car/components/topBarIcons/topBarIcons.js | 19 ++++++------------- packaging/modello-common.changes | 3 +++ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/css/car/car.js b/css/car/car.js index fde1150..2ffc4a2 100644 --- a/css/car/car.js +++ b/css/car/car.js @@ -124,9 +124,7 @@ function changeCssBgImageColor(selector, bgcolor) { img, ctx, w, h; if (imageSource !== undefined) { - console.log(imageSource); imageSource = imageSource.replace(patt, ''); - img = new Image(); ctx = document.createElement('canvas').getContext('2d'); @@ -144,6 +142,8 @@ function changeCssBgImageColor(selector, bgcolor) { img.src = imageSource; } + else + console.log("Modello app icon not defined"); } /** * Function loads teplate HTML code into script element with name provided as paramater. @@ -231,4 +231,4 @@ function formatPhoneNumber(phoneNumber) { } return convPhoneNumber; -} \ No newline at end of file +} diff --git a/css/car/components/topBarIcons/topBarIcons.js b/css/car/components/topBarIcons/topBarIcons.js index e150342..6c30c17 100644 --- a/css/car/components/topBarIcons/topBarIcons.js +++ b/css/car/components/topBarIcons/topBarIcons.js @@ -213,22 +213,24 @@ function launchApplication(id) { for (i = 0; i < list.length; i++) { var app = list[i]; - if (app.id.indexOf('Modello') >= 0) { + var subName = app.name.substr(8); + subName = subName.replace(/\./g, "_").replace(/\ /g, "_"); + if (app.name.indexOf('Modello') >= 0) { var newApp = { id: app.id, appName: app.name, - style: "background-image: url('file://" + app.iconPath + "');", + style: "background-image: url('icons/" + subName + "_icon.png');", iconPath: app.iconPath, css: "app_" + app.id.replace(/\./g, "_").replace(/\ /g, "_"), installed: true, running: TopBarIcons.runningAppName === app.id }; - if (app.id === "Modello005.HomeScreen") { + if (app.name === "Modello Homescreen") { homeScreenApp = newApp; } else { //app filter to block adding some apps into topbar - if (app.id === 'html5POC02.AMBSimulator') { + if (app.name === 'Modello AMB Simulator') { extraAppsModel.push(newApp); } else if (modelData.length < 7) { modelData.push(newApp); @@ -283,11 +285,6 @@ function launchApplication(id) { } } catch (exc) { console.error(exc.message); - } finally { - // Workaround due to https://bugs.tizen.org/jira/browse/TIVI-2018 - window.setTimeout(function() { - TopBarIcons._getApps(); - }, 1000); } }, @@ -299,7 +296,6 @@ function launchApplication(id) { */ renderApps: function() { $(".topBarIcons").empty(); - //$(".topBarIcons").css("display", "none"); template.compile(topBarAplicationsModel, "./css/car/components/topBarIcons/templates/topBarIconsDelegate.html", ".topBarIcons", function() { var j = 0; @@ -310,9 +306,6 @@ function launchApplication(id) { changeCssBgImageColor("." + topBarAplicationsModel[j].css, ThemeKeyColor); } } - setTimeout(function() { - // $(".topBarIcons").css("display", "block"); - }, 200); }); }, initLaunchingAppsByVoiceRecognition: function() { diff --git a/packaging/modello-common.changes b/packaging/modello-common.changes index 9e11809..de500d2 100644 --- a/packaging/modello-common.changes +++ b/packaging/modello-common.changes @@ -1,3 +1,6 @@ +* Thu May 22 2014 brianjjones submit/tizen_ivi/20140508.165053@655f898 +- Fixes for IVI-3190 - To get things to render normally + * Tue May 06 2014 brianjjones submit/tizen/20140424.173419@4b787b3 - Updated to work with Crosswalk. TIVI-3073 -- 2.7.4