Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
30185 tejbeer 1
         <div class="col-lg-12">
2
        <table class="table table-border table-condensed table-bordered" id="commitment-table" style="width:100%">
3
 
4
            <thead class="row htable" style="background:#F5F5F5;">
5
 
6
            <tr style="color:black;">
7
                <th>Committed By</th>
8
                <th>Partner Name</th>
9
                <th>Col_Tgt (<span id = "coltgt"> </span>)</th>
10
                <th>Col_Ach  (<span id = "colach"> </span>)</th>
11
                <th>Samsung_Tgt</th>
12
                <th>Samsung_Ach</th>
13
                <th>Oppo_Tgt</th>     
14
                <th>Oppo_Ach</th>
15
                <th>Vivo_Tgt</th>
16
                <th>Vivo_Ach</th>
17
                <th>Itel_Tgt</th>
18
                <th>Itel_Ach</th>
30205 tejbeer 19
                <th>Almost_New_Tgt</th>
20
                <th>Almost_New_Ach</th>
30185 tejbeer 21
                <th>Others_Tgt</th>
22
                <th>Others_Ach</th>
23
 
24
            </tr>
25
            </thead>
26
            <tbody>
27
                #foreach($commitment in $commitments )
28
 
29
                <tr>
30
                   #parse("team-commitment-index.vm")
31
 
32
                </tr>
33
 
34
                #end
35
 
36
            </tbody>
37
 
38
        </table>
39
    </div>
40
 
41
 <script type="text/javascript">
42
	$(document).ready(function() {
43
		var table = $('#commitment-table').DataTable({
44
			"scrollX": true,
45
			"bPaginate" : true,
46
			"bLengthChange" : true,
47
			"bFilter" : true,
48
			"bInfo" : false,
49
			"bAutoWidth" : false,
50
			"pageLength": 100,
51
 
52
 
53
		});
54
 
55
		    datatableSum();
56
		  table.on('search.dt', function () {
57
            console.log('Currently applied global search: ' + table.search());
58
            datatableSum();
59
 
60
 
61
        });
62
	});
63
 
64
 
65
	 function datatableSum() {
66
 
67
	   var col_tgt_sum = $('#commitment-table').DataTable().column(2,{page:'current'}).data().sum();
68
	   $('#coltgt').html(col_tgt_sum);
69
 
70
 
71
	  var col_acv_sum = $('#commitment-table').DataTable().column(3,{page:'current'}).data().sum();
72
	       console.log(col_acv_sum)
73
	   $('#colach').html(col_acv_sum);
74
 
75
	 }
76
 
77
 
78
</script>