Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

edit.htm 4.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {include file="public/layout" /}
  2. <link rel="stylesheet" type="text/css" href="__SKIN__/js/codemirror/codemirror.css?v={$version}">
  3. <script type="text/javascript" src="__SKIN__/js/codemirror/codemirror.js?v={$version}"></script>
  4. <script type="text/javascript" src="__SKIN__/js/codemirror/mode/xml/xml.js?v={$version}"></script>
  5. <script type="text/javascript" src="__SKIN__/js/codemirror/mode/javascript/javascript.js?v={$version}"></script>
  6. <script type="text/javascript" src="__SKIN__/js/codemirror/mode/css/css.js?v={$version}"></script>
  7. <script type="text/javascript" src="__SKIN__/js/codemirror/mode/php/php.js?v={$version}"></script>
  8. <script type="text/javascript" src="__SKIN__/js/codemirror/mode/clike/clike.js?v={$version}"></script>
  9. <script type="text/javascript" src="__SKIN__/js/codemirror/mode/htmlmixed/htmlmixed.js?v={$version}"></script>
  10. <body class="bodystyle">
  11. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  12. <div id="append_parent"></div>
  13. <div id="ajaxwaitid"></div>
  14. <div class="page">
  15. <div class="fixed-bar">
  16. <div class="item-title">
  17. <a class="back_xin" href="JavaScript:history.back(-1);" title="返回"><i class="iconfont e-fanhui"></i></a>
  18. <div class="subject">
  19. <h3>模板编辑</h3>
  20. <h5></h5>
  21. </div>
  22. </div>
  23. </div>
  24. <form class="form-horizontal" id="post_form" action="{:url('Filemanager/edit')}" method="post">
  25. <div class="ncap-form-default">
  26. <dl class="row">
  27. <dt class="tit"><em>*</em>所在目录</dt>
  28. <dd class="opt">
  29. <input type="text" name="activepath" value="{$info['activepath']|default=''}" id="activepath" class="input-txt">
  30. <span class="err"></span>
  31. <p class="notic">空白表示根目录,不允许用 “..” 形式的路径</p>
  32. </dd>
  33. </dl>
  34. <dl class="row">
  35. <dt class="tit">
  36. <label for="url"><em>*</em>文件名称</label>
  37. </dt>
  38. <dd class="opt">
  39. <input type="text" name="filename" value="{$info['filename']|default=''}" id="filename" class="input-txt">
  40. <span class="err"></span>
  41. <p class="notic">不允许用 “..” 形式的路径</p>
  42. </dd>
  43. </dl>
  44. <dl class="row">
  45. <dt class="tit">
  46. <label for="content">HTML代码</label>
  47. </dt>
  48. <dd class="opt">
  49. <textarea name='content' id='content' style='width:99%;height:450px;background:#ffffff;'>{$info.content|default=''}</textarea>
  50. <span class="err"></span>
  51. <p class="notic"></p>
  52. </dd>
  53. </dl>
  54. <div class="bot">
  55. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  56. <a href="JavaScript:history.back(-1);" class="ncap-btn-big ncap-btn-green" style="border: 1px solid #C9C9C9; background-color: #fff;color: #555;" >返回</a>
  57. </div>
  58. </div>
  59. </form>
  60. </div>
  61. <script type="text/javascript">
  62. var editor = CodeMirror.fromTextArea(document.getElementById('content'), {
  63. lineNumbers: true,
  64. lineWrapping: true,
  65. autofocus:true, //自动聚焦
  66. mode: '{$info.extension}'
  67. });
  68. // 判断输入框是否为空
  69. function checkForm(){
  70. if($.trim($('input[name=activepath]').val()) == ''){
  71. showErrorMsg('工作目录不能为空!');
  72. $('input[name=activepath]').focus();
  73. return false;
  74. }
  75. if($.trim($('input[name=filename]').val()) == ''){
  76. showErrorMsg('文件名称不能为空!');
  77. $('input[name=filename]').focus();
  78. return false;
  79. }
  80. layer_loading('正在处理');
  81. $('#post_form').submit();
  82. }
  83. </script>
  84. {include file="public/footer" /}