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

#715 - Support creating/editing collections (boxsets) in web client

This commit is contained in:
Luke Pulverenti 2014-03-07 10:53:23 -05:00
parent c353bf7d5e
commit edc7f33329
27 changed files with 486 additions and 58 deletions

View file

@ -95,6 +95,13 @@
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
}
function showNewCollectionPanel(page) {
$('#newCollectionPanel', page).panel('toggle');
$('#txtNewCollectionName', page).focus();
}
$(document).on('pageinit', "#boxsetsPage", function () {
var page = this;
@ -164,6 +171,11 @@
reloadItems(page);
});
$('#btnNewCollection', page).on('click', function () {
showNewCollectionPanel(page);
});
}).on('pagebeforeshow', "#boxsetsPage", function () {
var limit = LibraryBrowser.getDefaultPageSize();
@ -183,11 +195,35 @@
updateFilterControls(this);
});
window.BoxSetsPage = {
onNewCollectionSubmit: function() {
window.BoxSetsPage = {
onNewCollectionSubmit: function () {
Dashboard.showLoadingMsg();
var page = $(this).parents('.page');
var url = ApiClient.getUrl("Collections", {
Name: $('#txtNewCollectionName', page).val(),
IsLocked: !$('#chkEnableInternetMetadata', page).checked()
});
$.ajax({
type: "POST",
url: url
}).done(function () {
Dashboard.hideLoadingMsg();
$('#newCollectionPanel', page).panel('toggle');
reloadItems(page);
});
Dashboard.alert('Coming soon');
return false;
}
};