mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add Add to collection buttons
This commit is contained in:
parent
9b452f3b53
commit
218e086d94
19 changed files with 481 additions and 214 deletions
|
@ -356,19 +356,13 @@
|
|||
|
||||
if (createIfNeeded && !elem.length) {
|
||||
|
||||
var html = '<div class="searchResultsOverlay ui-page-theme-b"><div style="text-align:right;padding: 1em 2em 0 0;"><button class="btnCloseSearch" data-icon="delete" data-mini="true" data-inline="true" style="margin:0;">Close</button></div>';
|
||||
var html = '<div class="searchResultsOverlay ui-page-theme-b">';
|
||||
|
||||
html += '<div class="searchResultsContainer"><div class="itemsContainer"></div></div></div>';
|
||||
|
||||
elem = $(html).appendTo(document.body).hide().trigger('create');
|
||||
|
||||
elem.createCardMenus();
|
||||
|
||||
$('.btnCloseSearch', elem).on('click', function () {
|
||||
$('.headerSearchInput').val('');
|
||||
onHeaderSearchChange('');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
return elem;
|
||||
|
@ -377,11 +371,12 @@
|
|||
function onHeaderSearchChange(val) {
|
||||
|
||||
if (val) {
|
||||
|
||||
$('.btnCloseSearch').show();
|
||||
updateSearchOverlay(getSearchOverlay(true).fadeIn('fast'), val);
|
||||
|
||||
} else {
|
||||
|
||||
$('.btnCloseSearch').hide();
|
||||
updateSearchOverlay(getSearchOverlay(false).fadeOut('fast'), val);
|
||||
}
|
||||
}
|
||||
|
@ -414,6 +409,11 @@
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
$('.btnCloseSearch').on('click', function () {
|
||||
$('.headerSearchInput').val('');
|
||||
onHeaderSearchChange('');
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pagehide', ".libraryPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue