mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
show created category right away
This commit is contained in:
@@ -58,7 +58,7 @@ jQuery('.blockclass').each(function() {
|
||||
var category = {
|
||||
name:$('#inputName').val(),
|
||||
description:$('#inputDescription').val(),
|
||||
icon:$('#new-category-modal i').val(),
|
||||
icon:$('#new-category-modal i').attr('value'),
|
||||
blockclass:$('#inputBlockclass').val()
|
||||
};
|
||||
|
||||
@@ -72,6 +72,9 @@ jQuery('.blockclass').each(function() {
|
||||
timeout: 2000
|
||||
});
|
||||
|
||||
var html = templates.prepare(templates['admin/categories'].blocks['categories']).parse({categories:[data]});
|
||||
$('#entry-container').append(html);
|
||||
|
||||
$('#new-category-modal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -32,9 +32,10 @@
|
||||
</li>
|
||||
|
||||
<!-- END categories -->
|
||||
</ul>
|
||||
|
||||
<button class="btn btn-lg btn-primary" id="save">Save</button>
|
||||
<button class="btn btn-lg btn-primary" id="addNew">Add New</button>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="new-category-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="Add New Modal" aria-hidden="true">
|
||||
|
||||
Reference in New Issue
Block a user