Subversion Repositories SmartDukaan

Rev

Rev 26320 | Rev 34142 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23506 amit.gupta 1
<style>
23638 amit.gupta 2
	.pointer {
3
		cursor:pointer;
4
	}
23506 amit.gupta 5
	.btn:hover{
6
  		color: grey;
7
  		text-decoration: none;
8
	}
9
	.btn-primary:hover{
10
  		color: grey;
11
  		text-decoration: none;
12
	}
13
	.retailer-details{
14
		cursor:pointer;
15
	}
16
</style>
17
 
26320 tejbeer 18
<script type="text/javascript">
19
	$("#partnerFofoId").typeahead({
20
	  source: retailers,
21
	  autoSelect: true,
22
	  displayText:function(item){return item.businessName + "-" + item.address.city;},
23
	  afterSelect:	function(currentItem){
24
	  					currentFofoId = currentItem.partnerId;
26323 amit.gupta 25
	  					fofoId = currentItem.partnerId;
26320 tejbeer 26
	  						doAjaxRequestHandler(context+"/return/inventory/" + currentFofoId, "GET", function(response){
27
		              	inventoryTable.rows().remove().rows.add($(response)).draw(false);
28
		});
29
	  				}
30
	});
31
 
32
</script>
33
 
23506 amit.gupta 34
<section class="wrapper">            
35
	<div class="row">
36
		<div class="col-lg-12">
37
			<h3 class="page-header"><i class="icon_document_alt"></i>View/Request Return</h3>
38
			<ol class="breadcrumb">
39
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
40
				<li><i class="icon_document_alt"></i>View Returnables</li>
41
			</ol>
42
		</div>
43
	</div>
44
 
45
    <div>
46
	     <div class="row">
26320 tejbeer 47
 
48
	     	<div class="col-lg-2">
49
					<div class="input-group">
50
			    	<input id="partnerFofoId" type="text" class="typeahead form-control form-control-sm" placeholder="Search Partner by Store" data-provide="typeahead" 
51
			    	 #if(${retailerName}) value="${retailerName}" #end
52
			    	 autocomplete="off"/>
53
			   </div> 
54
			    </div>
55
 
23638 amit.gupta 56
			<div class="col-lg-4" id="inventory-container">
57
				<table class="table table-striped table-condensed table-bordered">
58
	    			<thead>
59
			            <tr>
60
							<th>Item Id</th>
61
							<th>Description</th>
62
							<th>Qty</th>
63
			            </tr>
64
			        </thead>
65
			        <tbody id="inventory-body">
66
			        </tbody>
67
				</table>
68
			</div>
69
			<div class="col-lg-6" id="returnable-container">
70
				<table class="table table-striped table-condensed table-bordered">
71
					<thead>
72
						<tr>
73
							<th>Serial Number</th>
74
							<th>Unit Price</th>
75
							<th>Scanned On</th>
76
							<th>Status</th>
77
						</tr>
78
					</thead>
79
					<tbody id="returnables-body">
80
					</tbody>
81
				</table>
82
			</div>
23506 amit.gupta 83
    	</div>
84
</section>
85
<script type="text/javascript">
86
/* Create an array with the values of all the input boxes in a column */
87
$.fn.dataTable.ext.order['dom-text'] = function  ( settings, col )
88
{
89
    return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
90
        return $('input', td).val();
91
    } );
92
}
93
 
94
/* Create an array with the values of all the input boxes in a column, parsed as numbers */
95
$.fn.dataTable.ext.order['dom-text-numeric'] = function  ( settings, col )
96
{
97
    return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
98
        return $('input', td).val() * 1;
99
    } );
100
}
101
 
102
/* Create an array with the values of all the select options in a column */
103
$.fn.dataTable.ext.order['dom-select'] = function  ( settings, col )
104
{
105
    return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
106
        return $('select', td).val();
107
    } );
108
}
109
 
110
/* Create an array with the values of all the checkboxes in a column */
111
$.fn.dataTable.ext.order['dom-checkbox'] = function  ( settings, col )
112
{
113
    return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
114
        return $('input', td).prop('checked') ? '1' : '0';
115
    } );
116
}
117
 
118
/* Initialise the table with the required column ordering data types */
119
$(document).ready(function() {
23638 amit.gupta 120
    /*storesTable = $('#store-container').find('table').DataTable({"pageLength": 20});*/
121
    inventoryTable = $('#inventory-container').find('table').DataTable(
122
     {
123
   		"paging": true,
124
    	"searching": true
125
	 }
126
	);
127
    returnsTable = $('#returnable-container').find('table').DataTable({
128
   		"paging": true,
129
   		"searching" : true
23506 amit.gupta 130
	});
131
});
132
 
133
</script>