", {class: 'game-container mdl-card mdl-shadow--4dp', id: 'game-'+app.id, backgroundImage: resolvedPromise, role: 'link', tabindex: 0, title: app.title, 'aria-label': app.title });
- $(outerDiv).append($("
![]()
", {src: resolvedPromise, id: 'game-'+app.id, name: app.title }));
- $(outerDiv).append($("
", {class: "game-title", html: $("
", {html: app.title} )}));
- $("#game-grid").append(outerDiv);
-
- $('#game-'+app.id).on('click', function () {
- startGame(host, app.id);
- });
- $('#game-'+app.id).keypress(function(e){
- if(e.keyCode == 13) {
- startGame(host, app.id);
- }
- });
-
- // apply CSS stylization to indicate whether the app is active
- stylizeBoxArt(host, app.id);
- }
+ $(outerDiv).append($("
", {src: resolvedPromise, name: app.title }));
}, function (failedPromise) {
- console.log('%c[index.js, showApps]', 'color: green;', 'Error! Failed to retrieve box art for app ID: ' + app.id + '. Returned value was: ' + failedPromise, '\n Host object:', host, host.toString());
-
- if ($('#game-' + app.id).length === 0) {
- // double clicking the button will cause multiple box arts to appear.
- // to mitigate this we ensure we don't add a duplicate.
- // This isn't perfect: there's lots of RTTs before the logic prevents anything
- var outerDiv = $("", {class: 'game-container mdl-card mdl-shadow--4dp', id: 'game-'+app.id, backgroundImage: "static/res/no_app_image.png" });
- $(outerDiv).append($("
![]()
", {src: "static/res/no_app_image.png", id: 'game-'+app.id, name: app.title }));
- $(outerDiv).append($("
", {class: "game-title", html: $("
", {html: app.title} )}));
- $("#game-grid").append(outerDiv);
-
- $('#game-'+app.id).on('click', function () {
- startGame(host, app.id);
- });
-
- // apply CSS stylization to indicate whether the app is active
- stylizeBoxArt(host, app.id);
- }
+ console.log('%c[index.js, showApps]', 'color: green;', 'Error! Failed to retrieve box art for app ID: ' + app.id + '. Returned value was: ' + failedPromise, '\n Host object:', host, host.toString());
+ $(outerDiv).append($("
", {src: "static/res/no_app_image.png", name: app.title }));
});
});
}, function (failedAppList) {