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

move paper dialog helper

This commit is contained in:
Luke Pulverenti 2016-01-30 14:31:22 -05:00
parent 54d014972b
commit 88bd9c7abb
18 changed files with 44 additions and 25 deletions

View file

@ -2877,7 +2877,7 @@
showSortMenu: function (options) {
require(['components/paperdialoghelper', 'paper-dialog', 'paper-radio-button', 'paper-radio-group', 'scale-up-animation', 'fade-in-animation', 'fade-out-animation'], function (paperDialogHelper) {
require(['paperdialoghelper', 'paper-dialog', 'paper-radio-button', 'paper-radio-group', 'scale-up-animation', 'fade-in-animation', 'fade-out-animation'], function (paperDialogHelper) {
var dlg = paperDialogHelper.createDialog({
removeOnClose: true,

View file

@ -253,7 +253,7 @@
function showOverlay(elem, item) {
require(['components/paperdialoghelper', 'scale-up-animation', 'fade-out-animation'], function () {
require(['paperdialoghelper', 'scale-up-animation', 'fade-out-animation'], function (paperdialoghelper) {
var dlg = document.createElement('paper-dialog');
@ -300,7 +300,7 @@
LibraryBrowser.renderGenres($('.itemGenres', dlg), item, 3);
$('.miscTvProgramInfo', dlg).html(LibraryBrowser.getMiscInfoHtml(item));
PaperDialogHelper.positionTo(dlg, elem);
paperdialoghelper.positionTo(dlg, elem);
dlg.open();

View file

@ -97,7 +97,7 @@
function showPlaybackOverlay(resolve, reject) {
require(['components/paperdialoghelper', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
require(['paperdialoghelper', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
var dlg = paperDialogHelper.createDialog({});

View file

@ -1806,6 +1806,10 @@ var AppInfo = {};
}
}
function returnFirstDependency(obj) {
return obj;
}
function initRequire() {
var urlArgs = "v=" + (window.dashboardVersion || new Date().getDate());
@ -1848,6 +1852,8 @@ var AppInfo = {};
qualityoptions: embyWebComponentsBowerPath + "/qualityoptions",
connectservice: apiClientBowerPath + '/connectservice',
hammer: bowerPath + "/hammerjs/hammer.min",
performanceManager: embyWebComponentsBowerPath + "/performancemanager",
focusManager: embyWebComponentsBowerPath + "/focusmanager",
imageLoader: embyWebComponentsBowerPath + "/images/imagehelper"
};
@ -1994,6 +2000,19 @@ var AppInfo = {};
define("multiserversync", [apiClientBowerPath + "/sync/multiserversync"]);
define("offlineusersync", [apiClientBowerPath + "/sync/offlineusersync"]);
define("mediasync", [apiClientBowerPath + "/sync/mediasync"]);
define("paperdialoghelper", [embyWebComponentsBowerPath + "/paperdialoghelper/paperdialoghelper"], returnFirstDependency);
// alias
define("historyManager", [], function () {
return {
pushState: function (state, title, url) {
state.navigate = false;
history.pushState(state, title, url);
jQuery.onStatePushed(state);
}
};
});
}
function init(hostingAppInfo) {

View file

@ -2,7 +2,7 @@
var currentDialogOptions;
function submitJob(dlg, userId, syncOptions, form) {
function submitJob(dlg, userId, syncOptions, form, paperDialogHelper) {
if (!userId) {
throw new Error('userId cannot be null');
@ -51,7 +51,7 @@
}).then(function () {
PaperDialogHelper.close(dlg);
paperDialogHelper.close(dlg);
$(window.SyncManager).trigger('jobsubmit');
Dashboard.alert(Globalize.translate('MessageSyncJobCreated'));
});
@ -216,7 +216,7 @@
function showSyncMenuInternal(options) {
require(['components/paperdialoghelper', 'paper-fab'], function (paperDialogHelper) {
require(['paperdialoghelper', 'paper-fab'], function (paperDialogHelper) {
var userId = Dashboard.getCurrentUserId();
@ -271,7 +271,7 @@
$('form', dlg).on('submit', function () {
submitJob(dlg, userId, options, this);
submitJob(dlg, userId, options, this, paperDialogHelper);
return false;
});