show created category right away

v1.18.x
Baris Usakli 12 years ago
parent 916150de01
commit e896fd1fd6

@ -58,7 +58,7 @@ jQuery('.blockclass').each(function() {
var category = { var category = {
name:$('#inputName').val(), name:$('#inputName').val(),
description:$('#inputDescription').val(), description:$('#inputDescription').val(),
icon:$('#new-category-modal i').val(), icon:$('#new-category-modal i').attr('value'),
blockclass:$('#inputBlockclass').val() blockclass:$('#inputBlockclass').val()
}; };
@ -72,6 +72,9 @@ jQuery('.blockclass').each(function() {
timeout: 2000 timeout: 2000
}); });
var html = templates.prepare(templates['admin/categories'].blocks['categories']).parse({categories:[data]});
$('#entry-container').append(html);
$('#new-category-modal').modal('hide'); $('#new-category-modal').modal('hide');
} }
}); });

@ -32,9 +32,10 @@
</li> </li>
<!-- END categories --> <!-- END categories -->
</ul>
<button class="btn btn-lg btn-primary" id="save">Save</button> <button class="btn btn-lg btn-primary" id="save">Save</button>
<button class="btn btn-lg btn-primary" id="addNew">Add New</button> <button class="btn btn-lg btn-primary" id="addNew">Add New</button>
</ul>
</div> </div>
<div id="new-category-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="Add New Modal" aria-hidden="true"> <div id="new-category-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="Add New Modal" aria-hidden="true">

Loading…
Cancel
Save