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

@ -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() {
Dashboard.showLoadingMsg();

View File

@ -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;
function getSystemInfo() {

View File

@ -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 currentItemType;

View File

@ -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 currentDeferred;

View File

@ -1,4 +1,4 @@
define(['components/paperdialoghelper', 'paper-dialog', 'paper-fab'], function (paperDialogHelper) {
define(['paperdialoghelper', 'paper-dialog', 'paper-fab'], function (paperDialogHelper) {
var currentItemId;
var currentFile;

View File

@ -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 currentDeferred;

View File

@ -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 hasChanges;

View File

@ -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 hasChanges;

View File

@ -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 metadataEditorInfo;

View File

@ -1,4 +1,4 @@
define(['components/paperdialoghelper', 'paper-dialog', 'paper-input'], function (paperDialogHelper) {
define(['paperdialoghelper', 'paper-dialog', 'paper-input'], function (paperDialogHelper) {
var lastPlaylistId = '';

View File

@ -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 currentDialog;

View File

@ -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;

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;
});

View File

@ -1,4 +1,4 @@
(function () {
define(['paperdialoghelper'], function (paperDialogHelper) {
var currentRecognition;
@ -87,7 +87,7 @@
var dlg = currentDialog;
if (dlg) {
PaperDialogHelper.close(dlg);
paperDialogHelper.close(dlg);
}
resolve();
@ -227,7 +227,7 @@
}
var currentDialog;
function showVoiceHelp(paperDialogHelper) {
function showVoiceHelp() {
var dlg = paperDialogHelper.createDialog({
size: 'medium',
@ -359,7 +359,7 @@
currentRecognition = recognition;
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
};
})();
});