gps_edit.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>编辑导航</title>
  7. </head>
  8. <body layout:fragment="content">
  9. <article class="page-container">
  10. <form class="form form-horizontal" id="form-slides-edit">
  11. <input type="hidden" th:name="id" th:id="id" th:value="${navigation?.id}"/>
  12. <div class="row cl">
  13. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>导航名称:</label>
  14. <div class="formControls col-xs-4 col-sm-4 title_input">
  15. <input type="text" class="input-text" th:value="${navigation?.name}" required th:id="name" th:name="name" disabled="disabled"/>
  16. </div>
  17. </div>
  18. <div class="row cl" th:if="${navigation.id==2}">
  19. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>网站图标:</label>
  20. <div class="formControls col-xs-8 col-sm-9 ">
  21. <div class="uploader-thum-container">
  22. <div id="fileList" class="uploader-list"></div>
  23. <div id="filePicker" class="margin-right-10">重新选择图片</div>
  24. <div id="fileListPre"><img id="preImg" th:src="${fileUrl} +${navigation.fileDown.file_url}"/></div>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="row cl">
  29. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>显示顺序:</label>
  30. <div class="formControls col-xs-8 col-sm-9">
  31. <input type="number" min="1" class="input-text" th:value="${navigation?.sort}" th:id="sort" th:name="sort"/>
  32. </div>
  33. </div>
  34. <div class="row cl">
  35. <label class="form-label col-xs-4 col-sm-2"><span>状态:</span></label>
  36. <div class="formControls col-xs-8 col-sm-9">
  37. <input type="radio" th:checked="${navigation.is_start==true}" name="is_start" value="true">启用</input>
  38. <input type="radio" th:checked="${navigation.is_start==false}" name="is_start" value="false">禁用</input>
  39. </div>
  40. </div>
  41. <div class="row cl" th:if="${navigation.id==2}">
  42. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>简介:</label>
  43. <div class="formControls col-xs-8 col-sm-9">
  44. <textarea id="content" name="content" th:name="content">[[${navigation.content}]]</textarea>
  45. </div>
  46. </div>
  47. <div class="row cl">
  48. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  49. <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>保存</button>
  50. <!--<button onClick="article_save();" class="btn btn-secondary radius" type="button"><i-->
  51. <!--class="Hui-iconfont">&#xe632;</i> 保存草稿-->
  52. <!--</button>-->
  53. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  54. </div>
  55. </div>
  56. </form>
  57. </article>
  58. <script type="text/javascript" th:src="@{/js/government/gps/gps_edit.js}"></script>
  59. <script th:inline="javascript">
  60. //富文本kindeditor初始化
  61. var editor;
  62. KindEditor.ready(function (K) {
  63. editor = K.create('#content', {
  64. uploadJson: pagePath+'/upload/kindEditorUpload',
  65. allowFileManager: false,
  66. allowUpload: true,
  67. width: "100%",
  68. height: "350px",
  69. items:array,
  70. syncType:"auto",
  71. afterBlur: function () {
  72. this.sync();
  73. }
  74. });
  75. });
  76. $(function () {
  77. // 初始化图片上传
  78. var options = {
  79. auto: false,
  80. uploadBtnId: '#filePicker',
  81. picturePreId: 'fileListPre',
  82. hiddenPictureUrl: 'fileDown.file_id',
  83. hiddenPictureName: 'imgName',
  84. accept: {
  85. title: 'Images',
  86. extensions: 'gif,jpg,jpeg,bmp,png',
  87. mimeTypes: 'image/gif,image/jpg,image/jpeg,image/bmp,image/png'
  88. },
  89. fileSizeLimit: 100 * 1024 * 1024,
  90. fileSingleSizeLimit: 100 * 1024 * 1024
  91. // fileNumLimit: 1
  92. };
  93. var webUploadPicture = new $WebUploadPicture(options);
  94. webUploadPicture.init();
  95. });
  96. /**
  97. * 取消
  98. */
  99. function removeIframe() {
  100. var index = parent.layer.getFrameIndex(window.name);
  101. parent.layer.close(index);
  102. }
  103. </script>
  104. </body>
  105. </html>