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

update dialog forms

This commit is contained in:
Luke Pulverenti 2016-03-23 15:06:36 -04:00
parent 02fd3db751
commit 76dd2768d2
6 changed files with 12 additions and 8 deletions

View file

@ -3,7 +3,7 @@
function onSubmit() { function onSubmit() {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
var panel = $(this).parents('dialog')[0]; var panel = $(this).parents('.dialog')[0];
var collectionId = $('#selectCollectionToAddTo', panel).val(); var collectionId = $('#selectCollectionToAddTo', panel).val();

View file

@ -130,7 +130,7 @@
ApiClient.downloadRemoteImage(options).then(function () { ApiClient.downloadRemoteImage(options).then(function () {
hasChanges = true; hasChanges = true;
var dlg = $(page).parents('dialog')[0]; var dlg = $(page).parents('.dialog')[0];
dialogHelper.close(dlg); dialogHelper.close(dlg);
}); });
} }

View file

@ -85,7 +85,7 @@
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
var page = $(this).parents('dialog'); var page = $(this).parents('.dialog');
var imageType = $('#selectImageType', page).val(); var imageType = $('#selectImageType', page).val();

View file

@ -18,7 +18,7 @@
} }
var form = this; var form = this;
var dlg = $(form).parents('dialog')[0]; var dlg = $(form).parents('.dialog')[0];
var name = $('#txtValue', form).val(); var name = $('#txtValue', form).val();
var type = $('#selectCollectionType', form).val(); var type = $('#selectCollectionType', form).val();
@ -63,7 +63,7 @@
return; return;
} }
var dlg = $(this).parents('dialog')[0]; var dlg = $(this).parents('.dialog')[0];
var index = this.selectedIndex; var index = this.selectedIndex;
if (index != -1) { if (index != -1) {

View file

@ -4,9 +4,13 @@
var metadataEditorInfo; var metadataEditorInfo;
var currentItem; var currentItem;
function isDialog() {
return currentContext.classList.contains('dialog');
}
function closeDialog(isSubmitted) { function closeDialog(isSubmitted) {
if (currentContext.tagName == 'DIALOG') { if (isDialog()) {
dialogHelper.close(currentContext); dialogHelper.close(currentContext);
} }
} }
@ -463,7 +467,7 @@
}); });
// For now this is only supported in dialog mode because we have a way of knowing when it closes // For now this is only supported in dialog mode because we have a way of knowing when it closes
if (currentContext.tagName == 'DIALOG') { if (isDialog()) {
bindItemChanged(context); bindItemChanged(context);
} }
} }

View file

@ -17,7 +17,7 @@
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
var panel = $(this).parents('dialog')[0]; var panel = $(this).parents('.dialog')[0];
var playlistId = $('#selectPlaylistToAddTo', panel).val(); var playlistId = $('#selectPlaylistToAddTo', panel).val();