Subversion Repositories SmartDukaan

Rev

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