瀏覽代碼

add special_seach

huanggang 7 年之前
父節點
當前提交
d9d80ec7fd
共有 2 個文件被更改,包括 28 次插入6 次删除
  1. 4 0
      admin/control/mb_special.php
  2. 24 6
      admin/templates/default/mb_special.list.php

+ 4 - 0
admin/control/mb_special.php

@@ -839,4 +839,8 @@ class mb_specialControl extends SystemControl
         }
         showMessage(L('nc_common_save_succ'), urlAdmin('mb_special', 'ugc_list'));
     }
+
+    public function discoveryOp(){
+        echo 'discovery';
+    }
 }

+ 24 - 6
admin/templates/default/mb_special.list.php

@@ -70,9 +70,9 @@ input {
           <th colspan="15" class="nobg"><?php echo $lang['nc_list'];?></th>
         </tr>
         <tr class="thead">
-          <th class="w12">&nbsp;</th>
-          <th>专题编号</th>
-          <th>专题描述</th>
+          <th class="center">专题编号</th>
+          <th class="center">专题描述</th>
+          <th class="center">专题搜索关键字</th>
           <th class="w200 align-center"><span><?php echo $lang['nc_handle'];?></span></th>
         </tr>
       </thead>
@@ -80,9 +80,9 @@ input {
         <?php if(!empty($output['list']) && is_array($output['list'])){ ?>
         <?php foreach($output['list'] as $key => $value){ ?>
         <tr class="hover">
-          <td>&nbsp;</td>
-          <td><?php echo $value['special_id'];?></td>
-          <td><span nc_type="edit_special_desc" column_id="<?php echo $value['special_id'];?>" title="<?php echo $lang['nc_editable'];?>" class="editable tooltip w270"><?php echo $value['special_desc'];?></span></td>
+          <td class="center"><?php echo $value['special_id'];?></td>
+          <td class="center"><span nc_type="edit_special_desc" column_id="<?php echo $value['special_id'];?>" title="<?php echo $lang['nc_editable'];?>" class="alignleft editable tooltip w270"><?php echo $value['special_desc'];?></span></td>
+          <td class="center"><input type="text" name="search_keyword" placeholder="添加该专题的搜索关键字" value=""><button class="search_keyword">添加</button></td>
           <td class="nowrap align-center"><a href="<?php echo urlAdmin('mb_special', 'special_edit', array('special_id' => $value['special_id']));?>">编辑</a>&nbsp;|&nbsp; <a href="javascript:;" nctype="btn_del" data-special-id="<?php echo $value['special_id'];?>">删除</a></td>
         </tr>
         <?php } ?>
@@ -171,5 +171,23 @@ input {
 
         //编辑专题描述
         $('span[nc_type="edit_special_desc"]').inline_edit({act: 'mb_special',op: 'update_special_desc'});
+
+        //添加搜索关键字
+
+        $('.search_keyword').on('click',function(){
+            var keyword = $(this).sibling('input[name="search_keyword"]').val();
+            console.log(keyword);
+            return;
+            if(!keyword){
+                alert('请输入关键字');
+                return;
+            }
+            if(confirm('确定提交?')) {
+
+            }
+            $.post('',{keyword:keyword},function(){
+
+            })
+        });
     });
 </script>