Rev 23500 | Rev 23637 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(function() {$(".good_inventory").live('click', function() {loadGoodInventory("main-content","");});$(".catalog").live('click', function() {loadCatalog("main-content","");});$(".item_aging").live('click', function() {getInventoryItemAgingByInterval("main-content", "");});$("#item-aging-search-button").live('click', function() {searchContent = $("#item-aging-search-text").val();if (typeof (searchContent) == "undefined" || !searchContent){searchContent = "";}getInventoryItemAgingByInterval("main-content", searchContent);});$("#item-aging-search-text").live("keyup", function(e) {var keyCode = e.keyCode || e.which;if(keyCode == 13){$("#item-aging-search-button").click();}});$("#item-aging-paginated .next").live('click', function() {var end = $( "#item-aging-paginated .end" ).text();getItemAgingNextPreviousItems(end, "");$("#item-aging-paginated .next").blur();});$("#item-aging-paginated .previous").live('click', function() {var start = $( "#item-aging-paginated .start" ).text();getItemAgingNextPreviousItems(start - 11, "");$("#item-aging-paginated .previous").blur();});$(".download_aging_report").live('click', function() {downloadAgingReport();});$(".item-ledger-report-download-page").live('click', function() {loadItemLedgerReportDownloadPage("main-content");});$(".bad_inventory").live('click', function() {loadBadInventory("main-content","");});$("#good-inventory-paginated .next").live('click', function() {var searchText = $("#good-inventory-search-text").val();if (typeof (searchText) == "undefined" || !searchText){searchText = "";}var params = {};params['searchTerm'] = searchText;loadPaginatedNextItems('/getPaginatedCurrentInventorySnapshot', params, 'good-inventory-paginated', 'good-inventory-table', null);$(this).blur();});$("#good-inventory-paginated .previous").live('click', function() {var searchText = $("#good-inventory-search-text").val();if (typeof (searchText) == "undefined" || !searchText){searchText = "";}var params = {};params['searchTerm'] = searchText;loadPaginatedPreviousItems('/getPaginatedCurrentInventorySnapshot', params, 'good-inventory-paginated', 'good-inventory-table', null);$(this).blur();});$("#good-inventory-search-button").live('click', function() {var searchText = $("#good-inventory-search-text").val();if (typeof (searchText) == "undefined" || !searchText){searchText = "";}loadGoodInventorySearchInfo(searchText);});$("#good-inventory-search-text").live("keyup", function(e) {var keyCode = e.keyCode || e.which;if(keyCode == 13){$("#good-inventory-search-button").click();}});$("#catalog-paginated .next").live('click', function() {var searchText = $("#catalog-search-text").val();if (typeof (searchText) == "undefined" || !searchText){searchText = "";}var params = {};params['searchTerm'] = searchText;loadPaginatedNextItems('/getPaginatedCatalog', params, 'catalog-paginated', 'catalog-table', null);$(this).blur();});$("#catalog-paginated .previous").live('click', function() {var searchText = $("#catalog-search-text").val();if (typeof (searchText) == "undefined" || !searchText){searchText = "";}var params = {};params['searchTerm'] = searchText;loadPaginatedPreviousItems('/getPaginatedCatalog', params, 'catalog-paginated', 'catalog-table', null);$(this).blur();});$("#catalog-search-button").live('click', function() {var searchText = $("#catalog-search-text").val();if (typeof (searchText) == "undefined" || !searchText){searchText = "";}loadCatalogSearchInfo(searchText);});$("#catalog-search-text").live("keyup", function(e) {var keyCode = e.keyCode || e.which;if(keyCode == 13){$("#catalog-search-button").click();}});});function loadGoodInventory(domId, search_text){doGetAjaxRequestHandler(context+"/getCurrentInventorySnapshot/?searchTerm="+search_text, function(response){$('#' + domId).html(response);});}function loadCatalog(domId, search_text){doGetAjaxRequestHandler(context+"/getCatalog/?searchTerm="+search_text, function(response){$('#' + domId).html(response);});}function getInventoryItemAgingByInterval(domId, searchContent){doPostAjaxRequestWithJsonHandler(context+"/getInventoryItemAgingByInterval?searchContent="+searchContent, JSON.stringify([5,15,30,45]), function(response){$('#' + domId).html(response);});}function downloadAgingReport(){data = JSON.stringify([5,15,30,45]),doAjaxPostDownload(context+"/downloadInventoryItemAgingByInterval",data, "InventoryItemAging.xlsx");}function downloadItemLedgerReport(){console.log("downloadItemLedgerReport Button clicked")var startDateTime = $('input[name="startDateTime"]').val();console.log("startDateTime : "+startDateTime);var endDateTime = $('input[name="endDateTime"]').val();console.log("endDateTime : "+endDateTime);//data = JSON.stringify([5,10,15,20,25,30,35,40]),doAjaxGetDownload(context+"/itemLedger/complete/download?startDateTime="+startDateTime+"&endDateTime="+endDateTime,"ItemCompleteLedegerReport.xlsx");}function getItemAgingNextPreviousItems(offset, searchContent){console.log("getItemAgingNextPreviousItems() called");doPostAjaxRequestWithJsonHandler(context+"/getInventoryItemAgingByInterval?offset="+offset+"&searchContent="+searchContent, JSON.stringify([5,15,30,45]), function(response){$('#main-content').html(response);});}function loadBadInventory(domId, search_text){doGetAjaxRequestHandler(context+"/getBadInventorySnapshot/?searchTerm="+search_text, function(response){$('#' + domId).html(response);});}function loadGoodInventorySearchInfo(search_text){loadGoodInventory("main-content",search_text);}function loadCatalogSearchInfo(search_text){loadCatalog("main-content",search_text);}function loadItemLedgerReportDownloadPage(domId){doGetAjaxRequestHandler(context+"/itemLedger/downloadPage", function(response){$('#' + domId).html(response);});}