diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js
index c465512ba..ee97b79e7 100644
--- a/dashboard-ui/apiclient/apiclient.js
+++ b/dashboard-ui/apiclient/apiclient.js
@@ -2577,9 +2577,19 @@
options.imageType = "thumb";
- var itemId = item.ImageTags && item.ImageTags.Thumb ? item.Id : item.ParentThumbItemId;
+ if (item.ImageTags && item.ImageTags.Thumb) {
- return itemId ? self.getImageUrl(itemId, options) : null;
+ options.tag = item.ImageTags.Thumb;
+ return self.getImageUrl(item.Id, options);
+ }
+ else if (item.ParentThumbItemId) {
+
+ options.tag = item.ImageTags.ParentThumbImageTag;
+ return self.getImageUrl(item.ParentThumbItemId, options);
+
+ } else {
+ return null;
+ }
};
/**
diff --git a/dashboard-ui/scripts/actionsheet.js b/dashboard-ui/scripts/actionsheet.js
index 72a2f4c05..576fd0c64 100644
--- a/dashboard-ui/scripts/actionsheet.js
+++ b/dashboard-ui/scripts/actionsheet.js
@@ -2,132 +2,130 @@
function show(options) {
- require(['paperbuttonstyle'], function () {
- // items
- // positionTo
- // showCancel
- // title
- var id = 'dlg' + new Date().getTime();
- var html = '';
+ // items
+ // positionTo
+ // showCancel
+ // title
+ var id = 'dlg' + new Date().getTime();
+ var html = '';
- var style = "";
+ var style = "";
- var windowHeight = $(window).height();
+ var windowHeight = $(window).height();
- // If the window height is under a certain amount, don't bother trying to position
- // based on an element.
- if (options.positionTo && windowHeight >= 540) {
+ // If the window height is under a certain amount, don't bother trying to position
+ // based on an element.
+ if (options.positionTo && windowHeight >= 540) {
- var pos = $(options.positionTo).offset();
+ var pos = $(options.positionTo).offset();
- pos.top += $(options.positionTo).innerHeight() / 2;
- pos.left += $(options.positionTo).innerWidth() / 2;
+ pos.top += $(options.positionTo).innerHeight() / 2;
+ pos.left += $(options.positionTo).innerWidth() / 2;
- // Account for margins
- pos.top -= 24;
- pos.left -= 24;
+ // Account for margins
+ pos.top -= 24;
+ pos.left -= 24;
- // Account for popup size - we can't predict this yet so just estimate
- pos.top -= (55 * options.items.length) / 2;
- pos.left -= 80;
+ // Account for popup size - we can't predict this yet so just estimate
+ pos.top -= (55 * options.items.length) / 2;
+ pos.left -= 80;
- // Account for scroll position
- pos.top -= $(window).scrollTop();
- pos.left -= $(window).scrollLeft();
+ // Account for scroll position
+ pos.top -= $(window).scrollTop();
+ pos.left -= $(window).scrollLeft();
- // Avoid showing too close to the bottom
- pos.top = Math.min(pos.top, $(window).height() - 300);
- pos.left = Math.min(pos.left, $(window).width() - 300);
+ // Avoid showing too close to the bottom
+ pos.top = Math.min(pos.top, $(window).height() - 300);
+ pos.left = Math.min(pos.left, $(window).width() - 300);
- // Do some boundary checking
- pos.top = Math.max(pos.top, 0);
- pos.left = Math.max(pos.left, 0);
+ // Do some boundary checking
+ pos.top = Math.max(pos.top, 0);
+ pos.left = Math.max(pos.left, 0);
- style += 'position:fixed;top:' + pos.top + 'px;left:' + pos.left + 'px';
+ style += 'position:fixed;top:' + pos.top + 'px;left:' + pos.left + 'px';
+ }
+
+ html += '';
+ html += options.title;
+ html += '
';
+ }
+
+ // There seems to be a bug with this in safari causing it to immediately roll up to 0 height
+ var isScrollable = !$.browser.safari;
+
+ if (isScrollable) {
+ html += '';
- html += options.title;
- html += '
';
+ else if (renderIcon) {
+ html += '