FormDesigner.aspx
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:9k
源码类别:

OA系统

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeFile="FormDesigner.aspx.cs" Inherits="WorkFlow_Design_FormDesigner" %>
  2. <HTML>
  3. <HEAD>
  4. <title>表单智能设计器</title>
  5. <script Language="JavaScript">
  6. self.moveTo(0,0);
  7. self.resizeTo(screen.availWidth,screen.availHeight);
  8. self.focus();
  9. function CheckForm()
  10. {
  11.    if(EDIT_HTML.get_docHtml()=="")
  12.    { alert("表单内容不能为空!");
  13.      return (false);
  14.    }
  15.    return (true);
  16. }
  17. function send()
  18. {
  19.  if(CheckForm())
  20.  {
  21.    if(EDIT_HTML.switchMode.checked == true)
  22.    {
  23.       alert("源文件模式,不能保存!");
  24.       return;
  25.    }
  26.    document.form1.CONTENT.value=EDIT_HTML.get_docHtml();
  27.    document.form1.submit();
  28.  }
  29. }
  30. function myclose()
  31. {
  32.  msg='关闭表单设计器前,保存对表单的修改?';
  33.  if(window.confirm(msg))
  34.  {
  35.    document.form1.CLOSE_FLAG.value="1";
  36.    send();
  37.  }
  38.  else
  39.    window.close();
  40. }
  41. function Load_Do()
  42. {
  43.   EDIT_HTML.insertHtml("<%=strFormModel%>");
  44.   EDIT_HTML.focus();  
  45.   <% = Request.QueryString["save"]!=null?"alert('表单已保存!')" : ""%>
  46. }
  47. function cool_textfield()
  48. {
  49.   URL="cool_textfield.aspx";
  50.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  51.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  52.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:150px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  53. }
  54. function cool_textarea()
  55. {
  56.   URL="cool_textarea.aspx";
  57.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  58.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  59.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:150px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  60. }
  61. function cool_listmenu()
  62. {
  63.   URL="cool_listmenu.aspx";
  64.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  65.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  66.   window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:290px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  67. }
  68. function cool_checkbox()
  69. {
  70.   URL="cool_checkbox.aspx";
  71.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  72.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  73.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:120px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  74. }
  75. function cool_calendar()
  76. {
  77.   URL="cool_calendar.aspx";
  78.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  79.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  80.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:120px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  81. }
  82. function cool_auto()
  83. {
  84.   URL="cool_auto.aspx";
  85.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-380;
  86.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  87.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:360px;dialogHeight:250px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  88. }
  89. function cool_calc()
  90. {
  91.   URL="cool_calc.aspx";
  92.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  93.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  94.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:180px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  95. }
  96. function cool_listview()
  97. {
  98.   URL="cool_listview.aspx";
  99.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-450;
  100.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  101.   window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:420px;dialogHeight:290px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  102. }
  103. function cool_user()
  104. {
  105.   URL="cool_user.aspx";
  106.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  107.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  108.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:330px;dialogHeight:120px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  109. }
  110. function cool_sign()
  111. {
  112.   URL="cool_sign.aspx";
  113.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  114.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  115.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:100px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  116. }
  117. </script>
  118. </HEAD>
  119. <body class="bodycolor" leftmargin="0" topmargin="0" onload="Load_Do();">
  120. <table width="100%" height="100%" class="big" bgcolor="#000000" border="0" cellpadding="3"
  121. cellspacing="1" align="center">
  122. <tr bgcolor="#DDDDDD">
  123. <td class="TableHeader" colspan="2" height="20">
  124. <b>表单智能设计器</b>:<span class="small">首先,将网页设计工具或Word编辑好的表格框架粘贴到表单设计区。然后,创建表单控件。</span>
  125. </td>
  126. </tr>
  127. <tr bgcolor="#DDDDDD">
  128. <td bgcolor="#DDDDDD" width="100%">
  129. <iframe id="EDIT_HTML" style="BACKGROUND-COLOR: buttonface" src="rte/Editor.aspx?form_id=<%=intFormId %>" width="100%"
  130. height="100%" type="text/x-scriptlet" VIEWASTEXT></iframe>
  131. </td>
  132. <td valign="top" align="center">
  133. <table width="120" border="0" cellspacing="1" class="small" bgcolor="#ffffff" cellpadding="3"
  134. align="center">
  135. <tr class="TableHeader">
  136. <td align="center">表单控件</td>
  137. </tr>
  138. <tr class="TableHeader">
  139. <td align="center"><button style="width:120;text-Align:left" onclick="cool_textfield()"><img src="form/textfield.gif" align="absmiddle">单行输入框</button></td>
  140. </tr>
  141. <tr class="TableHeader">
  142. <td align="center"><button style="width:120;text-Align:left" onclick="cool_textarea()"><img src="form/textarea.gif" align="absmiddle">多行输入框</button></td>
  143. </tr>
  144. <tr class="TableHeader">
  145. <td align="center"><button style="width:120;text-Align:left" onclick="cool_listmenu()"><img src="form/listmenu.gif" align="absmiddle">下拉菜单</button></td>
  146. </tr>
  147. <tr class="TableHeader">
  148. <td align="center"><button style="width:120;text-Align:left" onclick="cool_checkbox()"><img src="form/checkbox.gif" align="absmiddle">选择框</button></td>
  149. </tr>
  150. <%-- <tr class="TableHeader">
  151. <td align="center"><button style="width:120;text-Align:left" onclick="cool_listview()"><img src="form/listview.gif" align="absmiddle">列表控件</button></td>
  152. </tr>--%>
  153. <%-- <tr class="TableHeader">
  154. <td align="center"><button style="width:120;text-Align:left" onclick="cool_auto()"><img src="form/auto.gif" align="absmiddle">宏控件</button></td>
  155. </tr>--%>
  156. <%-- <tr class="TableHeader">
  157. <td align="center"><button style="width:120;text-Align:left" onclick="cool_calendar()"><img src="form/calendar.gif" align="absmiddle">日历控件</button></td>
  158. </tr>--%>
  159. <%-- <tr class="TableHeader">
  160. <td align="center"><button style="width:120;text-Align:left" onclick="cool_calc()"><img src="form/calc.gif" align="absmiddle">计算控件</button></td>
  161. </tr>--%>
  162. <%-- <tr class="TableHeader">
  163. <td align="center"><button style="width:120;text-Align:left" onclick="cool_user()"><img src="form/user.gif" align=absmiddle>部门人员控件</button></td>
  164. </tr>--%>
  165. <%-- <tr class="TableHeader">
  166.     <td align="center"><button style="width:120;text-Align:left" onclick="cool_sign()"><img src="form/sign.gif" height=20 width=20 align=absmiddle>安全签章控件</button></td>
  167. </tr>--%>
  168. </table>
  169. <br>
  170. <table width="120" border="0" cellspacing="1" class="small" bgcolor="#ffffff" cellpadding="3"
  171. align="center">
  172. <tr class="TableHeader">
  173. <td align="center">保存与退出</td>
  174. </tr>
  175. <form action="cool_submit.aspx" method="post" name="form1">
  176. <tr class="TableHeader">
  177. <td align="center"><button style="width:120;height:30;text-Align:center" onclick="send()"><b>保存表单</b></button></td>
  178. </tr>
  179. <tr class="TableHeader">
  180. <td align="center"><button style="width:120;height:30;text-Align:center" onclick="myclose()"><b>关闭设计器</b></button></td>
  181. </tr>
  182. <input type="hidden" name="CONTENT" value="">
  183. <input type="hidden" name="CLOSE_FLAG" value="0">
  184. <input type="hidden" name="FORM_ID" value="<%=intFormId%>">
  185. </form>
  186. </table>
  187. </td>
  188. </tr>
  189. </table>
  190. </body>
  191. </HTML>