Rev 28381 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(function() {$(document).on('click', '.retail-block-brand-submit', function() {if(brandSelect == 1){var brand = $('#block-brand').val();var fofoIds = $('#selected-block-ids').val();console.log("fofoIds"+fofoIds);if (confirm("Are you sure you want to submit") == true) {doPostAjaxRequestHandler(context + "/getRetailerBlockBrandMappping?brand=" + brand + "&fofoIds=" + fofoIds,function(response) {if (response = true) {alert("Successfully Submitted");$("button.block-brand-submit").click();}});}}else{alert("Please click submit button of selected brand");}});var brandSelect;$(document).on('change', ".brand-select", function() {brandSelect=0;console.log(brandSelect);});$(document).on('click', '.block-brand-submit', function() {var brand = $('#block-brand').val();brandSelect = 1;console.log(brandSelect);doGetAjaxRequestHandler(context + "/getBlockBrand?brand=" + brand,function(response) {$('.partnersbyblockbrands').html(response);});});$(document).on('click', '.brands-limit-submit', function() {var brand = $('#show-brands').val();doGetAjaxRequestHandler(context + "/getRetailerBrandslimitMapping?brand=" + brand,function(response) {$('.partnerByBrandsLimit').html(response);});})$(document).on('click', '.pincode-submit', function() {var fofoId = partnerId;var pincode = $('#partnerPincode').val();console.log("pin" + pincode);doPostAjaxRequestHandler(context + "/setPartnerPincode?pincode=" + pincode + "&fofoId=" + fofoId,function(response) {$('.partner-pincode-container').html(response);});});$(document).on('click', '.pincode-serach-submit', function() {var pincode = $('#searchPincode').val();console.log("pin" + pincode);doGetAjaxRequestHandler(context + "/searchPincodePartner?pincode=" + pincode,function(response) {$('.pincode-container').html(response);});});$(document).on('click', '.remove-pincode', function() {var pin = $(this).data('pin');var id = $(this).data('id');var fofoId = $(this).data('fofoid');console.log(pin);console.log(fofoId);if (confirm("Are you sure you want to remove this pincode") == true) {doPostAjaxRequestHandler(context + "/removeSearchPincode?id=" + id + "&fofoId=" + fofoId + "&pin=" + pin,function(response) {$('.pincode-container').html(response);});}});$(document).on('click', ".pincode-delete", function() {var id = $(this).data('id');var fofoId = $(this).data('fofoid');console.log(fofoId);if (confirm("Are you sure you want to remove this pincode") == true) {doPostAjaxRequestHandler(context + "/removePartnerPincode?id=" + id + "&fofoId=" + fofoId,function(response) {$('.partner-pincode-container').html(response);});}});});