pollAdd.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  3. <%@taglib uri="/struts-tags" prefix="s"%>
  4. <%
  5. String path = request.getContextPath();
  6. String basePath = request.getScheme() + "://"
  7. + request.getServerName() + ":" + request.getServerPort()
  8. + path + "/";
  9. %>
  10. <html xmlns="http://www.w3.org/1999/xhtml">
  11. <head>
  12. <title></title>
  13. <link href="../../ligerui/lib/ligerUI/skins/Aqua/css/ligerui-all.css"
  14. rel="stylesheet" type="text/css" />
  15. <link href="../../ligerui/lib/ligerUI/skins/Silvery/css/style.css"
  16. rel="stylesheet" type="text/css" />
  17. <script src="../../ligerui/lib/jquery/jquery-1.3.2.min.js"
  18. type="text/javascript"></script>
  19. <script src="../../ligerui/lib/ligerUI/js/core/base.js"
  20. type="text/javascript"></script>
  21. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerForm.js"
  22. type="text/javascript"></script>
  23. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerDateEditor.js"
  24. type="text/javascript"></script>
  25. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerComboBox.js"
  26. type="text/javascript"></script>
  27. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerCheckBox.js"
  28. type="text/javascript"></script>
  29. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerButton.js"
  30. type="text/javascript"></script>
  31. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerDialog.js"
  32. type="text/javascript"></script>
  33. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerRadio.js"
  34. type="text/javascript"></script>
  35. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerSpinner.js"
  36. type="text/javascript"></script>
  37. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerTextBox.js"
  38. type="text/javascript"></script>
  39. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerTip.js"
  40. type="text/javascript"></script>
  41. <script
  42. src="../../ligerui/lib/jquery-validation/jquery.validate.min.js"
  43. type="text/javascript"></script>
  44. <script src="../../ligerui/lib/jquery-validation/jquery.metadata.js"
  45. type="text/javascript"></script>
  46. <script src="../../ligerui/lib/jquery-validation/messages_cn.js"
  47. type="text/javascript"></script>
  48. <script src="../../ligerui/ajaxfileupload.js" type="text/javascript"></script>
  49. <script type="text/javascript" charset="utf-8"
  50. src="../../ueditor/ueditor.config.js"></script>
  51. <script type="text/javascript" charset="utf-8"
  52. src="../../ueditor/ueditor.all.min.js"> </script>
  53. <!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
  54. <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
  55. <script type="text/javascript" charset="utf-8"
  56. src="../../ueditor/lang/zh-cn/zh-cn.js"></script>
  57. <script type="text/javascript">
  58. //时间空间初始化
  59. Date.prototype.format = function(format){
  60. var o = {
  61. "M+" : this.getMonth()+1, //month
  62. "d+" : this.getDate(), //day
  63. "h+" : this.getHours(), //hour
  64. "m+" : this.getMinutes(), //minute
  65. "s+" : this.getSeconds(), //second
  66. "q+" : Math.floor((this.getMonth()+3)/3), //quarter
  67. "S" : this.getMilliseconds() //millisecond
  68. }
  69. if(/(y+)/.test(format)) {
  70. format = format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
  71. }
  72. for(var k in o) {
  73. if(new RegExp("("+ k +")").test(format)) {
  74. format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length));
  75. }
  76. }
  77. return format;
  78. }
  79. //初始化
  80. $(function ()
  81. {
  82. var lmid = '<s:property value="#parameters.lmid" />' ;
  83. //var now = new Date();
  84. //var addTime = now.format("yyyy-MM-dd hh:mm");
  85. $("#lmid").val(lmid);
  86. $.metadata.setType("attr", "validate");
  87. var v = $("form").validate({
  88. debug: true,
  89. errorPlacement: function (lable, element)
  90. {
  91. if (element.hasClass("l-textarea"))
  92. {
  93. element.ligerTip({ content: lable.html(), target: element[0] });
  94. }
  95. else if (element.hasClass("l-text-field"))
  96. {
  97. element.parent().ligerTip({ content: lable.html(), target: element[0] });
  98. }
  99. else
  100. {
  101. lable.appendTo(element.parents("td:first").next("td"));
  102. }
  103. },
  104. success: function (lable)
  105. {
  106. lable.ligerHideTip();
  107. lable.remove();
  108. },
  109. submitHandler: function ()
  110. {
  111. document.form.submit();
  112. }
  113. });
  114. $("form").ligerForm();
  115. $(".l-button-test").click(function ()
  116. {
  117. alert(v.element($("#txtName")));
  118. });
  119. });
  120. </script>
  121. <style type="text/css">
  122. body {
  123. font-size: 12px;
  124. }
  125. .l-table-edit {
  126. }
  127. .l-table-edit-td {
  128. padding-top: 4px;
  129. padding-bottom: 4px;
  130. padding-left: 10px;
  131. padding-right: 10px;
  132. }
  133. .l-button-submit,.l-button-test {
  134. width: 80px;
  135. float: left;
  136. margin-left: 10px;
  137. padding-bottom: 2px;
  138. }
  139. .l-verify-tip {
  140. left: 230px;
  141. top: 120px;
  142. }
  143. </style>
  144. <style type="text/css">
  145. * {
  146. font-size: 12px;
  147. }
  148. .div {
  149. margin: 0 auto;
  150. width: 100%;
  151. overflow: hidden;
  152. padding: 0px;
  153. }
  154. .line {
  155. position: relative;
  156. margin: 0 auto;
  157. text-align: left
  158. }
  159. .line span.span {
  160. float: left;
  161. padding-top: 2px;
  162. }
  163. .file {
  164. position: absolute;
  165. left: 0;
  166. width: 265px ! important;
  167. top: 0;
  168. height: 28px;
  169. filter: alpha(opacity = 0);
  170. opacity: 0;
  171. cursor: pointer
  172. }
  173. .file1 {
  174. float: left;
  175. margin-left: 0px;
  176. margin-right: 4px;
  177. z-index: 1;
  178. width: 70px;
  179. height: 28px;
  180. line-height: 28px;
  181. background: url(../image/liulan.gif) no-repeat 0 0;
  182. text-indent: -9999px;
  183. cursor: pointer
  184. }
  185. .file2 {
  186. float: left;
  187. z-index: 1;
  188. width: 70px;
  189. height: 28px;
  190. line-height: 28px;
  191. background: url(../image/liulan.gif) no-repeat 0 0;
  192. text-indent: -9999px;
  193. cursor: pointer
  194. }
  195. .inputstyle {
  196. border: 1px solid #BEBEBE;
  197. margin-left: -3px;
  198. margin-top: -1px;
  199. width: 196px ! important;
  200. float: left;
  201. height: 22px;
  202. line-height: 22px;
  203. background: #FFF;
  204. z-index: 99
  205. }
  206. #n {
  207. margin: 10px auto;
  208. width: 920px;
  209. border: 1px solid #CCC;
  210. font-size: 14px;
  211. line-height: 30px;
  212. }
  213. #n a {
  214. padding: 0 4px;
  215. color: #333
  216. }
  217. input{
  218. line-height:15px;
  219. height:15px;
  220. }
  221. .div1{
  222. height:455px;width:300px; overflow:hidden;border:1px solid #ccc; position:absolute;left:60%;margin-top:-10px;margin-left:-250px; z-index:1100; text-align:center;display:none;
  223. }
  224. div2{
  225. height:445px; overflow:hidden;border:1px solid #ccc; position:absolute; left:50%; margin-left:-250px; z-index:1000; }
  226. </style>
  227. </head>
  228. <body style="padding: 10px;">
  229. <form name="form" method="post" action="../poll/poll!savePollTitle" id="form1">
  230. <input name="lmid" type="hidden" id="lmid" />
  231. <table cellpadding="0" cellspacing="0" class="l-table-edit" border="1" bordercolor="#c7d4e2" style="margin-left:10px">
  232. <tr >
  233. <td align="center" class="l-table-edit-td" bgcolor="#f3f8f7" >
  234. 栏目名称:
  235. </td>
  236. <td align="left" class="l-table-edit-td" colspan="4" >
  237. <span style="margin-bottom:8px;"><s:property value="lmb.lmmc" /></span>
  238. </td>
  239. </tr>
  240. <tr>
  241. <td align="center" class="l-table-edit-td">
  242. 调查标题:
  243. </td>
  244. <td align="left" class="l-table-edit-td" colspan="4" >
  245. <input name="title" type="text" id="pollTitle" ltype="text"
  246. style="width: 782px;"
  247. validate="{required:true,minlength:0,maxlength:100}" />
  248. </td>
  249. <td align="left"></td>
  250. </tr>
  251. <tr>
  252. <td align="center" class="l-table-edit-td" bgcolor="#f3f8f7">
  253. 选项类型:
  254. </td>
  255. <td align="left" class="l-table-edit-td" colspan="4" >
  256. <select name="type" style="width: 200px">
  257. <option value="checkbox" selected="selected">多选</option>
  258. <option value="radio">单选</option>
  259. </select>
  260. </td>
  261. <td align="left"></td>
  262. </tr>
  263. <tr>
  264. <td align="center" class="l-table-edit-td">
  265. 选项1:
  266. </td>
  267. <td align="left" class="l-table-edit-td" colspan="4" >
  268. <input name="option" type="text" id="option1" ltype="text"
  269. style="width: 782px;"
  270. validate="{required:true,minlength:0,maxlength:100}" />
  271. </td>
  272. <td align="left"></td>
  273. </tr>
  274. <tr>
  275. <td align="center" class="l-table-edit-td" bgcolor="#f3f8f7">
  276. 选项2:
  277. </td>
  278. <td align="left" class="l-table-edit-td" colspan="4" >
  279. <input name="option" type="text" id="option2" ltype="text"
  280. style="width: 782px;"
  281. validate="{minlength:0,maxlength:100}" />
  282. </td>
  283. <td align="left"></td>
  284. </tr>
  285. <tr>
  286. <td align="center" class="l-table-edit-td">
  287. 选项3:
  288. </td>
  289. <td align="left" class="l-table-edit-td" colspan="4" >
  290. <input name="option" type="text" id="option3" ltype="text"
  291. style="width: 782px;"
  292. validate="{minlength:0,maxlength:100}" />
  293. </td>
  294. <td align="left"></td>
  295. </tr>
  296. <tr>
  297. <td align="center" class="l-table-edit-td" bgcolor="#f3f8f7">
  298. 选项4:
  299. </td>
  300. <td align="left" class="l-table-edit-td" colspan="4" >
  301. <input name="option" type="text" id="option4" ltype="text"
  302. style="width: 782px;"
  303. validate="{minlength:0,maxlength:100}" />
  304. </td>
  305. <td align="left"></td>
  306. </tr>
  307. <tr>
  308. <td align="center" class="l-table-edit-td">
  309. 选项5:
  310. </td>
  311. <td align="left" class="l-table-edit-td" colspan="4" >
  312. <input name="option" type="text" id="option5" ltype="text"
  313. style="width: 782px;"
  314. validate="{minlength:0,maxlength:100}" />
  315. </td>
  316. <td align="left"></td>
  317. </tr>
  318. <tr>
  319. <td align="center" class="l-table-edit-td" bgcolor="#f3f8f7">
  320. 选项6:
  321. </td>
  322. <td align="left" class="l-table-edit-td" colspan="4" >
  323. <input name="option" type="text" id="option6" ltype="text"
  324. style="width: 782px;"
  325. validate="{minlength:0,maxlength:100}" />
  326. </td>
  327. <td align="left"></td>
  328. </tr>
  329. <tr>
  330. <td align="center" class="l-table-edit-td">
  331. 选项7:
  332. </td>
  333. <td align="left" class="l-table-edit-td" colspan="4" >
  334. <input name="option" type="text" id="option7" ltype="text"
  335. style="width: 782px;"
  336. validate="{minlength:0,maxlength:100}" />
  337. </td>
  338. <td align="left"></td>
  339. </tr>
  340. <tr>
  341. <td align="center" class="l-table-edit-td" bgcolor="#f3f8f7">
  342. 选项8:
  343. </td>
  344. <td align="left" class="l-table-edit-td" colspan="4" >
  345. <input name="option" type="text" id="option8" ltype="text"
  346. style="width: 782px;"
  347. validate="{minlength:0,maxlength:100}" />
  348. </td>
  349. <td align="left"></td>
  350. </tr>
  351. <tr>
  352. <td align="center" class="l-table-edit-td">
  353. 选项9:
  354. </td>
  355. <td align="left" class="l-table-edit-td" colspan="4" >
  356. <input name="option" type="text" id="option9" ltype="text"
  357. style="width: 782px;"
  358. validate="{minlength:0,maxlength:100}" />
  359. </td>
  360. <td align="left"></td>
  361. </tr>
  362. <tr>
  363. <td align="center" class="l-table-edit-td" bgcolor="#f3f8f7">
  364. 选项10:
  365. </td>
  366. <td align="left" class="l-table-edit-td" colspan="4" >
  367. <input name="option" type="text" id="option10" ltype="text"
  368. style="width: 782px;"
  369. validate="{minlength:0,maxlength:100}" />
  370. </td>
  371. <td align="left"></td>
  372. </tr>
  373. <tr>
  374. <td align="right" class="l-table-edit-td" colspan="11" style="padding-left: 40%">
  375. <input type="submit" value="提交" id="btnSubmit"
  376. class="l-button l-button-submit" />
  377. <input type="button" value="返回" id="btnBack"
  378. onclick="javascript:window.location.href='../poll/poll!pollList?lmid=<s:property value="lmb.id" escape="false"/>';"
  379. class="l-button l-button-test" id="test" />
  380. </td>
  381. </tr>
  382. </table>
  383. <div style="display: none">
  384. </div>
  385. </form>
  386. </body>
  387. <script type="text/javascript" charset="utf-8"
  388. src="../../ueditor/uEditorContent.js"></script>
  389. </html>