img, ctx, w, h;
if (imageSource !== undefined) {
- console.log(imageSource);
imageSource = imageSource.replace(patt, '');
-
img = new Image();
ctx = document.createElement('canvas').getContext('2d');
img.src = imageSource;
}
+ else
+ console.log("Modello app icon not defined");
}
/**
* Function loads teplate HTML code into script element with name provided as paramater.
}
return convPhoneNumber;
-}
\ No newline at end of file
+}
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);
}
} catch (exc) {
console.error(exc.message);
- } finally {
- // Workaround due to https://bugs.tizen.org/jira/browse/TIVI-2018
- window.setTimeout(function() {
- TopBarIcons._getApps();
- }, 1000);
}
},
*/
renderApps: function() {
$(".topBarIcons").empty();
- //$(".topBarIcons").css("display", "none");
template.compile(topBarAplicationsModel, "./css/car/components/topBarIcons/templates/topBarIconsDelegate.html", ".topBarIcons", function() {
var j = 0;
changeCssBgImageColor("." + topBarAplicationsModel[j].css, ThemeKeyColor);
}
}
- setTimeout(function() {
- // $(".topBarIcons").css("display", "block");
- }, 200);
});
},
initLaunchingAppsByVoiceRecognition: function() {