diff --git a/dashboard-ui/musicrecommended.html b/dashboard-ui/musicrecommended.html
index ff6b1f3661..8e2cf35193 100644
--- a/dashboard-ui/musicrecommended.html
+++ b/dashboard-ui/musicrecommended.html
@@ -24,14 +24,14 @@
-
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index b7a5f532b9..11743adfd7 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -557,7 +557,7 @@
},
getUserDataCssClass: function (key) {
- return 'libraryItemUserData' + key;
+ return 'libraryItemUserData' + key.replace(new RegExp(' ', 'g'), '');
},
getListViewHtml: function (options) {
@@ -605,8 +605,8 @@
var href = LibraryBrowser.getHref(item, options.context);
html += '
';
- var onclick = options.defaultAction ? (' data-action="' + options.defaultAction + '" class="itemWithAction"') : '';
- html += '';
+ var defaultActionAttribute = options.defaultAction ? (' data-action="' + options.defaultAction + '" class="itemWithAction"') : '';
+ html += '';
var imgUrl;
@@ -1089,7 +1089,13 @@
var dataAttributes = LibraryBrowser.getItemDataAttributes(item, options);
- html += '';
+ var defaultActionAttribute = options.defaultAction ? (' data-action="' + options.defaultAction + '"') : '';
+
+ if (options.defaultAction) {
+ cssClass += ' itemWithAction';
+ }
+
+ html += '';
var style = "";
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index aa92cfa984..d711a43ad5 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -727,14 +727,16 @@
var elem = this;
var action = elem.getAttribute('data-action');
- var itemId = elem.parentNode.getAttribute('data-itemid');
+ var elemWithAttributes = elem.getAttribute('data-itemid') ? elem : elem.parentNode;
+
+ var itemId = elemWithAttributes.getAttribute('data-itemid');
if (action == 'play') {
MediaController.play(itemId);
}
else if (action == 'playallfromhere') {
- var index = elem.parentNode.getAttribute('data-index');
+ var index = elemWithAttributes.getAttribute('data-index');
var itemsContainer = $(elem).parents('.itemsContainer');
closeContextMenu();
diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js
index 626cff7f08..cba8513464 100644
--- a/dashboard-ui/scripts/musicrecommended.js
+++ b/dashboard-ui/scripts/musicrecommended.js
@@ -54,7 +54,9 @@
showUnplayedIndicator: false,
shape: "homePageSquare",
showTitle: true,
- showParentTitle: true
+ showParentTitle: true,
+ defaultAction: 'play'
+
})).createCardMenus();
});
@@ -84,7 +86,9 @@
showUnplayedIndicator: false,
shape: "homePageSquare",
showTitle: true,
- showParentTitle: true
+ showParentTitle: true,
+ defaultAction: 'play'
+
})).createCardMenus();
});