Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

246 lines
5.4 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <% if Session("FONTSIZE") = "" then %>
  5. <!--#include file="iito.inc"-->
  6. <% else %>
  7. <!--#include file="iidoc.str"-->
  8. <%
  9. On Error Resume Next
  10. Const STR_FOOTER_PREFIX = "FILE:"
  11. Dim path, currentobj
  12. path=Session("dpath")
  13. Session("path")=path
  14. Session("SpecObj")=""
  15. Session("SpecProps")=""
  16. Set currentobj=GetObject(path)
  17. function strStripFilePrefix( strFooterPath )
  18. if InStr( strFooterPath, STR_FOOTER_PREFIX ) > 0 then
  19. strStripFilePrefix = Mid( strFooterPath, Len(STR_FOOTER_PREFIX) + 1 )
  20. else
  21. strStripFilePrefix = strFooterPath
  22. end if
  23. end function
  24. %>
  25. <!--#include file="iiset.inc"-->
  26. <!--#include file="iisetfnt.inc"-->
  27. <HTML>
  28. <HEAD>
  29. <SCRIPT LANGUAGE="JavaScript">
  30. top.title.Global.helpFileName="iipy_36";
  31. top.title.Global.siteProperties = false;
  32. function disableDefault(dir,fromCntrl, toCntrl){
  33. if (!dir){
  34. if (fromCntrl.value !=""){
  35. toCntrl.value=fromCntrl.value;
  36. fromCntrl.value="";
  37. }
  38. }
  39. else{
  40. if (toCntrl.value !=""){
  41. fromCntrl.value=toCntrl.value;
  42. toCntrl.value="";
  43. }
  44. }
  45. }
  46. function enableDefault(textcntrl, chkCntrl){
  47. if (textcntrl.value !=""){
  48. chkCntrl.checked=true;
  49. }
  50. else{
  51. chkCntrl.checked=false;
  52. }
  53. }
  54. function warn(){
  55. top.title.Global.working = true;
  56. if (document.userform.chkEnableDocFooter.checked) {
  57. if (confirm("<%= L_PERFORMANCE_WARNINGMESSAGE %>")){
  58. document.userform.chkEnableDocFooter.checked=true;
  59. document.userform.hdnDefaultDocFooter.focus();
  60. }
  61. else{
  62. document.userform.chkEnableDocFooter.checked=false;
  63. document.userform.hdnDefaultDocFooter.value="";
  64. }
  65. }
  66. top.title.Global.working = false;
  67. }
  68. function checkValueChange( ctrl )
  69. {
  70. if( !top.title.Global.updated )
  71. {
  72. if( ctrl.value != ctrl.defaultValue )
  73. {
  74. top.title.Global.updated = true;
  75. }
  76. }
  77. }
  78. function PageValidation()
  79. {
  80. }
  81. validatePage = new PageValidation();
  82. function ContinueSave()
  83. {
  84. // Perform any sync validation.
  85. var bReturn = true;
  86. var path = document.userform.hdnDefaultDocFooter.value;
  87. if( path != "" )
  88. {
  89. document.userform.DefaultDocFooter.value = "<%= STR_FOOTER_PREFIX %>" + path;
  90. bReturn = false;
  91. }
  92. else
  93. {
  94. document.userform.DefaultDocFooter.value = "";
  95. }
  96. if( document.userform.chkEnableDocFooter.checked )
  97. {
  98. bReturn = false;
  99. }
  100. return bReturn;
  101. }
  102. function SaveCallback()
  103. {
  104. // Called back from iitool if ContinueSave returns false
  105. // Perform any async (ASP) based validation
  106. path = document.userform.hdnDefaultDocFooter.value;
  107. if( path != "" )
  108. {
  109. parent.hlist.location.href = "iichkpath.asp?path=" + escape(path) + "&ptype=1" +
  110. "&donext=top.body.tool.toolFuncs.dosave();";
  111. }
  112. else
  113. {
  114. // path is empty
  115. if( document.userform.chkEnableDocFooter.checked )
  116. {
  117. // don't save an empty path
  118. alert("<%= L_NOFOOTPATH_ERR %>");
  119. document.userform.hdnDefaultDocFooter.focus();
  120. }
  121. else
  122. {
  123. top.body.tool.toolFuncs.dosave();
  124. }
  125. }
  126. }
  127. </SCRIPT>
  128. <% if Session("canBrowse") then %>
  129. <SCRIPT SRC="JSBrowser/jsbrwsrc.asp">
  130. </SCRIPT>
  131. <SCRIPT>
  132. JSBrowser = new BrowserObj(null,false,TFILE,<%= Session("FONTSIZE") %>);
  133. function popBrowser()
  134. {
  135. JSBrowser = new BrowserObj(document.userform.hdnDefaultDocFooter,true,TFILE,<%= Session("FONTSIZE") %>);
  136. }
  137. </SCRIPT>
  138. <% end if %>
  139. </HEAD>
  140. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" TOPMARGIN=5 TEXT="#000000" LINK="#FFFFFF" >
  141. <TABLE WIDTH=500 BORDER = 0>
  142. <TR>
  143. <TD>
  144. <%= sFont("","","",True) %>
  145. <B><%= L_DOCUMENTS_TEXT %></B>
  146. <FORM NAME="userform">
  147. <INPUT TYPE="hidden" NAME="page" VALUE="iidoc">
  148. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  149. <%= checkbox("EnableDefaultDoc","disableDefault(this.checked,document.userform.DefaultDoc, document.userform.hdnDefaultDoc);",false) %>
  150. <%= L_ENABLEDEFAULT_TEXT %>
  151. <IMG SRC="images/hr.gif" WIDTH=<%= L_ENABLEDEFAULTHR_NUM %> HEIGHT=2 BORDER=0 ALIGN="middle">
  152. </FONT>
  153. <TABLE>
  154. <TR HEIGHT = 4>
  155. <TD>
  156. </TD>
  157. </TR>
  158. <TR>
  159. <TD VALIGN="bottom">
  160. <%= sFont("","","",True) %>
  161. <%= L_DEFAULTDOC_TEXT %>&nbsp;(<%= L_MULTIDOC_TEXT %>)
  162. <BR>
  163. <%= text("DefaultDoc",L_TEXTWIDTH_NUM,"enableDefault(this,document.userform.chkEnableDefaultDoc);" ,"","",true,false) %>
  164. </FONT>
  165. </TD>
  166. </TR>
  167. </TABLE>
  168. <P>
  169. <%= sFont("","","",True) %>
  170. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  171. <%= checkbox("EnableDocFooter","disableDefault(this.checked,document.userform.hdnDefaultDocFooter, document.userform.hdnhdnDefaultDocFooter);warn();",false) %>
  172. <%= L_ENABLEDOCFOOTER_TEXT %>
  173. <IMG SRC="images/hr.gif" WIDTH=<%= L_ENABLEDOCFOOTERHR_NUM %> HEIGHT=2 BORDER=0 ALIGN="middle">
  174. </FONT>
  175. <TABLE>
  176. <TR HEIGHT = 4>
  177. <TD>
  178. </TD>
  179. </TR>
  180. <TR>
  181. <TD VALIGN="bottom">
  182. <%= sFont("","","",True) %>
  183. <%= L_DOCFOOTER_TEXT %>
  184. <BR>
  185. <%= writeinputbox( 0, "TEXT", "hdnDefaultDocFooter", strStripFilePrefix(currentobj.Get("DefaultDocFooter")), L_TEXTWIDTH_NUM, L_TEXTWIDTH_NUM, "enableDefault(this, document.userform.chkEnableDocFooter);","","checkValueChange(this);",true,false,false,false ) %>
  186. <INPUT TYPE="HIDDEN" NAME="DefaultDocFooter" VALUE="">
  187. </FONT>
  188. </TD>
  189. </TR>
  190. <% if Session("canBrowse") then %>
  191. <TR>
  192. <TD COLSPAN = 2 ALIGN="right">
  193. <%= sFont("","","",True) %>
  194. <INPUT TYPE="button" NAME="hdnBrower" VALUE="<%= L_BROWSE_TEXT %>" OnClick="popBrowser();document.userform.chkEnableDocFooter.checked=true;">
  195. </FONT>
  196. </TD>
  197. </TR>
  198. </TABLE>
  199. <% end if %>
  200. </FONT>
  201. </FORM>
  202. </TD>
  203. </TR>
  204. </TABLE>
  205. </BODY>
  206. </HTML>
  207. <% end if %>