Fixes for IVI-3190 - To get things to render normally 46/21546/1 accepted/tizen/ivi/20140526.131027 submit/tizen_ivi/20140523.170337
authorbrianjjones <brian.j.jones@intel.com>
Thu, 22 May 2014 21:52:40 +0000 (14:52 -0700)
committerbrianjjones <brian.j.jones@intel.com>
Thu, 22 May 2014 21:59:39 +0000 (14:59 -0700)
Change-Id: I4b05317ce6164e7853c313d3efcffbeb58afd151

css/car/car.js
css/car/components/topBarIcons/topBarIcons.js
packaging/modello-common.changes

index fde1150..2ffc4a2 100644 (file)
@@ -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
+}
index e150342..6c30c17 100644 (file)
@@ -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() {
index 9e11809..de500d2 100644 (file)
@@ -1,3 +1,6 @@
+* Thu May 22 2014 brianjjones <brian.j.jones@intel.com> submit/tizen_ivi/20140508.165053@655f898
+- Fixes for IVI-3190 - To get things to render normally
+
 * Tue May 06 2014 brianjjones <brian.j.jones@intel.com> submit/tizen/20140424.173419@4b787b3
 - Updated to work with Crosswalk.  TIVI-3073