source: trunk/web-app/js/taskQuickSearchPane.js @ 810

Last change on this file since 810 was 737, checked in by gav, 14 years ago

Remove task budget status from task views.

File size: 1.3 KB
Line 
1
2function updateQuickSearchSelection() {
3    var personsTasksSelectionIds = ['personLabel', 'personSelection', 'completedLabel', 'completedSelection'];
4    var helpBalloonSpanIds = ['allTasksHelp', 'personsTasksHelp', 'personsImmediateCalloutsHelp'];
5    var val = $("quickSearchSelect").value;
6
7    $A(HelpBalloon._balloons).invoke('hide'); // Hide any open balloons.
8    helpBalloonSpanIds.each(Element.hide); // Hide all help icons.
9
10    switch(val)
11    {
12        case 'allTasks':
13            showUtil('allTasksHelp');
14            hideArrayUtil(personsTasksSelectionIds);
15            break;
16        case 'personsTasks':
17            showUtil('personsTasksHelp');
18            showArrayUtil(personsTasksSelectionIds);
19            break;
20        case 'personsImmediateCallouts':
21            showUtil('personsImmediateCalloutsHelp');
22            showArrayUtil(personsTasksSelectionIds);
23            break;
24    }
25
26}
27
28Event.observe(window, 'load', function() {
29    updateQuickSearchSelection(); // Initial page load.
30    $A(HelpBalloon._balloons).invoke('show'); // Work around for offset balloon when using a pane in IE.
31    $A(HelpBalloon._balloons).invoke('hide'); // Work around for offset balloon when using a pane in IE.
32    $("quickSearchSelect").observe('change', updateQuickSearchSelection); // Register onchange handler.
33});
Note: See TracBrowser for help on using the repository browser.