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:
parent
54d014972b
commit
88bd9c7abb
18 changed files with 44 additions and 25 deletions
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-checkbox', 'paper-dialog', 'paper-input'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-checkbox', 'paper-dialog', 'paper-input'], function (paperDialogHelper) {
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-item', 'paper-input', 'paper-fab', 'paper-item-body'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-item', 'paper-input', 'paper-fab', 'paper-item-body'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var systemInfo;
|
var systemInfo;
|
||||||
function getSystemInfo() {
|
function getSystemInfo() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-checkbox', 'paper-dialog', 'paper-fab'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-checkbox', 'paper-dialog', 'paper-fab'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentItemId;
|
var currentItemId;
|
||||||
var currentItemType;
|
var currentItemType;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'css!css/metadataeditor.css', 'paper-fab'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'css!css/metadataeditor.css', 'paper-fab'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
var currentDeferred;
|
var currentDeferred;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-dialog', 'paper-fab'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-dialog', 'paper-fab'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentItemId;
|
var currentItemId;
|
||||||
var currentFile;
|
var currentFile;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-dialog', 'paper-fab', 'paper-input', 'paper-checkbox'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-dialog', 'paper-fab', 'paper-input', 'paper-checkbox'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
var currentDeferred;
|
var currentDeferred;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-dialog', 'paper-input', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-dialog', 'paper-input', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentDeferred;
|
var currentDeferred;
|
||||||
var hasChanges;
|
var hasChanges;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentDeferred;
|
var currentDeferred;
|
||||||
var hasChanges;
|
var hasChanges;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-checkbox', 'paper-dialog', 'paper-input', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-checkbox', 'paper-dialog', 'paper-input', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentDialog;
|
var currentDialog;
|
||||||
var metadataEditorInfo;
|
var metadataEditorInfo;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-dialog', 'paper-input'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-dialog', 'paper-input'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var lastPlaylistId = '';
|
var lastPlaylistId = '';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-toggle-button'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-toggle-button'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentProgramId;
|
var currentProgramId;
|
||||||
var currentDialog;
|
var currentDialog;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['components/paperdialoghelper', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
|
|
||||||
|
|
|
@ -2877,7 +2877,7 @@
|
||||||
|
|
||||||
showSortMenu: function (options) {
|
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({
|
var dlg = paperDialogHelper.createDialog({
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
|
|
|
@ -253,7 +253,7 @@
|
||||||
|
|
||||||
function showOverlay(elem, item) {
|
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');
|
var dlg = document.createElement('paper-dialog');
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@
|
||||||
LibraryBrowser.renderGenres($('.itemGenres', dlg), item, 3);
|
LibraryBrowser.renderGenres($('.itemGenres', dlg), item, 3);
|
||||||
$('.miscTvProgramInfo', dlg).html(LibraryBrowser.getMiscInfoHtml(item));
|
$('.miscTvProgramInfo', dlg).html(LibraryBrowser.getMiscInfoHtml(item));
|
||||||
|
|
||||||
PaperDialogHelper.positionTo(dlg, elem);
|
paperdialoghelper.positionTo(dlg, elem);
|
||||||
|
|
||||||
dlg.open();
|
dlg.open();
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
|
|
||||||
function showPlaybackOverlay(resolve, reject) {
|
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({});
|
var dlg = paperDialogHelper.createDialog({});
|
||||||
|
|
||||||
|
|
|
@ -1806,6 +1806,10 @@ var AppInfo = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function returnFirstDependency(obj) {
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
function initRequire() {
|
function initRequire() {
|
||||||
|
|
||||||
var urlArgs = "v=" + (window.dashboardVersion || new Date().getDate());
|
var urlArgs = "v=" + (window.dashboardVersion || new Date().getDate());
|
||||||
|
@ -1848,6 +1852,8 @@ var AppInfo = {};
|
||||||
qualityoptions: embyWebComponentsBowerPath + "/qualityoptions",
|
qualityoptions: embyWebComponentsBowerPath + "/qualityoptions",
|
||||||
connectservice: apiClientBowerPath + '/connectservice',
|
connectservice: apiClientBowerPath + '/connectservice',
|
||||||
hammer: bowerPath + "/hammerjs/hammer.min",
|
hammer: bowerPath + "/hammerjs/hammer.min",
|
||||||
|
performanceManager: embyWebComponentsBowerPath + "/performancemanager",
|
||||||
|
focusManager: embyWebComponentsBowerPath + "/focusmanager",
|
||||||
imageLoader: embyWebComponentsBowerPath + "/images/imagehelper"
|
imageLoader: embyWebComponentsBowerPath + "/images/imagehelper"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1994,6 +2000,19 @@ var AppInfo = {};
|
||||||
define("multiserversync", [apiClientBowerPath + "/sync/multiserversync"]);
|
define("multiserversync", [apiClientBowerPath + "/sync/multiserversync"]);
|
||||||
define("offlineusersync", [apiClientBowerPath + "/sync/offlineusersync"]);
|
define("offlineusersync", [apiClientBowerPath + "/sync/offlineusersync"]);
|
||||||
define("mediasync", [apiClientBowerPath + "/sync/mediasync"]);
|
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) {
|
function init(hostingAppInfo) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
var currentDialogOptions;
|
var currentDialogOptions;
|
||||||
|
|
||||||
function submitJob(dlg, userId, syncOptions, form) {
|
function submitJob(dlg, userId, syncOptions, form, paperDialogHelper) {
|
||||||
|
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
throw new Error('userId cannot be null');
|
throw new Error('userId cannot be null');
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
|
|
||||||
PaperDialogHelper.close(dlg);
|
paperDialogHelper.close(dlg);
|
||||||
$(window.SyncManager).trigger('jobsubmit');
|
$(window.SyncManager).trigger('jobsubmit');
|
||||||
Dashboard.alert(Globalize.translate('MessageSyncJobCreated'));
|
Dashboard.alert(Globalize.translate('MessageSyncJobCreated'));
|
||||||
});
|
});
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
|
|
||||||
function showSyncMenuInternal(options) {
|
function showSyncMenuInternal(options) {
|
||||||
|
|
||||||
require(['components/paperdialoghelper', 'paper-fab'], function (paperDialogHelper) {
|
require(['paperdialoghelper', 'paper-fab'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var userId = Dashboard.getCurrentUserId();
|
var userId = Dashboard.getCurrentUserId();
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
|
|
||||||
$('form', dlg).on('submit', function () {
|
$('form', dlg).on('submit', function () {
|
||||||
|
|
||||||
submitJob(dlg, userId, options, this);
|
submitJob(dlg, userId, options, this, paperDialogHelper);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(function () {
|
define(['paperdialoghelper'], function (paperDialogHelper) {
|
||||||
|
|
||||||
var currentRecognition;
|
var currentRecognition;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
var dlg = currentDialog;
|
var dlg = currentDialog;
|
||||||
if (dlg) {
|
if (dlg) {
|
||||||
PaperDialogHelper.close(dlg);
|
paperDialogHelper.close(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
|
@ -227,7 +227,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentDialog;
|
var currentDialog;
|
||||||
function showVoiceHelp(paperDialogHelper) {
|
function showVoiceHelp() {
|
||||||
|
|
||||||
var dlg = paperDialogHelper.createDialog({
|
var dlg = paperDialogHelper.createDialog({
|
||||||
size: 'medium',
|
size: 'medium',
|
||||||
|
@ -359,7 +359,7 @@
|
||||||
currentRecognition = recognition;
|
currentRecognition = recognition;
|
||||||
|
|
||||||
if (createUI !== false) {
|
if (createUI !== false) {
|
||||||
require(['components/paperdialoghelper', 'paper-fab', 'css!voice/voice.css'], showVoiceHelp);
|
require(['paper-fab', 'css!voice/voice.css'], showVoiceHelp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,4 +378,4 @@
|
||||||
startListening: startListening
|
startListening: startListening
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
});
|
Loading…
Add table
Add a link
Reference in a new issue