flow_form_old.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:20k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="cn.js.fan.util.ParamUtil"%>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>智能表单设计器</title>
  7. <link rel="STYLESHEET" type="text/css" href="edit.css">
  8. <%
  9. String editorRootPath = request.getContextPath();
  10. String op = ParamUtil.get(request, "op");
  11. %>
  12. <script>
  13. var editorRootPath = "<%=editorRootPath%>";
  14. var op = "<%=op%>";
  15. function getContent() {
  16. return window.opener.getFormContent();
  17. }
  18. function saveexit() {
  19. var html;
  20. html = cws_getText();
  21. html = cws_rCode(html,"<a> </a>","");
  22. // alert(html);
  23.   window.opener.setFormContent(html);
  24. window.opener.focus();
  25. window.close();
  26. }
  27. function window_onload() {
  28. if (op=="edit") {
  29. setHTML(getContent());
  30. }
  31. cws_Size(360);
  32. }
  33. </script>
  34. <style type="text/css">
  35. <!--
  36. body {
  37. margin-left: 0px;
  38. margin-top: 0px;
  39. margin-right: 0px;
  40. margin-bottom: 0px;
  41. }
  42. -->
  43. </style></head>
  44. <body onLoad="window_onload()"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DEDFDE">
  45.   <tr>
  46.     <td width="81%" valign="top">
  47. <Script src="DhtmlEdit.js"></Script>
  48. <Script src="editor.js"></Script>
  49. <Script src="flow_form_js.jsp"></Script>
  50. <input type="hidden" id="edit" name="edit" value="" />
  51. <div id="cws_edit">
  52. <ul id="ExtToolbar0">
  53. <li >
  54. <select id="cws_formatSelect"  onchange="cws_doSelectClick('FormatBlock',this)">
  55. <option>段落格式</option>
  56. <option value="&lt;P&gt;">普通格式 
  57. <option value="&lt;H1&gt;">标题 1 
  58. <option value="&lt;H2&gt;">标题 2 
  59. <option value="&lt;H3&gt;">标题 3 
  60. <option value="&lt;H4&gt;">标题 4 
  61. <option value="&lt;H5&gt;">标题 5 
  62. <option value="&lt;H6&gt;">标题 6 
  63. <option value="&lt;H7&gt;">标题 7 
  64. <option value="&lt;PRE&gt;">已编排格式 
  65. <option value="&lt;ADDRESS&gt;">地址 
  66. </select>
  67. <select language="javascript" class="cws_TBGen" id="FontName" onChange="FormatText ('fontname',this[this.selectedIndex].value);">
  68. <option class="heading" selected>字体 
  69. <option value="宋体">宋体 
  70. <option value="黑体">黑体 
  71. <option value="楷体_GB2312">楷体 
  72. <option value="仿宋_GB2312">仿宋 
  73. <option value="隶书">隶书 
  74. <option value="幼圆">幼圆 
  75. <option value="新宋体">新宋体 
  76. <option value="细明体">细明体 
  77. <option value="Arial">Arial 
  78. <option value="Arial Black">Arial Black 
  79. <option value="Arial Narrow">Arial Narrow 
  80. <option value="Bradley Hand ITC">Bradley Hand ITC 
  81. <option value="Brush Script MT">Brush Script MT 
  82. <option value="Century Gothic">Century Gothic 
  83. <option value="Comic Sans MS">Comic Sans MS 
  84. <option value="Courier">Courier 
  85. <option value="Courier New">Courier New 
  86. <option value="MS Sans Serif">MS Sans Serif 
  87. <option value="Script">Script 
  88. <option value="System">System 
  89. <option value="Times New Roman">Times New Roman 
  90. <option value="Viner Hand ITC">Viner Hand ITC 
  91. <option value="Verdana">Verdana 
  92. <option value="Wide Latin">Wide Latin 
  93. <option value="Wingdings">Wingdings</option>
  94. </select>
  95. <select language="javascript" class="cws_TBGen" id="FontSize" onChange="FormatText('fontsize',this[this.selectedIndex].value);">                                   
  96. <option class="heading" selected>字号 
  97. <option value="1">1 
  98. <option value="2">2 
  99. <option value="3">3 
  100. <option value="4">4 
  101. <option value="5">5 
  102. <option value="6">6 
  103. <option value="7">7</option>
  104. </select>
  105. </li>
  106. <li class="cws_Btn" title="字体颜色" language="javascript" onClick="cws_foreColor();" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  107. <img class="cws_Ico" src="images/fgcolor.gif" /> </li>
  108. <li class="cws_Btn" title="字体背景颜色" language="javascript" onClick="cws_backColor();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';> 
  109. <img class="cws_Ico" src="images/fbcolor.gif" /> </li>
  110. <li class="cws_Btn" title="插入特殊符号" language="javascript" onClick="insertSpecialChar();" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';> 
  111. <img class="cws_Ico" src="images/specialchar.gif" /></li>
  112. <li class="cws_Btn" title="替换" language="javascript" onClick="cws_replace();" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';><img class="cws_Ico" src="images/replace.gif" /></li>
  113. <li class="cws_Btn" title="清理代码" language="javascript" onClick="cws_CleanCode();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';> 
  114. <img class="cws_Ico" src="images/cleancode.gif" /></li>
  115. <li> 
  116. <select ID="Zoom" class="cws_TBGen" onChange="doZoom(this)" >
  117. <option value="100">100% 
  118. <option value="50">50% 
  119. <option value="75">75% 
  120. <option value="100">100% 
  121. <option value="125">125% 
  122. <option value="150">150% 
  123. <option value="175">175% 
  124. <option value="200">200%</option>
  125. </select>
  126. </li>
  127.      <li class="cws_Btn" title="帮助" language="javascript" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';> <a href="#"><img src="images/help.gif" class="cws_Ico" border="0"></a> </li>        
  128. </ul>
  129. <ul id="ExtToolbar1"> 
  130. <li class="cws_Btn" title="全选" language="javascript" onClick="FormatText('selectAll');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn' > 
  131. <img class="cws_Ico" src="images/selectAll.gif" /> </li>
  132. <li class="cws_Btn" title="剪切" language="javascript" onClick="FormatText('cut');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  133. <img class="cws_Ico" src="images/cut.gif" /> </li>
  134. <li class="cws_Btn" title="复制" language="javascript" onClick="FormatText('copy');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  135. <img class="cws_Ico" src="images/copy.gif" /> </li>
  136. <li class="cws_Btn" title="粘贴" language="javascript" onClick="FormatText('paste');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  137. <img class="cws_Ico" src="images/paste.gif" /> </li>
  138. <li class="cws_Btn" title="撤消" language="javascript" onClick="FormatText('undo');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  139. <img class="cws_Ico" src="images/undo.gif" /> </li>
  140. <li class="cws_Btn" title="恢复" language="javascript" onClick="FormatText('redo');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  141. <img class="cws_Ico" src="images/redo.gif" /> </li>
  142. <li class="cws_Btn" title="插入超级链接" language="javascript" onClick="cws_forlink();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  143. <img class="cws_Ico" src="images/wlink.gif" > </li>
  144. <li class="cws_Btn" title="去掉超级链接" language="javascript" onClick="FormatText('Unlink');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  145. <img class="cws_Ico" src="images/unlink.gif" /> </li>
  146. <li class="cws_Btn" title="插入图片" language="javascript" onClick="cws_forimg();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  147. <img class="cws_Ico" src="images/img.gif" /> </li>
  148. <li class="cws_Btn" title="插入水平线" language="javascript" onClick="FormatText('InsertHorizontalRule', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  149. <img class="cws_Ico" src="images/hr.gif" /> </li>
  150. <li class="cws_Btn" title="插入表格" language="javascript" onClick="cws_fortable();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  151. <img class="cws_Ico" src="images/table.gif" /> </li>
  152. <li class="cws_Btn" title="插入行" language="javascript" onClick="cws_InsertRow();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  153. <img class="cws_Ico" src="images/insertrow.gif" /> </li>
  154. <li class="cws_Btn" title="删除行" language="javascript" onClick="cws_DeleteRow();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  155. <img class="cws_Ico" src="images/deleterow.gif" /> </li>
  156. <li class="cws_Btn" title="插入列" language="javascript" onClick="cws_InsertColumn();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  157. <img class="cws_Ico" src="images/insertcolumn.gif" /> </li>
  158. <li class="cws_Btn" title="删除列" language="javascript" onClick="cws_DeleteColumn();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  159. <img class="cws_Ico" src="images/deletecolumn.gif" /> </li>
  160. <li class="cws_Btn" title="插入Flash" language="javascript" onClick="cws_forswf();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  161. <img class="cws_Ico" src="images/swf.gif" /> </li>
  162. <li class="cws_Btn" title="插入Windows Media" language="javascript" onClick="cws_forwmv();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  163. <img class="cws_Ico" src="images/wmv.gif" /> </li>
  164. <li class="cws_Btn" title="插入Real Media" language="javascript" onClick="cws_forrm();ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  165. <img class="cws_Ico" src="images/rm.gif" /> </li>
  166. </ul>
  167. <ul id="ExtToolbar2"> 
  168. <li class="cws_Btn" title="加粗" language="javascript" onClick="FormatText('bold', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  169. <img class="cws_Ico" src="images/bold.gif" /> </li>
  170. <li class="cws_Btn" title="斜体" language="javascript" onClick="FormatText('italic', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  171. <img class="cws_Ico" src="images/italic.gif" /> </li>
  172. <li class="cws_Btn" title="下划线" language="javascript" onClick="FormatText('underline', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  173. <img class="cws_Ico" src="images/underline.gif" /> </li>
  174. <li class="cws_Btn" title="上标" language="javascript" onClick="FormatText('superscript', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  175. <img class="cws_Ico" src="images/superscript.gif" /> </li>
  176. <li class="cws_Btn" title="下标" language="javascript" onClick="FormatText('subscript', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  177. <img class="cws_Ico" src="images/subscript.gif" /> </li>
  178. <li class="cws_Btn" title="删除线" language="javascript" onClick="FormatText('strikethrough', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  179. <img class="cws_Ico" src="images/strikethrough.gif" /> </li>
  180. <li class="cws_Btn" title="取消格式" language="javascript" onClick="FormatText('RemoveFormat', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  181. <img class="cws_Ico" src="images/removeformat.gif" /> </li>
  182. <li class="cws_Btn" title="左对齐" NAME="Justify" language="javascript" onClick="FormatText('justifyleft', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  183. <img class="cws_Ico" src="images/aleft.gif" /> </li>
  184. <li class="cws_Btn" title="居中" NAME="Justify" language="javascript" onClick="FormatText('justifycenter', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  185. <img class="cws_Ico" src="images/center.gif" /> </li>
  186. <li class="cws_Btn" title="右对齐" NAME="Justify" language="javascript" onClick="FormatText('justifyright', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  187. <img class="cws_Ico" src="images/aright.gif" /> </li>
  188. <li class="cws_Btn" title="编号" language="javascript" onClick="FormatText('insertorderedlist', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  189. <img class="cws_Ico" src="images/numlist.gif" /> </li>
  190. <li class="cws_Btn" title="项目符号" language="javascript" onClick="FormatText('insertunorderedlist', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  191. <img class="cws_Ico" src="images/bullist.gif" /> </li>
  192. <li class="cws_Btn" title="减少缩进量" language="javascript" onClick="FormatText('outdent', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  193. <img class="cws_Ico" src="images/outdent.gif" /> </li>
  194. <li class="cws_Btn" title="增加缩进量" language="javascript" onClick="FormatText('indent', '');ondrag='return false;'" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  195. <img class="cws_Ico" src="images/indent.gif" /> </li>
  196. <li class="cws_Btn" title="插入表情" language="javascript" onClick="cws_foremot()" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn'; > 
  197. <img class="cws_Ico" src="images/smiley.gif" / > </li>
  198. <!--
  199. <li class="cws_Btn" title="上传文件" language="javascript" onclick="cws_forfile()" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';>
  200. <img class="cws_Ico" src="images/file.gif" />
  201. </li>
  202. -->
  203. <li class="cws_Btn" title="插入代码" language="javascript" onClick="cws_code()" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';>
  204. <img class="cws_Ico" src="images/code.gif" /> </li>
  205. <li class="cws_Btn" title="插入引用" language="javascript" onClick="cws_quote()" onmouseover=this.className='cws_BtnMouseOverUp'; onmouseout=this.className='cws_Btn';>
  206. <img class="cws_Ico" src="images/quote.gif" /> </li>
  207. </ul>
  208. <ul style="height:100%" id="PostiFrame">
  209.   <iframe class="cws_Composition" id="cws_Composition" marginheight="5" marginwidth="5" width="100%" height="100%"></iframe>
  210. </ul>
  211. <ul>
  212. <li style="width:10px"></li>
  213. <li class="cws_TabOn" id="cws_TabDesign" onClick="if (cws_bTextMode!=1) {cws_setMode(1);}"> 
  214. <img src="images/mode.design.gif" ALIGN="absmiddle" width="20" height="20">&nbsp;设计</li>
  215. <li style="width:10px"></li>
  216. <li class="cws_TabOff" id="cws_TabView" onClick="cws_View();" > 
  217. <img unselectable="on" src="images/mode.view.gif" ALIGN="absmiddle" width="20" height="20" />&nbsp;预览 </li>
  218. <li style="width:10px"></li>
  219. <li class="cws_TabOff" id="cws_TabHtml" onClick="if (cws_bTextMode!=2) {cws_setMode(2);}" style="cursor: pointer;"><img unselectable="on" src="images/mode.html.gif" ALIGN="absmiddle" width=21 height=20 />&nbsp;源码</li>
  220. <li style="width:300;text-align:right;">
  221. <a href="javascript:cws_Size(360)"></a> 
  222. <a href="javascript:cws_Size(420)"></a></li>
  223. <li style="width:10px"></li>
  224. </ul>
  225. </div>
  226. </ul>
  227.   </td>
  228.     <td width="19%" valign="top">
  229.       <table class="small" cellSpacing="1" cellPadding="3" width="120" align="center" border="0">
  230.   <tbody>
  231.     <tr class="TableHeader">
  232.       <td align="middle">表单控件</td>
  233.     </tr>
  234.     <tr class="TableHeader">
  235.       <td align="middle"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: left" 
  236. onclick=cloud_textfield()>
  237.         <img src="../images/form/textfield.gif" align="absMiddle" width="26" height="26">单行输入框</BUTTON>      </td>
  238.     </tr>
  239.     <tr class="TableHeader">
  240.       <td align="middle"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: left" 
  241. onclick=cloud_textarea()>
  242.         <img src="../images/form/textarea.gif" align="absMiddle" width="26" height="26">多行输入框</BUTTON>      </td>
  243.     </tr>
  244.     <tr class="TableHeader">
  245.       <td align="middle"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: left" 
  246. onclick=cloud_select()>
  247.         <img src="../images/form/listmenu.gif" align="absMiddle" width="26" height="26">下拉菜单</BUTTON>      </td>
  248.     </tr>
  249.     <tr class="TableHeader">
  250.       <td align="middle"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: left" 
  251. onclick=cloud_checkbox()>
  252.         <img src="../images/form/checkbox.gif" align="absMiddle" width="26" height="26">选择框</BUTTON>      </td>
  253.     </tr>
  254.     <tr class="TableHeader">
  255.       <td align="middle"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: left" 
  256. onclick=cloud_list()>
  257.         <img src="../images/form/listview.gif" align="absMiddle" width="26" height="26">列表控件</BUTTON>      </td>
  258.     </tr>
  259.     <tr class="TableHeader">
  260.       <td align="middle"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: left" 
  261. onclick=cloud_macro()>
  262.         <img src="../images/form/auto.gif" align="absMiddle" width="26" height="26">宏控件</BUTTON>      </td>
  263.     </tr>
  264.     <tr class="TableHeader">
  265.       <td align="middle"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: left" 
  266. onclick=cloud_calendar()>
  267.         <img src="../images/form/calendar.gif" align="absMiddle" width="26" height="26">日历控件</BUTTON>      </td>
  268.     </tr>
  269.   </tbody>
  270. </table>
  271. <br>
  272. <table class="small" cellSpacing="1" cellPadding="3" width="120" align="center" border="0">
  273.   <tbody>
  274.     <tr class="TableHeader">
  275.       <td align="center"><BUTTON style="WIDTH: 120px; TEXT-ALIGN: center; height: 30px" 
  276. onclick="showProperty()"> <strong>控件属性</strong></BUTTON></td>
  277.     </tr>
  278.     <form name="form1" action="../general/system/workflow/flow_form/cloud_form/submit.php" method="post">
  279.       <tr class="TableHeader">
  280.         <td align="middle"><BUTTON style="WIDTH: 120px; HEIGHT: 30px; TEXT-ALIGN: center" 
  281. onclick="saveexit()">
  282.           <b>保存并退出</b></BUTTON>        </td>
  283.       </tr>
  284.       <tr class="TableHeader">
  285.         <td align="middle"><BUTTON style="WIDTH: 120px; HEIGHT: 30px; TEXT-ALIGN: center" 
  286. onclick="window.close()">
  287.           <b>关闭设计器</b></BUTTON>        </td>
  288.       </tr>
  289.       <input type="hidden" name="CONTENT"><input type="hidden" name="CLOSE_FLAG"><input type="hidden" value="3" name="FORM_ID">
  290.     </form>
  291.   </tbody>
  292. </table>
  293.     </td>
  294.   </tr>
  295. </table>
  296.   
  297. </body>
  298. <Script language="JavaScript">
  299. var cws_bIsIE5=document.all;
  300. var canusehtml='1';
  301. var PostType=1;
  302. if (cws_bIsIE5){
  303. var IframeID=frames["cws_Composition"];
  304. }
  305. else{
  306. var IframeID=document.getElementById("cws_Composition").contentWindow;
  307. var cws_bIsNC=true;
  308. }
  309. if (cws_bLoad==false)
  310. {
  311. cws_InitDocument("Body","GB2312");
  312. }
  313. function initx(){
  314. //IframeID.document.body.innerHTML=document.oblogform.edit.value;
  315. }
  316. function initt(){
  317. //IframeID.document.body.innerHTML="<a> </a>"+document.oblogform.edit.value;
  318. }
  319. if (0==1) {
  320. initt();
  321. }
  322. else{
  323. initx();
  324. }
  325. function pastestr()
  326. {
  327. var tmpstr=window.clipboardData.getData("Text");
  328. if (tmpstr!=null)
  329. {
  330. if (IframeID.document.body.innerHTML!="") {
  331. if (confirm("您的编辑区有内容,是否覆盖?") == false)
  332. return false;
  333. }
  334. IframeID.document.body.innerHTML=window.clipboardData.getData("Text");
  335. }
  336. }
  337. </Script>
  338. </html>