release.htm 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {include file="public/layout" /}
  2. <body class="bodystyle">
  3. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. <div class="page ksedit">
  7. <div class="fixed-bar">
  8. <div class="item-title">
  9. <div class="subject">
  10. <h3><i class="fa fa-edit"></i>快捷发布</h3>
  11. <h5></h5>
  12. </div>
  13. </div>
  14. </div>
  15. <form class="form-horizontal" id="post_form" action="{:url('Archives/release')}" method="post">
  16. <div class="ncap-form-default">
  17. <dl class="row">
  18. <dt class="tit">
  19. <label for="title"><em>*</em>发布至</label>
  20. </dt>
  21. <dd class="opt">
  22. <select name="typeid" id="typeid" style="width: 300px;" size="25">
  23. {$select_html}
  24. </select>
  25. <span class="err"></span>
  26. <p class="notic"></p>
  27. </dd>
  28. </dl>
  29. </div>
  30. </form>
  31. </div>
  32. <script type="text/javascript">
  33. $(function () {
  34. $('#typeid').find('option').click(function(){
  35. check_submit();
  36. });
  37. });
  38. // 判断输入框是否为空
  39. function check_submit(){
  40. if (!$('#typeid').val()) {
  41. layer.alert('请选择栏目…!', {icon:5, title:false}, function(index){
  42. $('#typeid').val('');
  43. layer.close(index);
  44. });
  45. return false;
  46. }
  47. var current_channel = $('#typeid').find('option:selected').attr('data-current_channel');
  48. current_channel = parseInt(current_channel);
  49. var js_allow_channel_arr = {$js_allow_channel_arr};
  50. if ($.inArray(current_channel, js_allow_channel_arr) == -1) {
  51. layer.alert('该栏目模型不允许发布文档!', {icon:5, title:false}, function(index){
  52. $('#typeid').val('');
  53. layer.close(index);
  54. });
  55. return false;
  56. }
  57. layer_loading('正在处理');
  58. $('#post_form').submit();
  59. }
  60. </script>
  61. {include file="public/footer" /}