2010-03-17 15:54:12 -07:00
|
|
|
/*
|
|
|
|
|
* filename: findcustomer.js
|
|
|
|
|
*
|
|
|
|
|
* used in: customers/find.ctp
|
|
|
|
|
* @todo: This doesn't update the ID for some reason.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#customerName").autocomplete({
|
|
|
|
|
source: "/customers/completeCustomer",
|
2010-03-29 15:24:17 -07:00
|
|
|
minLength: 3,
|
2010-03-17 15:54:12 -07:00
|
|
|
select: function(event, ui) {
|
|
|
|
|
$("#CustomerId").val(ui.item.id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
);
|