WebUI: Improve subcategories

Now they should fully match GUI behavior, please let me know if I missed something.
Still plenty of room to improve them further (e.g styling/CSS) but for now I wanted to keep the changes to the minimum.

Also included small tweaks to category context menu actions.

PR #21269.
This commit is contained in:
skomerko 2024-09-08 09:21:11 +02:00 committed by GitHub
parent f00c5c9fa3
commit 1b53fdf9ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 179 additions and 72 deletions

View file

@ -597,10 +597,7 @@ const initializeWindows = function() {
paddingVertical: 0,
paddingHorizontal: 0,
width: 400,
height: 150,
onCloseComplete: function() {
updateMainData();
}
height: 150
});
}
};
@ -642,7 +639,6 @@ const initializeWindows = function() {
width: 400,
height: 150
});
updateMainData();
};
createSubcategoryFN = function(categoryHash) {
@ -662,7 +658,6 @@ const initializeWindows = function() {
width: 400,
height: 150
});
updateMainData();
};
editCategoryFN = function(categoryHash) {
@ -682,7 +677,6 @@ const initializeWindows = function() {
width: 400,
height: 150
});
updateMainData();
};
removeCategoryFN = function(categoryHash) {
@ -692,9 +686,12 @@ const initializeWindows = function() {
method: "post",
data: {
categories: categoryName
},
onSuccess: function() {
setCategoryFilter(CATEGORIES_ALL);
updateMainData();
}
}).send();
setCategoryFilter(CATEGORIES_ALL);
};
deleteUnusedCategoriesFN = function() {
@ -709,9 +706,12 @@ const initializeWindows = function() {
method: "post",
data: {
categories: categories.join("\n")
},
onSuccess: function() {
setCategoryFilter(CATEGORIES_ALL);
updateMainData();
}
}).send();
setCategoryFilter(CATEGORIES_ALL);
};
startTorrentsByCategoryFN = function(categoryHash) {