mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	migrating categories to new partial templating #2230
This commit is contained in:
		@@ -181,12 +181,10 @@ define('forum/category', ['composer', 'forum/pagination', 'forum/infinitescroll'
 | 
				
			|||||||
	Category.onNewTopic = function(topic) {
 | 
						Category.onNewTopic = function(topic) {
 | 
				
			||||||
		$(window).trigger('filter:categories.new_topic', topic);
 | 
							$(window).trigger('filter:categories.new_topic', topic);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		ajaxify.loadTemplate('category', function(categoryTemplate) {
 | 
							templates.parse('category', 'topics', {
 | 
				
			||||||
			var html = templates.parse(templates.getBlock(categoryTemplate, 'topics'), {
 | 
					 | 
				
			||||||
			privileges: {editable: !!$('.thread-tools').length},
 | 
								privileges: {editable: !!$('.thread-tools').length},
 | 
				
			||||||
			topics: [topic]
 | 
								topics: [topic]
 | 
				
			||||||
			});
 | 
							}, function(html) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
			translator.translate(html, function(translatedHTML) {
 | 
								translator.translate(html, function(translatedHTML) {
 | 
				
			||||||
				var topic = $(translatedHTML),
 | 
									var topic = $(translatedHTML),
 | 
				
			||||||
					container = $('#topics-container'),
 | 
										container = $('#topics-container'),
 | 
				
			||||||
@@ -276,9 +274,7 @@ define('forum/category', ['composer', 'forum/pagination', 'forum/infinitescroll'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		findInsertionPoint();
 | 
							findInsertionPoint();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ajaxify.loadTemplate('category', function(categoryTemplate) {
 | 
							templates.parse('category', 'topics', data, function(html) {
 | 
				
			||||||
			var html = templates.parse(templates.getBlock(categoryTemplate, 'topics'), data);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			translator.translate(html, function(translatedHTML) {
 | 
								translator.translate(html, function(translatedHTML) {
 | 
				
			||||||
				var container = $('#topics-container'),
 | 
									var container = $('#topics-container'),
 | 
				
			||||||
					html = $(translatedHTML);
 | 
										html = $(translatedHTML);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user