';
+
+ html += '
';
+
+ var startAtDisplay = totalRecordCount ? startIndex + 1 : 0;
+ html += startAtDisplay + '-' + recordsEnd + ' of ' + totalRecordCount;
+
+ html += '';
+
+ if (showControls || options.viewButton || options.addSelectionButton || options.additionalButtonsHtml) {
+
+ html += '
';
+
+ if (showControls) {
+
+ html += '';
+
+ html += '';
+ }
+
+ html += (options.additionalButtonsHtml || '');
+
+ if (options.addSelectionButton) {
+ html += '';
+ }
+
+ if (options.viewButton) {
+
+ html += '';
+ }
+
+ html += '
';
+
+ if (showControls && options.showLimit !== false) {
+ var id = "selectPageSize";
+
+ var pageSizes = options.pageSizes || LibraryBrowser.getDefaultPageSizeSelections();
+
+ var optionsHtml = pageSizes.map(function (val) {
+
+ if (limit == val) {
+
+ return '
';
+
+ } else {
+ return '
';
+ }
+ }).join('');
+
+ // Add styles to defeat jquery mobile
+ html += '
';
+ }
+ }
+
+ html += '
';
+
+ return html;
+ },
+
getPagingHtml: function (query, totalRecordCount, updatePageSizeSetting, pageSizes, showLimit) {
if (query.Limit && updatePageSizeSetting !== false) {
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index 1b455fbbc7..fd2f363bed 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -222,18 +222,24 @@
$('.tapHoldMenu').popup("close").remove();
+ var displayContextItem = posterItem;
+
+ if ($(posterItem).hasClass('listviewMenuButton')) {
+ posterItem = $(posterItem).parents('.listItem')[0];
+ }
+
var itemId = posterItem.getAttribute('data-itemid');
var commands = posterItem.getAttribute('data-commands').split(',');
+ var itemType = posterItem.getAttribute('data-itemtype');
+ var mediaType = posterItem.getAttribute('data-mediatype');
+ var playbackPositionTicks = parseInt(posterItem.getAttribute('data-positionticks') || '0');
+ var playAccess = posterItem.getAttribute('data-playaccess');
+ var locationType = posterItem.getAttribute('data-locationtype');
+ var isPlaceHolder = posterItem.getAttribute('data-placeholder') == 'true';
$(posterItem).addClass('hasContextMenu');
- var promise1 = ApiClient.getItem(Dashboard.getCurrentUserId(), itemId);
- var promise2 = Dashboard.getCurrentUser();
-
- $.when(promise1, promise2).done(function (response1, response2) {
-
- var item = response1[0];
- var user = response2[0];
+ Dashboard.getCurrentUser().done(function (user) {
var html = '