Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

edit.htm 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. {include file="public/layout" /}
  2. <style>
  3. .ncap-form-default dl.row {position: unset;}
  4. .comboTreeDropDownContainer {width: 388px !important;}
  5. .multiplesFilter {border: 0 !important;border-bottom: solid 1px #eee !important;outline: none !important; }
  6. .comboTreeDropDownContainer {box-shadow: 0 0 8px rgba(0,0,0,0.2);border-radius: 4px!important;background-color: #FFF !important;border: solid 1px #eee !important;}
  7. .multiplesFilter{height: 30px !important;}
  8. </style>
  9. {eq name="$editor.editor_select" value="1"}
  10. {load href="__PUBLIC__/plugins/Ueditor/ueditor.config.js" /}
  11. {load href="__PUBLIC__/plugins/Ueditor/ueditor.all.min.js" /}
  12. {load href="__PUBLIC__/plugins/Ueditor/lang/zh-cn/zh-cn.js" /}
  13. {else/}
  14. {load href="__PUBLIC__/plugins/ckeditor/ckeditor.js" /}
  15. {/eq}
  16. <link href="__SKIN__/css/notice.css?v={$version}" rel="stylesheet" type="text/css">
  17. <script type="text/javascript" src="__SKIN__/js/icontains.js?v={$version}"></script>
  18. <body class="bodystyle" style="overflow-y: scroll;">
  19. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  20. <div id="append_parent"></div>
  21. <div id="ajaxwaitid"></div>
  22. <div class="page min-hg-c-10">
  23. <form class="form-horizontal" id="post_form" action="{:url('UsersNotice/edit')}" method="post">
  24. <div class="ncap-form-default">
  25. <dl class="row">
  26. <dt class="tit">
  27. <label for="usernames">通知对象</label>
  28. </dt>
  29. <dd class="opt">
  30. <span>
  31. {$row.users_id|default='全站会员'}
  32. </span>
  33. <input type="hidden" name="users_id" value="{$row.users_id|default=''}" id="ids" class="input-txt" autocomplete="off">
  34. <span class="err"></span>
  35. <p class="notic"></p>
  36. </dd>
  37. </dl>
  38. <dl class="row">
  39. <dt class="tit">
  40. <label for="title"><em>*</em>通知标题</label>
  41. </dt>
  42. <dd class="opt">
  43. <input type="text" name="title" value="{$row.title|default=''}" id="title" class="input-txt">
  44. <span class="err"></span>
  45. <p class="notic"></p>
  46. </dd>
  47. </dl>
  48. <dl class="row">
  49. <dt class="tit">
  50. <label for="remark"><em>*</em>通知内容</label>
  51. </dt>
  52. <dd class="opt">
  53. <textarea rows="5" cols="60" id="remark" name="remark" style="height:150px;">{$row.remark|default=''}</textarea>
  54. <!-- <textarea class="span12 ckeditor" id="remark" placeholder="通知内容" name="remark" >{$row.remark|default=''}</textarea>
  55. <div class="opt-moreOper">
  56. <p>
  57. <a href="javascript:void(0);" onclick="remote_to_local_remark();" class="ncap-btn2">远程图片本地化</a>&nbsp;
  58. <a href="javascript:void(0);" onclick="replace_links_remark();" class="ncap-btn2">清除非本站链接</a>&nbsp;
  59. </p>
  60. </div> -->
  61. <span class="err"></span>
  62. <p class="notic"></p>
  63. </dd>
  64. </dl>
  65. <div class="bot">
  66. <input type="hidden" name="id" value="{$row.id}">
  67. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  68. </div>
  69. </div>
  70. </form>
  71. </div>
  72. <script type="text/javascript">
  73. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  74. // 判断输入框是否为空
  75. function checkForm(){
  76. if($('input[name=title]').val() == ''){
  77. showErrorMsg('通知标题不能为空!');
  78. $('input[name=title]').focus();
  79. return false;
  80. }
  81. if($('textarea[name=remark]').val() == ''){
  82. showErrorMsg('通知内容不能为空!');
  83. $('textarea[name=remark]').focus();
  84. return false;
  85. }
  86. layer_loading('正在处理');
  87. $.ajax({
  88. type : 'post',
  89. url : "{:url('UsersNotice/edit', ['_ajax'=>1])}",
  90. data : $('#post_form').serialize(),
  91. dataType : 'json',
  92. success : function(res){
  93. layer.closeAll();
  94. if(res.code == 1){
  95. var _parent = parent;
  96. _parent.layer.close(parentObj);
  97. _parent.layer.msg(res.msg, {shade: 0.1, time: 1000}, function(){
  98. _parent.window.location.reload();
  99. });
  100. }else{
  101. showErrorMsg(res.msg);
  102. }
  103. },
  104. error: function(e){
  105. layer.closeAll();
  106. layer.alert(e.responseText, {icon: 5, title:false});
  107. }
  108. });
  109. }
  110. </script>
  111. <script type="text/javascript">
  112. /*
  113. UE.getEditor('remark',{
  114. serverUrl :"{:url('Ueditor/index',array('savepath'=>'allimg'))}",
  115. zIndex: 999,
  116. initialFrameWidth: "100%", //初化宽度
  117. initialFrameHeight: 450, //初化高度
  118. focus: false, //初始化时,是否让编辑器获得焦点true或false
  119. maximumWords: 99999,
  120. removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
  121. pasteplain:false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
  122. autoHeightEnabled: false,
  123. toolbars: ueditor_toolbars
  124. });
  125. //必须在提交前渲染编辑器;
  126. function remark() {
  127. //判断编辑模式状态:0表示【源代码】HTML视图;1是【设计】视图,即可见即所得;-1表示不可用
  128. if(UE.getEditor("remark").queryCommandState('source') != 0) {
  129. UE.getEditor("remark").execCommand('source'); //切换到【设计】视图
  130. }
  131. }
  132. // 远程图片本地化
  133. function remote_to_local_remark() {
  134. var body = UE.getEditor("remark").getContent();
  135. layer_loading('下载中');
  136. $.ajax({
  137. type: 'POST',
  138. url: "{:url('Archives/ajax_remote_to_local')}",
  139. data: {body:body,_ajax:1},
  140. dataType: "JSON",
  141. success: function(res){
  142. layer.closeAll();
  143. if (res.code == 1) {
  144. UE.getEditor("{$vo.fieldArr}_{$vo.name|default=''}").setContent(res.data.body);
  145. layer.msg(res.msg, {icon: 1, time:1000});
  146. } else {
  147. showErrorMsg(res.msg);
  148. }
  149. },
  150. error: function(e){
  151. layer.closeAll();
  152. showErrorMsg(res.msg);
  153. }
  154. });
  155. }
  156. // 清除非本站链接
  157. function replace_links_remark() {
  158. var body = UE.getEditor("remark").getContent();
  159. layer_loading('正在处理');
  160. $.ajax({
  161. type: 'POST',
  162. url: "{:url('Archives/ajax_replace_links')}",
  163. data: {body:body,_ajax:1},
  164. dataType: "JSON",
  165. success: function(res){
  166. layer.closeAll();
  167. if (res.code == 1) {
  168. UE.getEditor("remark").setContent(res.data.body);
  169. layer.msg(res.msg, {icon: 1, time:1000});
  170. } else {
  171. showErrorMsg(res.msg);
  172. }
  173. },
  174. error: function(e){
  175. layer.closeAll();
  176. showErrorMsg(res.msg);
  177. }
  178. });
  179. }
  180. */
  181. </script>
  182. {include file="public/footer" /}