Subversion Repositories SmartDukaan

Rev

Rev 27756 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
27509 tejbeer 1
<section>
27835 amit.gupta 2
<script type="text/javascript">
3
$(function(){
4
	$("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"}); 
5
	$("select.criteria-warehouse").chosen({no_results_text: "Oops, nothing found!"}); 
6
});
7
 $('#brand').multiselect({
8
	includeSelectAllOption: true,
9
		multiple:true,
10
		maxHeight: 200,
11
		buttonWidth: '180px',
12
		numberDisplayed: 1,
13
	nonSelectedText: 'Brands',
14
	nSelectedText: ' - Brand Selected',
15
	allSelectedText: 'All Brands Selected',
16
	enableFiltering: true,
17
    enableCaseInsensitiveFiltering : true
18
});
19
 
20
$('#warehouse').multiselect({
21
	includeSelectAllOption: true,
22
	multiple:true,
23
	maxHeight: 200,
24
	buttonWidth: '180px',
25
	numberDisplayed: 1,
26
	nonSelectedText: 'Warehouse',
27
	nSelectedText: ' - Warehouse Selected',
28
	allSelectedText: 'All Warehouse Selected',
29
	enableFiltering: true,
30
    enableCaseInsensitiveFiltering : true
31
});
32
$(document).ready(function() {
33
	$("input.brandWiseSearch").click(function() {
34
	    var brands = $('#brand').val();
35
	    var category = $('#categoryName').val();
36
	    var warehouseId = $('#warehouse').val();
37
		if (brands == null) {
38
			alert("select the brand");
39
			return  false
40
		}
41
	    doGetAjaxRequestHandler(context + "/getWarehouseWiseItemStock?warehouseId="+warehouseId+"&brands="+brands+"&category="+category, function(response) {
42
			$('#warehosueItemStock').html(response);
43
			console.log(response)
44
		});
27529 tejbeer 45
	});
27835 amit.gupta 46
});
27529 tejbeer 47
</script>
48
 
27509 tejbeer 49
<section class="wrapper">
50
 
27529 tejbeer 51
 
52
 
53
 
54
 
55
    	<div class="row">
27538 tejbeer 56
  		<div class="col-lg-2 form-group">
57
						<select class="form-control input-sm" id = "brand" name="brand" placeholder="Brand" multiple=multiple>
58
						<option value="" disabled selected>Brands</option>
59
						#foreach($brand in $brands)
60
							#if($selectedBrand.contains($brand))						 
61
				              	<option value="$brand" selected>$brand</option>
62
				             #else
63
		             		<option value="$brand">$brand</option>
64
		             		#end
27835 amit.gupta 65
		             	#end
27538 tejbeer 66
		             	</select>
67
					</div>
68
 
69
 
70
				<div class="col-lg-2 form-group">
71
						<select class="form-control input-sm" id = "warehouse" name="warehouse" placeholder="Warehouse" multiple=multiple>
72
						<option value="" disabled selected>Warehouse</option>
27539 tejbeer 73
							#if($selectedWarehouse.contains(0))
74
							<option value="0" selected>All</option>
75
							#else 
76
							<option value="0">All</option>
77
							#end
27538 tejbeer 78
							#foreach($warehouse in $warehouseMap.entrySet())
79
							#if($selectedWarehouse.contains($warehouse.getKey()))					 
80
				              	<option value="$warehouse.getKey()" selected>$warehouse.getValue()</option>
81
				              	#else
82
		             		<option value="$warehouse.getKey()">$warehouse.getValue()</option>
83
		             		#end
84
		             		#end
85
		             	</select>
86
					</div>
87
 
88
	      		<div class="col-lg-2 form-group">
89
						<select class="form-control input-sm" id = "categoryName" name="categoryName" placeholder="categoryName">
90
						<option value="" disabled selected>Category Name</option>
91
							#foreach($category in $listCategory)
27539 tejbeer 92
							#if($selectedCategory == $category)
93
		             		<option value="$category" selected>$category</option>
94
		             		#else
27538 tejbeer 95
		             		<option value="$category">$category</option>
96
		             		#end
27539 tejbeer 97
		             		#end
27538 tejbeer 98
		             	</select>           
99
					</div>
100
 
27529 tejbeer 101
	      <div class="col-lg-2">
102
			<input class="btn btn-primary brandWiseSearch"  type="button" value="submit">	
103
		  </div>
104
 
27509 tejbeer 105
		</div>
106
 
27538 tejbeer 107
        <div class="row" id="warehosueItemStock">
108
 
27509 tejbeer 109
		</div>
110
 
111
 
112
</section>