mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 17:35:46 +01:00
fixed pagination, and loading of template blocks on cold load (temp solution)
This commit is contained in:
@@ -117,14 +117,17 @@ define(['uploader'], function(uploader) {
|
||||
timeout: 2000
|
||||
});
|
||||
|
||||
var html = templates.prepare(templates['admin/categories'].blocks['categories']).parse({
|
||||
categories: [data]
|
||||
});
|
||||
html = $(html);
|
||||
html.find('[data-name="bgColor"], [data-name="color"]').each(enableColorPicker);
|
||||
templates.preload_template('admin/categories', function() {
|
||||
templates['admin/categories'].parse({categories:[]});
|
||||
var html = templates.prepare(templates['admin/categories'].blocks['categories']).parse({
|
||||
categories: [data]
|
||||
});
|
||||
html = $(html);
|
||||
html.find('[data-name="bgColor"], [data-name="color"]').each(enableColorPicker);
|
||||
|
||||
$('#entry-container').append(html);
|
||||
$('#new-category-modal').modal('hide');
|
||||
$('#entry-container').append(html);
|
||||
$('#new-category-modal').modal('hide');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user