cmc-sales/app/webroot/js/costing_dialog.js
2013-03-23 16:25:52 +11:00

55 lines
1.1 KiB
JavaScript
Executable file

$(function() {
$("#costingdiv").dialog({
autoOpen: false,
height: 800,
width: 800,
modal: true,
buttons: {
'Add Costing': function() {
$.post("/line_items/ajaxSave", $("#LineItemAddForm").serialize(), function(data) {
fetchTable();
$('#mydebug').html(data);
}
);
$("#LineItemAddForm").resetForm();
$(this).dialog('close');
},
Cancel: function() {
$(this).dialog('close');
}
},
close: function() {
}
});
/**
* When add costing button is pressed. Bring up costing dialog
*/
$("#addCostingDialog").button().click(function () {
$.get('/costings/add/', function(data) {
$("#costingdiv").html(data);
$('#costingdiv').dialog('open');
})
});
});
function AjaxFetchPage() {
$.post("/costings/", $("#LineItemQuoteId").serialize(), function (itemTable) {
$("#productTable").html(itemTable);
});
}