export.js
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:5k
源码类别:

Email客户端

开发平台:

Visual C++

  1. // export.js
  2. // This file contains the funcitons needed to construct the HTML for the export / print dialog.
  3. //
  4. // Global variable
  5. var print = false; // default to export, so set print to false
  6. var crystal_postback =
  7.         "<INPUT type="hidden" name="reportsource" id="reportsource"/>" +
  8.         "<INPUT type="hidden" name="viewstate" id="viewstate"/>";
  9. function getPageTitle() {
  10. if (print) {
  11. return L_PrintPageTitle;
  12. }
  13. else {
  14. return L_ExportPageTitle;
  15. }
  16. }
  17. function getOptionsTitle() {
  18. if (print) {
  19. return L_PrintOptions;
  20. }
  21. else {
  22. return L_ExportOptions;
  23. }
  24. }
  25. function getFormatDropdownList() {
  26. if (print) {
  27. return "<INPUT type="hidden" name="exportformat" id="exportformat" value="PDF"/>";
  28. }
  29. else {
  30. var list =
  31. "<TABLE width="100%">" +
  32. "<TD align="center"><SPAN class="exportMessage"><LABEL for="exportFormatList">" + L_ExportFormat + "</LABEL></SPAN></TD>"  +
  33. "<TR>" +
  34. "<TD class="exportSelect" align="center">" +
  35. "<SELECT id="exportFormatList" class="exportSelect" name="exportformat" onchange="checkDisableRange()">" +
  36. "<OPTION selected value="">" + L_Formats +"</OPTION>";
  37. if( rpt )
  38. {
  39. list += "<OPTION value="CrystalReports">" + L_CrystalRptFormat + "</OPTION>";
  40. }
  41. if( pdf )
  42. {
  43. list += "<OPTION value="PDF">" + L_AcrobatFormat + "</OPTION>";
  44. }
  45. if( word )
  46. {
  47. list += "<OPTION value="MSWord">" + L_WordFormat + "</OPTION>";
  48. }
  49. if( xls )
  50. {
  51. list += "<OPTION value="MSExcel">" + L_ExcelFormat + "</OPTION>";
  52. }
  53. if( recXls )
  54. {
  55. list += "<OPTION value="RecordToMSExcel">" + L_ExcelRecordFormat + "</OPTION>";
  56. }
  57. if( rtf )
  58. {
  59. list += "<OPTION value="RTF">" + L_RTFFormat +"</OPTION>";
  60. }
  61. list += "</SELECT>" +
  62. "</TD>" +
  63. "</TR>" +
  64. "</TABLE>";
  65. return list;
  66. }
  67. }
  68. function getSelectPageRangeSentence() {
  69. if (print) {
  70. return L_PrintPageRange;
  71. }
  72. else {
  73. return L_ExportPageRange;
  74. }
  75. }
  76. function getPrintSteps() {
  77. if (print) {
  78. var steps =
  79. "<TR height=40 valign="bottom">" +
  80. "<TD><SPAN class="exportMessage">" + L_PrintStep0 + "</SPAN></TD>" +
  81. "</TR>" +
  82. "<TR valign="top">" +
  83. "<TD><SPAN class="exportMessage">" + L_PrintStep1 + "</TD>" +
  84. "</TR>" +
  85. "<TR height=40 valign="top">" +
  86. "<TD><SPAN class="exportMessage">" + L_PrintStep2 + "</SPAN></TD>" +
  87. "</TR>";
  88. return steps;
  89. }
  90. else {
  91. return "";
  92. }
  93. }
  94. function getExportDialog() {
  95. var exportDialog =
  96. "<HTML>" +
  97. "<HEAD>" +
  98. "<STYLE>" +
  99. "SPAN.exportMessage {" +
  100. "   FONT-SIZE: 12pt; FONT-FAMILY: Arial, Helvetica, sans-serif" +
  101. "}" +
  102. "SPAN.exportSelect {" +
  103. "   FONT-SIZE: 10pt; FONT-FAMILY: Arial, Helvetica, sans-serif" +
  104. "}" +
  105. "</STYLE>" +
  106. "<TITLE>" + getPageTitle() + "</TITLE>" +
  107. "</HEAD>" +
  108. "<BODY bottomMargin=0 topMargin=5 onload="init()">" +
  109. "<FORM name="Export" method="POST">" +
  110. crystal_postback +
  111. "<TABLE cellSpacing="0" cellPadding="3" width="97%" align="center" border="0">" +
  112. "<TBODY>" +
  113. "<TR bgColor=#008080><TD>&nbsp;</TD></TR>" +
  114. "<TR bgColor=#000000><TD>&nbsp;</TD></TR>" +
  115. "<FIELDSET style="border-style:none">" +
  116. "<TR><TD><LEGEND align="center"><SPAN class="exportMessage">" + getOptionsTitle() + "</SPAN></LEGEND></TD></TR>" +
  117. "<TR>" +
  118. "<TD align="center">" +
  119. getFormatDropdownList() +
  120. "</TD></TR>" +
  121. "<TR><TD><SPAN class="exportMessage">&nbsp;&nbsp;&nbsp;" + getSelectPageRangeSentence() +
  122. "</SPAN></TD>" +
  123. "</TR>" +
  124. "<TR>" +
  125. "<TD>" +
  126. "<TABLE>" +
  127. "<TR>" +
  128. "<TD><INPUT type="radio" id="radio1" checked name="isRange" value="all" onclick="return toggleRangeFields(this);"/></TD>" +
  129. "<TD><SPAN class="exportMessage"><LABEL for=radio1>" + L_All + "</LABEL></SPAN></TD>" +
  130. "</TR>" +
  131. "</TABLE>" +
  132. "</TD>" +
  133. "</TR>" +
  134. "<TR>" +
  135. "<TD>" +
  136. "<TABLE>" +
  137. "<TR>" +
  138. "<TD><INPUT type="radio" id="radio2" name="isRange" value="selection" onclick="return toggleRangeFields(this);"/></TD>" +
  139. "<TD><SPAN class="exportMessage"><LABEL for=radio2>" + L_Pages + "</LABEL></SPAN></TD>" +
  140. "</TR>" +
  141. "</TABLE>" +
  142. "</TD>" +
  143. "</TR>" +
  144. "<TR>" +
  145. "<TD>" +
  146. "<TABLE>" +
  147. "<TR>" +
  148. "<TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>" +
  149. "<TD><SPAN class="exportMessage"><LABEL for=from>" + L_From + "</LABEL></SPAN></TD>" +
  150. "<TD><INPUT type="text" width="20" size="6" maxLength="6" name="from" id="from" value="1" disabled></TD>" +
  151. "<TD><SPAN class="exportMessage"><LABEL for=to>" + L_To + "</LABEL></SPAN></TD>" +
  152. "<TD><INPUT type="text" width="20" size="6" maxLength="6" name="to" id="to" value="1" disabled></TD>" +
  153. "</TR>" +
  154. "</TABLE>" +
  155. "</TD>" +
  156. "</TR>" +
  157. "</FIELDSET>" +
  158. getPrintSteps() +
  159. "<TR>" +
  160. "<TD align="center" colspan=6><BR><INPUT type="button" id="submitexport" width="30" title="" + getPageTitle() + "" value="&nbsp;&nbsp;&nbsp;" + L_OK + "&nbsp;&nbsp;&nbsp;" onclick="checkValuesAndSubmit();"/></TD>" +
  161. "</TR>" +
  162. "</TBODY>" +
  163. "</TABLE>" +
  164. "</FORM>" +
  165. "</BODY>" +
  166. "</HTML>";
  167. return exportDialog;
  168. }