Subversion Repositories SmartDukaan

Rev

Rev 35971 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35971 Rev 35973
Line 47... Line 47...
47
                <th>ID</th>
47
                <th>ID</th>
48
                <th>Partner Name</th>
48
                <th>Partner Name</th>
49
                <th>Code</th>
49
                <th>Code</th>
50
                <th>City</th>
50
                <th>City</th>
51
                <!--                <th>ASM</th>-->
51
                <!--                <th>ASM</th>-->
52
                <th>Delayed Even
52
                <th>Delayed Event</th>
53
                <th>Responsible Team</th>
53
                <th>Responsible Team</th>
54
                <th>Planned Date</th>
54
                <th>Planned Date</th>
55
                <th>Days Overdue</th>
55
                <th>Days Overdue</th>
56
            </tr>
56
            </tr>
57
            </thead>
57
            </thead>
Line 91... Line 91...
91
            "pageLength": 50
91
            "pageLength": 50
92
        });
92
        });
93
 
93
 
94
        // Populate team filter dropdown from table data
94
        // Populate team filter dropdown from table data
95
        var teams = {};
95
        var teams = {};
96
        dtable.column(6).data().each(function (val) {
96
        dtable.column(5).data().each(function (val) {
97
            teams[val] = true;
97
            teams[val] = true;
98
        });
98
        });
99
        var teamFilter = $('#teamFilter');
99
        var teamFilter = $('#teamFilter');
100
        Object.keys(teams).sort().forEach(function (team) {
100
        Object.keys(teams).sort().forEach(function (team) {
101
            var opt = $('<option></option>').val(team).text(team);
101
            var opt = $('<option></option>').val(team).text(team);
Line 104... Line 104...
104
 
104
 
105
        // Filter by team
105
        // Filter by team
106
        teamFilter.on('change', function () {
106
        teamFilter.on('change', function () {
107
            var val = $(this).val();
107
            var val = $(this).val();
108
            if (val) {
108
            if (val) {
109
                dtable.column(6).search('^'.concat(val).concat('$'), true, false).draw();
109
                dtable.column(5).search('^'.concat(val).concat('$'), true, false).draw();
110
            } else {
110
            } else {
111
                dtable.column(6).search('', true, false).draw();
111
                dtable.column(5).search('', true, false).draw();
112
            }
112
            }
113
        });
113
        });
114
    });
114
    });
115
</script>
115
</script>