Ei kuvausta
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.

ajax_quickmenu.htm 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  8. <!-- Apple devices fullscreen -->
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <!-- Apple devices fullscreen -->
  11. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  12. <link href="__SKIN__/css/main.css?v={$version}" rel="stylesheet" type="text/css">
  13. <link href="__SKIN__/font/css/font-awesome.min.css" rel="stylesheet" />
  14. <link href="__SKIN__/css/index.css?v={$version}" rel="stylesheet" type="text/css">
  15. <!--[if IE 7]>
  16. <link rel="stylesheet" href="__SKIN__/font/css/font-awesome-ie7.min.css">
  17. <![endif]-->
  18. <link href="__SKIN__/css/diy_style.css?v={$version}" rel="stylesheet" type="text/css" />
  19. {include file="public/theme_css" /}
  20. <script type="text/javascript">
  21. var eyou_basefile = "{$Request.baseFile}";
  22. var module_name = "{$Think.const.MODULE_NAME}";
  23. var __root_dir__ = "__ROOT_DIR__";
  24. var __lang__ = "{$admin_lang}";
  25. var __main_lang__ = "{$main_lang}";
  26. </script>
  27. {load href="__STATIC__/common/js/jquery.min.js" /}
  28. <script type="text/javascript" src="__SKIN__/js/jquery-ui/jquery-ui.min.js"></script>
  29. <script type="text/javascript" src="__PUBLIC__/plugins/layer-v3.1.0/layer.js"></script>
  30. <script src="__SKIN__/js/global.js?v={$version}"></script>
  31. </head>
  32. <body style="background-color:#F4F4F4;padding:6px; overflow: auto;min-width:auto;">
  33. <form id="post_form">
  34. <div class="navboxs sort-list">
  35. {volist name='$menuList' id='vo'}
  36. <div>
  37. <label style="cursor: pointer;">
  38. <span><input type="checkbox" name="checkedids[]" value="{$vo.id}" {if condition="$vo.checked"}checked{/if} /></span>{$vo.title}
  39. <input type="hidden" name="ids[]" value="{$vo.id}" />
  40. </label>
  41. </div>
  42. {/volist}
  43. </div>
  44. <div class="navboxs_bt" onclick="check_confirm();">确认提交</div>
  45. </form>
  46. <script type="text/javascript">
  47. $(function () {
  48. /** 拖动排序相关 js*/
  49. $( ".sort-list" ).sortable({
  50. start: function( event, ui) {
  51. }
  52. ,stop: function( event, ui ) {
  53. }
  54. });
  55. $( ".sort-list" ).disableSelection();
  56. });
  57. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  58. // 表单提交
  59. function check_confirm(){
  60. if (0 < $('input[name*=checkedids]:checked').length) {
  61. submit_form();
  62. } else {
  63. layer.confirm('没有勾选项,快捷导航模块将被隐藏,不再显示。', {
  64. shade: layer_shade,
  65. area: ['380px', '180px'],
  66. move: false,
  67. title: '提示',
  68. btnAlign:'r',
  69. closeBtn: 3,
  70. btn: ['确定', '取消'] ,//按钮
  71. success: function () {
  72. $(".layui-layer-content").css('text-align', 'left');
  73. }
  74. }, function(){
  75. submit_form();
  76. }, function(index){
  77. layer.close(index);
  78. }
  79. );
  80. }
  81. return false;
  82. }
  83. function submit_form()
  84. {
  85. layer_loading('正在处理');
  86. $.ajax({
  87. url: "{:url('Index/ajax_quickmenu', ['_ajax'=>1])}",
  88. type: 'POST',
  89. dataType: 'JSON',
  90. data: $('#post_form').serialize(),
  91. success: function(res){
  92. layer.closeAll();
  93. if (res.code == 1) {
  94. var _parent = parent;
  95. _parent.layer.close(parentObj);
  96. _parent.layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
  97. _parent.gourl(res.url);
  98. });
  99. } else {
  100. showErrorMsg(res.msg);
  101. }
  102. },
  103. error: function(e){
  104. layer.closeAll();
  105. layer.alert(e.responseText, {icon:5, time:1500});
  106. }
  107. });
  108. }
  109. </script>
  110. {include file="public/footer" /}