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

added ability to edit root folder

This commit is contained in:
Luke Pulverenti 2013-06-02 10:33:51 -04:00
parent 7df9991141
commit ae8058a7d5
5 changed files with 30 additions and 3 deletions

View file

@ -11,6 +11,8 @@
StartIndex: 0
};
var currentItem;
function reloadItems(page) {
Dashboard.showLoadingMsg();
@ -66,7 +68,11 @@
Dashboard.hideLoadingMsg();
});
ApiClient.getItem(userId, query.ParentId).done(function (item) {
var promise = query.ParentId ? ApiClient.getItem(userId, query.ParentId) : ApiClient.getRootFolder(userId);
promise.done(function (item) {
currentItem = item;
var name = item.Name;
@ -140,7 +146,7 @@
$('#btnEdit', page).on('click', function () {
Dashboard.navigate("edititemmetadata.html?id=" + query.ParentId);
Dashboard.navigate("edititemmetadata.html?id=" + currentItem.Id);
});
}).on('pageshow', "#itemListPage", function () {
@ -177,6 +183,11 @@
}).checkboxradio('refresh');
$('#selectView', this).val(view).selectmenu('refresh');
}).on('pagehide', "#itemListPage", function () {
currentItem = null;
});
})(jQuery, document);