Subversion Repositories SmartDukaan

Rev

Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed


$(function() {

$(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', '.brands-update', function() { 
        
        
         var brands = $(this).data('brand');
         console.log(brands);
        var limit= $("form#brand-limit-container input[name=inputLimit]").val();      
        
     doPostAjaxRequestHandler(context + "/setBrandWiseLimit?brands=" + brands + "&limit=" + limit, 
                        function(response) {
                                $('.partnerByBrandsLimit').html(response);
                        });
        
        });
        
$(document).on('click', '.limit_update_submit', function() {    
     var row = $(this).closest("tr");
 
     var fofoId = $(this).data('id');
      var limit = $(row).find("input").val();      

       var brand = $(this).data('brand');

  doPostAjaxRequestHandler(context + "/setUpdateLimit?brand=" + brand + "&limit=" + limit + "&fofoId=" + fofoId, 
                        function(response) {
                                row.html(response);
                        });

        });
        
        });