wait.xts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2008
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/AGS.xml,messages/portal.xml" requiredCapability="canUseEventStudio">
  9. <!--
  10. ===============================================================================================
  11. Process Response
  12. ===============================================================================================
  13. -->
  14. <xts:block id="doWait" mode="output" processor="XSLT" type="exec" mimeType="text/html">
  15. <!-- get the new theme stuff -->
  16. <xts:logicsheet path="logicsheets/portal.xsl"/>
  17. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  18. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  19. <!-- apply the form logic -->
  20. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  21. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:out="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" exclude-result-prefixes="xts pf dp df xtsext SOAP-ENV bus cm SOAP-ENC">
  22. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  23. <!-- add any theme variables -->
  24. <df:variables/>
  25. <pf:variables/>
  26. <xsl:variable name="waitDialogStyle" select="/root/env/param[@name='waitDialogStyle']"/>
  27. <!-- start the output -->
  28. <xsl:template match="/root">
  29. <dp:page >
  30. <dp:script>
  31. <link rel="stylesheet" type="text/css" href="{$skin_root}/ags/ags.css"/>
  32. <script type="text/javascript" src="../ags/layout.js">//</script>
  33. <script language="javascript">
  34. var cancelled = false;
  35. function init(){
  36. parent.doOpenPopUpToSize("280", "200");
  37. document.body.style.cursor = "wait";
  38. var cf = parent.getConfigFrame();
  39. //just get on with the next command
  40. cf.getCommandStackManager().processCommandStack();
  41. }
  42. function cancelWait(){
  43. <xsl:choose>
  44. <xsl:when test="contains($waitDialogStyle, 'validate') or contains($waitDialogStyle, 'preview')">
  45. if(cancelled){
  46. return;
  47. }
  48. cancelled = true;
  49. var cButton = document.getElementById("cancel_button");
  50. if(cButton){
  51. getConfigFrame().setAsynchRequestCancelled(true);
  52. cButton.disabled = true;
  53. }
  54. var cancelLink = document.getElementById("cancel_link");
  55. if(cancelLink){
  56. cancelLink.disabled = true;
  57. }
  58. var message_div = document.getElementById("wait_message");
  59. var cancel_div = document.getElementById("canceling_message");
  60. message_div.style.display="none";
  61. cancel_div.style.display="";
  62. </xsl:when>
  63. <xsl:otherwise>
  64. parent.doClosePopUp();
  65. </xsl:otherwise>
  66. </xsl:choose>
  67. }
  68. </script>
  69. </dp:script>
  70. <dp:header help="false">
  71. <dp:title>
  72. <xsl:choose>
  73. <xsl:when test="contains($waitDialogStyle, 'validate')">
  74. <xsl:text><xts:string id="VALIDATE_PAGE_TITLE"/></xsl:text>
  75. </xsl:when>
  76. <xsl:when test="contains($waitDialogStyle, 'save')">
  77. <xsl:text><xts:string id="ASS_TOOLBAR_SAVE_ALT"/></xsl:text>
  78. </xsl:when>
  79. <xsl:when test="contains($waitDialogStyle, 'preview')">
  80. <xsl:text><xts:string id="ASS_TOOLBAR_PREVIEW_ALT"/></xsl:text>
  81. </xsl:when>
  82. <xsl:when test="contains($waitDialogStyle, 'open')">
  83. <xsl:text><xts:string id="ASS_TOOLBAR_OPEN_ALT"/></xsl:text>
  84. </xsl:when>
  85. <xsl:otherwise>
  86. <xsl:text><xts:string id="RESET_AGENT_PAGE_TITLE"/></xsl:text>
  87. </xsl:otherwise>
  88. </xsl:choose>
  89. </dp:title>
  90. <dp:close>
  91. <a href="javascript:cancelWait()" id="cancel_link"><dp:closeMarker/></a>
  92. </dp:close>
  93. </dp:header>
  94. <utml:form>
  95. <table align="center" cellspacing="0" cellpadding="0" style="vertical-align:middle" border="0">
  96. <tr>
  97. <td align="center">
  98. <img src="{$skin_root}/branding/progress.gif" style="margin:5px;" width="48" height="48"/>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td align="center" nowrap="nowrap" class="formText">
  103. <div id="wait_message">
  104. <xsl:choose>
  105. <xsl:when test="contains($waitDialogStyle, 'validate')">
  106. <xts:string id="VALIDATION_IN_PROGRESS"/>
  107. </xsl:when>
  108. <xsl:when test="contains($waitDialogStyle, 'save')">
  109. <xts:string id="SELECT_VALUES_WAIT"/>
  110. </xsl:when>
  111. <xsl:when test="contains($waitDialogStyle, 'preview')">
  112. <xts:string id="SELECT_VALUES_WAIT"/>
  113. </xsl:when>
  114. <xsl:when test="contains($waitDialogStyle, 'open')">
  115. <xts:string id="LOADING_IN_PROGRESS"/>
  116. </xsl:when>
  117. <xsl:otherwise>
  118. <xts:string id="RESET_AGENT_IN_PROGRESS"/>
  119. </xsl:otherwise>
  120. </xsl:choose>
  121. </div>
  122. <div id="canceling_message" style="display:none">
  123. <xts:string id="DIALOG_CANCELLING"/>
  124. </div>
  125. </td>
  126. </tr>
  127. <!--tr>
  128. <td style="width: 100% overflow:auto; height:25px">
  129. <span style="font-family: sans-serif; margin: 2px; font-size: 60%;width: 100%; color:grey;font-style:italic " id="wait_debug_message"/>
  130. </td>
  131. </tr-->
  132. </table>
  133. </utml:form>
  134. <xsl:if test="contains($waitDialogStyle, 'validate') or contains($waitDialogStyle, 'preview')">
  135. <dp:footer>
  136. <df:button df:id="DIALOG_CANCEL_BUTTON" id="cancel_button" df:style="href" df:href="#" onclick="cancelWait()"/>
  137. </dp:footer>
  138. </xsl:if>
  139. </dp:page>
  140. </xsl:template>
  141. </xsl:stylesheet>
  142. </xts:block>
  143. </xts:morphlet>