1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* ------------------------------------------------------------------------------
*
* # Inbox page
*
* Specific JS code additions for mail_list.html pages
*
* Version: 1.0
* Latest update: Dec 5, 2016
*
* ---------------------------------------------------------------------------- */
$(function() {
// Custom code
// ------------------------------
// Highlight row when checkbox is checked
$('.table-inbox').find('tr > td:first-child').find('input[type=checkbox]').on('change', function() {
if($(this).is(':checked')) {
$(this).parents('tr').addClass('warning');
}
else {
$(this).parents('tr').removeClass('warning');
}
});
// Grab first letter and insert to the icon
$(".table-inbox tr").each(function (i) {
// Title
var $title = $(this).find('.letter-icon-title'),
letter = $title.eq(0).text().charAt(0).toUpperCase();
// Icon
var $icon = $(this).find('.letter-icon');
$icon.eq(0).text(letter);
});
// Plugins
// ------------------------------
// Default initialization
$(".styled, .multiselect-container input").uniform({
radioClass: 'choice'
});
// Initialize Row link plugin
$('tbody.rowlink').rowlink();
});