Subversion Repositories SmartDukaan

Rev

Rev 27539 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<section>


<!--<style>
        .table-striped > tbody > tr:nth-child(odd) > td{
                background: white;
                background-color: white;
        }
        .table-striped > tbody > tr:nth-child(even) > td{
                background: white;
                background-color:white;
        }
        .table-striped > tbody > tr:hover > td,
        .table-striped > tbody > tr:hover {
                background-color: #e98c8f;
                color:white;
        }
        .btn:hover{
                color: grey;
                text-decoration: none;
        }
        .btn-primary:hover{
                color: grey;
                text-decoration: none;
        }
        .sale-details{
                cursor:pointer;
        }
</style>-->

<script>
    $(function(){
   
            
                $("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"}); 
                $("select.criteria-warehouse").chosen({no_results_text: "Oops, nothing found!"}); 
                
                
        });
        
             $('#brand').multiselect({
                includeSelectAllOption: true,
                        multiple:true,
                        maxHeight: 200,
                        buttonWidth: '180px',
                        numberDisplayed: 1,
                nonSelectedText: 'Brands',
                nSelectedText: ' - Brand Selected',
                allSelectedText: 'All Brands Selected',
                enableFiltering: true,
                enableCaseInsensitiveFiltering : true
        });
        
             $('#warehouse').multiselect({
                includeSelectAllOption: true,
                        multiple:true,
                        maxHeight: 200,
                        buttonWidth: '180px',
                        numberDisplayed: 1,
                nonSelectedText: 'Warehouse',
                nSelectedText: ' - Warehouse Selected',
                allSelectedText: 'All Warehouse Selected',
                enableFiltering: true,
                enableCaseInsensitiveFiltering : true
        });
        
</script>

<section class="wrapper">





        <div class="row">
                <div class="col-lg-2 form-group">
                                                <select class="form-control input-sm" id = "brand" name="brand" placeholder="Brand" multiple=multiple>
                                                <option value="" disabled selected>Brands</option>
                                                #foreach($brand in $brands)
                                                        #if($selectedBrand.contains($brand))                                             
                                                <option value="$brand" selected>$brand</option>
                                             #else
                                        <option value="$brand">$brand</option>
                                        #end
                                        #end
                                </select>
                                        </div>
              
             
                                <div class="col-lg-2 form-group">
                                                <select class="form-control input-sm" id = "warehouse" name="warehouse" placeholder="Warehouse" multiple=multiple>
                                                <option value="" disabled selected>Warehouse</option>
                                                        #if($selectedWarehouse.contains(0))
                                                        <option value="0" selected>All</option>
                                                        #else 
                                                        <option value="0">All</option>
                                                        #end
                                                        #foreach($warehouse in $warehouseMap.entrySet())
                                                        #if($selectedWarehouse.contains($warehouse.getKey()))                                    
                                                <option value="$warehouse.getKey()" selected>$warehouse.getValue()</option>
                                                #else
                                        <option value="$warehouse.getKey()">$warehouse.getValue()</option>
                                        #end
                                        #end
                                </select>
                                        </div>

                        <div class="col-lg-2 form-group">
                                                <select class="form-control input-sm" id = "categoryName" name="categoryName" placeholder="categoryName">
                                                <option value="" disabled selected>Category Name</option>
                                                        #foreach($category in $listCategory)
                                                        #if($selectedCategory == $category)
                                        <option value="$category" selected>$category</option>
                                        #else
                                        <option value="$category">$category</option>
                                        #end
                                        #end
                                </select>           
                                        </div>
                
              <div class="col-lg-2">
                        <input class="btn btn-primary brandWiseSearch"  type="button" value="submit">   
                  </div>
              
                </div>

        <div class="row" id="warehosueItemStock">

                </div>
                                        

</section>
<script type="text/javascript">

$(document).ready(function() {
$(document).on('click', ".brandWiseSearch",
                        function() {
        
    var brands = $('#brand').val();
    var category = $('#categoryName').val();
    var warehouseId = $('#warehouse').val();
        if (brands == null) {
                                        alert("select the brand");
                                        return  false
                                }
          doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+category,
                        function(response) {
                                $('#warehosueItemStock').html(response);
                                console.log(response)
                        
                        });
        });
});

</script>