瀏覽代碼

Merge branch 'master' of http://git.bocai108.com:10180/Ethan/Customer-Service

Ethan 6 年之前
父節點
當前提交
d794d834a3

+ 30 - 2
application/admin/view/admins/addpower.html

@@ -17,13 +17,13 @@
         <div class="col-sm-8">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <h5>添加权限组</h5>
+                    <h5>添加角色</h5>
                 </div>
                 <div class="ibox-content">
                     <form class="form-horizontal m-t" id="commentForm" method="post" action="{:url('admins/addPower')}">
 
                         <div class="form-group">
-                            <label class="col-sm-3 control-label">权限组名称:</label>
+                            <label class="col-sm-3 control-label">角色名称:</label>
                             <div class="input-group col-sm-4">
                                 <input id="group_name" type="text" class="form-control" name="group_name" required="" aria-required="true">
                             </div>
@@ -78,6 +78,34 @@
 <script src="__JS__/plugins/layer/layer.min.js"></script>
 <script src="__JS__/layui/layui.js"></script>
 <script src="__JS__/jquery.form.js"></script>
+<script>
+    $(function(){
+        $('[level=1]').click(function(){
+            if(this.checked){
+                $(this).parent().find('input').prop('checked','checked');
+            }
+            else{
+                $(this).parent().find('input').removeAttr('checked');
+            }
+        });
+        $('[level=2]').click(function(){
+            var n = 0;
+            if (this.checked) {
+                $(this).parent().parent().find('[level=1]').prop('checked','checked');
+            }
+            else{
+                for(var i=0;i<$(this).parent().find('[level=2]').length;i++){
+                    if($(this).parent().find('[level=2]')[i].checked){
+                        n = 1;
+                    }
+                }
+                if(n == 0){
+                    $(this).parent().parent().find('[level=1]').removeAttr('checked');
+                }
+            }
+        });
+    });
+</script>
 <script type="text/javascript">
 
     layui.use(['form', 'upload'], function(){

+ 3 - 3
application/admin/view/admins/editpower.html

@@ -3,7 +3,7 @@
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>编辑权限组</title>
+    <title>编辑角色</title>
     <link rel="shortcut icon" href="favicon.ico">
     <link href="__CSS__/bootstrap.min.css?v=3.3.6" rel="stylesheet">
     <link href="__CSS__/font-awesome.min.css?v=4.4.0" rel="stylesheet">
@@ -25,13 +25,13 @@
         <div class="col-sm-8">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <h5>编辑权限组</h5>
+                    <h5>编辑角色</h5>
                 </div>
                 <div class="ibox-content">
                     <!--<form class="form-horizontal m-t layui-form" id="commentForm" method="post" action="{:url('admins/editpower')}">-->
                     <form class="form-horizontal m-t" id="commentForm" method="post" action="{:url('admins/editpower')}">
                         <div class="form-group">
-                            <label class="col-sm-3 control-label">权限组名称:</label>
+                            <label class="col-sm-3 control-label">角色名称:</label>
                             <div class="input-group col-sm-4">
                                 <input id="group_name" type="text" class="form-control" name="group_name" required="" aria-required="true" value="{$admingroup['group_name']}">
                             </div>

+ 1 - 1
application/admin/view/admins/index.html

@@ -20,7 +20,7 @@
         </div>
         <div class="ibox-content">
             <a href="/admin/admins/addadmin.html">
-                <button class="btn btn-primary" type="button" style="margin-top:5px"><strong>新 增</strong>
+                <button class="btn btn-primary" type="button" style="margin-top:5px"><strong>新增管理员</strong>
                 </button>
             </a>
             <!--搜索框开始-->

+ 1 - 1
application/admin/view/admins/power.html

@@ -20,7 +20,7 @@
         </div>
         <div class="ibox-content">
             <a href="/admin/admins/addpower.html">
-                <button class="btn btn-primary" type="button" style="margin-top:5px"><strong>新 增</strong>
+                <button class="btn btn-primary" type="button" style="margin-top:5px"><strong>新增角色</strong>
                 </button>
             </a>
             <div class="example-wrap">