edit.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>Dreamer CMS - 后台管理系统</title>
  7. <link href="/resource/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  8. <link href="/resource/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  9. <link href="/resource/css/ionicons.min.css" rel="stylesheet" type="text/css" />
  10. <link href="/resource/css/iCheck/all.css" rel="stylesheet" type="text/css" />
  11. <link href="/resource/css/style.css" rel="stylesheet" type="text/css" />
  12. <link href="/resource/js/editor.md-master/css/editormd.css" rel="stylesheet" type="text/css" />
  13. <link href="/resource/js/plugins/tagit/jquery.tagit.css" rel="stylesheet" type="text/css" />
  14. <link href="/resource/js/plugins/tagit/tagit.ui-zendesk.css" rel="stylesheet" type="text/css" />
  15. <link href="/resource/js/webuploader-0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
  16. <link href="/resource/js/webuploader-0.1.5/css/style.css" rel="stylesheet" type="text/css" />
  17. <link href="/resource/js/my97datepicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
  18. <style type="text/css">
  19. .btns{display:flex;}
  20. .btns>#ctlBtn{height:32px;margin-left:10px;}
  21. .file-item{display:flex;align-items: center;height: 30px;font-size:12px;justify-content: space-between;}
  22. .file-item .file-name,.file-item .file-state{margin:0;padding:0;}
  23. .file-item .file-name{font-size:12px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap; width: 380px;}
  24. .file-item .state{margin-left:50px;}
  25. .file-item .close{cursor: pointer;}
  26. </style>
  27. </head>
  28. <body>
  29. <div class="row">
  30. <div class="col-md-12">
  31. <h1 class="panel-heading">编辑文章</h1>
  32. <!--breadcrumbs start -->
  33. <ul class="breadcrumb">
  34. <li><a href="/admin/dashboard/toIndex"><i class="fa fa-home"></i> 首页</a></li>
  35. <li th:if="${article.categoryCnName != null}"><a href="/admin/category" th:title="${article.categoryCnName}" th:text="${article.categoryCnName}"></a></li>
  36. <li class="active">编辑文章</li>
  37. </ul>
  38. <!--breadcrumbs end -->
  39. </div>
  40. </div>
  41. <section class="panel">
  42. <div class="panel-body">
  43. <form class="col s12" id="form1" enctype="multipart/form-data" th:object="${article}" th:action="@{/admin/archives/edit}" onsubmit="return validateForm();" method="post">
  44. <input name="id" id="id" type="hidden" th:value="*{aid}" />
  45. <input name="fid" id="fid" type="hidden" th:value="*{id}" />
  46. <input name="categoryId" type="hidden" th:value="*{categoryId}"/>
  47. <input name="categoryIds" type="hidden" th:value="*{categoryIds}"/>
  48. <input name="imagePath" id="filepath" type="hidden" th:value="*{imagePath}" />
  49. <input th:name="${field.fieldName}" th:id="'input-' + ${field.id}" type="hidden" th:each="field : ${fields}" th:if="${field.dataType} == 'html' or ${field.dataType} == 'markdown'" />
  50. <input th:name="${field.fieldName}" th:id="'input-' + ${field.id}" th:value="${article[field.fieldName]}" type="hidden" th:each="field : ${fields}" th:if="${field.dataType} == 'file'" />
  51. <input th:name="${field.fieldName}" th:id="'input-' + ${field.id}" th:value="${article[field.fieldName]}" type="hidden" th:each="field : ${fields}" th:if="${field.dataType} == 'image'" />
  52. <input th:name="${field.fieldName}" th:id="'input-' + ${field.id}" th:value="${article[field.fieldName]}" type="hidden" th:each="field : ${fields}" th:if="${field.dataType} == 'imageset'" />
  53. <div class="form-group form-control-medium">
  54. <label for="title">文章标题:</label>
  55. <input id="title" name="title" type="text" class="form-control" th:value="*{title}" placeholder="文章标题" />
  56. </div>
  57. <div class="form-group form-control-small">
  58. <label for="weight">权重:</label>
  59. <input id="weight" name="weight" type="text" class="form-control" th:value="*{weight}" placeholder="权重" />
  60. </div>
  61. <div class="form-group form-control-small">
  62. <label for="clicks">点击:</label>
  63. <input id="clicks" name="clicks" type="text" class="form-control" th:value="*{clicks}" placeholder="点击数" />
  64. </div>
  65. <div class="form-group form-control-medium">
  66. <label for="properties">自定义属性:</label>
  67. <label class="checkbox-inline">
  68. <input type="checkbox" name="properties" id="h" value="h" th:checked="${#strings.contains(article.properties,'h')}" /> 头条[h]
  69. </label>
  70. <label class="checkbox-inline">
  71. <input type="checkbox" name="properties" id="b" value="b" th:checked="${#strings.contains(article.properties,'b')}" /> 加粗[b]
  72. </label>
  73. <label class="checkbox-inline">
  74. <input type="checkbox" name="properties" id="f" value="f" th:checked="${#strings.contains(article.properties,'f')}" /> 幻灯[f]
  75. </label>
  76. <label class="checkbox-inline">
  77. <input type="checkbox" name="properties" id="p" value="p" th:checked="${#strings.contains(article.properties,'p')}" /> 图片[p]
  78. </label>
  79. </div>
  80. <div class="form-group form-control-medium">
  81. <label for="imagePath">缩略图:</label>
  82. <div id="uploader" class="wu-example">
  83. <!--用来存放文件信息-->
  84. <div id="file-priview" class="file-priview">
  85. <img th:src="${system.website} + 'resources/' + ${system.uploaddir} + '/' + *{imagePath}" th:if="*{imagePath} != null and *{imagePath} != ''" />
  86. </div>
  87. <div class="btns">
  88. <div id="picker">选择文件...</div>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="form-group form-control-medium">
  93. <label for="categoryId">所属栏目:</label>
  94. <input id="categoryId" type="text" class="form-control" th:value="*{categoryCnName}" readonly="readonly">
  95. </div>
  96. <div class="form-group form-control-medium">
  97. <label for="tag">标签:</label>
  98. <ul id="myULTags">
  99. <li th:each="item : ${#strings.arraySplit(article.tag,',')}" th:text="${item}"></li>
  100. </ul>
  101. </div>
  102. <div class="form-group">
  103. <label for="description">内容摘要:</label>
  104. <textarea id="description" name="description" class="form-control" th:text="*{description}" placeholder="内容摘要"></textarea>
  105. </div>
  106. <div th:each="field : ${fields}"
  107. th:class="${field.dataType} == 'varchar' or ${field.dataType} == 'char' or ${field.dataType} == 'file' or ${field.dataType} == 'select' or ${field.dataType} == 'datetime' or ${field.dataType} == 'imageset' ? 'form-group form-control-medium' : 'form-group'">
  108. <!-- 提示文字 -->
  109. <label th:attr="for=${field.id}" th:text="${field.fieldText}+':'"></label>
  110. <!-- 单行文本框(CHAR和VARCHAR) -->
  111. <input th:id="${field.id}" th:name="${field.fieldName}" th:value="${article[field.fieldName]}" type="text" class="form-control" th:if="${field.dataType} == 'varchar' or ${field.dataType} == 'char'">
  112. <!-- 多行文本框(TEXTAREA) -->
  113. <textarea th:id="${field.id}" th:name="${field.fieldName}" th:text="${article[field.fieldName]}" class="form-control" th:if="${field.dataType} == 'textarea'"></textarea>
  114. <!-- MARKDOWN -->
  115. <div class="mdeditor" th:id="'md-editormd-'+${field.id}" th:if="${field.dataType} == 'markdown'"></div>
  116. <!-- UEDITOR -->
  117. <script th:id="'ue-editor-'+${field.id}" type="text/plain" style="width:100%;height:320px;" th:if="${field.dataType} == 'html'"></script>
  118. <input type="hidden" th:id="'ue-editor-value-' + ${field.id}" th:attr="fieldid=${field.id}" th:value="${article[field.fieldName]}" th:if="${field.dataType} == 'html'" />
  119. <!-- 文件上传(FILE) -->
  120. <div th:id="'uploader-'+${field.id}" class="wu-example" th:if="${field.dataType} == 'file'">
  121. <!--用来存放文件信息-->
  122. <div th:id="'file-priview-'+${field.id}" class="file-priview">
  123. <div th:text="${system.uploaddir} + '/' + ${article[field.fieldName]}" th:if="${article[field.fieldName]} != null and ${article[field.fieldName]} != ''"></div>
  124. </div>
  125. <div class="btns">
  126. <div th:id="'picker-'+${field.id}">选择文件...</div>
  127. </div>
  128. </div>
  129. <!-- 单选(RADIO) -->
  130. <div class="row" th:if="${field.dataType} == 'radio'">
  131. <div class="checkbox-item" th:each="radio : ${#strings.arraySplit(field.defaultValue,',')}">
  132. <label class="checkbox-inline">
  133. <input type="radio" th:name="${field.fieldName}" th:id="${field.id}+'-'+${radio}" th:value="${radio}" th:text="${radio}" th:checked="${radio} == ${article[field.fieldName]}" />
  134. </label>
  135. </div>
  136. <div class="clearfix"></div>
  137. </div>
  138. <!-- 多选(CHECKBOX) -->
  139. <div class="row" th:if="${field.dataType} == 'checkbox'">
  140. <div class="checkbox-item" th:each="checkbox : ${#strings.arraySplit(field.defaultValue,',')}">
  141. <label class="checkbox-inline">
  142. <input type="checkbox" th:name="${field.fieldName}" th:id="${field.id}+'-'+${checkbox}" th:value="${checkbox}" th:text="${checkbox}" th:checked="${#strings.contains(article[field.fieldName],checkbox)}" />
  143. </label>
  144. </div>
  145. <div class="clearfix"></div>
  146. </div>
  147. <!-- 下拉框(SELECTED) -->
  148. <select class="form-control m-b-10" th:name="${field.fieldName}" th:if="${field.dataType} == 'select'">
  149. <option th:each="item : ${#strings.arraySplit(field.defaultValue,',')}" th:text="${item}" th:selected="${radio} == ${article[field.fieldName]}"></option>
  150. </select>
  151. <!-- 时间(DATETIME) -->
  152. <input th:id="${field.id}" th:name="${field.fieldName}" th:value="${article[field.fieldName]}" type="text" class="form-control" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" th:if="${field.dataType} == 'datetime'" />
  153. <!-- 图片(IMAGE) -->
  154. <div th:id="'uploader-'+${field.id}" class="wu-example" th:if="${field.dataType} == 'image'">
  155. <!--用来存放文件信息-->
  156. <div th:id="'file-priview-'+${field.id}" class="file-priview">
  157. <img th:src="${system.website} + 'resources/' + ${system.uploaddir} + '/' + ${article[field.fieldName]}" th:if="${article[field.fieldName]} != null and ${article[field.fieldName]} != ''" />
  158. </div>
  159. <div class="btns">
  160. <div th:id="'picker-'+${field.id}">选择文件...</div>
  161. </div>
  162. </div>
  163. <!-- 图集(IMAGESET) -->
  164. <div th:id="'uploader-'+${field.id}" th:attr="ref=${field.id}" class="wu-example" th:if="${field.dataType} == 'imageset'">
  165. <!--用来存放文件信息-->
  166. <div id="imagesetlist" class="uploader-list">
  167. <div th:id="${state.index}" class="file-item" th:each="file,state : ${#strings.listSplit(article[field.fieldName],',')}">
  168. <h4 class="file-name" th:attr="filepath=${file},field-id=${field.id}" th:text="${file}"></h4>
  169. <p class="file-state">已经上传...</p>
  170. <i class="close fa fa-times-circle" th:onclick="removeFile('[[${state.index}]]');"></i>
  171. </div>
  172. </div>
  173. <div class="btns">
  174. <div th:id="'picker-'+${field.id}">选择文件...</div>
  175. <button type="button" onclick="uploadFile();" id="ctlBtn" class="btn btn-default">开始上传</button>
  176. </div>
  177. </div>
  178. </div>
  179. <div class="form-group">
  180. <div class="col-lg-3">
  181. <label for="comment">允许评论:</label>
  182. <label class="checkbox-inline">
  183. <input type="radio" name="comment" id="comment-yes" value="1" th:checked="${article.comment} == 1" /> 是
  184. </label>
  185. <label class="checkbox-inline">
  186. <input type="radio" name="comment" id="comment-no" value="0" th:checked="${article.comment} == 0" /> 否
  187. </label>
  188. </div>
  189. <div class="col-lg-3">
  190. <label for="subscribe">允许订阅:</label>
  191. <label class="checkbox-inline">
  192. <input type="radio" name="subscribe" id="subscribe-yes" value="1" th:checked="${article.subscribe} == 1" /> 是
  193. </label>
  194. <label class="checkbox-inline">
  195. <input type="radio" name="subscribe" id="subscribe-no" value="0" th:checked="${article.subscribe} == 0" /> 否
  196. </label>
  197. </div>
  198. <div class="col-lg-3">
  199. <label for="status">发布状态:</label>
  200. <label class="checkbox-inline">
  201. <input type="radio" name="status" id="status-yes" value="1" th:checked="${article.status} == 1" /> 已发布
  202. </label>
  203. <label class="checkbox-inline">
  204. <input type="radio" name="status" id="status-no" value="0" th:checked="${article.status} == 0" /> 未发布
  205. </label>
  206. </div>
  207. <div style="clear:both;"></div>
  208. </div>
  209. <div class="form-btn-group-left" shiro:hasAnyPermissions="system:article:toedit,system:article:update">
  210. <button type="submit" class="btn btn-info">保存</button>
  211. </div>
  212. </form>
  213. </div>
  214. </section>
  215. <script src="/resource/js/jquery.min.js"></script>
  216. <script src="/resource/js/editor.md-master/editormd.min.js"></script>
  217. <script charset="utf-8" src="/resource/js/ueditor-1.4.3.3/ueditor.config.js"></script>
  218. <script charset="utf-8" src="/resource/js/ueditor-1.4.3.3/ueditor.all.min.js"></script>
  219. <script src="/resource/js/plugins/tagit/jquery-ui.min.js"></script>
  220. <script src="/resource/js/plugins/tagit/tag-it.js"></script>
  221. <script src="/resource/js/webuploader-0.1.5/webuploader.js"></script>
  222. <script src="/resource/js/coco-message/coco-message.js"></script>
  223. <script src="/resource/js/my97datepicker/WdatePicker.js"></script>
  224. <script th:inline="javascript">
  225. var fields = [[${fields}]];
  226. var article = [[${article}]];
  227. var thumbnailWidth = 178,thumbnailHeight = 178;
  228. var imagesetUploader = null;
  229. $(document).ready(function () {
  230. initUploader(
  231. "picker",
  232. "file-priview",
  233. "filepath",
  234. {
  235. title: 'Images',
  236. extensions: 'gif,jpg,jpeg,bmp,png',
  237. mimeTypes: 'image/*'
  238. },
  239. "IMAGES");
  240. for(var i = 0;i < fields.length;i++){
  241. var field = fields[i];
  242. if(field.dataType == 'markdown'){
  243. initMdEditor(field.id, "md-editormd-" + field.id, article[field.fieldName]);
  244. }else if(field.dataType == 'file'){
  245. initUploader(
  246. "picker-" + field.id,
  247. "file-priview-" + field.id,
  248. "input-" + field.id,
  249. {},
  250. "FILES");
  251. }else if(field.dataType == 'image'){
  252. initUploader(
  253. "picker-" + field.id,
  254. "file-priview-" + field.id,
  255. "input-" + field.id,
  256. {
  257. title: 'Images',
  258. extensions: 'gif,jpg,jpeg,bmp,png',
  259. mimeTypes: 'image/*'
  260. },
  261. "IMAGES");
  262. }else if(field.dataType == "imageset"){
  263. imagesetUploader = WebUploader.create({
  264. // swf文件路径
  265. swf: '/resource/js/webuploader-0.1.5/Uploader.swf',
  266. // 文件接收服务端。
  267. server: '/upload/uploadFile',
  268. // 选择文件的按钮。可选。
  269. compress: false,
  270. // 内部根据当前运行是创建,可能是input元素,也可能是flash.
  271. pick: '#picker-' + field.id,
  272. fileNumLimit: 10,
  273. // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
  274. resize: false,
  275. duplicate:true,
  276. // 只允许选择图片文件。
  277. accept: {
  278. title: 'Images',
  279. extensions: 'gif,jpg,jpeg,bmp,png',
  280. mimeTypes: 'image/*'
  281. }
  282. });
  283. // 当有文件被添加进队列的时候
  284. imagesetUploader.on('fileQueued', function( file ) {
  285. $("#imagesetlist").append( '<div id="' + file.id + '" class="file-item">' +
  286. '<h4 class="file-name" filepath="" field-id="' + field.id + '">' + file.name + '</h4>' +
  287. '<p class="file-state">等待上传...</p>' +
  288. '<i class="close fa fa-times-circle" onclick="removeFile(\''+file.id+'\')"></i>' +
  289. '</div>');
  290. });
  291. imagesetUploader.on('uploadSuccess', function(file, response) {
  292. $("#" + file.id + "> .file-state").text("上传成功...");
  293. $("#" + file.id + "> .file-name").attr("filepath", response.data.filepath).attr("field-id", field.id);
  294. var crtVal = $("#input-" + field.id).val();
  295. if(crtVal != null && crtVal != "" && crtVal != "undefined") crtVal += ",";
  296. $("#input-" + field.id).val(crtVal + response.data.filepath);
  297. cocoMessage.success("上传成功");
  298. });
  299. imagesetUploader.on('uploadError', function( file ) {
  300. cocoMessage.error("上传失败");
  301. });
  302. }
  303. }
  304. $("input[id^='ue-editor-value-']").each(function(e){
  305. var fieldid = $(this).attr("fieldid");
  306. var uevalue = $(this).val();
  307. var ue = UE.getEditor("ue-editor-" + fieldid);
  308. window[fieldid] = ue;
  309. ue.ready(function() {
  310. if(uevalue != null && uevalue != "" && uevalue != "undefined")
  311. ue.setContent(uevalue);
  312. });
  313. });
  314. $('#myULTags').tagit({
  315. availableTags: [],
  316. itemName: 'item',
  317. fieldName: 'tag'
  318. });
  319. });
  320. function initUploader(picker, el, inputEl, accepts, isShowThumb){
  321. var uploader = WebUploader.create({
  322. auto: true,
  323. // swf文件路径
  324. swf: '/resource/js/webuploader-0.1.5/Uploader.swf',
  325. // 文件接收服务端。
  326. server: '/upload/uploadFile',
  327. // 选择文件的按钮。可选。
  328. compress: false,
  329. // 内部根据当前运行是创建,可能是input元素,也可能是flash.
  330. pick: '#' + picker,
  331. fileNumLimit: 5,
  332. // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
  333. resize: false,
  334. duplicate:true,
  335. // 只允许选择图片文件。
  336. accept: accepts
  337. });
  338. uploader.on('fileQueued', function(file) {
  339. $("#"+el).children().remove();
  340. if(isShowThumb == "IMAGES"){
  341. $img = $("<img />");
  342. uploader.makeThumb( file, function(error, src) {
  343. if (error) {
  344. $img.replaceWith('<span>不能预览</span>');
  345. return;
  346. }
  347. $img.attr( 'src', src );
  348. }, thumbnailWidth, thumbnailHeight );
  349. $("#"+el).append($img);
  350. }else{
  351. $div = $("<div />");
  352. $div.text(file.name);
  353. $("#"+el).append($div);
  354. }
  355. });
  356. uploader.on('uploadSuccess', function(file, response) {
  357. $("#"+el).children().remove();
  358. if(isShowThumb == "IMAGES"){
  359. $("#"+el).append($("<img src='"+response.data.url+"'/>"));
  360. }else{
  361. $div = $("<div />");
  362. $div.text(response.data.originalFilename);
  363. $("#"+el).append($div);
  364. }
  365. $("#"+inputEl).val(response.data.filepath);
  366. uploader.reset();
  367. cocoMessage.success("上传成功");
  368. });
  369. uploader.on('uploadError', function( file ) {
  370. uploader.reset();
  371. cocoMessage.error("上传失败");
  372. });
  373. }
  374. //上传文件
  375. function uploadFile(){
  376. var fileNumbers = imagesetUploader.getFiles().length;
  377. if (fileNumbers > 0) {
  378. imagesetUploader.upload();
  379. } else {
  380. cocoMessage.error("请选择文件");
  381. }
  382. }
  383. //删除文件上传队列
  384. function removeFile(id){
  385. var fileList = imagesetUploader.getFiles();
  386. console.log(fileList);
  387. for(var i = 0;i < fileList.length;i++){
  388. if(fileList[i].id == id){
  389. imagesetUploader.removeFile(id, true);
  390. }
  391. }
  392. var fieldId = $("#" + id + "> .file-name").attr("field-id");
  393. var filepath = $("#" + id + "> .file-name").attr("filepath");
  394. var crtValue = $("#input-" + fieldId).val();
  395. if(filepath && crtValue){
  396. var files = crtValue.split(",");
  397. for(var i = 0;i < files.length;i++){
  398. if(files[i] == filepath){
  399. files.splice(i, 1);
  400. }
  401. }
  402. $("#input-" + fieldId).val(files.toString());
  403. }
  404. $("#" + id).remove();
  405. }
  406. function initMdEditor(id, el, content){
  407. //初始化MD编辑器
  408. window[id] = editormd(el, {
  409. width: "100%",
  410. height: 350,
  411. path : '/resource/js/editor.md-master/lib/',
  412. markdown : null,
  413. codeFold : true,
  414. saveHTMLToTextarea : true, // 保存 HTML 到 Textarea
  415. searchReplace : true,
  416. htmlDecode : "style,script,iframe|on*", // 开启 HTML 标签解析,为了安全性,默认不开启
  417. emoji : true,
  418. taskList : true,
  419. tocm : true, // Using [TOCM]
  420. tex : true, // 开启科学公式TeX语言支持,默认关闭
  421. flowChart : true, // 开启流程图支持,默认关闭
  422. sequenceDiagram : true, // 开启时序/序列图支持,默认关闭,
  423. imageUpload : true,
  424. imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
  425. imageUploadURL : "/upload/uploadMarkDown",
  426. onload : function() {
  427. this.setMarkdown(content);
  428. }
  429. });
  430. }
  431. function validateForm(){
  432. var title = $("#title").val();
  433. if(title == null || title == ""){
  434. cocoMessage.error("标题不能为空");
  435. return false;
  436. }
  437. for(var i = 0;i < fields.length;i++){
  438. var field = fields[i];
  439. if(field.dataType == 'markdown'){
  440. $("#input-"+ field.id).val(window[field.id].getMarkdown());
  441. }else if(field.dataType == 'html'){//初始化UE编辑器
  442. $("#input-"+ field.id).val(window[field.id].getContent());
  443. }
  444. }
  445. return true;
  446. }
  447. </script>
  448. </body>
  449. </html>