[11020] | 1 | /* This file contains the method for shrinking and expanding the collapsable sections */
|
---|
| 2 |
|
---|
| 3 | $(".collapse").click(function () {
|
---|
| 4 | if ($(this).html() == "-") {
|
---|
[11259] | 5 | $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeOut();
|
---|
[11020] | 6 | $(this).html("+");
|
---|
| 7 | }
|
---|
| 8 | else {
|
---|
[11259] | 9 | $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
|
---|
[11020] | 10 | $(this).html("-");
|
---|
| 11 | }
|
---|
| 12 | });
|
---|
| 13 |
|
---|
[11059] | 14 | /* Because some chart sections are created on the fly adding an event listener
|
---|
[11020] | 15 | was impossible. Therefore this function is hardcoded as an HTML onclick event
|
---|
| 16 | for the dynamically created buttons of these sections */
|
---|
[11053] | 17 | function CollapseSection(caller) {
|
---|
[11020] | 18 | var jqCaller = $(caller);
|
---|
| 19 | if (jqCaller.html() == "-") {
|
---|
[11259] | 20 | jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeOut();
|
---|
[11020] | 21 | jqCaller.html("+");
|
---|
| 22 | }
|
---|
| 23 | else {
|
---|
[11259] | 24 | jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
|
---|
[11020] | 25 | jqCaller.html("-");
|
---|
| 26 | }
|
---|
[11030] | 27 | }
|
---|
| 28 |
|
---|
| 29 | /* Passed the interior div this fucntion is used to create an automatically collapsed
|
---|
| 30 | section */
|
---|
[11053] | 31 | function CollapsedByDefault(caller) {
|
---|
[11259] | 32 | $(caller).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").hide();
|
---|
[11030] | 33 | }
|
---|
| 34 |
|
---|
| 35 | /* Used when scrolling to a task by error, opens the container before task is scrolled to */
|
---|
[11053] | 36 | function OpenOnError(caller) {
|
---|
[11030] | 37 | var jqCaller = $(caller);
|
---|
[11259] | 38 | jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
|
---|
[11030] | 39 | jqCaller.parent().children("button").html("-");
|
---|
[11059] | 40 | }
|
---|
| 41 |
|
---|
| 42 | /* Because some chart sections are collapsed(display=none) on resize the charts will not chart
|
---|
| 43 | properly unless they are opened, them updated, then closed again. */
|
---|
| 44 | function ResizeOpenClose(caller) {
|
---|
| 45 | var jqCaller = $(caller);
|
---|
| 46 | if (jqCaller.html() == "-") {
|
---|
[11259] | 47 | jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table, select").hide();
|
---|
[11059] | 48 | jqCaller.html("+");
|
---|
| 49 | }
|
---|
| 50 | else {
|
---|
[11259] | 51 | jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table, select").show();
|
---|
[11059] | 52 | jqCaller.html("-");
|
---|
| 53 | }
|
---|
[11084] | 54 | }
|
---|
| 55 |
|
---|
| 56 | /* Because some chart sections are collapsed(display=none) on resize the charts will not chart
|
---|
| 57 | properly unless they are opened, them updated, then closed again. */
|
---|
| 58 | function ResizeOpenCloseTabular(caller) {
|
---|
| 59 | var jqCaller = $(caller);
|
---|
| 60 | if (jqCaller.css("display") != "none") {
|
---|
| 61 | jqCaller.hide();
|
---|
| 62 | }
|
---|
| 63 | else {
|
---|
| 64 | jqCaller.show();
|
---|
| 65 | }
|
---|
[11020] | 66 | } |
---|