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 = {
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 -->
<button class="btn btn-lg btn-primary" id="save">Save</button>
<button class="btn btn-lg btn-primary" id="addNew">Add New</button>
</ul>
<button class="btn btn-lg btn-primary" id="save">Save</button>
<button class="btn btn-lg btn-primary" id="addNew">Add New</button>
</div>
<div id="new-category-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="Add New Modal" aria-hidden="true">

Loading…
Cancel
Save