Subversion Repositories SmartDukaan

Rev

Rev 30205 | Go to most recent revision | Details | 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>
19
                <th>Others_Tgt</th>
20
                <th>Others_Ach</th>
21
 
22
            </tr>
23
            </thead>
24
            <tbody>
25
                #foreach($commitment in $commitments )
26
 
27
                <tr>
28
                   #parse("team-commitment-index.vm")
29
 
30
                </tr>
31
 
32
                #end
33
 
34
            </tbody>
35
 
36
        </table>
37
    </div>
38
 
39
 <script type="text/javascript">
40
	$(document).ready(function() {
41
		var table = $('#commitment-table').DataTable({
42
			"scrollX": true,
43
			"bPaginate" : true,
44
			"bLengthChange" : true,
45
			"bFilter" : true,
46
			"bInfo" : false,
47
			"bAutoWidth" : false,
48
			"pageLength": 100,
49
 
50
 
51
		});
52
 
53
		    datatableSum();
54
		  table.on('search.dt', function () {
55
            console.log('Currently applied global search: ' + table.search());
56
            datatableSum();
57
 
58
 
59
        });
60
	});
61
 
62
 
63
	 function datatableSum() {
64
 
65
	   var col_tgt_sum = $('#commitment-table').DataTable().column(2,{page:'current'}).data().sum();
66
	   $('#coltgt').html(col_tgt_sum);
67
 
68
 
69
	  var col_acv_sum = $('#commitment-table').DataTable().column(3,{page:'current'}).data().sum();
70
	       console.log(col_acv_sum)
71
	   $('#colach').html(col_acv_sum);
72
 
73
	 }
74
 
75
 
76
</script>