source: sandbox/workflow/flumen/js/userinterface/orgchartPrint.js @ 795

Revision 795, 1.2 KB checked in by viani, 15 years ago (diff)

Ticket #488 - Inclusão do módulo workflow no ramo trunk do repositório Expresso.

Line 
1function toggleEmployeesVisibility()
2{
3        if ($('#employeesVisibility').attr('checked'))
4                $('div.employees').show();
5        else
6                $('div.employees').hide();
7}
8
9function toggleHighlightSupervisor()
10{
11        if ($('#highlightSupervisor').attr('checked'))
12                $('span.employeesupervisor').css('font-weight', 'bold');
13        else
14                $('span.employeesupervisor').css('font-weight', 'normal');
15}
16
17function toggleOrgchartPathVisibility()
18{
19        if ($('#orgchartPathVisibility').attr('checked'))
20        {
21                $('span.orgchartPath').css('visibility', 'visible').show();
22        }
23        else
24        {
25                if ($('#orgchartPathIndentation').attr('checked'))
26                        $('span.orgchartPath').show().css('visibility', 'hidden');
27                else
28                        $('span.orgchartPath').hide();
29        }
30}
31
32function printAction()
33{
34        window.print();
35}
36
37function bindEvents()
38{
39        $('#employeesVisibility').click(toggleEmployeesVisibility);
40        $('#highlightSupervisor').click(toggleHighlightSupervisor);
41        $('#orgchartPathVisibility').click(toggleOrgchartPathVisibility);
42        $('#printButton').click(printAction);
43}
44
45function initialSetup()
46{
47        toggleEmployeesVisibility();
48        toggleHighlightSupervisor();
49        toggleOrgchartPathVisibility();
50}
51
52function pageLoad()
53{
54        bindEvents();
55        initialSetup();
56}
57
58$(window).load(pageLoad);
Note: See TracBrowser for help on using the repository browser.