用户部门关联查询
|
|
@ -48,8 +48,8 @@ create table sys_user (
|
|||
-- ----------------------------
|
||||
-- 初始化-用户信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_user values('1', '4', 'admin', '若依', 'yzz_ivy@163.com', '15088888888', '172eee54aa664e9dd0536b063796e54e', '', 0, '维护中', '2018-03-01');
|
||||
insert into sys_user values('2', '4', 'ry', '若依', 'ry@163.com', '15288888888', '2f59d63eddd54f3977d6fe25aec8b2bc', '', 1, '锁定中', '2018-03-01');
|
||||
insert into sys_user values('1', '7', 'admin', '若依', 'yzz_ivy@163.com', '15088888888', '172eee54aa664e9dd0536b063796e54e', '', 0, '维护中', '2018-03-01');
|
||||
insert into sys_user values('2', '8', 'ry', '若依', 'ry@163.com', '15288888888', '2f59d63eddd54f3977d6fe25aec8b2bc', '', 1, '锁定中', '2018-03-01');
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.ruoyi.common.utils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* Map通用处理方法
|
||||
*
|
||||
* @author yangzz
|
||||
*/
|
||||
public class MapDataUtil
|
||||
{
|
||||
public static Map<String, Object> convertDataMap(HttpServletRequest request)
|
||||
{
|
||||
Map<String, String[]> properties = request.getParameterMap();
|
||||
Map<String, Object> returnMap = new HashMap<String, Object>();
|
||||
Iterator<?> entries = properties.entrySet().iterator();
|
||||
Map.Entry<?, ?> entry;
|
||||
String name = "";
|
||||
String value = "";
|
||||
while (entries.hasNext())
|
||||
{
|
||||
entry = (Entry<?, ?>) entries.next();
|
||||
name = (String) entry.getKey();
|
||||
Object valueObj = entry.getValue();
|
||||
if (null == valueObj)
|
||||
{
|
||||
value = "";
|
||||
}
|
||||
else if (valueObj instanceof String[])
|
||||
{
|
||||
String[] values = (String[]) valueObj;
|
||||
for (int i = 0; i < values.length; i++)
|
||||
{
|
||||
value = values[i] + ",";
|
||||
}
|
||||
value = value.substring(0, value.length() - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = valueObj.toString();
|
||||
}
|
||||
returnMap.put(name, value);
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.framework.web.page;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
|
@ -24,4 +25,6 @@ public class PageUtilEntity
|
|||
private int totalResult;
|
||||
/** 搜索值 */
|
||||
private String searchValue;
|
||||
/** 请求参数 */
|
||||
protected Map<String, Object> reqMap;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.ruoyi.framework.web.support;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.ruoyi.common.utils.HttpContextUtils;
|
||||
import com.ruoyi.common.utils.MapDataUtil;
|
||||
import com.ruoyi.framework.web.page.PageUtilEntity;
|
||||
|
||||
/**
|
||||
|
|
@ -23,6 +25,7 @@ public class TableSupport
|
|||
pageUtilEntity.setOrderByColumn(request.getParameter("sort"));
|
||||
pageUtilEntity.setIsAsc(request.getParameter("order"));
|
||||
pageUtilEntity.setSearchValue(request.getParameter("search"));
|
||||
pageUtilEntity.setReqMap(MapDataUtil.convertDataMap(request));
|
||||
return pageUtilEntity;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.ruoyi.project.system.dept.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.web.domain.JSON;
|
||||
import com.ruoyi.project.system.dept.domain.Dept;
|
||||
|
|
@ -59,7 +58,7 @@ public class DeptController
|
|||
model.addAttribute("dept", dept);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
|
|
@ -113,4 +112,15 @@ public class DeptController
|
|||
}
|
||||
return JSON.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载部门列表树
|
||||
*/
|
||||
@GetMapping("/treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData()
|
||||
{
|
||||
List<Map<String, Object>> tree = deptService.selectDeptTree();
|
||||
return tree;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.ruoyi.project.system.dept.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -39,6 +42,27 @@ public class DeptServiceImpl implements IDeptService
|
|||
return deptDao.selectDeptAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门管理树
|
||||
*
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
public List<Map<String, Object>> selectDeptTree()
|
||||
{
|
||||
List<Map<String, Object>> trees = new ArrayList<Map<String, Object>>();
|
||||
List<Dept> deptList = deptDao.selectDeptAll();
|
||||
|
||||
for (Dept dept : deptList)
|
||||
{
|
||||
Map<String, Object> deptMap = new HashMap<String, Object>();
|
||||
deptMap.put("id", dept.getDeptId());
|
||||
deptMap.put("pId", dept.getParentId());
|
||||
deptMap.put("name", dept.getDeptName());
|
||||
trees.add(deptMap);
|
||||
}
|
||||
return trees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门人数
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.project.system.dept.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.project.system.dept.domain.Dept;
|
||||
|
||||
/**
|
||||
|
|
@ -23,6 +25,14 @@ public interface IDeptService
|
|||
* @return 所有部门信息
|
||||
*/
|
||||
public List<Dept> selectDeptAll();
|
||||
|
||||
/**
|
||||
* 查询部门管理树
|
||||
*
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
public List<Map<String, Object>> selectDeptTree();
|
||||
|
||||
|
||||
/**
|
||||
* 查询部门人数
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
package com.ruoyi.project.system.user.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.framework.web.page.PageUtilEntity;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.system.user.domain.User;
|
||||
import com.ruoyi.project.system.user.domain.UserRole;
|
||||
|
||||
/**
|
||||
* 用户表 数据层
|
||||
|
|
@ -43,6 +46,14 @@ public interface IUserDao
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteUserById(Long userId);
|
||||
|
||||
/**
|
||||
* 通过用户ID删除用户和角色关联
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserRoleByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
|
|
@ -53,11 +64,19 @@ public interface IUserDao
|
|||
public int batchDeleteUser(Long[] ids);
|
||||
|
||||
/**
|
||||
* 保存用户信息
|
||||
* 修改用户信息
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUser(User user);
|
||||
|
||||
/**
|
||||
* 批量新增用户角色信息
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchUserRole(List<UserRole> userRoleList);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
package com.ruoyi.project.system.user.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.ruoyi.framework.web.dao.DynamicObjectBaseDao;
|
||||
import com.ruoyi.framework.web.page.PageUtilEntity;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.system.user.domain.User;
|
||||
import com.ruoyi.project.system.user.domain.UserRole;
|
||||
|
||||
/**
|
||||
* 用户 数据层处理
|
||||
|
|
@ -63,6 +66,18 @@ public class UserDaoImpl extends DynamicObjectBaseDao implements IUserDao
|
|||
return this.delete("SystemUserMapper.deleteUserById", userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户ID删除用户和角色关联
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserRoleByUserId(Long userId)
|
||||
{
|
||||
return this.delete("SystemUserRoleMapper.deleteUserRoleByUserId", userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
*
|
||||
|
|
@ -85,4 +100,21 @@ public class UserDaoImpl extends DynamicObjectBaseDao implements IUserDao
|
|||
return this.save("SystemUserMapper.updateUser", user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户信息
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
/**
|
||||
* 批量新增用户角色信息
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchUserRole(List<UserRole> userRoleList)
|
||||
{
|
||||
return this.batchSave("SystemUserRoleMapper.batchUserRole", userRoleList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,5 +37,7 @@ public class User
|
|||
private Date createTime;
|
||||
/** 部门对象 */
|
||||
private Dept dept;
|
||||
/** 角色组 */
|
||||
private Long[] roleIds;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.ruoyi.project.system.user.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户和角色关联 sys_user_role
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class UserRole
|
||||
{
|
||||
/** 用户ID */
|
||||
private Long userId;
|
||||
/** 角色ID */
|
||||
private Long roleId;
|
||||
}
|
||||
|
|
@ -1,11 +1,16 @@
|
|||
package com.ruoyi.project.system.user.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.framework.web.page.PageUtilEntity;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.system.user.dao.IUserDao;
|
||||
import com.ruoyi.project.system.user.domain.User;
|
||||
import com.ruoyi.project.system.user.domain.UserRole;
|
||||
|
||||
/**
|
||||
* 用户 业务层处理
|
||||
|
|
@ -85,8 +90,21 @@ public class UserServiceImpl implements IUserService
|
|||
*/
|
||||
public int saveUser(User user)
|
||||
{
|
||||
Long userId = user.getUserId();
|
||||
// 删除用户与角色关联
|
||||
userDao.deleteUserRoleByUserId(userId);
|
||||
// 新增用户与角色管理
|
||||
List<UserRole> list = new ArrayList<>();
|
||||
for (Long roleId : user.getRoleIds())
|
||||
{
|
||||
UserRole ur = new UserRole();
|
||||
ur.setUserId(userId);
|
||||
ur.setRoleId(roleId);
|
||||
list.add(ur);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
userDao.batchUserRole(list);
|
||||
}
|
||||
return userDao.updateUser(user);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ spring:
|
|||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.jdbc.Driver
|
||||
#url: jdbc:mysql://10.213.24.45:3306/ry?useUnicode=true&characterEncoding=utf8
|
||||
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8
|
||||
url: jdbc:mysql://10.213.24.45:3306/ry?useUnicode=true&characterEncoding=utf8
|
||||
#url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8
|
||||
username: root
|
||||
password: password
|
||||
# 初始化大小,最小,最大
|
||||
|
|
|
|||
|
|
@ -27,12 +27,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="status" column="dept_status" />
|
||||
</resultMap>
|
||||
|
||||
<select id="pageInfoQuery" parameterType="User" resultMap="UserResult">
|
||||
<select id="pageInfoQuery" parameterType="PageUtilEntity" resultMap="UserResult">
|
||||
select * from sys_user
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND login_name = #{searchValue}
|
||||
</if>
|
||||
<if test="reqMap.deptId != null and reqMap.parentId != null and reqMap.parentId != 0">
|
||||
AND dept_id IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{reqMap.deptId} OR parent_id = #{reqMap.deptId})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -106,5 +109,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="SystemUserRoleMapper">
|
||||
|
||||
<resultMap type="UserRole" id="UserRoleResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="roleId" column="role_id" />
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteUserRoleByUserId">
|
||||
delete from sys_user_role where user_id=#{userId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchUserRole">
|
||||
insert into sys_user_role(user_id, role_id) values
|
||||
<foreach item="item" index="index" collection="list"
|
||||
separator=",">
|
||||
(#{item.userId},#{item.roleId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -48,7 +48,7 @@ function initTreeTable(_id, _parentId, _columns, _url) {
|
|||
expandColumn : '1', // 在哪一列上面显示展开按钮
|
||||
striped : false, // 是否各行渐变色
|
||||
bordered : true, // 是否显示边框
|
||||
expandAll : false, // 是否全部展开
|
||||
expandAll : true, // 是否全部展开
|
||||
showRefresh: true, // 是否显示刷新按钮
|
||||
columns: _columns
|
||||
});
|
||||
|
|
@ -68,10 +68,8 @@ function getIdSelections(_id) {
|
|||
|
||||
// 获取新增或修改选中复选框
|
||||
function getIsChecked(_name) {
|
||||
var checkArr = [];
|
||||
$('input[name="'+_name+'"]:checked').each(function() {
|
||||
checkArr.push($(this).val());
|
||||
});
|
||||
return checkArr;
|
||||
return $.map($('input[name="'+_name+'"]:checked').each, function () {
|
||||
return $(this).val();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-layout-pane{overflow:auto}.ui-layout-content{padding:10px;position:relative;overflow:auto;width:100%;border:0}.layout-child-container,.layout-content-container{padding:0;overflow:hidden}.layout-child-container{border:0}.layout-scroll{overflow:auto}.layout-hide{display:none}.ui-layout-resizer{background:#fafafa;border:1px solid #eee;border-width:0}.ui-layout-resizer-open-hover,.ui-layout-resizer-dragging{background:#fafafa}.ui-layout-resizer-dragging{border:1px solid #eee}.ui-layout-resizer-north-dragging,.ui-layout-resizer-south-dragging{border-width:1px 0}.ui-layout-resizer-west-dragging,.ui-layout-resizer-east-dragging{border-width:0 1px}.ui-layout-resizer-dragging-limit{background:#e1a4a4}.ui-layout-resizer-closed-hover{background:#ebd5aa}.ui-layout-resizer-north-sliding-hover{border-bottom-width:1px}.ui-layout-resizer-south-sliding-hover{border-top-width:1px}.ui-layout-resizer-west-sliding-hover{border-right-width:1px}.ui-layout-resizer-east-sliding-hover{border-left-width:1px}.ui-layout-toggler{border:1px solid #eee;background-color:#eee}.ui-layout-resizer-hover .ui-layout-toggler{opacity:1.00;filter:alpha(opacity=100)}.ui-layout-toggler-hover,.ui-layout-resizer-hover .ui-layout-toggler-hover{background-color:#FC6;opacity:1.00;filter:alpha(opacity=100)}.ui-layout-toggler-north,.ui-layout-toggler-south{border-width:0 1px}.ui-layout-toggler-west,.ui-layout-toggler-east{border-width:1px 0}.ui-layout-resizer-sliding .ui-layout-toggler{display:none}.ui-layout-toggler .ui-content{color:#666;font-size:12px;font-weight:bold;line-height:8px;width:100%;padding-bottom:.35ex}.ui-layout-toggler .ui-content .fa{line-height:8px}.ui-layout-toggler-north-closed .fa:before,.ui-layout-toggler-south-open .fa:before{content:"\f0d7"}.ui-layout-toggler-south-closed .fa:before,.ui-layout-toggler-north-open .fa:before{content:"\f0d8"}.ui-layout-toggler-west-closed .fa:before,.ui-layout-toggler-east-open .fa:before{content:"\f0da"}.ui-layout-toggler-east-closed .fa:before,.ui-layout-toggler-west-open .fa:before{content:"\f0d9"}.ui-layout-mask{border:none!important;padding:0!important;margin:0!important;overflow:hidden!important;position:absolute!important;opacity:0!important;filter:Alpha(Opacity="0")!important}.ui-layout-mask-inside-pane{top:0!important;left:0!important;width:100%!important;height:100%!important}@media print{html{height:auto!important;overflow:visible!important}body.ui-layout-container{position:static!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;_width:auto!important;_height:auto!important}.ui-layout-resizer,.ui-layout-toggler{display:none!important}.ui-layout-pane{border:none!important;background:transparent!important;position:relative!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;width:auto!important;height:auto!important;overflow:visible!important}}
|
||||
|
After Width: | Height: | Size: 601 B |
|
After Width: | Height: | Size: 580 B |
|
After Width: | Height: | Size: 570 B |
|
After Width: | Height: | Size: 762 B |
|
After Width: | Height: | Size: 399 B |
|
After Width: | Height: | Size: 710 B |
|
After Width: | Height: | Size: 432 B |
|
After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 467 B |
|
After Width: | Height: | Size: 45 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -0,0 +1,102 @@
|
|||
/*-------------------------------------
|
||||
zTree Style
|
||||
|
||||
version: 3.4
|
||||
author: Hunter.z
|
||||
email: hunter.z@263.net
|
||||
website: http://code.google.com/p/jquerytree/
|
||||
|
||||
-------------------------------------*/
|
||||
|
||||
.ztree * {padding:0; margin:0; font-size:12px;}
|
||||
.ztree {margin:0; padding:2px; color:#333}
|
||||
.ztree li{padding:0; margin:0; list-style:none; line-height:18px; text-align:left; white-space:nowrap; outline:0}
|
||||
.ztree li ul{ margin:0; padding:0 0 0 18px}
|
||||
.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
|
||||
|
||||
.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; /* height:17px; */ color:#333; background-color: transparent;
|
||||
text-decoration:none; vertical-align:top; display: inline-block}
|
||||
.ztree li a:hover {text-decoration:underline}
|
||||
/*.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}*/
|
||||
.ztree li a.curSelectedNode {padding-top:0px; background-color:#F6F6F6; color:#0663A2; border:1px #DDDDDD solid; opacity:0.8;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
/*.ztree li a.curSelectedNode {padding-top:0px; color:#0663a2; font-weight:bold; height:16px; opacity:0.8;}*/
|
||||
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
|
||||
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
|
||||
opacity:0.8; filter:alpha(opacity=80)}
|
||||
.ztree li a.tmpTargetNode_prev {}
|
||||
.ztree li a.tmpTargetNode_next {}
|
||||
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
|
||||
font-size:12px; border:1px #7EC4CC solid; *border:0px}
|
||||
.ztree li span {line-height:16px; margin-right:2px}
|
||||
.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
|
||||
border:0 none; cursor: pointer;outline:none;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
|
||||
|
||||
/* IE7 fix */
|
||||
.ztree li span.button.level0 {*margin-left:-15px;}
|
||||
|
||||
.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
|
||||
.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
|
||||
.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
|
||||
.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
|
||||
.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
|
||||
.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
|
||||
.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
|
||||
.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
|
||||
.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
|
||||
.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
|
||||
.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
|
||||
.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
|
||||
.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
|
||||
.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
|
||||
.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
|
||||
.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
|
||||
.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
|
||||
.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
|
||||
.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
|
||||
.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
|
||||
.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
|
||||
|
||||
.ztree li span.button.switch {width:18px; height:18px}
|
||||
.ztree li span.button.root_open{background-position:-92px -54px}
|
||||
.ztree li span.button.root_close{background-position:-74px -54px}
|
||||
.ztree li span.button.roots_open{background-position:-92px 0}
|
||||
.ztree li span.button.roots_close{background-position:-74px 0}
|
||||
.ztree li span.button.center_open{background-position:-92px -18px}
|
||||
.ztree li span.button.center_close{background-position:-74px -18px}
|
||||
.ztree li span.button.bottom_open{background-position:-92px -36px}
|
||||
.ztree li span.button.bottom_close{background-position:-74px -36px}
|
||||
.ztree li span.button.noline_open{background-position:-92px -72px}
|
||||
.ztree li span.button.noline_close{background-position:-74px -72px}
|
||||
.ztree li span.button.root_docu{ background:none;}
|
||||
.ztree li span.button.roots_docu{background-position:-56px 0}
|
||||
.ztree li span.button.center_docu{background-position:-56px -18px}
|
||||
.ztree li span.button.bottom_docu{background-position:-56px -36px}
|
||||
.ztree li span.button.noline_docu{ background:none;}
|
||||
|
||||
.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; /* vertical-align:top; * */vertical-align:middle}
|
||||
.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
|
||||
|
||||
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
|
||||
|
||||
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
|
||||
|
||||
span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
|
||||
|
||||
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
|
||||
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
|
||||
|
||||
/* level style*/
|
||||
/*.ztree li span.button.level0 {
|
||||
display:none;
|
||||
}
|
||||
.ztree li ul.level0 {
|
||||
padding:0;
|
||||
background:none;
|
||||
}*/
|
||||
|
After Width: | Height: | Size: 45 B |
|
After Width: | Height: | Size: 933 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
|
@ -0,0 +1,107 @@
|
|||
/*-------------------------------------
|
||||
zTree Style
|
||||
|
||||
version: 3.4
|
||||
author: Hunter.z
|
||||
email: hunter.z@263.net
|
||||
website: http://code.google.com/p/jquerytree/
|
||||
|
||||
-------------------------------------*/
|
||||
|
||||
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
|
||||
.ztree {margin:0; padding:5px; color:#333}
|
||||
.ztree li{padding:0; margin:0; list-style:none; line-height:21px; text-align:left; white-space:nowrap; outline:0}
|
||||
.ztree li ul{ margin:0; padding:0 0 0 18px}
|
||||
.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;}
|
||||
|
||||
.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; display: inline-block}
|
||||
.ztree li a:hover {text-decoration:underline}
|
||||
.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:22px; -webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:22px; border:1px #666 solid; -webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid;
|
||||
opacity:0.8; filter:alpha(opacity=80)}
|
||||
.ztree li a.tmpTargetNode_prev {}
|
||||
.ztree li a.tmpTargetNode_next {}
|
||||
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
|
||||
font-size:12px; border:1px #7EC4CC solid; *border:0px}
|
||||
.ztree li span {line-height:21px; margin-right:2px}
|
||||
.ztree li span.button {line-height:0; margin:0; width:21px; height:21px; display: inline-block; vertical-align:middle;
|
||||
border:0 none; cursor: pointer;outline:none;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
|
||||
|
||||
.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto}
|
||||
.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;}
|
||||
.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;}
|
||||
.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;}
|
||||
.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;}
|
||||
.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;}
|
||||
.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;}
|
||||
.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;}
|
||||
.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;}
|
||||
.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;}
|
||||
.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;}
|
||||
.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;}
|
||||
.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;}
|
||||
.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;}
|
||||
.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;}
|
||||
.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;}
|
||||
.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;}
|
||||
.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;}
|
||||
.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;}
|
||||
.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;}
|
||||
.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;}
|
||||
|
||||
.ztree li span.button.switch {width:21px; height:21px}
|
||||
.ztree li span.button.root_open{background-position:-105px -85px}
|
||||
.ztree li span.button.root_close{background-position:-126px -85px}
|
||||
.ztree li span.button.roots_open{background-position: -105px 0;}
|
||||
.ztree li span.button.roots_close{background-position: -126px 0;}
|
||||
.ztree li span.button.center_open{background-position: -105px -21px;}
|
||||
.ztree li span.button.center_close{background-position: -126px -21px;}
|
||||
.ztree li span.button.bottom_open{background-position: -105px -42px;}
|
||||
.ztree li span.button.bottom_close{background-position: -126px -42px;}
|
||||
.ztree li span.button.noline_open{background-position: -126px -84px;}
|
||||
.ztree li span.button.noline_close{background-position: -105px -84px;}
|
||||
.ztree li span.button.root_docu{ background:none;}
|
||||
.ztree li span.button.roots_docu{background-position: -84px 0;}
|
||||
.ztree li span.button.center_docu{background-position: -84px -21px;}
|
||||
.ztree li span.button.bottom_docu{background-position: -84px -42px;}
|
||||
.ztree li span.button.noline_docu{ background:none;}
|
||||
|
||||
.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.edit:hover {
|
||||
background-position: -168px -21px;
|
||||
}
|
||||
.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.remove:hover {
|
||||
background-position: -168px -42px;
|
||||
}
|
||||
.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.add:hover {
|
||||
background-position: -168px 0;
|
||||
}
|
||||
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
|
||||
|
||||
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
|
||||
|
||||
span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
|
||||
|
||||
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
|
||||
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
|
||||
|
||||
/* 树搜索相关 */
|
||||
.treeSearchInput {padding:13px 0 0 20px;}
|
||||
.treeSearchInput label {padding:5px 0 3px 0;font-size:13px;font-weight:normal;vertical-align:middle;}
|
||||
.treeSearchInput input {width:145px;vertical-align:middle;line-height:24px;height:26px;border:1px solid #bbb;padding:0 4px;}
|
||||
.treeSearchInput button {border:1px solid #bbb;vertical-align:middle;height:26px;height:26px\9;font-size:13px;background:#efefef;padding:0 8px;}
|
||||
.treeShowHideButton {position:absolute;right:8px;top:2px;font-size:12px;color:#333;z-index:3;}
|
||||
.treeShowHideButton label {cursor:pointer;}
|
||||
.treeExpandCollapse {float:right;margin:6px 5px;padding:5px;font-size:12px;color:#333;position:relative;z-index:2;background:#fff;}
|
||||
.treeExpandCollapse a {text-decoration:none;color:#333}
|
||||
.treeselect.ztree {padding:10px 20px;}
|
||||
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 45 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -0,0 +1,118 @@
|
|||
/*-------------------------------------
|
||||
zTree Style
|
||||
|
||||
version: 3.4
|
||||
author: Hunter.z
|
||||
email: hunter.z@263.net
|
||||
website: http://code.google.com/p/jquerytree/
|
||||
|
||||
-------------------------------------*/
|
||||
|
||||
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
|
||||
.ztree {margin:0; padding:5px; color:#333}
|
||||
.ztree li{padding:0; margin:0; list-style:none; line-height:21px; text-align:left; white-space:nowrap; outline:0}
|
||||
.ztree li ul{ margin:0; padding:0 0 0 18px}
|
||||
.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;}
|
||||
|
||||
.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; display: inline-block}
|
||||
.ztree li a:hover {text-decoration:underline}
|
||||
.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;}
|
||||
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;}
|
||||
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid;
|
||||
opacity:0.8; filter:alpha(opacity=80)}
|
||||
.ztree li a.tmpTargetNode_prev {}
|
||||
.ztree li a.tmpTargetNode_next {}
|
||||
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
|
||||
font-size:12px; border:1px #7EC4CC solid; *border:0px}
|
||||
.ztree li span {line-height:21px; margin-right:2px}
|
||||
.ztree li span.button {line-height:0; margin:0; width:21px; height:21px; display: inline-block; vertical-align:middle;
|
||||
border:0 none; cursor: pointer;outline:none;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
|
||||
|
||||
.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto}
|
||||
.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;}
|
||||
.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;}
|
||||
.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;}
|
||||
.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;}
|
||||
.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;}
|
||||
.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;}
|
||||
.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;}
|
||||
.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;}
|
||||
.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;}
|
||||
.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;}
|
||||
.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;}
|
||||
.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;}
|
||||
.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;}
|
||||
.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;}
|
||||
.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;}
|
||||
.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;}
|
||||
.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;}
|
||||
.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;}
|
||||
.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;}
|
||||
.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;}
|
||||
|
||||
.ztree li span.button.switch {width:21px; height:21px}
|
||||
.ztree li span.button.root_open{background-position:-92px -54px}
|
||||
.ztree li span.button.root_close{background-position:-74px -54px}
|
||||
.ztree li span.button.roots_open{background-position: -105px 0;}
|
||||
.ztree li span.button.roots_close{background-position: -126px 0;}
|
||||
.ztree li span.button.center_open{background-position: -105px -21px;}
|
||||
.ztree li span.button.center_close{background-position: -126px -21px;}
|
||||
.ztree li span.button.bottom_open{background-position: -105px -42px;}
|
||||
.ztree li span.button.bottom_close{background-position: -126px -42px;}
|
||||
.ztree li span.button.noline_open{background-position: -126px -84px;}
|
||||
.ztree li span.button.noline_close{background-position: -105px -84px;}
|
||||
.ztree li span.button.root_docu{ background:none;}
|
||||
.ztree li span.button.roots_docu{background-position: -84px 0;}
|
||||
.ztree li span.button.center_docu{background-position: -84px -21px;}
|
||||
.ztree li span.button.bottom_docu{background-position: -84px -42px;}
|
||||
.ztree li span.button.noline_docu{ background:none;}
|
||||
|
||||
.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.edit:hover {
|
||||
background-position: -168px -21px;
|
||||
}
|
||||
.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.remove:hover {
|
||||
background-position: -168px -42px;
|
||||
}
|
||||
.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.add:hover {
|
||||
background-position: -168px 0;
|
||||
}
|
||||
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
|
||||
|
||||
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
|
||||
|
||||
span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
|
||||
|
||||
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
|
||||
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
|
||||
|
||||
/* simple */
|
||||
|
||||
.ztree * {font-size:14px;font-family:"Microsoft Yahei",Verdana,Simsun,"Segoe UI Web Light","Segoe UI Light","Segoe UI Web Regular","Segoe UI","Segoe UI Symbol","Helvetica Neue",Arial;}
|
||||
.ztree li ul{ margin:0; padding:0}
|
||||
.ztree li {line-height:28px;}
|
||||
.ztree li a {width:100%;height:28px;padding-top: 0px;}
|
||||
.ztree li a:hover {text-decoration:none; background-color: #E7E7E7;}
|
||||
.ztree11 li a span.button.switch {visibility:hidden}
|
||||
.ztree11.showIcon li a span.button.switch {visibility:visible}
|
||||
.ztree li a.curSelectedNode {background-color:#D4D4D4;border:0;height:28px;}
|
||||
.ztree li span {line-height:26px;margin-right:0px;}
|
||||
.ztree li span.button {margin-top: -7px;}
|
||||
.ztree li span.button.switch {width:16px;height: 16px;}
|
||||
.ztree li a.level0 span {font-size:15px;font-weight:bold;}
|
||||
.ztree li span.button {background-image:url("img/left_menu.png"); *background-image:url("./left_menu.gif")}
|
||||
.ztree li span.button.switch.level0 {width: 20px; height:20px}
|
||||
.ztree li span.button.switch.level1 {width: 20px; height:20px}
|
||||
.ztree li span.button.noline_open {background-position: 0 0;}
|
||||
.ztree li span.button.noline_close {background-position: -18px 0;}
|
||||
.ztree li span.button.noline_open.level0 {background-position: 0 -17px;}
|
||||
.ztree li span.button.noline_close.level0 {background-position: -18px -17px;}
|
||||
|
|
@ -0,0 +1,624 @@
|
|||
/*
|
||||
* JQuery zTree excheck 3.5.12
|
||||
* http://zTree.me/
|
||||
*
|
||||
* Copyright (c) 2010 Hunter.z
|
||||
*
|
||||
* Licensed same as jquery - MIT License
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* email: hunter.z@263.net
|
||||
* Date: 2013-03-11
|
||||
*/
|
||||
(function($){
|
||||
//default consts of excheck
|
||||
var _consts = {
|
||||
event: {
|
||||
CHECK: "ztree_check"
|
||||
},
|
||||
id: {
|
||||
CHECK: "_check"
|
||||
},
|
||||
checkbox: {
|
||||
STYLE: "checkbox",
|
||||
DEFAULT: "chk",
|
||||
DISABLED: "disable",
|
||||
FALSE: "false",
|
||||
TRUE: "true",
|
||||
FULL: "full",
|
||||
PART: "part",
|
||||
FOCUS: "focus"
|
||||
},
|
||||
radio: {
|
||||
STYLE: "radio",
|
||||
TYPE_ALL: "all",
|
||||
TYPE_LEVEL: "level"
|
||||
}
|
||||
},
|
||||
//default setting of excheck
|
||||
_setting = {
|
||||
check: {
|
||||
enable: false,
|
||||
autoCheckTrigger: false,
|
||||
chkStyle: _consts.checkbox.STYLE,
|
||||
nocheckInherit: false,
|
||||
chkDisabledInherit: false,
|
||||
radioType: _consts.radio.TYPE_LEVEL,
|
||||
chkboxType: {
|
||||
"Y": "ps",
|
||||
"N": "ps"
|
||||
}
|
||||
},
|
||||
data: {
|
||||
key: {
|
||||
checked: "checked"
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
beforeCheck:null,
|
||||
onCheck:null
|
||||
}
|
||||
},
|
||||
//default root of excheck
|
||||
_initRoot = function (setting) {
|
||||
var r = data.getRoot(setting);
|
||||
r.radioCheckedList = [];
|
||||
},
|
||||
//default cache of excheck
|
||||
_initCache = function(treeId) {},
|
||||
//default bind event of excheck
|
||||
_bindEvent = function(setting) {
|
||||
var o = setting.treeObj,
|
||||
c = consts.event;
|
||||
o.bind(c.CHECK, function (event, srcEvent, treeId, node) {
|
||||
tools.apply(setting.callback.onCheck, [!!srcEvent?srcEvent : event, treeId, node]);
|
||||
});
|
||||
},
|
||||
_unbindEvent = function(setting) {
|
||||
var o = setting.treeObj,
|
||||
c = consts.event;
|
||||
o.unbind(c.CHECK);
|
||||
},
|
||||
//default event proxy of excheck
|
||||
_eventProxy = function(e) {
|
||||
var target = e.target,
|
||||
setting = data.getSetting(e.data.treeId),
|
||||
tId = "", node = null,
|
||||
nodeEventType = "", treeEventType = "",
|
||||
nodeEventCallback = null, treeEventCallback = null;
|
||||
|
||||
if (tools.eqs(e.type, "mouseover")) {
|
||||
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
|
||||
tId = target.parentNode.id;
|
||||
nodeEventType = "mouseoverCheck";
|
||||
}
|
||||
} else if (tools.eqs(e.type, "mouseout")) {
|
||||
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
|
||||
tId = target.parentNode.id;
|
||||
nodeEventType = "mouseoutCheck";
|
||||
}
|
||||
} else if (tools.eqs(e.type, "click")) {
|
||||
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
|
||||
tId = target.parentNode.id;
|
||||
nodeEventType = "checkNode";
|
||||
}
|
||||
}
|
||||
if (tId.length>0) {
|
||||
node = data.getNodeCache(setting, tId);
|
||||
switch (nodeEventType) {
|
||||
case "checkNode" :
|
||||
nodeEventCallback = _handler.onCheckNode;
|
||||
break;
|
||||
case "mouseoverCheck" :
|
||||
nodeEventCallback = _handler.onMouseoverCheck;
|
||||
break;
|
||||
case "mouseoutCheck" :
|
||||
nodeEventCallback = _handler.onMouseoutCheck;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var proxyResult = {
|
||||
stop: false,
|
||||
node: node,
|
||||
nodeEventType: nodeEventType,
|
||||
nodeEventCallback: nodeEventCallback,
|
||||
treeEventType: treeEventType,
|
||||
treeEventCallback: treeEventCallback
|
||||
};
|
||||
return proxyResult
|
||||
},
|
||||
//default init node of excheck
|
||||
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
|
||||
if (!n) return;
|
||||
var checkedKey = setting.data.key.checked;
|
||||
if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
|
||||
n[checkedKey] = !!n[checkedKey];
|
||||
n.checkedOld = n[checkedKey];
|
||||
if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
|
||||
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
|
||||
if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
|
||||
n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);
|
||||
if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
|
||||
n.halfCheck = !!n.halfCheck;
|
||||
n.check_Child_State = -1;
|
||||
n.check_Focus = false;
|
||||
n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
|
||||
},
|
||||
//add dom for check
|
||||
_beforeA = function(setting, node, html) {
|
||||
var checkedKey = setting.data.key.checked;
|
||||
if (setting.check.enable) {
|
||||
data.makeChkFlag(setting, node);
|
||||
if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
|
||||
var r = data.getRoot(setting);
|
||||
r.radioCheckedList.push(node);
|
||||
}
|
||||
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
|
||||
}
|
||||
},
|
||||
//update zTreeObj, add method of check
|
||||
_zTreeTools = function(setting, zTreeTools) {
|
||||
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
|
||||
var checkedKey = this.setting.data.key.checked;
|
||||
if (node.chkDisabled === true) return;
|
||||
if (checked !== true && checked !== false) {
|
||||
checked = !node[checkedKey];
|
||||
}
|
||||
callbackFlag = !!callbackFlag;
|
||||
|
||||
if (node[checkedKey] === checked && !checkTypeFlag) {
|
||||
return;
|
||||
} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
|
||||
return;
|
||||
}
|
||||
if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
|
||||
node[checkedKey] = checked;
|
||||
var checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
|
||||
view.setChkClass(this.setting, checkObj, node);
|
||||
view.repairParentChkClassWithSelf(this.setting, node);
|
||||
if (callbackFlag) {
|
||||
setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
zTreeTools.checkAllNodes = function(checked) {
|
||||
view.repairAllChk(this.setting, !!checked);
|
||||
}
|
||||
|
||||
zTreeTools.getCheckedNodes = function(checked) {
|
||||
var childKey = this.setting.data.key.children;
|
||||
checked = (checked !== false);
|
||||
return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
|
||||
}
|
||||
|
||||
zTreeTools.getChangeCheckedNodes = function() {
|
||||
var childKey = this.setting.data.key.children;
|
||||
return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
|
||||
}
|
||||
|
||||
zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
|
||||
disabled = !!disabled;
|
||||
inheritParent = !!inheritParent;
|
||||
inheritChildren = !!inheritChildren;
|
||||
view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);
|
||||
view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);
|
||||
}
|
||||
|
||||
var _updateNode = zTreeTools.updateNode;
|
||||
zTreeTools.updateNode = function(node, checkTypeFlag) {
|
||||
if (_updateNode) _updateNode.apply(zTreeTools, arguments);
|
||||
if (!node || !this.setting.check.enable) return;
|
||||
var nObj = $("#" + node.tId);
|
||||
if (nObj.get(0) && tools.uCanDo(this.setting)) {
|
||||
var checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
|
||||
view.setChkClass(this.setting, checkObj, node);
|
||||
view.repairParentChkClassWithSelf(this.setting, node);
|
||||
}
|
||||
}
|
||||
},
|
||||
//method of operate data
|
||||
_data = {
|
||||
getRadioCheckedList: function(setting) {
|
||||
var checkedList = data.getRoot(setting).radioCheckedList;
|
||||
for (var i=0, j=checkedList.length; i<j; i++) {
|
||||
if(!data.getNodeCache(setting, checkedList[i].tId)) {
|
||||
checkedList.splice(i, 1);
|
||||
i--; j--;
|
||||
}
|
||||
}
|
||||
return checkedList;
|
||||
},
|
||||
getCheckStatus: function(setting, node) {
|
||||
if (!setting.check.enable || node.nocheck || node.chkDisabled) return null;
|
||||
var checkedKey = setting.data.key.checked,
|
||||
r = {
|
||||
checked: node[checkedKey],
|
||||
half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
|
||||
};
|
||||
return r;
|
||||
},
|
||||
getTreeCheckedNodes: function(setting, nodes, checked, results) {
|
||||
if (!nodes) return [];
|
||||
var childKey = setting.data.key.children,
|
||||
checkedKey = setting.data.key.checked,
|
||||
onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);
|
||||
results = !results ? [] : results;
|
||||
for (var i = 0, l = nodes.length; i < l; i++) {
|
||||
if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {
|
||||
results.push(nodes[i]);
|
||||
if(onlyOne) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
|
||||
if(onlyOne && results.length > 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return results;
|
||||
},
|
||||
getTreeChangeCheckedNodes: function(setting, nodes, results) {
|
||||
if (!nodes) return [];
|
||||
var childKey = setting.data.key.children,
|
||||
checkedKey = setting.data.key.checked;
|
||||
results = !results ? [] : results;
|
||||
for (var i = 0, l = nodes.length; i < l; i++) {
|
||||
if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
|
||||
results.push(nodes[i]);
|
||||
}
|
||||
data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
|
||||
}
|
||||
return results;
|
||||
},
|
||||
makeChkFlag: function(setting, node) {
|
||||
if (!node) return;
|
||||
var childKey = setting.data.key.children,
|
||||
checkedKey = setting.data.key.checked,
|
||||
chkFlag = -1;
|
||||
if (node[childKey]) {
|
||||
for (var i = 0, l = node[childKey].length; i < l; i++) {
|
||||
var cNode = node[childKey][i];
|
||||
var tmp = -1;
|
||||
if (setting.check.chkStyle == consts.radio.STYLE) {
|
||||
if (cNode.nocheck === true || cNode.chkDisabled === true) {
|
||||
tmp = cNode.check_Child_State;
|
||||
} else if (cNode.halfCheck === true) {
|
||||
tmp = 2;
|
||||
} else if (cNode[checkedKey]) {
|
||||
tmp = 2;
|
||||
} else {
|
||||
tmp = cNode.check_Child_State > 0 ? 2:0;
|
||||
}
|
||||
if (tmp == 2) {
|
||||
chkFlag = 2; break;
|
||||
} else if (tmp == 0){
|
||||
chkFlag = 0;
|
||||
}
|
||||
} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
|
||||
if (cNode.nocheck === true || cNode.chkDisabled === true) {
|
||||
tmp = cNode.check_Child_State;
|
||||
} else if (cNode.halfCheck === true) {
|
||||
tmp = 1;
|
||||
} else if (cNode[checkedKey] ) {
|
||||
tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
|
||||
} else {
|
||||
tmp = (cNode.check_Child_State > 0) ? 1 : 0;
|
||||
}
|
||||
if (tmp === 1) {
|
||||
chkFlag = 1; break;
|
||||
} else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {
|
||||
chkFlag = 1; break;
|
||||
} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
|
||||
chkFlag = 1; break;
|
||||
} else if (tmp > -1) {
|
||||
chkFlag = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
node.check_Child_State = chkFlag;
|
||||
}
|
||||
},
|
||||
//method of event proxy
|
||||
_event = {
|
||||
|
||||
},
|
||||
//method of event handler
|
||||
_handler = {
|
||||
onCheckNode: function (event, node) {
|
||||
if (node.chkDisabled === true) return false;
|
||||
var setting = data.getSetting(event.data.treeId),
|
||||
checkedKey = setting.data.key.checked;
|
||||
if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
|
||||
node[checkedKey] = !node[checkedKey];
|
||||
view.checkNodeRelation(setting, node);
|
||||
var checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
view.setChkClass(setting, checkObj, node);
|
||||
view.repairParentChkClassWithSelf(setting, node);
|
||||
setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);
|
||||
return true;
|
||||
},
|
||||
onMouseoverCheck: function(event, node) {
|
||||
if (node.chkDisabled === true) return false;
|
||||
var setting = data.getSetting(event.data.treeId),
|
||||
checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
node.check_Focus = true;
|
||||
view.setChkClass(setting, checkObj, node);
|
||||
return true;
|
||||
},
|
||||
onMouseoutCheck: function(event, node) {
|
||||
if (node.chkDisabled === true) return false;
|
||||
var setting = data.getSetting(event.data.treeId),
|
||||
checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
node.check_Focus = false;
|
||||
view.setChkClass(setting, checkObj, node);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
//method of tools for zTree
|
||||
_tools = {
|
||||
|
||||
},
|
||||
//method of operate ztree dom
|
||||
_view = {
|
||||
checkNodeRelation: function(setting, node) {
|
||||
var pNode, i, l,
|
||||
childKey = setting.data.key.children,
|
||||
checkedKey = setting.data.key.checked,
|
||||
r = consts.radio;
|
||||
if (setting.check.chkStyle == r.STYLE) {
|
||||
var checkedList = data.getRadioCheckedList(setting);
|
||||
if (node[checkedKey]) {
|
||||
if (setting.check.radioType == r.TYPE_ALL) {
|
||||
for (i = checkedList.length-1; i >= 0; i--) {
|
||||
pNode = checkedList[i];
|
||||
pNode[checkedKey] = false;
|
||||
checkedList.splice(i, 1);
|
||||
|
||||
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
|
||||
if (pNode.parentTId != node.parentTId) {
|
||||
view.repairParentChkClassWithSelf(setting, pNode);
|
||||
}
|
||||
}
|
||||
checkedList.push(node);
|
||||
} else {
|
||||
var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
|
||||
for (i = 0, l = parentNode[childKey].length; i < l; i++) {
|
||||
pNode = parentNode[childKey][i];
|
||||
if (pNode[checkedKey] && pNode != node) {
|
||||
pNode[checkedKey] = false;
|
||||
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (setting.check.radioType == r.TYPE_ALL) {
|
||||
for (i = 0, l = checkedList.length; i < l; i++) {
|
||||
if (node == checkedList[i]) {
|
||||
checkedList.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
|
||||
view.setSonNodeCheckBox(setting, node, true);
|
||||
}
|
||||
if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
|
||||
view.setSonNodeCheckBox(setting, node, false);
|
||||
}
|
||||
if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
|
||||
view.setParentNodeCheckBox(setting, node, true);
|
||||
}
|
||||
if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
|
||||
view.setParentNodeCheckBox(setting, node, false);
|
||||
}
|
||||
}
|
||||
},
|
||||
makeChkClass: function(setting, node) {
|
||||
var checkedKey = setting.data.key.checked,
|
||||
c = consts.checkbox, r = consts.radio,
|
||||
fullStyle = "";
|
||||
if (node.chkDisabled === true) {
|
||||
fullStyle = c.DISABLED;
|
||||
} else if (node.halfCheck) {
|
||||
fullStyle = c.PART;
|
||||
} else if (setting.check.chkStyle == r.STYLE) {
|
||||
fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
|
||||
} else {
|
||||
fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
|
||||
}
|
||||
var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
|
||||
chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
|
||||
return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
|
||||
},
|
||||
repairAllChk: function(setting, checked) {
|
||||
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
|
||||
var checkedKey = setting.data.key.checked,
|
||||
childKey = setting.data.key.children,
|
||||
root = data.getRoot(setting);
|
||||
for (var i = 0, l = root[childKey].length; i<l ; i++) {
|
||||
var node = root[childKey][i];
|
||||
if (node.nocheck !== true && node.chkDisabled !== true) {
|
||||
node[checkedKey] = checked;
|
||||
}
|
||||
view.setSonNodeCheckBox(setting, node, checked);
|
||||
}
|
||||
}
|
||||
},
|
||||
repairChkClass: function(setting, node) {
|
||||
if (!node) return;
|
||||
data.makeChkFlag(setting, node);
|
||||
if (node.nocheck !== true) {
|
||||
var checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
view.setChkClass(setting, checkObj, node);
|
||||
}
|
||||
},
|
||||
repairParentChkClass: function(setting, node) {
|
||||
if (!node || !node.parentTId) return;
|
||||
var pNode = node.getParentNode();
|
||||
view.repairChkClass(setting, pNode);
|
||||
view.repairParentChkClass(setting, pNode);
|
||||
},
|
||||
repairParentChkClassWithSelf: function(setting, node) {
|
||||
if (!node) return;
|
||||
var childKey = setting.data.key.children;
|
||||
if (node[childKey] && node[childKey].length > 0) {
|
||||
view.repairParentChkClass(setting, node[childKey][0]);
|
||||
} else {
|
||||
view.repairParentChkClass(setting, node);
|
||||
}
|
||||
},
|
||||
repairSonChkDisabled: function(setting, node, chkDisabled, inherit) {
|
||||
if (!node) return;
|
||||
var childKey = setting.data.key.children;
|
||||
if (node.chkDisabled != chkDisabled) {
|
||||
node.chkDisabled = chkDisabled;
|
||||
}
|
||||
view.repairChkClass(setting, node);
|
||||
if (node[childKey] && inherit) {
|
||||
for (var i = 0, l = node[childKey].length; i < l; i++) {
|
||||
var sNode = node[childKey][i];
|
||||
view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);
|
||||
}
|
||||
}
|
||||
},
|
||||
repairParentChkDisabled: function(setting, node, chkDisabled, inherit) {
|
||||
if (!node) return;
|
||||
if (node.chkDisabled != chkDisabled && inherit) {
|
||||
node.chkDisabled = chkDisabled;
|
||||
}
|
||||
view.repairChkClass(setting, node);
|
||||
view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);
|
||||
},
|
||||
setChkClass: function(setting, obj, node) {
|
||||
if (!obj) return;
|
||||
if (node.nocheck === true) {
|
||||
obj.hide();
|
||||
} else {
|
||||
obj.show();
|
||||
}
|
||||
obj.removeClass();
|
||||
obj.addClass(view.makeChkClass(setting, node));
|
||||
},
|
||||
setParentNodeCheckBox: function(setting, node, value, srcNode) {
|
||||
var childKey = setting.data.key.children,
|
||||
checkedKey = setting.data.key.checked,
|
||||
checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
if (!srcNode) srcNode = node;
|
||||
data.makeChkFlag(setting, node);
|
||||
if (node.nocheck !== true && node.chkDisabled !== true) {
|
||||
node[checkedKey] = value;
|
||||
view.setChkClass(setting, checkObj, node);
|
||||
if (setting.check.autoCheckTrigger && node != srcNode) {
|
||||
setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
|
||||
}
|
||||
}
|
||||
if (node.parentTId) {
|
||||
var pSign = true;
|
||||
if (!value) {
|
||||
var pNodes = node.getParentNode()[childKey];
|
||||
for (var i = 0, l = pNodes.length; i < l; i++) {
|
||||
if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])
|
||||
|| ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {
|
||||
pSign = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pSign) {
|
||||
view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
|
||||
}
|
||||
}
|
||||
},
|
||||
setSonNodeCheckBox: function(setting, node, value, srcNode) {
|
||||
if (!node) return;
|
||||
var childKey = setting.data.key.children,
|
||||
checkedKey = setting.data.key.checked,
|
||||
checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
if (!srcNode) srcNode = node;
|
||||
|
||||
var hasDisable = false;
|
||||
if (node[childKey]) {
|
||||
for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
|
||||
var sNode = node[childKey][i];
|
||||
view.setSonNodeCheckBox(setting, sNode, value, srcNode);
|
||||
if (sNode.chkDisabled === true) hasDisable = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (node != data.getRoot(setting) && node.chkDisabled !== true) {
|
||||
if (hasDisable && node.nocheck !== true) {
|
||||
data.makeChkFlag(setting, node);
|
||||
}
|
||||
if (node.nocheck !== true && node.chkDisabled !== true) {
|
||||
node[checkedKey] = value;
|
||||
if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
|
||||
} else {
|
||||
node.check_Child_State = -1;
|
||||
}
|
||||
view.setChkClass(setting, checkObj, node);
|
||||
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {
|
||||
setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
_z = {
|
||||
tools: _tools,
|
||||
view: _view,
|
||||
event: _event,
|
||||
data: _data
|
||||
};
|
||||
$.extend(true, $.fn.zTree.consts, _consts);
|
||||
$.extend(true, $.fn.zTree._z, _z);
|
||||
|
||||
var zt = $.fn.zTree,
|
||||
tools = zt._z.tools,
|
||||
consts = zt.consts,
|
||||
view = zt._z.view,
|
||||
data = zt._z.data,
|
||||
event = zt._z.event;
|
||||
|
||||
data.exSetting(_setting);
|
||||
data.addInitBind(_bindEvent);
|
||||
data.addInitUnBind(_unbindEvent);
|
||||
data.addInitCache(_initCache);
|
||||
data.addInitNode(_initNode);
|
||||
data.addInitProxy(_eventProxy);
|
||||
data.addInitRoot(_initRoot);
|
||||
data.addBeforeA(_beforeA);
|
||||
data.addZTreeTools(_zTreeTools);
|
||||
|
||||
var _createNodes = view.createNodes;
|
||||
view.createNodes = function(setting, level, nodes, parentNode) {
|
||||
if (_createNodes) _createNodes.apply(view, arguments);
|
||||
if (!nodes) return;
|
||||
view.repairParentChkClassWithSelf(setting, parentNode);
|
||||
}
|
||||
var _removeNode = view.removeNode;
|
||||
view.removeNode = function(setting, node) {
|
||||
var parentNode = node.getParentNode();
|
||||
if (_removeNode) _removeNode.apply(view, arguments);
|
||||
if (!node || !parentNode) return;
|
||||
view.repairChkClass(setting, parentNode);
|
||||
view.repairParentChkClass(setting, parentNode);
|
||||
}
|
||||
|
||||
var _appendNodes = view.appendNodes;
|
||||
view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {
|
||||
var html = "";
|
||||
if (_appendNodes) {
|
||||
html = _appendNodes.apply(view, arguments);
|
||||
}
|
||||
if (parentNode) {
|
||||
data.makeChkFlag(setting, parentNode);
|
||||
}
|
||||
return html;
|
||||
}
|
||||
})(jQuery);
|
||||
|
|
@ -0,0 +1,366 @@
|
|||
/*
|
||||
* JQuery zTree exHideNodes 3.5.12
|
||||
* http://zTree.me/
|
||||
*
|
||||
* Copyright (c) 2010 Hunter.z
|
||||
*
|
||||
* Licensed same as jquery - MIT License
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* email: hunter.z@263.net
|
||||
* Date: 2013-03-11
|
||||
*/
|
||||
(function($){
|
||||
//default init node of exLib
|
||||
var _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
|
||||
if (typeof n.isHidden == "string") n.isHidden = tools.eqs(n.isHidden, "true");
|
||||
n.isHidden = !!n.isHidden;
|
||||
data.initHideForExCheck(setting, n);
|
||||
},
|
||||
//add dom for check
|
||||
_beforeA = function(setting, node, html) {},
|
||||
//update zTreeObj, add method of exLib
|
||||
_zTreeTools = function(setting, zTreeTools) {
|
||||
zTreeTools.showNodes = function(nodes, options) {
|
||||
view.showNodes(setting, nodes, options);
|
||||
}
|
||||
zTreeTools.showNode = function(node, options) {
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
view.showNodes(setting, [node], options);
|
||||
}
|
||||
zTreeTools.hideNodes = function(nodes, options) {
|
||||
view.hideNodes(setting, nodes, options);
|
||||
}
|
||||
zTreeTools.hideNode = function(node, options) {
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
view.hideNodes(setting, [node], options);
|
||||
}
|
||||
|
||||
var _checkNode = zTreeTools.checkNode;
|
||||
if (_checkNode) {
|
||||
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
|
||||
if (!!node && !!node.isHidden) {
|
||||
return;
|
||||
}
|
||||
_checkNode.apply(zTreeTools, arguments);
|
||||
}
|
||||
}
|
||||
},
|
||||
//method of operate data
|
||||
_data = {
|
||||
initHideForExCheck: function(setting, n) {
|
||||
if (n.isHidden && setting.check && setting.check.enable) {
|
||||
if(typeof n._nocheck == "undefined") {
|
||||
n._nocheck = !!n.nocheck
|
||||
n.nocheck = true;
|
||||
}
|
||||
n.check_Child_State = -1;
|
||||
if (view.repairParentChkClassWithSelf) {
|
||||
view.repairParentChkClassWithSelf(setting, n);
|
||||
}
|
||||
}
|
||||
},
|
||||
initShowForExCheck: function(setting, n) {
|
||||
if (!n.isHidden && setting.check && setting.check.enable) {
|
||||
if(typeof n._nocheck != "undefined") {
|
||||
n.nocheck = n._nocheck;
|
||||
delete n._nocheck;
|
||||
}
|
||||
if (view.setChkClass) {
|
||||
var checkObj = $("#" + n.tId + consts.id.CHECK);
|
||||
view.setChkClass(setting, checkObj, n);
|
||||
}
|
||||
if (view.repairParentChkClassWithSelf) {
|
||||
view.repairParentChkClassWithSelf(setting, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//method of operate ztree dom
|
||||
_view = {
|
||||
clearOldFirstNode: function(setting, node) {
|
||||
var n = node.getNextNode();
|
||||
while(!!n){
|
||||
if (n.isFirstNode) {
|
||||
n.isFirstNode = false;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
}
|
||||
if (n.isLastNode) {
|
||||
break;
|
||||
}
|
||||
n = n.getNextNode();
|
||||
}
|
||||
},
|
||||
clearOldLastNode: function(setting, node) {
|
||||
var n = node.getPreNode();
|
||||
while(!!n){
|
||||
if (n.isLastNode) {
|
||||
n.isLastNode = false;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
}
|
||||
if (n.isFirstNode) {
|
||||
break;
|
||||
}
|
||||
n = n.getPreNode();
|
||||
}
|
||||
},
|
||||
makeDOMNodeMainBefore: function(html, setting, node) {
|
||||
html.push("<li ", (node.isHidden ? "style='display:none;' " : ""), "id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>");
|
||||
},
|
||||
showNode: function(setting, node, options) {
|
||||
node.isHidden = false;
|
||||
data.initShowForExCheck(setting, node);
|
||||
$("#" + node.tId).show();
|
||||
},
|
||||
showNodes: function(setting, nodes, options) {
|
||||
if (!nodes || nodes.length == 0) {
|
||||
return;
|
||||
}
|
||||
var pList = {}, i, j;
|
||||
for (i=0, j=nodes.length; i<j; i++) {
|
||||
var n = nodes[i];
|
||||
if (!pList[n.parentTId]) {
|
||||
var pn = n.getParentNode();
|
||||
pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode();
|
||||
}
|
||||
view.showNode(setting, n, options);
|
||||
}
|
||||
for (var tId in pList) {
|
||||
var children = pList[tId][setting.data.key.children];
|
||||
view.setFirstNodeForShow(setting, children);
|
||||
view.setLastNodeForShow(setting, children);
|
||||
}
|
||||
},
|
||||
hideNode: function(setting, node, options) {
|
||||
node.isHidden = true;
|
||||
node.isFirstNode = false;
|
||||
node.isLastNode = false;
|
||||
data.initHideForExCheck(setting, node);
|
||||
view.cancelPreSelectedNode(setting, node);
|
||||
$("#" + node.tId).hide();
|
||||
},
|
||||
hideNodes: function(setting, nodes, options) {
|
||||
if (!nodes || nodes.length == 0) {
|
||||
return;
|
||||
}
|
||||
var pList = {}, i, j;
|
||||
for (i=0, j=nodes.length; i<j; i++) {
|
||||
var n = nodes[i];
|
||||
if ((n.isFirstNode || n.isLastNode) && !pList[n.parentTId]) {
|
||||
var pn = n.getParentNode();
|
||||
pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode();
|
||||
}
|
||||
view.hideNode(setting, n, options);
|
||||
}
|
||||
for (var tId in pList) {
|
||||
var children = pList[tId][setting.data.key.children];
|
||||
view.setFirstNodeForHide(setting, children);
|
||||
view.setLastNodeForHide(setting, children);
|
||||
}
|
||||
},
|
||||
setFirstNode: function(setting, parentNode) {
|
||||
var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
|
||||
if (childLength > 0 && !parentNode[childKey][0].isHidden) {
|
||||
parentNode[childKey][0].isFirstNode = true;
|
||||
} else if (childLength > 0) {
|
||||
view.setFirstNodeForHide(setting, parentNode[childKey]);
|
||||
}
|
||||
},
|
||||
setLastNode: function(setting, parentNode) {
|
||||
var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
|
||||
if (childLength > 0 && !parentNode[childKey][0].isHidden) {
|
||||
parentNode[childKey][childLength - 1].isLastNode = true;
|
||||
} else if (childLength > 0) {
|
||||
view.setLastNodeForHide(setting, parentNode[childKey]);
|
||||
}
|
||||
},
|
||||
setFirstNodeForHide: function(setting, nodes) {
|
||||
var n,i,j;
|
||||
for (i=0, j=nodes.length; i<j; i++) {
|
||||
n = nodes[i];
|
||||
if (n.isFirstNode) {
|
||||
break;
|
||||
}
|
||||
if (!n.isHidden && !n.isFirstNode) {
|
||||
n.isFirstNode = true;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
} else {
|
||||
n = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
},
|
||||
setFirstNodeForShow: function(setting, nodes) {
|
||||
var n,i,j, first, old;
|
||||
for(i=0, j=nodes.length; i<j; i++) {
|
||||
n = nodes[i];
|
||||
if (!first && !n.isHidden && n.isFirstNode) {
|
||||
first = n;
|
||||
break;
|
||||
} else if (!first && !n.isHidden && !n.isFirstNode) {
|
||||
n.isFirstNode = true;
|
||||
first = n;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
} else if (first && n.isFirstNode) {
|
||||
n.isFirstNode = false;
|
||||
old = n;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
} else {
|
||||
n = null;
|
||||
}
|
||||
}
|
||||
return {"new":first, "old":old};
|
||||
},
|
||||
setLastNodeForHide: function(setting, nodes) {
|
||||
var n,i;
|
||||
for (i=nodes.length-1; i>=0; i--) {
|
||||
n = nodes[i];
|
||||
if (n.isLastNode) {
|
||||
break;
|
||||
}
|
||||
if (!n.isHidden && !n.isLastNode) {
|
||||
n.isLastNode = true;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
} else {
|
||||
n = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
},
|
||||
setLastNodeForShow: function(setting, nodes) {
|
||||
var n,i,j, last, old;
|
||||
for (i=nodes.length-1; i>=0; i--) {
|
||||
n = nodes[i];
|
||||
if (!last && !n.isHidden && n.isLastNode) {
|
||||
last = n;
|
||||
break;
|
||||
} else if (!last && !n.isHidden && !n.isLastNode) {
|
||||
n.isLastNode = true;
|
||||
last = n;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
} else if (last && n.isLastNode) {
|
||||
n.isLastNode = false;
|
||||
old = n;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
} else {
|
||||
n = null;
|
||||
}
|
||||
}
|
||||
return {"new":last, "old":old};
|
||||
}
|
||||
},
|
||||
|
||||
_z = {
|
||||
view: _view,
|
||||
data: _data
|
||||
};
|
||||
$.extend(true, $.fn.zTree._z, _z);
|
||||
|
||||
var zt = $.fn.zTree,
|
||||
tools = zt._z.tools,
|
||||
consts = zt.consts,
|
||||
view = zt._z.view,
|
||||
data = zt._z.data,
|
||||
event = zt._z.event;
|
||||
|
||||
data.addInitNode(_initNode);
|
||||
data.addBeforeA(_beforeA);
|
||||
data.addZTreeTools(_zTreeTools);
|
||||
|
||||
// Override method in core
|
||||
var _dInitNode = data.initNode;
|
||||
data.tmpHideParent = -1;
|
||||
data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) {
|
||||
if (data.tmpHideParent !== parentNode) {
|
||||
data.tmpHideParent = parentNode;
|
||||
var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
|
||||
children = tmpPNode[setting.data.key.children];
|
||||
data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children);
|
||||
data.tmpHideLastNode = view.setLastNodeForHide(setting, children);
|
||||
view.setNodeLineIcos(setting, data.tmpHideFirstNode);
|
||||
view.setNodeLineIcos(setting, data.tmpHideLastNode);
|
||||
}
|
||||
isFirstNode = (data.tmpHideFirstNode === node);
|
||||
isLastNode = (data.tmpHideLastNode === node);
|
||||
if (_dInitNode) _dInitNode.apply(data, arguments);
|
||||
if (isLastNode) {
|
||||
view.clearOldLastNode(setting, node);
|
||||
}
|
||||
}
|
||||
|
||||
var _makeChkFlag = data.makeChkFlag;
|
||||
if (!!_makeChkFlag) {
|
||||
data.makeChkFlag = function(setting, node) {
|
||||
if (!!node && !!node.isHidden) {
|
||||
return;
|
||||
}
|
||||
_makeChkFlag.apply(data, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
var _getTreeCheckedNodes = data.getTreeCheckedNodes;
|
||||
if (!!_getTreeCheckedNodes) {
|
||||
data.getTreeCheckedNodes = function(setting, nodes, checked, results) {
|
||||
if (!!nodes && nodes.length > 0) {
|
||||
var p = nodes[0].getParentNode();
|
||||
if (!!p && !!p.isHidden) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
return _getTreeCheckedNodes.apply(data, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes;
|
||||
if (!!_getTreeChangeCheckedNodes) {
|
||||
data.getTreeChangeCheckedNodes = function(setting, nodes, results) {
|
||||
if (!!nodes && nodes.length > 0) {
|
||||
var p = nodes[0].getParentNode();
|
||||
if (!!p && !!p.isHidden) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
return _getTreeChangeCheckedNodes.apply(data, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
var _expandCollapseSonNode = view.expandCollapseSonNode;
|
||||
if (!!_expandCollapseSonNode) {
|
||||
view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) {
|
||||
if (!!node && !!node.isHidden) {
|
||||
return;
|
||||
}
|
||||
_expandCollapseSonNode.apply(view, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
var _setSonNodeCheckBox = view.setSonNodeCheckBox;
|
||||
if (!!_setSonNodeCheckBox) {
|
||||
view.setSonNodeCheckBox = function(setting, node, value, srcNode) {
|
||||
if (!!node && !!node.isHidden) {
|
||||
return;
|
||||
}
|
||||
_setSonNodeCheckBox.apply(view, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf;
|
||||
if (!!_repairParentChkClassWithSelf) {
|
||||
view.repairParentChkClassWithSelf = function(setting, node) {
|
||||
if (!!node && !!node.isHidden) {
|
||||
return;
|
||||
}
|
||||
_repairParentChkClassWithSelf.apply(view, arguments);
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
=ZTree v3.x (JQuery Tree插件) 更新日志=
|
||||
|
||||
<font color="red">为了更好的优化及扩展zTree, 因此决定升级为v3.x,并且对之前的v2.x不兼容,会有很多结构上的修改,对此深感无奈与抱歉,请大家谅解。</font>
|
||||
<font color="red">
|
||||
|
||||
具体修改内容可参考:
|
||||
|
||||
* [http://www.ztree.me/v3/api.php zTree v3.0 API 文档]
|
||||
|
||||
* [http://www.ztree.me/v3/demo.php#_101 zTree v3.0 Demo 演示]
|
||||
|
||||
* [http://www.ztree.me/v3/faq.php#_101 zTree v3.0 常见问题]
|
||||
|
||||
</font>
|
||||
|
||||
<font color=#041594>
|
||||
*2013.03.11* v3.5.12
|
||||
* 【修改】由于 jquery 1.9 中移除 event.srcElement 导致的 js 报错的bug。
|
||||
* 【修改】在异步加载模式下,使用 moveNode 方法,且 moveType != "inner" 时,也会导致 targetNode 自动加载子节点的 bug
|
||||
* 【修改】对已经显示的节点(nochecked=true)使用 showNodes 或 showNode 方法后,导致勾选框出现的bug。
|
||||
* 【修改】对已经隐藏的节点(nochecked=false)使用 hideNodes 或 hideNode 方法后,导致勾选框消失的bug。
|
||||
* 【修改】getNodesByParamFuzzy 支持 大小写模糊。
|
||||
* 【修改】className 结构,提取 _consts.className.BUTTON / LEVEL / ICO_LOADING / SWITCH,便于快速修改 css 冲突。
|
||||
例如:与 WordPress 产生冲突后,直接修改 core 中的 "button" 和 "level" 即可。 Issue: https://github.com/zTree/zTree_v3/issues/2
|
||||
|
||||
*2013.01.28* v3.5.02
|
||||
* 【增加】setting.check.chkDisabledInherit 属性,用于设置 chkDisabled 在初始化时子节点是否可以继承父节点的 chkDisabled 属性
|
||||
* 【删除】内部 noSel 方法,使用 selectstart事件 和 "-moz-user-select"样式 处理禁止 节点文字被选择的功能
|
||||
* 【修改】不兼容 jQuery 1.9 的bug
|
||||
* 【修改】onDrop 的触发规则,保证异步加载模式下,可以在延迟加载结束后触发,避免 onDrop 中被拖拽的节点是已经更新后的数据。
|
||||
* 【修改】setChkDisabled 方法,增加 inheritParent, inheritChildren 参数设置是否让父子节点继承 disabled
|
||||
* 【修改】异步加载时 拼接参数的方法,由 string 修改为 json 对象
|
||||
* 【修正】1-2-3 3级节点时,如果 2级节点 全部设置为 nocheck 或 chkDisabled后,勾选3级节点时,1级节点的半勾选状态错误的 bug
|
||||
* 【修改】Demo: checkbox_nocheck.html & checkbox_chkDisabled.html;
|
||||
* 【修改】Demo: edit_super.html,增加 showRenameBtn & showRemoveBtn 的演示
|
||||
* 【修改】Demo: asyncForAll, 将 post 修改为 get;为了避免由于 IE10 的 bug 造成的客户端 以及 服务端崩溃
|
||||
IE10 ajax Post 无法提交参数的bug (http://bugs.jquery.com/ticket/12790)
|
||||
|
||||
*2012.12.21* v3.5.01
|
||||
* 【优化】clone 方法
|
||||
* 【修正】对于初始化无 children 属性的父节点进行 reAsyncChildNodes 操作时出错的 bug
|
||||
* 【修正】beforeRename 回调中使用 cancelEditName 方法后,再 return false 导致无法重新进行编辑的 bug
|
||||
* 【修正】exedit 扩展包让 setting.data.key.url 失效的 bug
|
||||
* 【修正】setting.check.autoCheckTrigger 设置为 true 时,onCheck 回调缺少 event 参数的 bug
|
||||
* 【修正】singlepath.html Demo 中的 bug
|
||||
|
||||
*2012.11.20* v3.5
|
||||
* 【优化】原先的 clone 方法 (特别感谢:愚人码头)
|
||||
* 【修改】隐藏父节点后,使用 expandAll 方法导致 父节点展开的 bug
|
||||
* 【修改】使用 jQuery v1.7 以上时,设置 zTree 容器 ul 隐藏(visibility: hidden;)后, 调用 selectNode 导致 IE 浏览器报错 Can't move focus 的 bug
|
||||
* 【修改】正在异步加载时,执行 destory 或 init 方法后,异步加载的节点影响新树的 bug
|
||||
* 【修改】方法 reAsyncChildNodes 在 refresh 的时候未清空内部 cache 导致内存泄露 的 bug
|
||||
* 【修改】批量节点拖拽到其他父节点内(inner)时,导致顺序反转 的 bug
|
||||
* 【修改】对于 使用 html格式的 节点无法触发 双击事件 的 bug
|
||||
* 【修改】onCheck 回调中的 event ,保证与触发事件中的 event 一致
|
||||
* 【修改】异步加载时,在 onNodeCreated 中执行 selectNode 后,导致节点折叠的 bug
|
||||
* 【修改】API 中 dataFilter 的参数名称 childNodes -> responseData
|
||||
* 【修改】API 中 iconSkin 的 举例内容
|
||||
* 【修改】API 中 chkDisabled 的说明
|
||||
* 【修改】Demo 中 index.html 内的 loadReady 重复绑定问题
|
||||
|
||||
*2012.09.03* v3.4
|
||||
* 【增加】 Demo —— OutLook 样式的左侧菜单
|
||||
* 【增加】清空 zTree 的方法 $.fn.zTree.destory(treeId) & zTree.destory()
|
||||
|
||||
* 【修改】core核心文件内 _eventProxy 方法中获取 tId 的方法,提高 DOM 的灵活性
|
||||
* 【修改】初始化时 多层父节点的 checkbox 半选状态计算错误的 bug
|
||||
* 【修改】同时选中父、子节点后,利用 getSelectedNodes 获取选中节点并利用 removeNode 删除时报错的 bug
|
||||
* 【修改】treeNode.chkDisabled / nocheck 属性,支持字符串格式的 "false"/"true"
|
||||
* 【修改】异步加载模式下无法利用 server 返回 xml 并且 在 dataFilter 中继续处理的 bug
|
||||
* 【修改】title 只允许设置为 string 类型值的问题。 修正后允许设置为 number 类型的值
|
||||
* 【修改】zId 计数规则 & Cache 保存,减少 IE9 的 bug 造成的内存泄漏
|
||||
* 【修改】API 页面搜索功能导致 IE 崩溃的 bug
|
||||
|
||||
*2012.07.16* v3.3
|
||||
* 【增加】扩展库 exhide -- 节点隐藏功能
|
||||
|
||||
* 【修改】getNodesByFilter 方法,添加 invokeParam 自定义参数
|
||||
* 【修改】拖拽中测试代码未删除,导致出现黄颜色的 iframe 遮罩层的 bug
|
||||
* 【修改】延迟加载方法 对于使用 expandAll 进行全部展开时,导致 onNodeCreated 回调 和 addDiyDom 方法触发过早的 bug
|
||||
* 【修改】使用 moveNode 移动尚未生成 DOM 的节点时,视图会出现异常的 bug
|
||||
* 【修改】删除节点后,相关节点的 isFirstNode 属性未重置的 bug
|
||||
* 【修改】getPreNode(),getNextNode() 方法在对于特殊情况时计算错误的 bug
|
||||
* 【修改】设置 title 之后,如果重新将 title 内容设置为空后,会导致无法更新 title 的 bug
|
||||
* 【修改】针对 setting.check.chkStyle=="radio" && setting.check.radioType=="all" 的情况时,getTreeCheckedNodes方法优化,找到一个结果就 break
|
||||
* 【修改】zTreeObj.getCheckedNodes(false) 在 radioType = "all" 时计算错误的 bug
|
||||
* 【修改】完善 API 中 beforeDrop / onDrop 的关于 treeId 的说明
|
||||
|
||||
*2012.05.13* v3.2
|
||||
* 【增加】setting.data.key.url 允许修改 treeNode.url 属性
|
||||
* 【增加】getNodesByFilter(filter, isSingle) 方法
|
||||
* 【增加】"与其他 DOM 拖拽互动" 的 Demo (http://www.ztree.me/v3/demo.php#_511)
|
||||
* 【增加】"异步加载模式下全部展开" 的 Demo (http://www.ztree.me/v3/demo.php#_512)
|
||||
|
||||
* 【修改】代码结构,将 addNodes、removeNode、removeChildNodes 方法 和 beforeRemove、onRemove 回调 转移到 core 内
|
||||
* 【修改】IE7的环境下无子节点的父节点反复展开出现多余空行的 bug
|
||||
* 【修改】异步加载时,如果出现网络异常等,会导致 图标显示错误的 bug
|
||||
* 【修改】dataFilter中 return null 导致异常 的 bug
|
||||
* 【修改】removeChildNodes 方法清空子节点后,无法正常添加节点的 bug
|
||||
* 【修改】moveNode 后节点中的自定义元素的事件丢失的 bug
|
||||
* 【修改】moveNode 方法中设置 isSilent = true 时,如果移动到已展开的 父节点后,出现异常的 bug
|
||||
* 【修改】onClick/onDrag/onDrop 回调中 event 不是原始 event 的 bug
|
||||
* 【修改】onDrop 回调中 当拖拽无效时,无法获得 treeNodes 的 bug
|
||||
* 【修改】onDrop 无法判断拖拽是 移动还是复制的问题
|
||||
* 【修改】未开启异步加载模式时,拖拽节点到子节点为空的父节点内时 出现异常 的 bug
|
||||
* 【修改】拖拽过程中,反复在 父节点图标上划动时,会出现停顿的 bug
|
||||
(需要css 结构—— button -> span.button)
|
||||
|
||||
* 【修改】拖拽操作时箭头 与 targetNode 背景之间的细节现实问题,便于用户拖拽时更容易区分 prev、next 和 inner 操作
|
||||
* 【修改】拖拽操作时IE6/7 下 在 节点<a> 右侧 10px 内会导致 targetNode = root 的 bug
|
||||
* 【修改】编辑模式下 默认的编辑按钮、删除按钮点击后,如果相应的 before 回调 return false 时会触发 onClick 回调的 bug
|
||||
|
||||
*2012.02.14* v3.1
|
||||
* 【增加】ajax 的参数 setting.async.contentType ,让提交参数适用于 json 数据提交 (主要适用于 .Net 的开发)。
|
||||
* 【增加】setting.edit.editNameSelectAll, 用于设定编辑节点名称时初次显示 input 后 text 内容为全选
|
||||
* 【修改】异步加载 规则,不再仅仅依靠父节点的子节点数来判定,增加内部属性 zAsync,保证默认状态下父节点及时无子节点也只能异步加载一次,除非使用 reAsyncChildNodes 方法强行控制异步加载。
|
||||
* 【修改】放大浏览器后导致 界面出现多余连接线的bug (需要更新:icon 图标和 css )
|
||||
* 【修改】在编辑状态,如果节点名超过编辑框宽度,左右键在框内不起作用的bug(IE 6 7 8 出现)
|
||||
CSS 中 filter:alpha(opacity=80) 造成的,应该是 ie 的 bug,需要更新 css 文件
|
||||
* 【修改】title 设置后,如果属性不存在,则默认为 title 为空,便于数据容错和用户灵活使用
|
||||
* 【修改】editName 方法如果针对尚未展开的 父节点,会导致该父节点自动展开的 bug
|
||||
* 【修改】title 中存在标签时导致 title 显示异常的bug(例如:蓝色字22%"'`<input/>`)
|
||||
|
||||
*2012.01.10* v3.0
|
||||
* 【增加】setting.check.autoCheckTrigger 默认值 false,可以设置联动选中时是否触发事件回调函数
|
||||
* 【增加】setting.callback.beforeEditName 回调函数,以保证用户可以捕获点击编辑按钮的事件
|
||||
* 【增加】treeNode.chkDisabled 属性,显示 checkbox 但是用户无法修改 checkbox 状态,并且该 checkbox 会影响父节点的 checkbox 的半选状态
|
||||
* 【增加】setting.check.nocheckInherit 属性,用户设置子节点继承 nocheck 属性,用于批量初始化节点,不适用于已经显示的节点
|
||||
* 【增加】setting.edit.drag.autoExpandTrigger 默认值 false,可以设置自动展开、折叠操作时是否触发事件回调函数
|
||||
* 【增加】setting.view.nameIsHTML 默认值 false,允许用户对 name 设置 DOM 对象
|
||||
* 【增加】treeNode.click 属性的说明文档
|
||||
* 【增加】treeObj.setChkDisabled 方法用于设置 checkbox / radio disabled 状态
|
||||
* 【增加】treeNode.halfCheck 属性,用于强制设定节点的半选状态
|
||||
|
||||
* 【修改】异步加载 & 编辑功能 共存时,拖拽节点 或 增加节点 导致 ie 上报错的 bug (apply 方法引起)
|
||||
* 【修改】zTreeStyle 样式冲突
|
||||
* 【修改】setting.data.key.title 默认值设置为 "",初始化时自动赋值为 setting.data.key.name 这样可避免希望 title 与 name 一致的用户反复设置参数
|
||||
* 【修改】点击叶子节点的连接线会触发 expand 事件的 bug
|
||||
* 【修改】IE 下 点击叶子节点连线会出现虚线框的 bug
|
||||
* 【修改】updateNode 导致 checkbox 半选状态错误的 bug
|
||||
* 【修改】checkNode 方法实现 toggle 操作, 取消 expandAll 方法的 toggle 操作
|
||||
* 【修改】zTree 内鼠标移动会抢页面上 input 内的焦点的 bug
|
||||
* 【修改】beforeRename / onRename 的触发方式——即使名称内容未改变也会触发,便于用户配合 beforeEditName 捕获编辑状态的结束,赋予用户更多调整规则的权利
|
||||
* 【修改】与 easyUI 共存时无法拖拽的bug
|
||||
* 【修改】beforeRename 在 Firefox 下如果利用 alert,会触发两次的 bug
|
||||
* 【修改】checkNode/expandNode/removeNode 方法,默认不触发回调函数,恢复 v2.6 的默认状态,同时增加 callbackFlag 参数,设置为 true 时,可以触发回调函数
|
||||
* 【修改】IE9下“根据参数查找节点”的Demo 报错:行14 重新声明常量属性(Demo 自身的问题,定义了history变量)
|
||||
* 【修改】初始化 zTree 时 onNodeCreated 事件回调函数中无法 用 getZTreeObj 获取 zTree 对象的 bug
|
||||
* 【修改】setting.edit.drag.prev / next / inner 参数,增加被拖拽的节点集合
|
||||
* 【修改】异步加载模式下,otherParam 使用Array数组会出错的 bug。例如: ["id", "1", "name", "test"]
|
||||
* 【修改】FireFox 下多棵树拖拽异常的 bug
|
||||
* 【修改】exedit 中调用 excheck库的方法时没有进行容错处理,导致如果只加入 exedit 而没有 excheck的时候,会出现 js 错误
|
||||
* 【修改】显示 checkbox 的 zTree 在编辑模式下,移动节点不会更新父节点半选状态的 bug
|
||||
* 【修改】treeNode.childs --> children; treeObject.removeChilds --> removeChildNodes; setting.data.key.childs --> children(英文不好惹的祸!抱歉了!)
|
||||
* 【修改】onRemove 回调中得到的 treeNode 还可以查找 preNode、nextNode 的bug。 修正后,getPreNode 和 getNextNode 都返回 null; 为了便于查找父节点,getParentNode 仍保留
|
||||
* 【修改】简单数据模式下,如果 id 与 pId 的值相同会导致该节点无法正常加载的 bug
|
||||
* 【修改】移动或删除中间节点会导致最后一个节点连接线图标变小的 bug
|
||||
|
||||
*2011.09.05* v3.0 beta
|
||||
* 【修改】zTree 的 js 代码架构全面修改,并且拆分
|
||||
* 【修改】zTree 的 css 样式全面修改,对浏览器可以更好地兼容,同时解决了以前1个像素差的问题
|
||||
* 【优化】采用延迟加载技术,一次性加载大数据量的节点性能飞速提升
|
||||
* 【增加】支持多节点同时选中、拖拽
|
||||
* 【增加】checkNode、checkAllNodes 等多种方法
|
||||
* 【增加】IE6 自动取消动画展开、折叠的功能
|
||||
* 【修正】异步加载 & 编辑模式 能够更完美的共存
|
||||
* 【修正】setting 配置更加合理,并且增加了若干项配置参数
|
||||
* 【修正】treeNode 节点数据的属性更加合理,并且增加了一些方法
|
||||
* 【修正】拖拽操作更加灵活方便,更容易制定自己的规则
|
||||
* 【修正】其他若干修改,详细对比请参考 url:[http://www.ztree.me/v3/faq.php#_101 zTree v3.0 常见问题]
|
||||
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 45 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -0,0 +1,118 @@
|
|||
/*-------------------------------------
|
||||
zTree Style
|
||||
|
||||
version: 3.4
|
||||
author: Hunter.z
|
||||
email: hunter.z@263.net
|
||||
website: http://code.google.com/p/jquerytree/
|
||||
|
||||
-------------------------------------*/
|
||||
|
||||
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
|
||||
.ztree {margin:0; padding:5px; color:#333}
|
||||
.ztree li{padding:0; margin:0; list-style:none; line-height:21px; text-align:left; white-space:nowrap; outline:0}
|
||||
.ztree li ul{ margin:0; padding:0 0 0 18px}
|
||||
.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;}
|
||||
|
||||
.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; display: inline-block}
|
||||
.ztree li a:hover {text-decoration:underline}
|
||||
.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;}
|
||||
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;}
|
||||
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid;
|
||||
opacity:0.8; filter:alpha(opacity=80)}
|
||||
.ztree li a.tmpTargetNode_prev {}
|
||||
.ztree li a.tmpTargetNode_next {}
|
||||
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
|
||||
font-size:12px; border:1px #7EC4CC solid; *border:0px}
|
||||
.ztree li span {line-height:21px; margin-right:2px}
|
||||
.ztree li span.button {line-height:0; margin:0; width:21px; height:21px; display: inline-block; vertical-align:middle;
|
||||
border:0 none; cursor: pointer;outline:none;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
|
||||
|
||||
.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto}
|
||||
.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;}
|
||||
.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;}
|
||||
.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;}
|
||||
.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;}
|
||||
.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;}
|
||||
.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;}
|
||||
.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;}
|
||||
.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;}
|
||||
.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;}
|
||||
.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;}
|
||||
.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;}
|
||||
.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;}
|
||||
.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;}
|
||||
.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;}
|
||||
.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;}
|
||||
.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;}
|
||||
.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;}
|
||||
.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;}
|
||||
.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;}
|
||||
.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;}
|
||||
|
||||
.ztree li span.button.switch {width:21px; height:21px}
|
||||
.ztree li span.button.root_open{background-position:-92px -54px}
|
||||
.ztree li span.button.root_close{background-position:-74px -54px}
|
||||
.ztree li span.button.roots_open{background-position: -105px 0;}
|
||||
.ztree li span.button.roots_close{background-position: -126px 0;}
|
||||
.ztree li span.button.center_open{background-position: -105px -21px;}
|
||||
.ztree li span.button.center_close{background-position: -126px -21px;}
|
||||
.ztree li span.button.bottom_open{background-position: -105px -42px;}
|
||||
.ztree li span.button.bottom_close{background-position: -126px -42px;}
|
||||
.ztree li span.button.noline_open{background-position: -126px -84px;}
|
||||
.ztree li span.button.noline_close{background-position: -105px -84px;}
|
||||
.ztree li span.button.root_docu{ background:none;}
|
||||
.ztree li span.button.roots_docu{background-position: -84px 0;}
|
||||
.ztree li span.button.center_docu{background-position: -84px -21px;}
|
||||
.ztree li span.button.bottom_docu{background-position: -84px -42px;}
|
||||
.ztree li span.button.noline_docu{ background:none;}
|
||||
|
||||
.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.edit:hover {
|
||||
background-position: -168px -21px;
|
||||
}
|
||||
.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.remove:hover {
|
||||
background-position: -168px -42px;
|
||||
}
|
||||
.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle}
|
||||
.ztree li span.button.add:hover {
|
||||
background-position: -168px 0;
|
||||
}
|
||||
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
|
||||
|
||||
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
|
||||
|
||||
span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
|
||||
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
|
||||
background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
|
||||
|
||||
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
|
||||
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
|
||||
|
||||
/* simple */
|
||||
|
||||
.ztree * {font-size:14px;font-family:"Microsoft Yahei",Verdana,Simsun,"Segoe UI Web Light","Segoe UI Light","Segoe UI Web Regular","Segoe UI","Segoe UI Symbol","Helvetica Neue",Arial;}
|
||||
.ztree li ul{ margin:0; padding:0}
|
||||
.ztree li {line-height:28px;}
|
||||
.ztree li a {width:100%;height:28px;padding-top: 0px;}
|
||||
.ztree li a:hover {text-decoration:none; background-color: #E7E7E7;}
|
||||
.ztree11 li a span.button.switch {visibility:hidden}
|
||||
.ztree11.showIcon li a span.button.switch {visibility:visible}
|
||||
.ztree li a.curSelectedNode {background-color:#D4D4D4;border:0;height:28px;}
|
||||
.ztree li span {line-height:26px;margin-right:0px;}
|
||||
.ztree li span.button {margin-top: -7px;}
|
||||
.ztree li span.button.switch {width:16px;height: 16px;}
|
||||
.ztree li a.level0 span {font-size:15px;font-weight:bold;}
|
||||
.ztree li span.button {background-image:url("img/left_menu.png"); *background-image:url("./left_menu.gif")}
|
||||
.ztree li span.button.switch.level0 {width: 20px; height:20px}
|
||||
.ztree li span.button.switch.level1 {width: 20px; height:20px}
|
||||
.ztree li span.button.noline_open {background-position: 0 0;}
|
||||
.ztree li span.button.noline_close {background-position: -18px 0;}
|
||||
.ztree li span.button.noline_open.level0 {background-position: 0 -17px;}
|
||||
.ztree li span.button.noline_close.level0 {background-position: -18px -17px;}
|
||||
|
|
@ -2024,3 +2024,775 @@
|
|||
.fa-fonticons:before {
|
||||
content: "\f280";
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family:'simple-line-icons';src:url('../fonts/Simple-Line-Icons.eot?v=2.4.0');src:url('../fonts/Simple-Line-Icons.eot?v=2.4.0#iefix') format('embedded-opentype'),url('../fonts/Simple-Line-Icons.woff2?v=2.4.0') format('woff2'),url('../fonts/Simple-Line-Icons.ttf?v=2.4.0') format('truetype'),url('../fonts/Simple-Line-Icons.woff?v=2.4.0') format('woff'),url('../fonts/Simple-Line-Icons.svg?v=2.4.0#simple-line-icons') format('svg');font-weight:normal;font-style:normal
|
||||
}
|
||||
|
||||
.icon-user,.icon-people,.icon-user-female,.icon-user-follow,.icon-user-following,.icon-user-unfollow,.icon-login,.icon-logout,.icon-emotsmile,.icon-phone,.icon-call-end,.icon-call-in,.icon-call-out,.icon-map,.icon-location-pin,.icon-direction,.icon-directions,.icon-compass,.icon-layers,.icon-menu,.icon-list,.icon-options-vertical,.icon-options,.icon-arrow-down,.icon-arrow-left,.icon-arrow-right,.icon-arrow-up,.icon-arrow-up-circle,.icon-arrow-left-circle,.icon-arrow-right-circle,.icon-arrow-down-circle,.icon-check,.icon-clock,.icon-plus,.icon-minus,.icon-close,.icon-event,.icon-exclamation,.icon-organization,.icon-trophy,.icon-screen-smartphone,.icon-screen-desktop,.icon-plane,.icon-notebook,.icon-mustache,.icon-mouse,.icon-magnet,.icon-energy,.icon-disc,.icon-cursor,.icon-cursor-move,.icon-crop,.icon-chemistry,.icon-speedometer,.icon-shield,.icon-screen-tablet,.icon-magic-wand,.icon-hourglass,.icon-graduation,.icon-ghost,.icon-game-controller,.icon-fire,.icon-eyeglass,.icon-envelope-open,.icon-envelope-letter,.icon-bell,.icon-badge,.icon-anchor,.icon-wallet,.icon-vector,.icon-speech,.icon-puzzle,.icon-printer,.icon-present,.icon-playlist,.icon-pin,.icon-picture,.icon-handbag,.icon-globe-alt,.icon-globe,.icon-folder-alt,.icon-folder,.icon-film,.icon-feed,.icon-drop,.icon-drawer,.icon-docs,.icon-doc,.icon-diamond,.icon-cup,.icon-calculator,.icon-bubbles,.icon-briefcase,.icon-book-open,.icon-basket-loaded,.icon-basket,.icon-bag,.icon-action-undo,.icon-action-redo,.icon-wrench,.icon-umbrella,.icon-trash,.icon-tag,.icon-support,.icon-frame,.icon-size-fullscreen,.icon-size-actual,.icon-shuffle,.icon-share-alt,.icon-share,.icon-rocket,.icon-question,.icon-pie-chart,.icon-pencil,.icon-note,.icon-loop,.icon-home,.icon-grid,.icon-graph,.icon-microphone,.icon-music-tone-alt,.icon-music-tone,.icon-earphones-alt,.icon-earphones,.icon-equalizer,.icon-like,.icon-dislike,.icon-control-start,.icon-control-rewind,.icon-control-play,.icon-control-pause,.icon-control-forward,.icon-control-end,.icon-volume-1,.icon-volume-2,.icon-volume-off,.icon-calendar,.icon-bulb,.icon-chart,.icon-ban,.icon-bubble,.icon-camrecorder,.icon-camera,.icon-cloud-download,.icon-cloud-upload,.icon-envelope,.icon-eye,.icon-flag,.icon-heart,.icon-info,.icon-key,.icon-link,.icon-lock,.icon-lock-open,.icon-magnifier,.icon-magnifier-add,.icon-magnifier-remove,.icon-paper-clip,.icon-paper-plane,.icon-power,.icon-refresh,.icon-reload,.icon-settings,.icon-star,.icon-symbol-female,.icon-symbol-male,.icon-target,.icon-credit-card,.icon-paypal,.icon-social-tumblr,.icon-social-twitter,.icon-social-facebook,.icon-social-instagram,.icon-social-linkedin,.icon-social-pinterest,.icon-social-github,.icon-social-google,.icon-social-reddit,.icon-social-skype,.icon-social-dribbble,.icon-social-behance,.icon-social-foursqare,.icon-social-soundcloud,.icon-social-spotify,.icon-social-stumbleupon,.icon-social-youtube,.icon-social-dropbox,.icon-social-vkontakte,.icon-social-steam {
|
||||
font-family: 'simple-line-icons';
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale
|
||||
}
|
||||
|
||||
.icon-user:before {
|
||||
content: "\e005"
|
||||
}
|
||||
|
||||
.icon-people:before {
|
||||
content: "\e001"
|
||||
}
|
||||
|
||||
.icon-user-female:before {
|
||||
content: "\e000"
|
||||
}
|
||||
|
||||
.icon-user-follow:before {
|
||||
content: "\e002"
|
||||
}
|
||||
|
||||
.icon-user-following:before {
|
||||
content: "\e003"
|
||||
}
|
||||
|
||||
.icon-user-unfollow:before {
|
||||
content: "\e004"
|
||||
}
|
||||
|
||||
.icon-login:before {
|
||||
content: "\e066"
|
||||
}
|
||||
|
||||
.icon-logout:before {
|
||||
content: "\e065"
|
||||
}
|
||||
|
||||
.icon-emotsmile:before {
|
||||
content: "\e021"
|
||||
}
|
||||
|
||||
.icon-phone:before {
|
||||
content: "\e600"
|
||||
}
|
||||
|
||||
.icon-call-end:before {
|
||||
content: "\e048"
|
||||
}
|
||||
|
||||
.icon-call-in:before {
|
||||
content: "\e047"
|
||||
}
|
||||
|
||||
.icon-call-out:before {
|
||||
content: "\e046"
|
||||
}
|
||||
|
||||
.icon-map:before {
|
||||
content: "\e033"
|
||||
}
|
||||
|
||||
.icon-location-pin:before {
|
||||
content: "\e096"
|
||||
}
|
||||
|
||||
.icon-direction:before {
|
||||
content: "\e042"
|
||||
}
|
||||
|
||||
.icon-directions:before {
|
||||
content: "\e041"
|
||||
}
|
||||
|
||||
.icon-compass:before {
|
||||
content: "\e045"
|
||||
}
|
||||
|
||||
.icon-layers:before {
|
||||
content: "\e034"
|
||||
}
|
||||
|
||||
.icon-menu:before {
|
||||
content: "\e601"
|
||||
}
|
||||
|
||||
.icon-list:before {
|
||||
content: "\e067"
|
||||
}
|
||||
|
||||
.icon-options-vertical:before {
|
||||
content: "\e602"
|
||||
}
|
||||
|
||||
.icon-options:before {
|
||||
content: "\e603"
|
||||
}
|
||||
|
||||
.icon-arrow-down:before {
|
||||
content: "\e604"
|
||||
}
|
||||
|
||||
.icon-arrow-left:before {
|
||||
content: "\e605"
|
||||
}
|
||||
|
||||
.icon-arrow-right:before {
|
||||
content: "\e606"
|
||||
}
|
||||
|
||||
.icon-arrow-up:before {
|
||||
content: "\e607"
|
||||
}
|
||||
|
||||
.icon-arrow-up-circle:before {
|
||||
content: "\e078"
|
||||
}
|
||||
|
||||
.icon-arrow-left-circle:before {
|
||||
content: "\e07a"
|
||||
}
|
||||
|
||||
.icon-arrow-right-circle:before {
|
||||
content: "\e079"
|
||||
}
|
||||
|
||||
.icon-arrow-down-circle:before {
|
||||
content: "\e07b"
|
||||
}
|
||||
|
||||
.icon-check:before {
|
||||
content: "\e080"
|
||||
}
|
||||
|
||||
.icon-clock:before {
|
||||
content: "\e081"
|
||||
}
|
||||
|
||||
.icon-plus:before {
|
||||
content: "\e095"
|
||||
}
|
||||
|
||||
.icon-minus:before {
|
||||
content: "\e615"
|
||||
}
|
||||
|
||||
.icon-close:before {
|
||||
content: "\e082"
|
||||
}
|
||||
|
||||
.icon-event:before {
|
||||
content: "\e619"
|
||||
}
|
||||
|
||||
.icon-exclamation:before {
|
||||
content: "\e617"
|
||||
}
|
||||
|
||||
.icon-organization:before {
|
||||
content: "\e616"
|
||||
}
|
||||
|
||||
.icon-trophy:before {
|
||||
content: "\e006"
|
||||
}
|
||||
|
||||
.icon-screen-smartphone:before {
|
||||
content: "\e010"
|
||||
}
|
||||
|
||||
.icon-screen-desktop:before {
|
||||
content: "\e011"
|
||||
}
|
||||
|
||||
.icon-plane:before {
|
||||
content: "\e012"
|
||||
}
|
||||
|
||||
.icon-notebook:before {
|
||||
content: "\e013"
|
||||
}
|
||||
|
||||
.icon-mustache:before {
|
||||
content: "\e014"
|
||||
}
|
||||
|
||||
.icon-mouse:before {
|
||||
content: "\e015"
|
||||
}
|
||||
|
||||
.icon-magnet:before {
|
||||
content: "\e016"
|
||||
}
|
||||
|
||||
.icon-energy:before {
|
||||
content: "\e020"
|
||||
}
|
||||
|
||||
.icon-disc:before {
|
||||
content: "\e022"
|
||||
}
|
||||
|
||||
.icon-cursor:before {
|
||||
content: "\e06e"
|
||||
}
|
||||
|
||||
.icon-cursor-move:before {
|
||||
content: "\e023"
|
||||
}
|
||||
|
||||
.icon-crop:before {
|
||||
content: "\e024"
|
||||
}
|
||||
|
||||
.icon-chemistry:before {
|
||||
content: "\e026"
|
||||
}
|
||||
|
||||
.icon-speedometer:before {
|
||||
content: "\e007"
|
||||
}
|
||||
|
||||
.icon-shield:before {
|
||||
content: "\e00e"
|
||||
}
|
||||
|
||||
.icon-screen-tablet:before {
|
||||
content: "\e00f"
|
||||
}
|
||||
|
||||
.icon-magic-wand:before {
|
||||
content: "\e017"
|
||||
}
|
||||
|
||||
.icon-hourglass:before {
|
||||
content: "\e018"
|
||||
}
|
||||
|
||||
.icon-graduation:before {
|
||||
content: "\e019"
|
||||
}
|
||||
|
||||
.icon-ghost:before {
|
||||
content: "\e01a"
|
||||
}
|
||||
|
||||
.icon-game-controller:before {
|
||||
content: "\e01b"
|
||||
}
|
||||
|
||||
.icon-fire:before {
|
||||
content: "\e01c"
|
||||
}
|
||||
|
||||
.icon-eyeglass:before {
|
||||
content: "\e01d"
|
||||
}
|
||||
|
||||
.icon-envelope-open:before {
|
||||
content: "\e01e"
|
||||
}
|
||||
|
||||
.icon-envelope-letter:before {
|
||||
content: "\e01f"
|
||||
}
|
||||
|
||||
.icon-bell:before {
|
||||
content: "\e027"
|
||||
}
|
||||
|
||||
.icon-badge:before {
|
||||
content: "\e028"
|
||||
}
|
||||
|
||||
.icon-anchor:before {
|
||||
content: "\e029"
|
||||
}
|
||||
|
||||
.icon-wallet:before {
|
||||
content: "\e02a"
|
||||
}
|
||||
|
||||
.icon-vector:before {
|
||||
content: "\e02b"
|
||||
}
|
||||
|
||||
.icon-speech:before {
|
||||
content: "\e02c"
|
||||
}
|
||||
|
||||
.icon-puzzle:before {
|
||||
content: "\e02d"
|
||||
}
|
||||
|
||||
.icon-printer:before {
|
||||
content: "\e02e"
|
||||
}
|
||||
|
||||
.icon-present:before {
|
||||
content: "\e02f"
|
||||
}
|
||||
|
||||
.icon-playlist:before {
|
||||
content: "\e030"
|
||||
}
|
||||
|
||||
.icon-pin:before {
|
||||
content: "\e031"
|
||||
}
|
||||
|
||||
.icon-picture:before {
|
||||
content: "\e032"
|
||||
}
|
||||
|
||||
.icon-handbag:before {
|
||||
content: "\e035"
|
||||
}
|
||||
|
||||
.icon-globe-alt:before {
|
||||
content: "\e036"
|
||||
}
|
||||
|
||||
.icon-globe:before {
|
||||
content: "\e037"
|
||||
}
|
||||
|
||||
.icon-folder-alt:before {
|
||||
content: "\e039"
|
||||
}
|
||||
|
||||
.icon-folder:before {
|
||||
content: "\e089"
|
||||
}
|
||||
|
||||
.icon-film:before {
|
||||
content: "\e03a"
|
||||
}
|
||||
|
||||
.icon-feed:before {
|
||||
content: "\e03b"
|
||||
}
|
||||
|
||||
.icon-drop:before {
|
||||
content: "\e03e"
|
||||
}
|
||||
|
||||
.icon-drawer:before {
|
||||
content: "\e03f"
|
||||
}
|
||||
|
||||
.icon-docs:before {
|
||||
content: "\e040"
|
||||
}
|
||||
|
||||
.icon-doc:before {
|
||||
content: "\e085"
|
||||
}
|
||||
|
||||
.icon-diamond:before {
|
||||
content: "\e043"
|
||||
}
|
||||
|
||||
.icon-cup:before {
|
||||
content: "\e044"
|
||||
}
|
||||
|
||||
.icon-calculator:before {
|
||||
content: "\e049"
|
||||
}
|
||||
|
||||
.icon-bubbles:before {
|
||||
content: "\e04a"
|
||||
}
|
||||
|
||||
.icon-briefcase:before {
|
||||
content: "\e04b"
|
||||
}
|
||||
|
||||
.icon-book-open:before {
|
||||
content: "\e04c"
|
||||
}
|
||||
|
||||
.icon-basket-loaded:before {
|
||||
content: "\e04d"
|
||||
}
|
||||
|
||||
.icon-basket:before {
|
||||
content: "\e04e"
|
||||
}
|
||||
|
||||
.icon-bag:before {
|
||||
content: "\e04f"
|
||||
}
|
||||
|
||||
.icon-action-undo:before {
|
||||
content: "\e050"
|
||||
}
|
||||
|
||||
.icon-action-redo:before {
|
||||
content: "\e051"
|
||||
}
|
||||
|
||||
.icon-wrench:before {
|
||||
content: "\e052"
|
||||
}
|
||||
|
||||
.icon-umbrella:before {
|
||||
content: "\e053"
|
||||
}
|
||||
|
||||
.icon-trash:before {
|
||||
content: "\e054"
|
||||
}
|
||||
|
||||
.icon-tag:before {
|
||||
content: "\e055"
|
||||
}
|
||||
|
||||
.icon-support:before {
|
||||
content: "\e056"
|
||||
}
|
||||
|
||||
.icon-frame:before {
|
||||
content: "\e038"
|
||||
}
|
||||
|
||||
.icon-size-fullscreen:before {
|
||||
content: "\e057"
|
||||
}
|
||||
|
||||
.icon-size-actual:before {
|
||||
content: "\e058"
|
||||
}
|
||||
|
||||
.icon-shuffle:before {
|
||||
content: "\e059"
|
||||
}
|
||||
|
||||
.icon-share-alt:before {
|
||||
content: "\e05a"
|
||||
}
|
||||
|
||||
.icon-share:before {
|
||||
content: "\e05b"
|
||||
}
|
||||
|
||||
.icon-rocket:before {
|
||||
content: "\e05c"
|
||||
}
|
||||
|
||||
.icon-question:before {
|
||||
content: "\e05d"
|
||||
}
|
||||
|
||||
.icon-pie-chart:before {
|
||||
content: "\e05e"
|
||||
}
|
||||
|
||||
.icon-pencil:before {
|
||||
content: "\e05f"
|
||||
}
|
||||
|
||||
.icon-note:before {
|
||||
content: "\e060"
|
||||
}
|
||||
|
||||
.icon-loop:before {
|
||||
content: "\e064"
|
||||
}
|
||||
|
||||
.icon-home:before {
|
||||
content: "\e069"
|
||||
}
|
||||
|
||||
.icon-grid:before {
|
||||
content: "\e06a"
|
||||
}
|
||||
|
||||
.icon-graph:before {
|
||||
content: "\e06b"
|
||||
}
|
||||
|
||||
.icon-microphone:before {
|
||||
content: "\e063"
|
||||
}
|
||||
|
||||
.icon-music-tone-alt:before {
|
||||
content: "\e061"
|
||||
}
|
||||
|
||||
.icon-music-tone:before {
|
||||
content: "\e062"
|
||||
}
|
||||
|
||||
.icon-earphones-alt:before {
|
||||
content: "\e03c"
|
||||
}
|
||||
|
||||
.icon-earphones:before {
|
||||
content: "\e03d"
|
||||
}
|
||||
|
||||
.icon-equalizer:before {
|
||||
content: "\e06c"
|
||||
}
|
||||
|
||||
.icon-like:before {
|
||||
content: "\e068"
|
||||
}
|
||||
|
||||
.icon-dislike:before {
|
||||
content: "\e06d"
|
||||
}
|
||||
|
||||
.icon-control-start:before {
|
||||
content: "\e06f"
|
||||
}
|
||||
|
||||
.icon-control-rewind:before {
|
||||
content: "\e070"
|
||||
}
|
||||
|
||||
.icon-control-play:before {
|
||||
content: "\e071"
|
||||
}
|
||||
|
||||
.icon-control-pause:before {
|
||||
content: "\e072"
|
||||
}
|
||||
|
||||
.icon-control-forward:before {
|
||||
content: "\e073"
|
||||
}
|
||||
|
||||
.icon-control-end:before {
|
||||
content: "\e074"
|
||||
}
|
||||
|
||||
.icon-volume-1:before {
|
||||
content: "\e09f"
|
||||
}
|
||||
|
||||
.icon-volume-2:before {
|
||||
content: "\e0a0"
|
||||
}
|
||||
|
||||
.icon-volume-off:before {
|
||||
content: "\e0a1"
|
||||
}
|
||||
|
||||
.icon-calendar:before {
|
||||
content: "\e075"
|
||||
}
|
||||
|
||||
.icon-bulb:before {
|
||||
content: "\e076"
|
||||
}
|
||||
|
||||
.icon-chart:before {
|
||||
content: "\e077"
|
||||
}
|
||||
|
||||
.icon-ban:before {
|
||||
content: "\e07c"
|
||||
}
|
||||
|
||||
.icon-bubble:before {
|
||||
content: "\e07d"
|
||||
}
|
||||
|
||||
.icon-camrecorder:before {
|
||||
content: "\e07e"
|
||||
}
|
||||
|
||||
.icon-camera:before {
|
||||
content: "\e07f"
|
||||
}
|
||||
|
||||
.icon-cloud-download:before {
|
||||
content: "\e083"
|
||||
}
|
||||
|
||||
.icon-cloud-upload:before {
|
||||
content: "\e084"
|
||||
}
|
||||
|
||||
.icon-envelope:before {
|
||||
content: "\e086"
|
||||
}
|
||||
|
||||
.icon-eye:before {
|
||||
content: "\e087"
|
||||
}
|
||||
|
||||
.icon-flag:before {
|
||||
content: "\e088"
|
||||
}
|
||||
|
||||
.icon-heart:before {
|
||||
content: "\e08a"
|
||||
}
|
||||
|
||||
.icon-info:before {
|
||||
content: "\e08b"
|
||||
}
|
||||
|
||||
.icon-key:before {
|
||||
content: "\e08c"
|
||||
}
|
||||
|
||||
.icon-link:before {
|
||||
content: "\e08d"
|
||||
}
|
||||
|
||||
.icon-lock:before {
|
||||
content: "\e08e"
|
||||
}
|
||||
|
||||
.icon-lock-open:before {
|
||||
content: "\e08f"
|
||||
}
|
||||
|
||||
.icon-magnifier:before {
|
||||
content: "\e090"
|
||||
}
|
||||
|
||||
.icon-magnifier-add:before {
|
||||
content: "\e091"
|
||||
}
|
||||
|
||||
.icon-magnifier-remove:before {
|
||||
content: "\e092"
|
||||
}
|
||||
|
||||
.icon-paper-clip:before {
|
||||
content: "\e093"
|
||||
}
|
||||
|
||||
.icon-paper-plane:before {
|
||||
content: "\e094"
|
||||
}
|
||||
|
||||
.icon-power:before {
|
||||
content: "\e097"
|
||||
}
|
||||
|
||||
.icon-refresh:before {
|
||||
content: "\e098"
|
||||
}
|
||||
|
||||
.icon-reload:before {
|
||||
content: "\e099"
|
||||
}
|
||||
|
||||
.icon-settings:before {
|
||||
content: "\e09a"
|
||||
}
|
||||
|
||||
.icon-star:before {
|
||||
content: "\e09b"
|
||||
}
|
||||
|
||||
.icon-symbol-female:before {
|
||||
content: "\e09c"
|
||||
}
|
||||
|
||||
.icon-symbol-male:before {
|
||||
content: "\e09d"
|
||||
}
|
||||
|
||||
.icon-target:before {
|
||||
content: "\e09e"
|
||||
}
|
||||
|
||||
.icon-credit-card:before {
|
||||
content: "\e025"
|
||||
}
|
||||
|
||||
.icon-paypal:before {
|
||||
content: "\e608"
|
||||
}
|
||||
|
||||
.icon-social-tumblr:before {
|
||||
content: "\e00a"
|
||||
}
|
||||
|
||||
.icon-social-twitter:before {
|
||||
content: "\e009"
|
||||
}
|
||||
|
||||
.icon-social-facebook:before {
|
||||
content: "\e00b"
|
||||
}
|
||||
|
||||
.icon-social-instagram:before {
|
||||
content: "\e609"
|
||||
}
|
||||
|
||||
.icon-social-linkedin:before {
|
||||
content: "\e60a"
|
||||
}
|
||||
|
||||
.icon-social-pinterest:before {
|
||||
content: "\e60b"
|
||||
}
|
||||
|
||||
.icon-social-github:before {
|
||||
content: "\e60c"
|
||||
}
|
||||
|
||||
.icon-social-google:before {
|
||||
content: "\e60d"
|
||||
}
|
||||
|
||||
.icon-social-reddit:before {
|
||||
content: "\e60e"
|
||||
}
|
||||
|
||||
.icon-social-skype:before {
|
||||
content: "\e60f"
|
||||
}
|
||||
|
||||
.icon-social-dribbble:before {
|
||||
content: "\e00d"
|
||||
}
|
||||
|
||||
.icon-social-behance:before {
|
||||
content: "\e610"
|
||||
}
|
||||
|
||||
.icon-social-foursqare:before {
|
||||
content: "\e611"
|
||||
}
|
||||
|
||||
.icon-social-soundcloud:before {
|
||||
content: "\e612"
|
||||
}
|
||||
|
||||
.icon-social-spotify:before {
|
||||
content: "\e613"
|
||||
}
|
||||
|
||||
.icon-social-stumbleupon:before {
|
||||
content: "\e614"
|
||||
}
|
||||
|
||||
.icon-social-youtube:before {
|
||||
content: "\e008"
|
||||
}
|
||||
|
||||
.icon-social-dropbox:before {
|
||||
content: "\e00c"
|
||||
}
|
||||
|
||||
.icon-social-vkontakte:before {
|
||||
content: "\e618"
|
||||
}
|
||||
|
||||
.icon-social-steam:before {
|
||||
content: "\e620"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
/*!
|
||||
* ruoyi.css v1.0.2
|
||||
* Author: Ruoyi
|
||||
*/
|
||||
|
||||
.box {
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
background: #ffffff;
|
||||
border-top: 3px solid #d2d6de;
|
||||
margin-bottom: 20px;
|
||||
width: 100%;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.1)
|
||||
}
|
||||
|
||||
.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after {
|
||||
content: " ";
|
||||
display: table
|
||||
}
|
||||
|
||||
.box-header:after,.box-body:after,.box-footer:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.btn-box-tool {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
background: transparent;
|
||||
color: #97a0b3;
|
||||
}
|
||||
.open .btn-box-tool,
|
||||
.btn-box-tool:hover {
|
||||
color: #606c84;
|
||||
}
|
||||
|
||||
.box-main {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
padding-top: 2px;
|
||||
border-radius: 0;
|
||||
box-shadow: none
|
||||
}
|
||||
|
||||
.box-main>.box-header {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 12px 10px 2px 15px
|
||||
}
|
||||
|
||||
.box-header .box-title {
|
||||
display: inline-block;
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.box-main>.box-header .box-title {
|
||||
font-size: 16px;
|
||||
margin-bottom: 13px;
|
||||
float: left
|
||||
}
|
||||
|
||||
.box-main>.box-header .box-title .fa {
|
||||
font-size: 14px;
|
||||
padding-right: 3px;
|
||||
margin-top: -2px
|
||||
}
|
||||
|
||||
.box-main>.box-header .box-tools {
|
||||
position: relative;
|
||||
top: -5px;
|
||||
right: 0
|
||||
}
|
||||
|
||||
.box-main>.box-header .box-tools .btn {
|
||||
padding: 3px 10px 5px 10px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 2px
|
||||
}
|
||||
|
||||
.box-main>.box-header .box-tools .btn-box-tool {
|
||||
padding: 4px 2px
|
||||
}
|
||||
|
||||
.box-main form>.box-footer,.nav-main form>.box-footer {
|
||||
background: #fafafa
|
||||
}
|
||||
|
||||
.box-main form>.box-footer .row,.nav-main form>.box-footer .row {
|
||||
margin: 5px 0 5px -25px
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -69,4 +69,4 @@ function simpleSuccess(result) {
|
|||
} else {
|
||||
layer.alert(result.msg, { icon: 2, title: "系统提示" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ $(function() {
|
|||
// 单条强退
|
||||
function forceLogout(id) {
|
||||
layer.confirm("确定要强制选中用户下线吗?",{icon: 3, title:'提示'},function(index){
|
||||
_ajax(prefix + "/forceLogout/" + id, , "", "post");
|
||||
_ajax(prefix + "/forceLogout/" + id, "", "post");
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@ $(function() {
|
|||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var msg = '<a class="btn btn-warning btn-sm" href="#" title="详细信息" onclick="detail(\'' + row.operId + '\')"><i class="fa fa-search"></i></a> ';
|
||||
return msg;
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-warning btn-sm" href="#" title="详细信息" onclick="detail(\'' + row.operId + '\')"><i class="fa fa-search"></i></a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}];
|
||||
var url = prefix + "/list";
|
||||
|
|
|
|||
|
|
@ -38,10 +38,11 @@ function loading() {
|
|||
align : 'center',
|
||||
formatter : function(row, index) {
|
||||
if(row.parentId != 0) {
|
||||
var edit = '<a class="btn btn-primary btn-sm" href="#" title="编辑" mce_href="#" onclick="edit(\'' + row.deptId + '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var add = '<a class="btn btn-primary btn-sm" href="#" title="增加下級" mce_href="#" onclick="add(\'' + row.deptId + '\')"><i class="fa fa-plus"></i></a> ';
|
||||
var del = '<a class="btn btn-warning btn-sm" href="#" title="删除" mce_href="#" onclick="remove(\'' + row.deptId + '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return edit + add + del;
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-primary btn-sm" href="#" title="编辑" mce_href="#" onclick="edit(\'' + row.deptId + '\')"><i class="fa fa-edit"></i></a>');
|
||||
actions.push('<a class="btn btn-primary btn-sm" href="#" title="新增" mce_href="#" onclick="add(\'' + row.deptId + '\')"><i class="fa fa-plus"></i></a>');
|
||||
actions.push('<a class="btn btn-warning btn-sm" href="#" title="删除" mce_href="#" onclick="remove(\'' + row.deptId + '\')"><i class="fa fa-remove"></i></a>');
|
||||
return actions.join('');
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,13 +15,26 @@ $("#form-user-edit").validate({
|
|||
}
|
||||
});
|
||||
|
||||
function getIsChecked(_name) {
|
||||
var adIds = "";
|
||||
$('input:checkbox[name="'+_name+'"]:checked').each(function(i) {
|
||||
if (0 == i) {
|
||||
adIds = $(this).val();
|
||||
} else {
|
||||
adIds += ("," + $(this).val());
|
||||
}
|
||||
});
|
||||
return adIds;
|
||||
}
|
||||
|
||||
function update() {
|
||||
var userId = $("input[name='userId']").val();
|
||||
var userName = $("input[name='userName']").val();
|
||||
var email = $("input[name='email']").val();
|
||||
var phonenumber = $("input[name='phonenumber']").val();
|
||||
var status = $("input[name='status']").is(':checked') == true ? 0 : 1;
|
||||
var roleIds = getIsChecked("role");
|
||||
var roleIds = getIsChecked("role");
|
||||
alert(roleIds);
|
||||
$.ajax({
|
||||
cache : true,
|
||||
type : "POST",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
var prefix = "/system/user"
|
||||
|
||||
$(function() {
|
||||
|
||||
$(document).ready(function(){
|
||||
$('body').layout({ west__size: 185 });
|
||||
queryUserList();
|
||||
queryDeptTreeDaTa();
|
||||
});
|
||||
|
||||
function queryUserList() {
|
||||
var columns = [{
|
||||
checkbox: true
|
||||
},
|
||||
|
|
@ -44,14 +51,55 @@ $(function() {
|
|||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var edit = '<a class="btn btn-primary btn-sm" href="#" title="编辑" mce_href="#" onclick="edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var del = '<a class="btn btn-warning btn-sm" href="#" title="删除" onclick="remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return edit + del;
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-primary btn-sm" href="#" title="编辑" mce_href="#" onclick="edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i></a>');
|
||||
actions.push('<a class="btn btn-warning btn-sm" href="#" title="删除" onclick="remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i></a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}];
|
||||
var url = prefix + "/list";
|
||||
initTable(columns, url);
|
||||
});
|
||||
}
|
||||
|
||||
function queryDeptTreeDaTa()
|
||||
{
|
||||
// 树结构初始化加载
|
||||
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
tree.expandNode(treeNode);
|
||||
var opt = { query : { deptId : treeNode.id, parentId : treeNode.pId, } };
|
||||
$('.bootstrap-table').bootstrapTable('refresh', opt);
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
$.get("/system/dept/treeData", function(data) {
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data); //.expandAll(true);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
// 展开第二级节点
|
||||
nodes = tree.getNodesByParam("level", 1);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
}, null, null, "正在加载,请稍后...");
|
||||
};loadTree();
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
zTree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
$('#btnCollapse').click(function() {
|
||||
zTree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
$('#btnRefresh').click(function() {
|
||||
loadTree();
|
||||
});
|
||||
}
|
||||
|
||||
/*用户管理-删除*/
|
||||
function remove(userId) {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,33 @@
|
|||
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content">
|
||||
<link href="/ajax/libs/jquery-layout/jquery.layout-latest.css" rel="stylesheet">
|
||||
<link href="/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css" rel="stylesheet">
|
||||
<link href="/ruoyi/css/RuoYi.css" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> 组织机构
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool addTabPage" data-href="/sys/office/list" title="管理机构"><i class="fa fa-edit"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新机构"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content ui-layout-center">
|
||||
<div class="btn-group hidden-xs" id="tableToolbar" role="group">
|
||||
<button type="button" class="btn btn-outline btn-default" th:onclick="'javascript:batchRemove()'">
|
||||
<i class="glyphicon glyphicon-trash"></i>
|
||||
|
|
@ -17,5 +42,7 @@
|
|||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script type="text/javascript" src="/ruoyi/system/user/user.js"></script>
|
||||
<script src="/ajax/libs/jquery-layout/jquery.layout-latest.js"></script>
|
||||
<script src="/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js"></script>
|
||||
</body>
|
||||
</html>
|
||||