RequestExecutedIndicator.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2013
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or
  8. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *|
  10. *+------------------------------------------------------------------------+
  11. */
  12. function RequestExecutedIndicator(oCV)
  13. {
  14. RequestExecutedIndicator.baseConstructor.call( this, oCV );
  15. }
  16. RequestExecutedIndicator.prototype = new BaseRequestExecutedIndicator();
  17. RequestExecutedIndicator.baseConstructor = BaseRequestExecutedIndicator;
  18. RequestExecutedIndicator.prototype.parent = BaseRequestExecutedIndicator.prototype;
  19. RequestExecutedIndicator.prototype.show = function() {
  20. var oCV = this.getViewer();
  21. var cvid = oCV.getId();
  22. var executionCursor = document.getElementById("executionCursor" + cvid);
  23. var rvContentDiv = document.getElementById("formWarpRequest" + cvid);
  24. if(!executionCursor && rvContentDiv)
  25. {
  26. executionCursor = document.createElement("span");
  27. executionCursor.className = "executionCursor";
  28. executionCursor.setAttribute("id", "executionCursor" + cvid);
  29. var imageSrcHtml = "<img alt=\"\" src=\"" + oCV.getWebContentRoot() + "/rv/images/action_busy_32x32.gif" + "\"/>";
  30. executionCursor.innerHTML = imageSrcHtml;
  31. rvContentDiv.appendChild(executionCursor);
  32. }
  33. this.parent.show.call(this);
  34. };
  35. RequestExecutedIndicator.prototype.hide = function() {
  36. var executionCursor = document.getElementById("executionCursor" + this.getViewer().getId());
  37. if(executionCursor != null) {
  38. executionCursor.parentNode.removeChild(executionCursor);
  39. }
  40. this.parent.hide.call(this);
  41. };