pentaho/pentaho-platform-plugin-reporting — pull request #85 by dcleao (2014-05-26 15:24:37+00:00)
Title: [PRD-5086] - When auto-submit is off, the report parameter/prompt panel flashes/glass pane appears.

Made changes so that the glass pane is only shown with a dark background when the report is being updated (this is the most time-taking process).
When the glass pane is shown, but only the prompt is being refreshed, it is shown transparent, achieving a less disruptive user experience.

The incremental recreation of each of the prompt's CDF controls still significantly disrupts the user experience. It looks like a slide-down effect.

Summarising, two changes were made:
1. replaced all explicit calls to show/hide the glass pane's dojo element with calls to central functions having the same code; this change is conservative of the original behaviour — a refactoring;
2. then, a behaviour changing change: the new show/hide methods add logic that additionally controls the glass pane's transparency.

Detailing the changes:
* In __reportviewer-prompt.js__
* Created two methods in the report-viewer prompt showGlassPane and hideGlassPane whose implementation calls show/hide on the dojo element.
* Replaced all existing calls to show/hide the dojo element with calls to showGlassPane and hideGlassPane.
* Moved the call to `showGlassPane` in `getParameterDefinition` to `fetchParameterDefinition`.
This location is more central: it accounts for other scenarios where `fetchParameterDefinition` is being called directly (in _reportViewer.js_), and thus required additional explicit calls to `showGlassPane`.
* In __reportviewer.js__
* In the same spirit of other existing code, the prompt's default `showGlassPane` and `hideGlassPane` implementations are overridden with view-specific implementations. These use details only known by the view (whether the report content is loading as well or not) to control the transparency of the glass pane, when showing/hiding.
* A new method was added, `reportContentUpdating`, which uses the already existing `_updateReportTimeout` variable — no new state flags were added.
* Taking advantage that `fetchParameterDefinition` now already calls `showGlassPane`, the existing call in `_updateReportContent` can be moved to the only branch of its code which doesn't call it yet: the `_updateReportContentCore` method. It is placed right after the update to `_updateReportTimeout` variable, so that `showGlassPane` can properly control the glass pane's transparency.

I tested these changes with a variety of reports in report viewer, using Chrome/MacOS and Safari/iPad.
Additional execution contexts still need to be tested:
* Scheduling
* Dashboards
* Interactive Reporting

@mdamour1976, @pamval, @dkincade please comment/review.