fixed pagination, and loading of template blocks on cold load (temp solution)

This commit is contained in:
psychobunny
2014-03-09 22:35:09 -04:00
parent 6ea4d89edc
commit 857df86726
10 changed files with 191 additions and 154 deletions

View File

@@ -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');
});
});
}