forked from pimlie/authres_status
-
Notifications
You must be signed in to change notification settings - Fork 0
/
authres_status.js
executable file
·27 lines (25 loc) · 952 Bytes
/
authres_status.js
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
/*
* authres_status plugin
* @author pimlie
*/
var authres_status = {
initColumn: function() {
$('#rcmauthres_status span').html(' ');
var li = '<label><input type="checkbox" name="list_col[]" value="authres_status" id="cols_authres_status" /> <span>'+rcmail.get_label('authres_status.column_title')+'</span></label>';
$("#listoptions-columns ul.proplist").append('<li>'+li+'</li>');
},
insertrow: function(evt) {
if (typeof(rcmail.env.authres_flags[evt.uid]) !== "undefined") {
$('.fromto', evt.row.obj).prepend($('<span/>').html(rcmail.env.authres_flags[evt.uid]));
}
}
};
window.rcmail && rcmail.addEventListener('init', function(evt) {
if (rcmail.env.layout == 'widescreen') {
if (rcmail.gui_objects.messagelist) {
rcmail.addEventListener('insertrow', authres_status.insertrow);
}
} else {
authres_status.initColumn();
}
});