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