mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework metadata manager tabs
This commit is contained in:
parent
f5fb6ccca5
commit
a7ade97b44
19 changed files with 672 additions and 824 deletions
|
@ -2,14 +2,6 @@
|
|||
|
||||
var currentItem;
|
||||
|
||||
function updateTabs(page, item) {
|
||||
|
||||
var query = MetadataEditor.getEditQueryString(item);
|
||||
|
||||
$('#btnEditMetadata', page).attr('href', 'edititemmetadata.html?' + query);
|
||||
$('#btnEditImages', page).attr('href', 'edititemimages.html?' + query);
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -22,8 +14,6 @@
|
|||
|
||||
LibraryBrowser.renderName(item, $('.itemName', page), true);
|
||||
|
||||
updateTabs(page, item);
|
||||
|
||||
reloadTitles(page, item);
|
||||
});
|
||||
}
|
||||
|
@ -192,7 +182,7 @@
|
|||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
$('.popupIdentify', page).popup('close');
|
||||
$('.popupIdentifyCollection', page).popup('close');
|
||||
|
||||
reload(page);
|
||||
|
||||
|
@ -237,29 +227,14 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#editCollectionTitlesPage", function () {
|
||||
$(document).on('pageinitdepends', "#editItemMetadataPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.libraryTree', page).on('itemclicked', function (event, data) {
|
||||
|
||||
if (data.id != currentItem.Id) {
|
||||
|
||||
MetadataEditor.currentItemId = data.id;
|
||||
MetadataEditor.currentItemType = data.itemType;
|
||||
//Dashboard.navigate('edititemmetadata.html?id=' + data.id);
|
||||
|
||||
//$.mobile.urlHistory.ignoreNextHashChange = true;
|
||||
window.location.hash = 'editItemImagesPage?id=' + data.id;
|
||||
|
||||
reload(page);
|
||||
}
|
||||
});
|
||||
|
||||
$('#btnAddItem', page).on('click', function () {
|
||||
|
||||
|
||||
var popup = $('.popupIdentify', page).popup('open');
|
||||
var popup = $('.popupIdentifyCollection', page).popup('open');
|
||||
|
||||
$('#txtLookupName', popup).val('');
|
||||
$('.collectionItemSearchResults', popup).empty();
|
||||
|
@ -279,17 +254,14 @@
|
|||
|
||||
$('.collectionItemSearchForm').off('submit', onSearchFormSubmit).on('submit', onSearchFormSubmit);
|
||||
|
||||
}).on('pagebeforeshowready', "#editCollectionTitlesPage", function () {
|
||||
$(page.querySelector('neon-animated-pages')).on('tabchange', function () {
|
||||
|
||||
var page = this;
|
||||
if (parseInt(this.selected) == 2) {
|
||||
var tabContent = page.querySelector('.collectionItemsTabContent');
|
||||
|
||||
reload(page);
|
||||
|
||||
}).on('pagebeforehide', "#editCollectionTitlesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
currentItem = null;
|
||||
reload(tabContent);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery, document, window, window.FileReader, escape);
|
Loading…
Add table
Add a link
Reference in a new issue