mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
WebUI: Implement adding categories
This commit is contained in:
parent
a939fca4ac
commit
a4dca52617
7 changed files with 71 additions and 16 deletions
|
@ -292,8 +292,8 @@ var TorrentsTableContextMenu = new Class({
|
|||
updateCategoriesSubMenu : function (category_list) {
|
||||
var categoryList = $('contextCategoryList');
|
||||
categoryList.empty();
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:newCategoryFN();"><img src="theme/list-add" alt="QBT_TR(New...)QBT_TR"/> QBT_TR(New...)QBT_TR</a>'}));
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:setCategoryFN(0);"><img src="theme/edit-clear" alt="QBT_TR(Reset)QBT_TR"/> QBT_TR(Reset)QBT_TR</a>'}));
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:torrentNewCategoryFN();"><img src="theme/list-add" alt="QBT_TR(New...)QBT_TR"/> QBT_TR(New...)QBT_TR</a>'}));
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:torrentSetCategoryFN(0);"><img src="theme/edit-clear" alt="QBT_TR(Reset)QBT_TR"/> QBT_TR(Reset)QBT_TR</a>'}));
|
||||
|
||||
var sortedCategories = []
|
||||
Object.each(category_list, function (category) {
|
||||
|
@ -304,7 +304,7 @@ var TorrentsTableContextMenu = new Class({
|
|||
var first = true;
|
||||
Object.each(sortedCategories, function (categoryName) {
|
||||
var categoryHash = genHash(categoryName);
|
||||
var el = new Element('li', {html: '<a href="javascript:setCategoryFN(\'' + categoryHash + '\');"><img src="theme/inode-directory"/> ' + escapeHtml(categoryName) + '</a>'});
|
||||
var el = new Element('li', {html: '<a href="javascript:torrentSetCategoryFN(\'' + categoryHash + '\');"><img src="theme/inode-directory"/> ' + escapeHtml(categoryName) + '</a>'});
|
||||
if (first) {
|
||||
el.addClass('separator');
|
||||
first = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue