69 lines
846 B
JavaScript
69 lines
846 B
JavaScript
/*
|
|
* file: search.js
|
|
|
|
* Powers AJAX search of records in the CMC Sales System.
|
|
*
|
|
*
|
|
*/
|
|
|
|
$(function() {
|
|
|
|
$("#ajaxLoading").hide();
|
|
|
|
|
|
$("#ajaxLoading").bind("ajaxSend", function() {
|
|
$(this).show();
|
|
}).bind("ajaxComplete", function() {
|
|
$(this).hide();
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#dialogDiv").hide();
|
|
|
|
|
|
|
|
$("#dialogDiv").dialog({
|
|
autoOpen: false,
|
|
width: 900,
|
|
height: 900,
|
|
modal: true
|
|
|
|
});
|
|
|
|
|
|
$("#searchLink").click(function() {
|
|
|
|
$("#dialogDiv").dialog('open');
|
|
return false;
|
|
});
|
|
|
|
$("#searchButton").button().click(function() {
|
|
|
|
doSearch();
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function doSearch() {
|
|
$.post("/enquiries/doSearch", $("#searchString").serialize(), function(data) {
|
|
$("#results").html(data);
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function searchDialog() {
|
|
$("")
|
|
}
|
|
|
|
|