summaryrefslogtreecommitdiff
path: root/src/components/HMI/app/view/info/appsView.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/HMI/app/view/info/appsView.js')
-rw-r--r--src/components/HMI/app/view/info/appsView.js37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/components/HMI/app/view/info/appsView.js b/src/components/HMI/app/view/info/appsView.js
index c1d123c0b..81d1ce510 100644
--- a/src/components/HMI/app/view/info/appsView.js
+++ b/src/components/HMI/app/view/info/appsView.js
@@ -58,23 +58,30 @@ SDL.InfoAppsView = Em.ContainerView
this.listOfApplications.list.refresh();
- var i, apps = SDL.SDLModel.registeredApps, appIndex;
+ var i, apps = SDL.SDLModel.updatedAppsList, btn, appIndex;
for (i = 0; i < apps.length; i++) {
- appIndex = SDL.SDLModel.registeredApps.indexOf(apps[i]);
-
- this.get('listOfApplications.list.childViews')
- .pushObject(SDL.Button.create( {
- action: 'onActivateSDLApp',
- target: 'SDL.SDLController',
- text: apps[i].appName + " - " + apps[i].deviceName,
- appName: apps[i].appName,
- appID: apps[i].appID,
- classNames: 'list-item button',
- iconBinding: 'SDL.SDLModel.registeredApps.' + appIndex
- + '.appIcon'
- }));
+ btn = {
+ action: 'onActivateSDLApp',
+ target: 'SDL.SDLController',
+ text: apps[i].appName + " - " + apps[i].deviceName,
+ appName: apps[i].appName,
+ appID: apps[i].appID,
+ classNames: 'list-item button',
+ disabled: apps[i].greyOut
+ };
+
+ if (SDL.SDLController.getApplicationModel(apps[i].appID)) {
+ var index = SDL.SDLModel.registeredApps.indexOf(
+ SDL.SDLController.getApplicationModel(apps[i].appID)
+ );
+ btn.iconBinding = 'SDL.SDLModel.registeredApps.' + index + '.appIcon';
+ } else {
+ btn.icon = apps[i].icon ? apps[i].icon : SDL.SDLModel.defaultListOfIcons.app;
+ }
+
+ this.get('listOfApplications.list.childViews').pushObject(SDL.Button.create(btn));
}
},
@@ -145,4 +152,4 @@ SDL.InfoAppsView = Em.ContainerView
/** Items */
items: new Array()
})
- }); \ No newline at end of file
+ });