cmc-sales/php/app/webroot/js/costing_dialog.js

55 lines
1.1 KiB
JavaScript
Raw Normal View History

$(function() {
2010-05-30 22:54:44 -07:00
$("#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() {
}
});
2010-05-30 22:54:44 -07:00
/**
* 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');
2010-05-30 22:54:44 -07:00
})
});
});
2010-05-30 22:54:44 -07:00
function AjaxFetchPage() {
$.post("/costings/", $("#LineItemQuoteId").serialize(), function (itemTable) {
$("#productTable").html(itemTable);
});
}