';
html += '
![]()
';
html += '
';
if (item.title || item.subtitle) {
@@ -316,21 +323,19 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
}
}
- function getCurrentItemId() {
-
+ function getCurrentImageInfo() {
if (swiperInstance) {
- return document.querySelector('.swiper-slide-active').getAttribute('data-itemid');
- } else {
+ var slide = document.querySelector('.swiper-slide-active');
+
+ if (slide) {
+ return {
+ url: slide.getAttribute('data-original'),
+ itemId: slide.getAttribute('data-itemid'),
+ serverId: slide.getAttribute('data-serverid')
+ };
+ }
return null;
- }
- }
-
- function getCurrentImageUrl() {
-
-
- if (swiperInstance) {
- return document.querySelector('.swiper-slide-active').getAttribute('data-original');
} else {
return null;
}
@@ -338,20 +343,20 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
function download() {
- var url = getCurrentImageUrl();
- var itemId = getCurrentItemId();
+ var imageInfo = getCurrentImageInfo();
require(['fileDownloader'], function (fileDownloader) {
- fileDownloader.download([
- {
- url: url,
- itemId: itemId
- }]);
+ fileDownloader.download([imageInfo]);
});
}
function share() {
+ var imageInfo = getCurrentImageInfo();
+
+ require(['sharingmanager'], function (sharingManager) {
+ sharingManager.showMenu(imageInfo);
+ });
}
function play() {
diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json
index 9784e3a3b7..f0167baf13 100644
--- a/dashboard-ui/bower_components/iron-icon/.bower.json
+++ b/dashboard-ui/bower_components/iron-icon/.bower.json
@@ -32,14 +32,14 @@
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
- "homepage": "https://github.com/PolymerElements/iron-icon",
+ "homepage": "https://github.com/polymerelements/iron-icon",
"_release": "1.0.8",
"_resolution": {
"type": "version",
"tag": "v1.0.8",
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
},
- "_source": "git://github.com/PolymerElements/iron-icon.git",
+ "_source": "git://github.com/polymerelements/iron-icon.git",
"_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-icon"
+ "_originalSource": "polymerelements/iron-icon"
}
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json
index bbad7fe7ba..3e8a4009a3 100644
--- a/dashboard-ui/bower_components/polymer/.bower.json
+++ b/dashboard-ui/bower_components/polymer/.bower.json
@@ -34,6 +34,6 @@
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
},
"_source": "git://github.com/Polymer/polymer.git",
- "_target": "^1.1.0",
+ "_target": "^1.0.0",
"_originalSource": "Polymer/polymer"
}
\ No newline at end of file
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index aa5beb5142..ee654b5088 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -950,6 +950,8 @@
});
}
+ var serverId = ApiClient.serverInfo().Id;
+
require(['actionsheet'], function (actionsheet) {
actionsheet.show({
@@ -961,7 +963,10 @@
case 'share':
require(['sharingmanager'], function (sharingManager) {
- sharingManager.showMenu(ApiClient, itemId);
+ sharingManager.showMenu({
+ serverId: serverId,
+ itemId: itemId
+ });
});
break;
case 'addtocollection':
@@ -990,7 +995,8 @@
fileDownloader.download([
{
url: downloadHref,
- itemId: itemId
+ itemId: itemId,
+ serverId: serverId
}]);
});
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index fa4bce8d64..3301c8202a 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -249,6 +249,7 @@
var albumid = card.getAttribute('data-albumid');
var artistid = card.getAttribute('data-artistid');
+ var serverId = ApiClient.serverInfo().Id;
Dashboard.getCurrentUser().then(function (user) {
@@ -494,7 +495,8 @@
fileDownloader.download([
{
url: downloadHref,
- itemId: itemId
+ itemId: itemId,
+ serverId: serverId
}]);
});
@@ -577,7 +579,10 @@
break;
case 'share':
require(['sharingmanager'], function (sharingManager) {
- sharingManager.showMenu(ApiClient, itemId);
+ sharingManager.showMenu({
+ serverId: serverId,
+ itemId: itemId
+ });
});
break;
case 'removefromplaylist':