mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update startup wizard
This commit is contained in:
parent
681639cc95
commit
b4c8cb07c9
16 changed files with 256 additions and 70 deletions
|
@ -221,7 +221,7 @@
|
|||
|
||||
var html = '';
|
||||
html += '<h2 class="dialogHeader">';
|
||||
html += '<button type="button" is="emby-button" icon="arrow-back" class="fab mini btnCloseDialog" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||
html += '<button type="button" is="emby-button" icon="arrow-back" class="fab mini btnCloseDialog autoSize" tabindex="-1"><i class="md-icon">arrow_back</i></button>';
|
||||
html += '<div style="display:inline-block;margin-left:.6em;vertical-align:middle;">' + (options.header || Globalize.translate('HeaderSelectPath')) + '</div>';
|
||||
html += '</h2>';
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
var currentItem;
|
||||
var currentItemType;
|
||||
var currentDeferred;
|
||||
var currentResolve;
|
||||
var currentReject;
|
||||
var hasChanges = false;
|
||||
var currentSearchResult;
|
||||
|
||||
|
@ -288,7 +289,8 @@
|
|||
currentItemType = currentItem.Type;
|
||||
|
||||
var dlg = dialogHelper.createDialog({
|
||||
size: 'medium'
|
||||
size: 'medium',
|
||||
removeOnClose: true
|
||||
});
|
||||
|
||||
dlg.classList.add('ui-body-b');
|
||||
|
@ -336,9 +338,12 @@
|
|||
|
||||
function onDialogClosed() {
|
||||
|
||||
$(this).remove();
|
||||
loading.hide();
|
||||
currentDeferred.resolveWith(null, [hasChanges]);
|
||||
if (hasChanges) {
|
||||
currentResolve();
|
||||
} else {
|
||||
currentReject();
|
||||
}
|
||||
}
|
||||
|
||||
function showEditorFindNew(itemName, itemYear, itemType, resolveFunc) {
|
||||
|
@ -417,13 +422,14 @@
|
|||
return {
|
||||
show: function (itemId) {
|
||||
|
||||
var deferred = jQuery.Deferred();
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
currentDeferred = deferred;
|
||||
hasChanges = false;
|
||||
currentResolve = resolve;
|
||||
currentReject = reject;
|
||||
hasChanges = false;
|
||||
|
||||
showEditor(itemId);
|
||||
return deferred.promise();
|
||||
showEditor(itemId);
|
||||
});
|
||||
},
|
||||
|
||||
showFindNew: function (itemName, itemYear, itemType) {
|
||||
|
|
|
@ -311,7 +311,9 @@
|
|||
switch (id) {
|
||||
|
||||
case 'identify':
|
||||
LibraryBrowser.identifyItem(currentItem.Id);
|
||||
LibraryBrowser.identifyItem(currentItem.Id).then(function () {
|
||||
reload(context, currentItem.Id);
|
||||
});
|
||||
break;
|
||||
case 'refresh':
|
||||
showRefreshMenu(context, button);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue