mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-30 02:25:55 +01:00 
			
		
		
		
	feat: allow themes to define custom classes for categories via filter:admin.category.get
`datalist` isn't supported in all browsers but this will fallback to the original behavior. The first item in the list is the placeholder.
This commit is contained in:
		| @@ -35,14 +35,17 @@ categoriesController.get = function (req, res, callback) { | ||||
| 				req: req, | ||||
| 				res: res, | ||||
| 				category: category, | ||||
| 				customClasses: [], | ||||
| 				allCategories: data.allCategories, | ||||
| 			}, next); | ||||
| 		}, | ||||
| 		function (data) { | ||||
| 			data.category.name = translator.escape(String(data.category.name)); | ||||
|  | ||||
| 			res.render('admin/manage/category', { | ||||
| 				category: data.category, | ||||
| 				allCategories: data.allCategories, | ||||
| 				customClasses: data.customClasses, | ||||
| 			}); | ||||
| 		}, | ||||
| 	], callback); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user