1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update sharing widget

This commit is contained in:
Luke Pulverenti 2016-04-27 22:56:18 -04:00
parent 3657bdf7b7
commit acb094fa46
2 changed files with 11 additions and 4 deletions

View file

@ -94,6 +94,8 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
'filedownload'
];
features.push('sharing');
return features.indexOf(command.toLowerCase()) != -1;
},
appInfo: function () {

View file

@ -1,4 +1,4 @@
define(['dialogHelper', 'jQuery', 'thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.min', 'css!thirdparty/social-share-kit-1.0.4/dist/css/social-share-kit.css'], function (dialogHelper, $) {
define(['dialogHelper', 'thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.min', 'css!thirdparty/social-share-kit-1.0.4/dist/css/social-share-kit.css'], function (dialogHelper) {
function showMenu(options, successCallback, cancelCallback) {
@ -58,11 +58,16 @@
}
});
// Has to be assigned a z-index after the call to .open()
$('.ssk', dlg).on('click', function () {
function onSskButtonClick(e) {
isShared = true;
dialogHelper.close(dlg);
});
}
// Has to be assigned a z-index after the call to .open()
var sskButtons = dlg.querySelectorAll('.ssk');
for (var i = 0, length = sskButtons.length; i < length; i++) {
sskButtons[i].addEventListener('click', onSskButtonClick);
}
// Has to be assigned a z-index after the call to .open()
dlg.querySelector('.btnCancel').addEventListener('click', function () {