diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index f20b0c734e..122db24dd1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.2.53", - "_release": "1.2.53", + "version": "1.2.56", + "_release": "1.2.56", "_resolution": { "type": "version", - "tag": "1.2.53", - "commit": "818133a9b1b4b241b6f0e8e1733da3358bb02df5" + "tag": "1.2.56", + "commit": "1f1194a244b476b500d3fabe85f469b6420182f8" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/sharing/sharingmanager.js b/dashboard-ui/bower_components/emby-webcomponents/sharing/sharingmanager.js index 9ac2787574..facbbc39e1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/sharing/sharingmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/sharing/sharingmanager.js @@ -1,10 +1,5 @@ define(['connectionManager', 'sharingMenu', 'loading'], function (connectionManager, sharingMenu, loading) { - function onSharingSuccess(options) { - - console.log('share success. shareId: ' + options.share.Id); - } - function onSharingCancel(options, apiClient) { var shareId = options.share.Id; @@ -24,7 +19,7 @@ loading.show(); var itemId = options.itemId; - var apiClient = options.apiClient || connectionManager.getApiClient(options.serverId); + var apiClient = connectionManager.getApiClient(options.serverId); var userId = apiClient.getCurrentUserId(); return apiClient.getItem(userId, itemId).then(function () { @@ -45,7 +40,10 @@ }; loading.hide(); - sharingMenu.showMenu(options, onSharingSuccess, function (options) { + + sharingMenu.showMenu(options).then(function() { + console.log('share success. shareId: ' + options.share.Id); + }, function () { onSharingCancel(options, apiClient); }); diff --git a/dashboard-ui/components/sharingwidget.js b/dashboard-ui/bower_components/emby-webcomponents/sharing/sharingmenu.js similarity index 65% rename from dashboard-ui/components/sharingwidget.js rename to dashboard-ui/bower_components/emby-webcomponents/sharing/sharingmenu.js index 87f87d400a..7c1f57b99a 100644 --- a/dashboard-ui/components/sharingwidget.js +++ b/dashboard-ui/bower_components/emby-webcomponents/sharing/sharingmenu.js @@ -1,6 +1,6 @@ -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) { +define(['dialogHelper', 'dialogText', './social-share-kit-1.0.4/dist/js/social-share-kit.min', 'css!./social-share-kit-1.0.4/dist/css/social-share-kit.css'], function (dialogHelper, dialogText) { - function showMenu(options, successCallback, cancelCallback) { + function showMenu(options) { var dlg = dialogHelper.createDialog({ removeOnClose: true, @@ -10,25 +10,19 @@ dlg.id = 'dlg' + new Date().getTime(); var html = ''; - html += '

' + Globalize.translate('HeaderShare') + '

'; + html += '

' + Globalize.translate('Share') + '

'; html += '
'; html += '
'; // We can only do facebook if we can guarantee that the current page is available over the internet, since FB will try to probe it. - if (Dashboard.isConnectMode()) { - html += ''; - } + html += ''; html += '
'; html += '
'; - html += '
'; - html += Globalize.translate('ButtonShareHelp'); - html += '
'; - html += '
'; - html += '' + Globalize.translate('ButtonCancel') + ''; + html += '' + dialogText.get('Cancel') + ''; html += '
'; dlg.innerHTML = html; @@ -48,16 +42,6 @@ via: 'Emby' }); - // Has to be assigned a z-index after the call to .open() - dlg.addEventListener('close', function () { - - if (isShared) { - successCallback(options); - } else { - cancelCallback(options); - } - }); - function onSskButtonClick(e) { isShared = true; dialogHelper.close(dlg); @@ -74,7 +58,20 @@ dialogHelper.close(dlg); }); + var promise = new Promise(function (resolve, reject) { + + dlg.addEventListener('close', function () { + if (isShared) { + resolve(); + } else { + reject(); + } + }); + }); + dialogHelper.open(dlg); + + return promise; } return { diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/LICENSE b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/LICENSE similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/LICENSE rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/LICENSE diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/css/social-share-kit.css b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/css/social-share-kit.css similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/css/social-share-kit.css rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/css/social-share-kit.css diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.eot b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.eot similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.eot rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.eot diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.svg b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.svg similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.svg rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.svg diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.ttf b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.ttf similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.ttf rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.ttf diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.woff b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.woff similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/fonts/social-share-kit.woff rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/fonts/social-share-kit.woff diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.js b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/js/social-share-kit.js similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.js rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/js/social-share-kit.js diff --git a/dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.min.js b/dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/js/social-share-kit.min.js similarity index 100% rename from dashboard-ui/thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.min.js rename to dashboard-ui/bower_components/emby-webcomponents/sharing/social-share-kit-1.0.4/dist/js/social-share-kit.min.js 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/site.js b/dashboard-ui/scripts/site.js index 9da42d37d2..f182dfdbbe 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1647,10 +1647,10 @@ var AppInfo = {}; paths.wakeonlan = "cordova/wakeonlan"; paths.actionsheet = "cordova/actionsheet"; } else { - paths.sharingMenu = "components/sharingwidget"; paths.serverdiscovery = apiClientBowerPath + "/serverdiscovery"; paths.wakeonlan = apiClientBowerPath + "/wakeonlan"; + define("sharingMenu", [embyWebComponentsBowerPath + "/sharing/sharingmenu"], returnFirstDependency); define("actionsheet", [embyWebComponentsBowerPath + "/actionsheet/actionsheet"], returnFirstDependency); } diff --git a/dashboard-ui/strings/en-US.json b/dashboard-ui/strings/en-US.json index 9ac4fb5f98..85e3101f70 100644 --- a/dashboard-ui/strings/en-US.json +++ b/dashboard-ui/strings/en-US.json @@ -2221,8 +2221,7 @@ "ErrorMessageUsernameInUse": "The username is already in use. Please choose a new name and try again.", "ErrorMessageEmailInUse": "The email address is already in use. Please enter a new email address and try again, or use the forgot password feature.", "MessageThankYouForConnectSignUp": "Thank you for signing up for Emby Connect. An email will be sent to your address with instructions on how to confirm your new account. Please confirm the account and then return here to sign in.", - "HeaderShare": "Share", - "ButtonShareHelp": "Share a web page containing media information with social media. Media files are never shared publicly.", + "Share": "Share", "ButtonShare": "Share", "HeaderConfirm": "Confirm", "MessageConfirmDeleteTunerDevice": "Are you sure you wish to delete this device?",