fold custom reports by default (for me)

This commit is contained in:
Frédéric Péters 2020-05-19 11:20:30 +02:00
parent 43ba9ed3e7
commit fd7319f48f
1 changed files with 15 additions and 0 deletions

View File

@ -315,4 +315,19 @@ $(function() {
$main.css('background-attachment', 'fixed');
$main.css('background-image', 'url(' + url + ')');
}
// custom features, enabled on user request
function folded_custom_reports() { // fold "custom reports" in sidebar by default
var custom_reports_title = $('h3:contains("Rapports personnalisés")');
custom_reports_title.css('cursor', 'pointer').on('click', function() {
$('h3:contains("Rapports personnalisés") + ul').toggle();
}).trigger('click');
}
var current_user = $('#loggedas a.user').text();
if (["fpeters"].indexOf(current_user) != -1) {
folded_custom_reports();
}
});