Subversion Repositories SmartDukaan

Rev

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