Fixed issue with item modals not displaying.

Moved item modal code to an includable file.
This commit is contained in:
Tom Price
2015-01-22 19:26:16 +00:00
parent 7f2c4d2f18
commit 5c236819f4
4 changed files with 80 additions and 67 deletions

View File

@@ -42,6 +42,8 @@ $('#item-table').on('click', '.item-add', function () {
$('#item_description').val('');
$('#item_quantity').val('');
$('#item_cost').val('');
$($(this).data('target')).modal('show');
});
$('#item-table').on('click', '.item-edit', function () {
@@ -55,6 +57,8 @@ $('#item-table').on('click', '.item-edit', function () {
$('#item_description').val(fields.description);
$('#item_quantity').val(fields.quantity);
$('#item_cost').val(fields.cost);
$($(this).data('target')).modal('show');
});
$('body').on('submit', '#item-form', function (e) {