Нема описа
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.

batch_attr.htm 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>批量属性操作</title>
  6. <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
  7. <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css">
  8. {load href="__STATIC__/common/js/jquery.min.js" /}
  9. {load href="__PUBLIC__/plugins/layer-v3.1.0/layer.js" /}
  10. <script type="text/javascript">
  11. var eyou_basefile = "{$Request.baseFile}";
  12. var module_name = "{$Think.const.MODULE_NAME}";
  13. var __root_dir__ = "__ROOT_DIR__";
  14. var __lang__ = "{$admin_lang}";
  15. var __main_lang__ = "{$main_lang}";
  16. </script>
  17. <script src="__SKIN__/js/global.js?v={$version}"></script>
  18. <style type="text/css">
  19. .container-fluid {
  20. padding: 10px 10px;
  21. overflow: hidden;
  22. }
  23. .control-group {
  24. padding: 5px 0px;
  25. }
  26. .input{
  27. width: 100px;
  28. }
  29. .select {
  30. height: 28px;
  31. font-size: 12px;
  32. border: 1px solid #eee;
  33. padding: 4px 0;
  34. }
  35. .btn{
  36. background-color: #4fc0e8;
  37. color: #FFF;
  38. border-radius: 4px;
  39. padding: 6px 20px;
  40. }
  41. .btn:hover {
  42. color: #FFF;
  43. background-color: #3aa8cf;
  44. }
  45. .controls{
  46. margin: 0 auto;
  47. }
  48. .notic{
  49. border:1px dashed #cae9f5;
  50. border-radius:6px;
  51. padding: 10px 16px;
  52. margin-top: 10px;
  53. background-color:#e7f6fc;
  54. color: #0d7fca;
  55. }
  56. label{
  57. font-weight: normal;
  58. color: #555;
  59. }
  60. em{
  61. color: red;
  62. }
  63. input[type="text"]{
  64. color: #555555;
  65. background-color: #FFF;
  66. border: solid 1px #eee;
  67. padding: 4px 6px;
  68. resize: none;
  69. }
  70. input[type="text"]:focus, input[type="text"]:hover, input[type="text"]:active{
  71. border: 1px solid;
  72. border-color: rgba(82,168,236,0.8);
  73. box-shadow: 0 0 0 2px rgba(82, 168, 236, 0.15);
  74. outline: 0 none;
  75. }
  76. </style>
  77. </head>
  78. <body>
  79. <div class="container-fluid">
  80. <div class="row-fluid">
  81. <div class="span12">
  82. <form class="form-horizontal" id="post_form" method="POST" action="{:url('Archives/batch_attr')}" onsubmit="check_submit();">
  83. <div class="control-group">
  84. <div class="controls">
  85. <label class="control-label" for="inputEmail">文档属性:</label>
  86. {volist name="archives_flags" id="vo"}
  87. <label><input type="radio" value="{$vo.flag_fieldname}" name="attrType">{$vo.flag_name}[{$vo.flag_attr}]</label>&nbsp;
  88. {/volist}
  89. </div>
  90. </div>
  91. <div class="control-group">
  92. <div class="controls">
  93. <label class="control-label" for="inputEmail">文档ID:</label>
  94. <input type="text" name="aids" value="" id="aids" class="input-txt" style="width: 280px;">
  95. </div>
  96. </div>
  97. <div class="control-group">
  98. <div class="controls" style="text-align: center; margin-top: 10px;">
  99. <input type="hidden" name="opt" value="{$Request.param.opt|default=''}">
  100. <input type="hidden" name="_ajax" value="1">
  101. <input type="button" class="btn" value="确认提交" onclick="check_submit();" />
  102. </div>
  103. </div>
  104. </form>
  105. </div>
  106. </div>
  107. </div>
  108. <script type="text/javascript">
  109. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  110. function check_submit()
  111. {
  112. layer_loading('正在处理');
  113. $.ajax({
  114. url: $('#post_form').attr('action'),
  115. type: 'POST',
  116. dataType: 'JSON',
  117. data: $('#post_form').serialize(),
  118. success: function(res){
  119. layer.closeAll();
  120. if (res.code == 1) {
  121. parent.layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
  122. parent.window.location.reload();
  123. parent.layer.close(parentObj);
  124. });
  125. } else {
  126. layer.alert(res.msg, {icon: 5, title:false});
  127. }
  128. return false;
  129. },
  130. error: function(e){
  131. layer.closeAll();
  132. layer.alert('操作失败', {icon: 5, title:false});
  133. return false;
  134. }
  135. });
  136. }
  137. /**
  138. * 封装的加载层
  139. */
  140. function layer_loading(msg){
  141. var loading = layer.msg(
  142. msg+'...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请勿刷新页面',
  143. {
  144. icon: 1,
  145. time: 3600000, //1小时后后自动关闭
  146. shade: [0.2] //0.1透明度的白色背景
  147. });
  148. //loading层
  149. var index = layer.load(3, {
  150. shade: [0.1,'#fff'] //0.1透明度的白色背景
  151. });
  152. return loading;
  153. }
  154. </script>
  155. </body>
  156. </html>