diff --git a/gatway/src/main/java/com/team7/happycommunity/gatway/config/GlobalCorsConfig.java b/gatway/src/main/java/com/team7/happycommunity/gatway/config/GlobalCorsConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..e32b507475b5d0fb1f7b794d53170e93a2ab0597 --- /dev/null +++ b/gatway/src/main/java/com/team7/happycommunity/gatway/config/GlobalCorsConfig.java @@ -0,0 +1,30 @@ +package com.team7.happycommunity.gatway.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +@Configuration +public class GlobalCorsConfig { + @Bean + public CorsFilter corsFilter() { + //1.添加CORS配置信息 + CorsConfiguration config = new CorsConfiguration(); + //1) 允许的域,不要写*,否则cookie就无法使用了 + config.addAllowedOrigin("*"); + //2) 是否发送Cookie信息 +// config.setAllowCredentials(true); + //3) 允许的请求方式 + config.addAllowedMethod("*"); + // 4)允许的头信息 + config.addAllowedHeader("*"); + //2.添加映射路径,我们拦截一切请求 + UrlBasedCorsConfigurationSource configSource = new + UrlBasedCorsConfigurationSource(); + configSource.registerCorsConfiguration("/**", config); + //3.返回新的CorsFilter. + return new CorsFilter(configSource); + } +} diff --git a/gatway/src/main/resources/application.yml b/gatway/src/main/resources/application.yml index 0b1da80aebe1c62cde877e847ff9c9b06b6e6bba..3fcfaa2d66e07dced4fb609902536bcf6259e1cd 100644 --- a/gatway/src/main/resources/application.yml +++ b/gatway/src/main/resources/application.yml @@ -1,9 +1,23 @@ spring: + aop: + auto: true + proxy-target-class: true application: name: gateway + cloud: + gateway: + globalcors: + corsConfigurations: + '[/**]': + allowedHeaders: '*' + allowedMethods: '*' + allowedOrigins: '*' eureka: client: service-url: - defaultZone: http://106.12.148.100:8081/registor-0.1/eureka + defaultZone: http://localhost:8761/eureka server: - port: 9100 \ No newline at end of file + port: 9100 +zuul: + sensitive-headers: Access-Control-Allow-Credentials,Access-Control-Allow-Origin,Access-Control-Allow-Methods + ignored-headers: Access-Control-Allow-Credentials,Access-Control-Allow-Origin, Access-Control-Allow-Methods,H-APP-Id,Token,APPToken \ No newline at end of file diff --git a/marketservice/.gitignore b/marketservice/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..77e3d03cb8fb0cae9c3024c3266456e8a169994f --- /dev/null +++ b/marketservice/.gitignore @@ -0,0 +1,32 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ +.mvn/* \ No newline at end of file diff --git a/marketservice/pom.xml b/marketservice/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..12b611f26c2ff6533ac464f8959a44aaa430520d --- /dev/null +++ b/marketservice/pom.xml @@ -0,0 +1,109 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + com.woniu + marketservice + 0.0.1-SNAPSHOT + marketservice + Demo project for Spring Boot + + + 1.8 + Hoxton.SR3 + + + + + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.2 + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.cloud + spring-cloud-starter-netflix-zuul + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + mysql + mysql-connector-java + runtime + 5.1.48 + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/marketservice/src/main/java/com/woniu/MarketserviceApplication.java b/marketservice/src/main/java/com/woniu/MarketserviceApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..0a548b4533d7f3c04262d4fc15dd59fb86e3a659 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/MarketserviceApplication.java @@ -0,0 +1,17 @@ +package com.woniu; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; + +@SpringBootApplication +@MapperScan("com.woniu.dao") +@EnableEurekaClient +public class MarketserviceApplication { + + public static void main(String[] args) { + SpringApplication.run(MarketserviceApplication.class, args); + } + +} diff --git a/marketservice/src/main/java/com/woniu/common/CommonResult.java b/marketservice/src/main/java/com/woniu/common/CommonResult.java new file mode 100644 index 0000000000000000000000000000000000000000..2340a380d42ef58c9dc767550cd155f4c95ddea2 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/common/CommonResult.java @@ -0,0 +1,105 @@ +package com.woniu.common; + +import java.io.Serializable; +public class CommonResult implements Serializable { + + //状态码 + private Long code; + //提示消息 + private String message; + //响应数据 + private T data; + + public CommonResult(){} + public CommonResult(Long code,String message){ + this.code = code; + this.message = message; + } + + public CommonResult(Long code ,String message,T data){ + this.code = code; + this.message = message; + this.data = data; + } + + /** + * 响应成功的结果 + * @return 状态码 200 + */ + public static CommonResult success(){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),ResultUtil.SUCCESS.getMessage()); + } + + public static CommonResult success(String message){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),message); + } + + public static CommonResult success(T data){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),ResultUtil.SUCCESS.getMessage(),data); + } + public static CommonResult success(String message,T data){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),message,data); + } + + /** + * 响应失败 + * @return 状态码500 + */ + public static CommonResult failed(){ + return new CommonResult(ResultUtil.FAILED.getCode(),ResultUtil.FAILED.getMessage()); + } + + public static CommonResult failed(String message){ + return new CommonResult(ResultUtil.FAILED.getCode(),message); + } + /** + * 参数验证失败 + * @return 状态码 400 + */ + public static CommonResult valetateFailed(){ + return new CommonResult(ResultUtil.VALIDATE_FAILED.getCode(),ResultUtil.VALIDATE_FAILED.getMessage()); + } + public static CommonResult valetateFailed(String msg){ + return new CommonResult(ResultUtil.VALIDATE_FAILED.getCode(),msg); + } + + /** + * 未认证 + * @return 状态码401 + */ + public static CommonResult unathorizedFailed(){ + return new CommonResult(ResultUtil.UNAUTORIED.getCode(), ResultUtil.UNAUTORIED.getMessage()); + } + + /** + * 未授权 + * @return 状态码403 + */ + public static CommonResult forbiddenFailed(){ + return new CommonResult(ResultUtil.FORBIDDEN.getCode(),ResultUtil.FORBIDDEN.getMessage()); + } + + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } +} diff --git a/marketservice/src/main/java/com/woniu/common/ResultUtil.java b/marketservice/src/main/java/com/woniu/common/ResultUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..36aabc043f22423b6de11eba73462e628458a092 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/common/ResultUtil.java @@ -0,0 +1,32 @@ +package com.woniu.common; + +public enum ResultUtil { + SUCCESS(200L,"操作成功"), + FAILED(500L,"操作失败"), + VALIDATE_FAILED(400L,"参数验证失败"), + UNAUTORIED(401L,"未认证或token过期"), + FORBIDDEN(403L,"未授权"); + private Long code; + private String message; + + private ResultUtil(Long code,String message){ + this.code = code; + this.message = message; + } + + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/marketservice/src/main/java/com/woniu/config/WebMvcConfig.java b/marketservice/src/main/java/com/woniu/config/WebMvcConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..7e75a5c7ce7af8907c4343508a22872536c95d34 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/config/WebMvcConfig.java @@ -0,0 +1,14 @@ +package com.woniu.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebMvcConfig implements WebMvcConfigurer { + + @Override + public void addViewControllers(ViewControllerRegistry registry) { +// registry.addViewController("/").setViewName("/"); + } +} diff --git a/marketservice/src/main/java/com/woniu/controller/AreainfoController.java b/marketservice/src/main/java/com/woniu/controller/AreainfoController.java new file mode 100644 index 0000000000000000000000000000000000000000..e7de50a2b9d8fd09937241bbc39cbc4d09fe07de --- /dev/null +++ b/marketservice/src/main/java/com/woniu/controller/AreainfoController.java @@ -0,0 +1,35 @@ +package com.woniu.controller; + +import com.woniu.entity.Areainfo; +import com.woniu.service.AreainfoService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 小区信息表(Areainfo)表控制层 + * + * @author makejava + * @since 2020-03-23 10:45:05 + */ +@RestController +@RequestMapping("areainfo") +public class AreainfoController { + /** + * 服务对象 + */ + @Resource + private AreainfoService areainfoService; + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public Areainfo selectOne(Integer id) { + return this.areainfoService.queryById(id); + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/controller/PersonUserController.java b/marketservice/src/main/java/com/woniu/controller/PersonUserController.java new file mode 100644 index 0000000000000000000000000000000000000000..61bc5844d139e3b874727b2e4f5f450206294cbf --- /dev/null +++ b/marketservice/src/main/java/com/woniu/controller/PersonUserController.java @@ -0,0 +1,35 @@ +package com.woniu.controller; + +import com.woniu.entity.PersonUser; +import com.woniu.service.PersonUserService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * (PersonUser)表控制层 + * + * @author makejava + * @since 2020-03-23 10:44:40 + */ +@RestController +@RequestMapping("personUser") +public class PersonUserController { + /** + * 服务对象 + */ + @Resource + private PersonUserService personUserService; + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public PersonUser selectOne(Integer id) { + return this.personUserService.queryById(id); + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/controller/UsedMessageController.java b/marketservice/src/main/java/com/woniu/controller/UsedMessageController.java new file mode 100644 index 0000000000000000000000000000000000000000..0ec59fb9e47efbde427f5ca210fa14865e37268d --- /dev/null +++ b/marketservice/src/main/java/com/woniu/controller/UsedMessageController.java @@ -0,0 +1,35 @@ +package com.woniu.controller; + +import com.woniu.entity.UsedMessage; +import com.woniu.service.UsedMessageService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 二手商品聊天表(UsedMessage)表控制层 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +@RestController +@RequestMapping("usedMessage") +public class UsedMessageController { + /** + * 服务对象 + */ + @Resource + private UsedMessageService usedMessageService; + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public UsedMessage selectOne(Integer id) { + return this.usedMessageService.queryById(id); + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/controller/UsedProductCommentController.java b/marketservice/src/main/java/com/woniu/controller/UsedProductCommentController.java new file mode 100644 index 0000000000000000000000000000000000000000..cdb3b4b409e0943792517d2410802210e5fb0fdc --- /dev/null +++ b/marketservice/src/main/java/com/woniu/controller/UsedProductCommentController.java @@ -0,0 +1,35 @@ +package com.woniu.controller; + +import com.woniu.entity.UsedProductComment; +import com.woniu.service.UsedProductCommentService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 商品评价表(UsedProductComment)表控制层 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +@RestController +@RequestMapping("usedProductComment") +public class UsedProductCommentController { + /** + * 服务对象 + */ + @Resource + private UsedProductCommentService usedProductCommentService; + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public UsedProductComment selectOne(Integer id) { + return this.usedProductCommentService.queryById(id); + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/controller/UsedProductController.java b/marketservice/src/main/java/com/woniu/controller/UsedProductController.java new file mode 100644 index 0000000000000000000000000000000000000000..53423bd307790428c9e2a82ff5645fa23cca46ab --- /dev/null +++ b/marketservice/src/main/java/com/woniu/controller/UsedProductController.java @@ -0,0 +1,95 @@ +package com.woniu.controller; + +import com.woniu.common.CommonResult; +import com.woniu.entity.Areainfo; +import com.woniu.entity.UsedProduct; +import com.woniu.entity.UsedProductType; +import com.woniu.service.AreainfoService; +import com.woniu.service.PersonUserService; +import com.woniu.service.UsedProductService; +import com.woniu.service.UsedProductTypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 二手商品表(UsedProduct)表控制层 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +@Controller +@RequestMapping("/usedProduct") +public class UsedProductController { + + @Resource + UsedProductService usedProductService; + + @Resource + PersonUserService personUserService; + + @Resource + AreainfoService areainfoService; + + @Resource + UsedProductTypeService usedProductTypeService; + +// @RequestMapping("/listByType/{typeId}") +// public ModelAndView listByType(@PathVariable("typeId") Integer typeId,ModelAndView modelAndView){ +// //根据商品类型Id查询所有商品 +// List products = usedProductService.findAllByTypeId(typeId); +// } + + @GetMapping("/findAllProductType") + public @ResponseBody CommonResult findAllProductType(){ + //查询所有二手商品类型信息 + List types = null; + try { + types = usedProductTypeService.findAll(); + return CommonResult.success(types); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("获取信息失败!"); + } + + } + + /** + * 根据UserId查询所属小区名称 + * @param userId + * @return + */ + @GetMapping("/findAreainfo/{userId}") + public @ResponseBody CommonResult findAreainfo(@PathVariable("userId") Integer userId){ + Areainfo areainfo = null; + try { + //根据用户Id查询所属小区 + Integer plotId = personUserService.findPlotIdByUserId(userId); + //查询小区信息 + areainfo = areainfoService.queryById(plotId); + return CommonResult.success(areainfo); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("获取信息失败!"); + } + + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("/selectOne") + public UsedProduct selectOne(Integer id) { + return this.usedProductService.queryById(id); + } + + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/controller/UsedProductImgsController.java b/marketservice/src/main/java/com/woniu/controller/UsedProductImgsController.java new file mode 100644 index 0000000000000000000000000000000000000000..615999bc15cd6840e2f297ec1388004e264cc3ae --- /dev/null +++ b/marketservice/src/main/java/com/woniu/controller/UsedProductImgsController.java @@ -0,0 +1,35 @@ +package com.woniu.controller; + +import com.woniu.entity.UsedProductImgs; +import com.woniu.service.UsedProductImgsService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 商品图片表(UsedProductImgs)表控制层 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +@RestController +@RequestMapping("usedProductImgs") +public class UsedProductImgsController { + /** + * 服务对象 + */ + @Resource + private UsedProductImgsService usedProductImgsService; + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public UsedProductImgs selectOne(Integer id) { + return this.usedProductImgsService.queryById(id); + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/controller/UsedProductTypeController.java b/marketservice/src/main/java/com/woniu/controller/UsedProductTypeController.java new file mode 100644 index 0000000000000000000000000000000000000000..02bbf8178473b3a2a773eb64edd53f05d9bc6347 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/controller/UsedProductTypeController.java @@ -0,0 +1,35 @@ +package com.woniu.controller; + +import com.woniu.entity.UsedProductType; +import com.woniu.service.UsedProductTypeService; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.annotation.Resource; +import javax.jws.WebParam; + +/** + * 商品类型表(UsedProductType)表控制层 + * + * @author makejava + * @since 2020-03-23 09:48:23 + */ +@RestController +@RequestMapping("/usedProductType") +public class UsedProductTypeController { + + @Resource + private UsedProductTypeService usedProductTypeService; + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public UsedProductType selectOne(Integer id) { + return this.usedProductTypeService.queryById(id); + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/dao/AreainfoDao.java b/marketservice/src/main/java/com/woniu/dao/AreainfoDao.java new file mode 100644 index 0000000000000000000000000000000000000000..5c1d0c87c047008d39eec0cb2569472e2a685748 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/dao/AreainfoDao.java @@ -0,0 +1,65 @@ +package com.woniu.dao; + +import com.woniu.entity.Areainfo; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 小区信息表(Areainfo)表数据库访问层 + * + * @author makejava + * @since 2020-03-23 10:45:05 + */ +public interface AreainfoDao { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + Areainfo queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit); + + + /** + * 通过实体作为筛选条件查询 + * + * @param areainfo 实例对象 + * @return 对象列表 + */ + List queryAll(Areainfo areainfo); + + /** + * 新增数据 + * + * @param areainfo 实例对象 + * @return 影响行数 + */ + int insert(Areainfo areainfo); + + /** + * 修改数据 + * + * @param areainfo 实例对象 + * @return 影响行数 + */ + int update(Areainfo areainfo); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/dao/PersonUserDao.java b/marketservice/src/main/java/com/woniu/dao/PersonUserDao.java new file mode 100644 index 0000000000000000000000000000000000000000..078a7c37684e55328144b5f727c90cb3a4f9ccd7 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/dao/PersonUserDao.java @@ -0,0 +1,69 @@ +package com.woniu.dao; + +import com.woniu.entity.PersonUser; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * (PersonUser)表数据库访问层 + * + * @author makejava + * @since 2020-03-23 10:44:40 + */ +public interface PersonUserDao { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + PersonUser queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit); + + + /** + * 通过实体作为筛选条件查询 + * + * @param personUser 实例对象 + * @return 对象列表 + */ + List queryAll(PersonUser personUser); + + /** + * 新增数据 + * + * @param personUser 实例对象 + * @return 影响行数 + */ + int insert(PersonUser personUser); + + /** + * 修改数据 + * + * @param personUser 实例对象 + * @return 影响行数 + */ + int update(PersonUser personUser); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + + @Select("select plot_id from person_user where id = #{value}") + Integer findPlotIdByUserId(Integer userId); +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/dao/UsedMessageDao.java b/marketservice/src/main/java/com/woniu/dao/UsedMessageDao.java new file mode 100644 index 0000000000000000000000000000000000000000..ca9e7e84e718093439e380b0801cb28804b73aa3 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/dao/UsedMessageDao.java @@ -0,0 +1,65 @@ +package com.woniu.dao; + +import com.woniu.entity.UsedMessage; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 二手商品聊天表(UsedMessage)表数据库访问层 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +public interface UsedMessageDao { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedMessage queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit); + + + /** + * 通过实体作为筛选条件查询 + * + * @param usedMessage 实例对象 + * @return 对象列表 + */ + List queryAll(UsedMessage usedMessage); + + /** + * 新增数据 + * + * @param usedMessage 实例对象 + * @return 影响行数 + */ + int insert(UsedMessage usedMessage); + + /** + * 修改数据 + * + * @param usedMessage 实例对象 + * @return 影响行数 + */ + int update(UsedMessage usedMessage); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/dao/UsedProductCommentDao.java b/marketservice/src/main/java/com/woniu/dao/UsedProductCommentDao.java new file mode 100644 index 0000000000000000000000000000000000000000..6a4ee7ae2f43853fe7a84850e0dfaac80b650638 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/dao/UsedProductCommentDao.java @@ -0,0 +1,65 @@ +package com.woniu.dao; + +import com.woniu.entity.UsedProductComment; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 商品评价表(UsedProductComment)表数据库访问层 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public interface UsedProductCommentDao { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProductComment queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit); + + + /** + * 通过实体作为筛选条件查询 + * + * @param usedProductComment 实例对象 + * @return 对象列表 + */ + List queryAll(UsedProductComment usedProductComment); + + /** + * 新增数据 + * + * @param usedProductComment 实例对象 + * @return 影响行数 + */ + int insert(UsedProductComment usedProductComment); + + /** + * 修改数据 + * + * @param usedProductComment 实例对象 + * @return 影响行数 + */ + int update(UsedProductComment usedProductComment); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/dao/UsedProductDao.java b/marketservice/src/main/java/com/woniu/dao/UsedProductDao.java new file mode 100644 index 0000000000000000000000000000000000000000..5535158b33071f7bf429d161762941e72e6e3f50 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/dao/UsedProductDao.java @@ -0,0 +1,69 @@ +package com.woniu.dao; + +import com.woniu.entity.UsedProduct; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * 二手商品表(UsedProduct)表数据库访问层 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public interface UsedProductDao { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProduct queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit); + + + /** + * 通过实体作为筛选条件查询 + * + * @param usedProduct 实例对象 + * @return 对象列表 + */ + List queryAll(UsedProduct usedProduct); + + /** + * 新增数据 + * + * @param usedProduct 实例对象 + * @return 影响行数 + */ + int insert(UsedProduct usedProduct); + + /** + * 修改数据 + * + * @param usedProduct 实例对象 + * @return 影响行数 + */ + int update(UsedProduct usedProduct); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + + @Select("select * from used_product where product_type_id = #{value}") + List findAllByTypeId(Integer typeId); +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/dao/UsedProductImgsDao.java b/marketservice/src/main/java/com/woniu/dao/UsedProductImgsDao.java new file mode 100644 index 0000000000000000000000000000000000000000..de752582f448a47f2a1516c7c1486eed9bf57676 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/dao/UsedProductImgsDao.java @@ -0,0 +1,65 @@ +package com.woniu.dao; + +import com.woniu.entity.UsedProductImgs; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 商品图片表(UsedProductImgs)表数据库访问层 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public interface UsedProductImgsDao { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProductImgs queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit); + + + /** + * 通过实体作为筛选条件查询 + * + * @param usedProductImgs 实例对象 + * @return 对象列表 + */ + List queryAll(UsedProductImgs usedProductImgs); + + /** + * 新增数据 + * + * @param usedProductImgs 实例对象 + * @return 影响行数 + */ + int insert(UsedProductImgs usedProductImgs); + + /** + * 修改数据 + * + * @param usedProductImgs 实例对象 + * @return 影响行数 + */ + int update(UsedProductImgs usedProductImgs); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/dao/UsedProductTypeDao.java b/marketservice/src/main/java/com/woniu/dao/UsedProductTypeDao.java new file mode 100644 index 0000000000000000000000000000000000000000..06847743d822c5396a77fbd59ed029b9cb58e031 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/dao/UsedProductTypeDao.java @@ -0,0 +1,69 @@ +package com.woniu.dao; + +import com.woniu.entity.UsedProductType; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * 商品类型表(UsedProductType)表数据库访问层 + * + * @author makejava + * @since 2020-03-23 09:48:22 + */ +public interface UsedProductTypeDao { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProductType queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit); + + + /** + * 通过实体作为筛选条件查询 + * + * @param usedProductType 实例对象 + * @return 对象列表 + */ + List queryAll(UsedProductType usedProductType); + + /** + * 新增数据 + * + * @param usedProductType 实例对象 + * @return 影响行数 + */ + int insert(UsedProductType usedProductType); + + /** + * 修改数据 + * + * @param usedProductType 实例对象 + * @return 影响行数 + */ + int update(UsedProductType usedProductType); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + + @Select("select * from used_product_type") + List findAll(); +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/entity/Areainfo.java b/marketservice/src/main/java/com/woniu/entity/Areainfo.java new file mode 100644 index 0000000000000000000000000000000000000000..4955542c5aed4f7261f29b55c5b2e12f8ed32444 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/entity/Areainfo.java @@ -0,0 +1,58 @@ +package com.woniu.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 小区信息表(Areainfo)实体类 + * + * @author makejava + * @since 2020-03-23 10:45:05 + */ +@Data +public class Areainfo implements Serializable { + private static final long serialVersionUID = 825592721303424513L; + + private Integer id; + + private String areaName; + + private String areaAddress; + + private String detail1; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAreaAddress() { + return areaAddress; + } + + public void setAreaAddress(String areaAddress) { + this.areaAddress = areaAddress; + } + + public String getDetail1() { + return detail1; + } + + public void setDetail1(String detail1) { + this.detail1 = detail1; + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/entity/PersonUser.java b/marketservice/src/main/java/com/woniu/entity/PersonUser.java new file mode 100644 index 0000000000000000000000000000000000000000..e3129b45cfb7e4cf10b0bfb839543548ce5bc6af --- /dev/null +++ b/marketservice/src/main/java/com/woniu/entity/PersonUser.java @@ -0,0 +1,156 @@ +package com.woniu.entity; + +import java.util.Date; +import java.io.Serializable; + +/** + * (PersonUser)实体类 + * + * @author makejava + * @since 2020-03-23 10:44:40 + */ +public class PersonUser implements Serializable { + private static final long serialVersionUID = 184628878578858583L; + + private Integer id; + + private String idNumber; + + private String cellPhNumber; + + private String password; + + private String name; + + private Integer sex; + + private String nickname; + + private String mailbox; + + private Integer plotId; + + private String tag; + + private Integer mailboxStatus; + + private String code; + + private String passwordSalt; + + private Date createTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getIdNumber() { + return idNumber; + } + + public void setIdNumber(String idNumber) { + this.idNumber = idNumber; + } + + public String getCellPhNumber() { + return cellPhNumber; + } + + public void setCellPhNumber(String cellPhNumber) { + this.cellPhNumber = cellPhNumber; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getSex() { + return sex; + } + + public void setSex(Integer sex) { + this.sex = sex; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public String getMailbox() { + return mailbox; + } + + public void setMailbox(String mailbox) { + this.mailbox = mailbox; + } + + public Integer getPlotId() { + return plotId; + } + + public void setPlotId(Integer plotId) { + this.plotId = plotId; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public Integer getMailboxStatus() { + return mailboxStatus; + } + + public void setMailboxStatus(Integer mailboxStatus) { + this.mailboxStatus = mailboxStatus; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getPasswordSalt() { + return passwordSalt; + } + + public void setPasswordSalt(String passwordSalt) { + this.passwordSalt = passwordSalt; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/entity/UsedMessage.java b/marketservice/src/main/java/com/woniu/entity/UsedMessage.java new file mode 100644 index 0000000000000000000000000000000000000000..a50991f7e3b01c1c3efd704364cdc15ea7ebef47 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/entity/UsedMessage.java @@ -0,0 +1,100 @@ +package com.woniu.entity; + +import java.util.Date; +import java.io.Serializable; + +/** + * 二手商品聊天表(UsedMessage)实体类 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +public class UsedMessage implements Serializable { + private static final long serialVersionUID = 724461933608522870L; + /** + * 聊天信息Id + */ + private Integer id; + /** + * 用户1Id + */ + private Integer useroneId; + /** + * 用户2Id + */ + private Integer usertwoId; + /** + * 聊天信息内容 + */ + private String message; + /** + * 信息发送时间 + */ + private Date createTime; + /** + * 当前用户Id + */ + private Integer currentUserId; + /** + * 二手商品Id + */ + private Integer productId; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getUseroneId() { + return useroneId; + } + + public void setUseroneId(Integer useroneId) { + this.useroneId = useroneId; + } + + public Integer getUsertwoId() { + return usertwoId; + } + + public void setUsertwoId(Integer usertwoId) { + this.usertwoId = usertwoId; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getCurrentUserId() { + return currentUserId; + } + + public void setCurrentUserId(Integer currentUserId) { + this.currentUserId = currentUserId; + } + + public Integer getProductId() { + return productId; + } + + public void setProductId(Integer productId) { + this.productId = productId; + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/entity/UsedProduct.java b/marketservice/src/main/java/com/woniu/entity/UsedProduct.java new file mode 100644 index 0000000000000000000000000000000000000000..df81c1bfc30b77b3a7280aec996edc18c0c4943c --- /dev/null +++ b/marketservice/src/main/java/com/woniu/entity/UsedProduct.java @@ -0,0 +1,196 @@ +package com.woniu.entity; + +import java.util.Date; +import java.io.Serializable; + +/** + * 二手商品表(UsedProduct)实体类 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public class UsedProduct implements Serializable { + private static final long serialVersionUID = 612895049832801151L; + /** + * 主键-二手商品Id + */ + private Integer id; + /** + * 发布商品用户Id + */ + private Integer userId; + /** + * 发布商品商户Id + */ + private Integer merchantId; + /** + * 当前小区Id + */ + private Integer communityId; + /** + * 商品名称 + */ + private String productName; + /** + * 商品详情 + */ + private String productDetails; + /** + * 入手价格 + */ + private Object buyingPrice; + /** + * 出售价格 + */ + private Object ssellingPrice; + /** + * 数量 + */ + private Integer number; + /** + * 商品状态 + */ + private Integer status; + /** + * 商品类型Id + */ + private Integer productTypeId; + /** + * 商品类型名称 + */ + private String productTypeName; + /** + * 商品创建时间 + */ + private Date creatTime; + /** + * 商品最后更新时间 + */ + private Date lastTime; + /** + * 送货方式 + */ + private Integer deliverMethod; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public Integer getMerchantId() { + return merchantId; + } + + public void setMerchantId(Integer merchantId) { + this.merchantId = merchantId; + } + + public Integer getCommunityId() { + return communityId; + } + + public void setCommunityId(Integer communityId) { + this.communityId = communityId; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductDetails() { + return productDetails; + } + + public void setProductDetails(String productDetails) { + this.productDetails = productDetails; + } + + public Object getBuyingPrice() { + return buyingPrice; + } + + public void setBuyingPrice(Object buyingPrice) { + this.buyingPrice = buyingPrice; + } + + public Object getSsellingPrice() { + return ssellingPrice; + } + + public void setSsellingPrice(Object ssellingPrice) { + this.ssellingPrice = ssellingPrice; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getProductTypeId() { + return productTypeId; + } + + public void setProductTypeId(Integer productTypeId) { + this.productTypeId = productTypeId; + } + + public String getProductTypeName() { + return productTypeName; + } + + public void setProductTypeName(String productTypeName) { + this.productTypeName = productTypeName; + } + + public Date getCreatTime() { + return creatTime; + } + + public void setCreatTime(Date creatTime) { + this.creatTime = creatTime; + } + + public Date getLastTime() { + return lastTime; + } + + public void setLastTime(Date lastTime) { + this.lastTime = lastTime; + } + + public Integer getDeliverMethod() { + return deliverMethod; + } + + public void setDeliverMethod(Integer deliverMethod) { + this.deliverMethod = deliverMethod; + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/entity/UsedProductComment.java b/marketservice/src/main/java/com/woniu/entity/UsedProductComment.java new file mode 100644 index 0000000000000000000000000000000000000000..43168fb474736a7a67ffe4d2c44c791c2e2fae6e --- /dev/null +++ b/marketservice/src/main/java/com/woniu/entity/UsedProductComment.java @@ -0,0 +1,100 @@ +package com.woniu.entity; + +import java.util.Date; +import java.io.Serializable; + +/** + * 商品评价表(UsedProductComment)实体类 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public class UsedProductComment implements Serializable { + private static final long serialVersionUID = 523055369212936195L; + /** + * 评价Id + */ + private Integer id; + /** + * 商品Id + */ + private Integer productId; + /** + * 评价用户Id + */ + private Integer userId; + /** + * 评价内容 + */ + private String comment; + /** + * 评价时间 + */ + private Date commentTime; + /** + * 评价星级 + */ + private Integer start; + /** + * 点赞数量 + */ + private Integer number; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getProductId() { + return productId; + } + + public void setProductId(Integer productId) { + this.productId = productId; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public Date getCommentTime() { + return commentTime; + } + + public void setCommentTime(Date commentTime) { + this.commentTime = commentTime; + } + + public Integer getStart() { + return start; + } + + public void setStart(Integer start) { + this.start = start; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/entity/UsedProductImgs.java b/marketservice/src/main/java/com/woniu/entity/UsedProductImgs.java new file mode 100644 index 0000000000000000000000000000000000000000..87f5cfcff374acf952a13b415de26568836bd366 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/entity/UsedProductImgs.java @@ -0,0 +1,51 @@ +package com.woniu.entity; + +import java.io.Serializable; + +/** + * 商品图片表(UsedProductImgs)实体类 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public class UsedProductImgs implements Serializable { + private static final long serialVersionUID = -17518035962904970L; + /** + * 商品图片Id + */ + private Integer id; + /** + * 商品Id + */ + private Integer productId; + /** + * 图片链接 + */ + private String imgUrl; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getProductId() { + return productId; + } + + public void setProductId(Integer productId) { + this.productId = productId; + } + + public String getImgUrl() { + return imgUrl; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl; + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/entity/UsedProductType.java b/marketservice/src/main/java/com/woniu/entity/UsedProductType.java new file mode 100644 index 0000000000000000000000000000000000000000..3814f2b9b4e2ed57628bb9866b081f7ddd16c4fb --- /dev/null +++ b/marketservice/src/main/java/com/woniu/entity/UsedProductType.java @@ -0,0 +1,39 @@ +package com.woniu.entity; + +import java.io.Serializable; + +/** + * 商品类型表(UsedProductType)实体类 + * + * @author makejava + * @since 2020-03-23 09:48:20 + */ +public class UsedProductType implements Serializable { + private static final long serialVersionUID = 963585419734442913L; + /** + * 商品类型Id + */ + private Integer id; + /** + * 类型名称 + */ + private String typeName; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTypeName() { + return typeName; + } + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/AreainfoService.java b/marketservice/src/main/java/com/woniu/service/AreainfoService.java new file mode 100644 index 0000000000000000000000000000000000000000..c15013ba2d5e2a132025966951118f4efada3d78 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/AreainfoService.java @@ -0,0 +1,55 @@ +package com.woniu.service; + +import com.woniu.entity.Areainfo; +import java.util.List; + +/** + * 小区信息表(Areainfo)表服务接口 + * + * @author makejava + * @since 2020-03-23 10:45:05 + */ +public interface AreainfoService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + Areainfo queryById(Integer id); + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(int offset, int limit); + + /** + * 新增数据 + * + * @param areainfo 实例对象 + * @return 实例对象 + */ + Areainfo insert(Areainfo areainfo); + + /** + * 修改数据 + * + * @param areainfo 实例对象 + * @return 实例对象 + */ + Areainfo update(Areainfo areainfo); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/PersonUserService.java b/marketservice/src/main/java/com/woniu/service/PersonUserService.java new file mode 100644 index 0000000000000000000000000000000000000000..621a68aa9b880cf69e4186c471935a839e97bca1 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/PersonUserService.java @@ -0,0 +1,61 @@ +package com.woniu.service; + +import com.woniu.entity.PersonUser; +import java.util.List; + +/** + * (PersonUser)表服务接口 + * + * @author makejava + * @since 2020-03-23 10:44:40 + */ +public interface PersonUserService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + PersonUser queryById(Integer id); + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(int offset, int limit); + + /** + * 新增数据 + * + * @param personUser 实例对象 + * @return 实例对象 + */ + PersonUser insert(PersonUser personUser); + + /** + * 修改数据 + * + * @param personUser 实例对象 + * @return 实例对象 + */ + PersonUser update(PersonUser personUser); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + + /** + * 查询用户所属小区Id + * @param userId + * @return + */ + Integer findPlotIdByUserId(Integer userId); +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/UsedMessageService.java b/marketservice/src/main/java/com/woniu/service/UsedMessageService.java new file mode 100644 index 0000000000000000000000000000000000000000..b040c6485c1c5748615d1f1ef6cf3e657d586175 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/UsedMessageService.java @@ -0,0 +1,55 @@ +package com.woniu.service; + +import com.woniu.entity.UsedMessage; +import java.util.List; + +/** + * 二手商品聊天表(UsedMessage)表服务接口 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +public interface UsedMessageService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedMessage queryById(Integer id); + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(int offset, int limit); + + /** + * 新增数据 + * + * @param usedMessage 实例对象 + * @return 实例对象 + */ + UsedMessage insert(UsedMessage usedMessage); + + /** + * 修改数据 + * + * @param usedMessage 实例对象 + * @return 实例对象 + */ + UsedMessage update(UsedMessage usedMessage); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/UsedProductCommentService.java b/marketservice/src/main/java/com/woniu/service/UsedProductCommentService.java new file mode 100644 index 0000000000000000000000000000000000000000..1a8cafff3e7c0884445aa892404cca84be866f1a --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/UsedProductCommentService.java @@ -0,0 +1,55 @@ +package com.woniu.service; + +import com.woniu.entity.UsedProductComment; +import java.util.List; + +/** + * 商品评价表(UsedProductComment)表服务接口 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public interface UsedProductCommentService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProductComment queryById(Integer id); + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(int offset, int limit); + + /** + * 新增数据 + * + * @param usedProductComment 实例对象 + * @return 实例对象 + */ + UsedProductComment insert(UsedProductComment usedProductComment); + + /** + * 修改数据 + * + * @param usedProductComment 实例对象 + * @return 实例对象 + */ + UsedProductComment update(UsedProductComment usedProductComment); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/UsedProductImgsService.java b/marketservice/src/main/java/com/woniu/service/UsedProductImgsService.java new file mode 100644 index 0000000000000000000000000000000000000000..3a91a0160b29a3c47e48e718af436bedc485b9fa --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/UsedProductImgsService.java @@ -0,0 +1,55 @@ +package com.woniu.service; + +import com.woniu.entity.UsedProductImgs; +import java.util.List; + +/** + * 商品图片表(UsedProductImgs)表服务接口 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +public interface UsedProductImgsService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProductImgs queryById(Integer id); + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(int offset, int limit); + + /** + * 新增数据 + * + * @param usedProductImgs 实例对象 + * @return 实例对象 + */ + UsedProductImgs insert(UsedProductImgs usedProductImgs); + + /** + * 修改数据 + * + * @param usedProductImgs 实例对象 + * @return 实例对象 + */ + UsedProductImgs update(UsedProductImgs usedProductImgs); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/UsedProductService.java b/marketservice/src/main/java/com/woniu/service/UsedProductService.java new file mode 100644 index 0000000000000000000000000000000000000000..9ca605b62a9ecc880e2133c91679c234882ff8b8 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/UsedProductService.java @@ -0,0 +1,56 @@ +package com.woniu.service; + +import com.woniu.entity.UsedProduct; +import java.util.List; + +/** + * 二手商品表(UsedProduct)表服务接口 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +public interface UsedProductService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProduct queryById(Integer id); + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(int offset, int limit); + + /** + * 新增数据 + * + * @param usedProduct 实例对象 + * @return 实例对象 + */ + UsedProduct insert(UsedProduct usedProduct); + + /** + * 修改数据 + * + * @param usedProduct 实例对象 + * @return 实例对象 + */ + UsedProduct update(UsedProduct usedProduct); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + + List findAllByTypeId(Integer typeId); +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/UsedProductTypeService.java b/marketservice/src/main/java/com/woniu/service/UsedProductTypeService.java new file mode 100644 index 0000000000000000000000000000000000000000..564f6989b7007fd7780c1dbe8966194c4b31012e --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/UsedProductTypeService.java @@ -0,0 +1,56 @@ +package com.woniu.service; + +import com.woniu.entity.UsedProductType; +import java.util.List; + +/** + * 商品类型表(UsedProductType)表服务接口 + * + * @author makejava + * @since 2020-03-23 09:48:22 + */ +public interface UsedProductTypeService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + UsedProductType queryById(Integer id); + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + List queryAllByLimit(int offset, int limit); + + /** + * 新增数据 + * + * @param usedProductType 实例对象 + * @return 实例对象 + */ + UsedProductType insert(UsedProductType usedProductType); + + /** + * 修改数据 + * + * @param usedProductType 实例对象 + * @return 实例对象 + */ + UsedProductType update(UsedProductType usedProductType); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + + List findAll(); +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/impl/AreainfoServiceImpl.java b/marketservice/src/main/java/com/woniu/service/impl/AreainfoServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..d644a363da026a62671a7948b695eed7d52d65da --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/impl/AreainfoServiceImpl.java @@ -0,0 +1,79 @@ +package com.woniu.service.impl; + +import com.woniu.entity.Areainfo; +import com.woniu.dao.AreainfoDao; +import com.woniu.service.AreainfoService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 小区信息表(Areainfo)表服务实现类 + * + * @author makejava + * @since 2020-03-23 10:45:05 + */ +@Service("areainfoService") +public class AreainfoServiceImpl implements AreainfoService { + @Resource + private AreainfoDao areainfoDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public Areainfo queryById(Integer id) { + return this.areainfoDao.queryById(id); + } + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + @Override + public List queryAllByLimit(int offset, int limit) { + return this.areainfoDao.queryAllByLimit(offset, limit); + } + + /** + * 新增数据 + * + * @param areainfo 实例对象 + * @return 实例对象 + */ + @Override + public Areainfo insert(Areainfo areainfo) { + this.areainfoDao.insert(areainfo); + return areainfo; + } + + /** + * 修改数据 + * + * @param areainfo 实例对象 + * @return 实例对象 + */ + @Override + public Areainfo update(Areainfo areainfo) { + this.areainfoDao.update(areainfo); + return this.queryById(areainfo.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.areainfoDao.deleteById(id) > 0; + } +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/impl/PersonUserServiceImpl.java b/marketservice/src/main/java/com/woniu/service/impl/PersonUserServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..08a70377c893a2d9042c1c610e10077b35b6b612 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/impl/PersonUserServiceImpl.java @@ -0,0 +1,84 @@ +package com.woniu.service.impl; + +import com.woniu.entity.PersonUser; +import com.woniu.dao.PersonUserDao; +import com.woniu.service.PersonUserService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * (PersonUser)表服务实现类 + * + * @author makejava + * @since 2020-03-23 10:44:40 + */ +@Service("personUserService") +public class PersonUserServiceImpl implements PersonUserService { + @Resource + private PersonUserDao personUserDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public PersonUser queryById(Integer id) { + return this.personUserDao.queryById(id); + } + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + @Override + public List queryAllByLimit(int offset, int limit) { + return this.personUserDao.queryAllByLimit(offset, limit); + } + + /** + * 新增数据 + * + * @param personUser 实例对象 + * @return 实例对象 + */ + @Override + public PersonUser insert(PersonUser personUser) { + this.personUserDao.insert(personUser); + return personUser; + } + + /** + * 修改数据 + * + * @param personUser 实例对象 + * @return 实例对象 + */ + @Override + public PersonUser update(PersonUser personUser) { + this.personUserDao.update(personUser); + return this.queryById(personUser.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.personUserDao.deleteById(id) > 0; + } + + @Override + public Integer findPlotIdByUserId(Integer userId) { + return personUserDao.findPlotIdByUserId(userId); + } +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/impl/UsedMessageServiceImpl.java b/marketservice/src/main/java/com/woniu/service/impl/UsedMessageServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..f9f324d582688b477e75790a9462614cff653a48 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/impl/UsedMessageServiceImpl.java @@ -0,0 +1,79 @@ +package com.woniu.service.impl; + +import com.woniu.entity.UsedMessage; +import com.woniu.dao.UsedMessageDao; +import com.woniu.service.UsedMessageService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 二手商品聊天表(UsedMessage)表服务实现类 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +@Service("usedMessageService") +public class UsedMessageServiceImpl implements UsedMessageService { + @Resource + private UsedMessageDao usedMessageDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public UsedMessage queryById(Integer id) { + return this.usedMessageDao.queryById(id); + } + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + @Override + public List queryAllByLimit(int offset, int limit) { + return this.usedMessageDao.queryAllByLimit(offset, limit); + } + + /** + * 新增数据 + * + * @param usedMessage 实例对象 + * @return 实例对象 + */ + @Override + public UsedMessage insert(UsedMessage usedMessage) { + this.usedMessageDao.insert(usedMessage); + return usedMessage; + } + + /** + * 修改数据 + * + * @param usedMessage 实例对象 + * @return 实例对象 + */ + @Override + public UsedMessage update(UsedMessage usedMessage) { + this.usedMessageDao.update(usedMessage); + return this.queryById(usedMessage.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.usedMessageDao.deleteById(id) > 0; + } +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/impl/UsedProductCommentServiceImpl.java b/marketservice/src/main/java/com/woniu/service/impl/UsedProductCommentServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..72a8163897cdcde8a06a4f5bdf2bac383d7350f2 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/impl/UsedProductCommentServiceImpl.java @@ -0,0 +1,79 @@ +package com.woniu.service.impl; + +import com.woniu.entity.UsedProductComment; +import com.woniu.dao.UsedProductCommentDao; +import com.woniu.service.UsedProductCommentService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 商品评价表(UsedProductComment)表服务实现类 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +@Service("usedProductCommentService") +public class UsedProductCommentServiceImpl implements UsedProductCommentService { + @Resource + private UsedProductCommentDao usedProductCommentDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public UsedProductComment queryById(Integer id) { + return this.usedProductCommentDao.queryById(id); + } + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + @Override + public List queryAllByLimit(int offset, int limit) { + return this.usedProductCommentDao.queryAllByLimit(offset, limit); + } + + /** + * 新增数据 + * + * @param usedProductComment 实例对象 + * @return 实例对象 + */ + @Override + public UsedProductComment insert(UsedProductComment usedProductComment) { + this.usedProductCommentDao.insert(usedProductComment); + return usedProductComment; + } + + /** + * 修改数据 + * + * @param usedProductComment 实例对象 + * @return 实例对象 + */ + @Override + public UsedProductComment update(UsedProductComment usedProductComment) { + this.usedProductCommentDao.update(usedProductComment); + return this.queryById(usedProductComment.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.usedProductCommentDao.deleteById(id) > 0; + } +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/impl/UsedProductImgsServiceImpl.java b/marketservice/src/main/java/com/woniu/service/impl/UsedProductImgsServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..fedf453c5e39555f6a8ecb8a95c5ac000a93ce09 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/impl/UsedProductImgsServiceImpl.java @@ -0,0 +1,79 @@ +package com.woniu.service.impl; + +import com.woniu.entity.UsedProductImgs; +import com.woniu.dao.UsedProductImgsDao; +import com.woniu.service.UsedProductImgsService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 商品图片表(UsedProductImgs)表服务实现类 + * + * @author makejava + * @since 2020-03-23 09:48:24 + */ +@Service("usedProductImgsService") +public class UsedProductImgsServiceImpl implements UsedProductImgsService { + @Resource + private UsedProductImgsDao usedProductImgsDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public UsedProductImgs queryById(Integer id) { + return this.usedProductImgsDao.queryById(id); + } + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + @Override + public List queryAllByLimit(int offset, int limit) { + return this.usedProductImgsDao.queryAllByLimit(offset, limit); + } + + /** + * 新增数据 + * + * @param usedProductImgs 实例对象 + * @return 实例对象 + */ + @Override + public UsedProductImgs insert(UsedProductImgs usedProductImgs) { + this.usedProductImgsDao.insert(usedProductImgs); + return usedProductImgs; + } + + /** + * 修改数据 + * + * @param usedProductImgs 实例对象 + * @return 实例对象 + */ + @Override + public UsedProductImgs update(UsedProductImgs usedProductImgs) { + this.usedProductImgsDao.update(usedProductImgs); + return this.queryById(usedProductImgs.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.usedProductImgsDao.deleteById(id) > 0; + } +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/impl/UsedProductServiceImpl.java b/marketservice/src/main/java/com/woniu/service/impl/UsedProductServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..40b64193113ca6fa1b064b8f6ddd1214ccc9d3e0 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/impl/UsedProductServiceImpl.java @@ -0,0 +1,84 @@ +package com.woniu.service.impl; + +import com.woniu.entity.UsedProduct; +import com.woniu.dao.UsedProductDao; +import com.woniu.service.UsedProductService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 二手商品表(UsedProduct)表服务实现类 + * + * @author makejava + * @since 2020-03-23 09:48:25 + */ +@Service("usedProductService") +public class UsedProductServiceImpl implements UsedProductService { + @Resource + private UsedProductDao usedProductDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public UsedProduct queryById(Integer id) { + return this.usedProductDao.queryById(id); + } + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + @Override + public List queryAllByLimit(int offset, int limit) { + return this.usedProductDao.queryAllByLimit(offset, limit); + } + + /** + * 新增数据 + * + * @param usedProduct 实例对象 + * @return 实例对象 + */ + @Override + public UsedProduct insert(UsedProduct usedProduct) { + this.usedProductDao.insert(usedProduct); + return usedProduct; + } + + /** + * 修改数据 + * + * @param usedProduct 实例对象 + * @return 实例对象 + */ + @Override + public UsedProduct update(UsedProduct usedProduct) { + this.usedProductDao.update(usedProduct); + return this.queryById(usedProduct.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.usedProductDao.deleteById(id) > 0; + } + + @Override + public List findAllByTypeId(Integer typeId) { + return usedProductDao.findAllByTypeId(typeId); + } +} \ No newline at end of file diff --git a/marketservice/src/main/java/com/woniu/service/impl/UsedProductTypeServiceImpl.java b/marketservice/src/main/java/com/woniu/service/impl/UsedProductTypeServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..7dc7da3b23e2f029e3369c08a68b2fafc9fa1681 --- /dev/null +++ b/marketservice/src/main/java/com/woniu/service/impl/UsedProductTypeServiceImpl.java @@ -0,0 +1,84 @@ +package com.woniu.service.impl; + +import com.woniu.entity.UsedProductType; +import com.woniu.dao.UsedProductTypeDao; +import com.woniu.service.UsedProductTypeService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 商品类型表(UsedProductType)表服务实现类 + * + * @author makejava + * @since 2020-03-23 09:48:23 + */ +@Service("usedProductTypeService") +public class UsedProductTypeServiceImpl implements UsedProductTypeService { + @Resource + private UsedProductTypeDao usedProductTypeDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public UsedProductType queryById(Integer id) { + return this.usedProductTypeDao.queryById(id); + } + + /** + * 查询多条数据 + * + * @param offset 查询起始位置 + * @param limit 查询条数 + * @return 对象列表 + */ + @Override + public List queryAllByLimit(int offset, int limit) { + return this.usedProductTypeDao.queryAllByLimit(offset, limit); + } + + /** + * 新增数据 + * + * @param usedProductType 实例对象 + * @return 实例对象 + */ + @Override + public UsedProductType insert(UsedProductType usedProductType) { + this.usedProductTypeDao.insert(usedProductType); + return usedProductType; + } + + /** + * 修改数据 + * + * @param usedProductType 实例对象 + * @return 实例对象 + */ + @Override + public UsedProductType update(UsedProductType usedProductType) { + this.usedProductTypeDao.update(usedProductType); + return this.queryById(usedProductType.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.usedProductTypeDao.deleteById(id) > 0; + } + + @Override + public List findAll() { + return usedProductTypeDao.findAll(); + } +} \ No newline at end of file diff --git a/marketservice/src/main/resources/application.yml b/marketservice/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..d957fc7cbf35b6387615b8b2aa5900b5b37a9fbb --- /dev/null +++ b/marketservice/src/main/resources/application.yml @@ -0,0 +1,44 @@ +server: + port: 8999 +spring: + application: + name: marketservice + datasource: + password: 20200322 + username: develop + url: jdbc:mysql://106.12.148.100:3307/happycommunity?useUnicode=true&characterEncoding=utf-8&useSSL=false + driver-class-name: com.mysql.jdbc.Driver + redis: + password: Yh496989943 + jedis: + pool: + max-active: 1000 + max-idle: 10 + max-wait: 1000ms + sentinel: + master: mymaster + nodes: 47.99.241.119:26379,47.99.241.119:26380,47.99.241.119:26381 + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 +# rabbitmq: +# host: 47.99.241.119 +# port: 5672 +# username: admin +# password: admin +# virtual-host: /used +# listener: +# simple: +# acknowledge-mode: manual +# prefetch: 10 +eureka: + client: + service-url: + defaultZone: http://localhost:8761/eureka +mybatis: + mapper-locations: classpath:mapper/*.xml + configuration: + map-underscore-to-camel-case: true +logging: + level: + com.woniu.dao: debug diff --git a/marketservice/src/main/resources/mapper/AreainfoDao.xml b/marketservice/src/main/resources/mapper/AreainfoDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..a309402945b64e3d1b29ca7c57c58fd4cae222c4 --- /dev/null +++ b/marketservice/src/main/resources/mapper/AreainfoDao.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + insert into happycommunity.areainfo(area_name, area_address, detail1) + values (#{areaName}, #{areaAddress}, #{detail1}) + + + + + update happycommunity.areainfo + + + area_name = #{areaName}, + + + area_address = #{areaAddress}, + + + detail1 = #{detail1}, + + + where id = #{id} + + + + + delete from happycommunity.areainfo where id = #{id} + + + \ No newline at end of file diff --git a/marketservice/src/main/resources/mapper/PersonUserDao.xml b/marketservice/src/main/resources/mapper/PersonUserDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..a6534dab72250fe3cce5221d7211d1bb86ee4fae --- /dev/null +++ b/marketservice/src/main/resources/mapper/PersonUserDao.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into happycommunity.person_user(id_number, cell_ph_number, password, name, sex, nickname, mailbox, plot_id, tag, mailbox_status, code, password_salt, create_time) + values (#{idNumber}, #{cellPhNumber}, #{password}, #{name}, #{sex}, #{nickname}, #{mailbox}, #{plotId}, #{tag}, #{mailboxStatus}, #{code}, #{passwordSalt}, #{createTime}) + + + + + update happycommunity.person_user + + + id_number = #{idNumber}, + + + cell_ph_number = #{cellPhNumber}, + + + password = #{password}, + + + name = #{name}, + + + sex = #{sex}, + + + nickname = #{nickname}, + + + mailbox = #{mailbox}, + + + plot_id = #{plotId}, + + + tag = #{tag}, + + + mailbox_status = #{mailboxStatus}, + + + code = #{code}, + + + password_salt = #{passwordSalt}, + + + create_time = #{createTime}, + + + where id = #{id} + + + + + delete from happycommunity.person_user where id = #{id} + + + \ No newline at end of file diff --git a/marketservice/src/main/resources/mapper/UsedMessageDao.xml b/marketservice/src/main/resources/mapper/UsedMessageDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..a28120cfbbdaed4a9b089ccb0f4a08980bf3cebb --- /dev/null +++ b/marketservice/src/main/resources/mapper/UsedMessageDao.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + insert into happycommunity.used_message(userone_id, usertwo_id, message, create_time, current_user_id, product_id) + values (#{useroneId}, #{usertwoId}, #{message}, #{createTime}, #{currentUserId}, #{productId}) + + + + + update happycommunity.used_message + + + userone_id = #{useroneId}, + + + usertwo_id = #{usertwoId}, + + + message = #{message}, + + + create_time = #{createTime}, + + + current_user_id = #{currentUserId}, + + + product_id = #{productId}, + + + where id = #{id} + + + + + delete from happycommunity.used_message where id = #{id} + + + \ No newline at end of file diff --git a/marketservice/src/main/resources/mapper/UsedProductCommentDao.xml b/marketservice/src/main/resources/mapper/UsedProductCommentDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..2d263fda3f88a12511262d6e950291179e901124 --- /dev/null +++ b/marketservice/src/main/resources/mapper/UsedProductCommentDao.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + insert into happycommunity.used_product_comment(product_id, user_id, comment, comment_time, start, number) + values (#{productId}, #{userId}, #{comment}, #{commentTime}, #{start}, #{number}) + + + + + update happycommunity.used_product_comment + + + product_id = #{productId}, + + + user_id = #{userId}, + + + comment = #{comment}, + + + comment_time = #{commentTime}, + + + start = #{start}, + + + number = #{number}, + + + where id = #{id} + + + + + delete from happycommunity.used_product_comment where id = #{id} + + + \ No newline at end of file diff --git a/marketservice/src/main/resources/mapper/UsedProductDao.xml b/marketservice/src/main/resources/mapper/UsedProductDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..ac575011afcc7e8f95ed648ef0b5497274e3c625 --- /dev/null +++ b/marketservice/src/main/resources/mapper/UsedProductDao.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into happycommunity.used_product(user_id, merchant_id, community_id, product_name, product_details, buying_price, sselling_price, number, status, product_type_id, product_type_name, creat_time, last_time, deliver_method) + values (#{userId}, #{merchantId}, #{communityId}, #{productName}, #{productDetails}, #{buyingPrice}, #{ssellingPrice}, #{number}, #{status}, #{productTypeId}, #{productTypeName}, #{creatTime}, #{lastTime}, #{deliverMethod}) + + + + + update happycommunity.used_product + + + user_id = #{userId}, + + + merchant_id = #{merchantId}, + + + community_id = #{communityId}, + + + product_name = #{productName}, + + + product_details = #{productDetails}, + + + buying_price = #{buyingPrice}, + + + sselling_price = #{ssellingPrice}, + + + number = #{number}, + + + status = #{status}, + + + product_type_id = #{productTypeId}, + + + product_type_name = #{productTypeName}, + + + creat_time = #{creatTime}, + + + last_time = #{lastTime}, + + + deliver_method = #{deliverMethod}, + + + where id = #{id} + + + + + delete from happycommunity.used_product where id = #{id} + + + \ No newline at end of file diff --git a/marketservice/src/main/resources/mapper/UsedProductImgsDao.xml b/marketservice/src/main/resources/mapper/UsedProductImgsDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..af3df2ca488623fa6df9909ac88a53150d96b1c9 --- /dev/null +++ b/marketservice/src/main/resources/mapper/UsedProductImgsDao.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + insert into happycommunity.used_product_imgs(product_id, img_url) + values (#{productId}, #{imgUrl}) + + + + + update happycommunity.used_product_imgs + + + product_id = #{productId}, + + + img_url = #{imgUrl}, + + + where id = #{id} + + + + + delete from happycommunity.used_product_imgs where id = #{id} + + + \ No newline at end of file diff --git a/marketservice/src/main/resources/mapper/UsedProductTypeDao.xml b/marketservice/src/main/resources/mapper/UsedProductTypeDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..bc72285aed9c72bf38019a7345e19c833152f747 --- /dev/null +++ b/marketservice/src/main/resources/mapper/UsedProductTypeDao.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + insert into happycommunity.used_product_type(product_id, type_name) + values (#{productId}, #{typeName}) + + + + + update happycommunity.used_product_type + + + product_id = #{productId}, + + + type_name = #{typeName}, + + + where id = #{id} + + + + + delete from happycommunity.used_product_type where id = #{id} + + + \ No newline at end of file diff --git a/marketservice/src/test/java/com/woniu/MarketserviceApplicationTests.java b/marketservice/src/test/java/com/woniu/MarketserviceApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..38ba493b787e70048a945575800965e0de84b86b --- /dev/null +++ b/marketservice/src/test/java/com/woniu/MarketserviceApplicationTests.java @@ -0,0 +1,13 @@ +package com.woniu; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class MarketserviceApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/pccenter/.gitignore b/pccenter/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..77e3d03cb8fb0cae9c3024c3266456e8a169994f --- /dev/null +++ b/pccenter/.gitignore @@ -0,0 +1,32 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ +.mvn/* \ No newline at end of file diff --git a/pccenter/pom.xml b/pccenter/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..2e5cc4826e4a2a5bff8fd7b38af0faad06d47481 --- /dev/null +++ b/pccenter/pom.xml @@ -0,0 +1,152 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + com.team7.happycommunity + pccenter + 1 + pccenter + Demo project for Spring Boot + + + 1.8 + Hoxton.SR3 + + + + + org.springframework.boot + spring-boot-starter-amqp + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.2 + + + org.springframework.cloud + spring-cloud-starter-config + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + mysql + mysql-connector-java + runtime + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + org.springframework.amqp + spring-rabbit-test + test + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.2.10 + + + + org.apache.shiro + shiro-spring-boot-web-starter + 1.4.1 + + + + com.github.theborakompanioni + thymeleaf-extras-shiro + 2.0.0 + + + + org.aspectj + aspectjweaver + 1.9.5 + + + + com.alibaba + druid-spring-boot-starter + 1.1.18 + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + ${basedir}/src/main/resources/generatorConfig.xml + + + + mysql + mysql-connector-java + 5.1.47 + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/pccenter/src/main/java/com/woniu/PccenterApplication.java b/pccenter/src/main/java/com/woniu/PccenterApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..8bf7ea7f8c770370ca8f92ebd3ebb2ed4bb95d7c --- /dev/null +++ b/pccenter/src/main/java/com/woniu/PccenterApplication.java @@ -0,0 +1,15 @@ +package com.woniu; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +@MapperScan(value = "com.woniu.dao") +public class PccenterApplication { + + public static void main(String[] args) { + SpringApplication.run(PccenterApplication.class, args); + } + +} diff --git a/pccenter/src/main/java/com/woniu/common/CommonResult.java b/pccenter/src/main/java/com/woniu/common/CommonResult.java new file mode 100644 index 0000000000000000000000000000000000000000..f4fe65effa3522956c805c49d37c1bb55bcd99d0 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/common/CommonResult.java @@ -0,0 +1,104 @@ +package com.woniu.common; + +import javax.xml.crypto.Data; +import java.io.Serializable; + +public class CommonResult implements Serializable { + + //状态码 + private Long code; + //提示消息 + private String message; + //响应数据 + private T data; + + public CommonResult(){} + public CommonResult(Long code,String message){ + this.code = code; + this.message = message; + } + + public CommonResult(Long code ,String message,T data){ + this.code = code; + this.message = message; + this.data = data; + } + + /** + * 响应成功的结果 + * @return 状态码 200 + */ + public static CommonResult success(){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),ResultUtil.SUCCESS.getMessage()); + } + + public static CommonResult success(String message){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),message); + } + + public static CommonResult success(T data){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),ResultUtil.SUCCESS.getMessage(),data); + } + public static CommonResult success(String message,T data){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),message,data); + } + + /** + * 响应失败 + * @return 状态码500 + */ + public static CommonResult failed(){ + return new CommonResult(ResultUtil.FAILED.getCode(),ResultUtil.FAILED.getMessage()); + } + + public static CommonResult failed(String message){ + return new CommonResult(ResultUtil.FAILED.getCode(),message); + } + /** + * 参数验证失败 + * @return 状态码 400 + */ + public static CommonResult valetateFailed(){ + return new CommonResult(ResultUtil.VALIDATE_FAILED.getCode(),ResultUtil.VALIDATE_FAILED.getMessage()); + } + + /** + * 未认证 + * @return 状态码401 + */ + public static CommonResult unathorizedFailed(){ + return new CommonResult(ResultUtil.UNAUTORIED.getCode(), ResultUtil.UNAUTORIED.getMessage()); + } + + /** + * 未授权 + * @return 状态码403 + */ + public static CommonResult forbiddenFailed(){ + return new CommonResult(ResultUtil.FORBIDDEN.getCode(),ResultUtil.FORBIDDEN.getMessage()); + } + + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } +} diff --git a/pccenter/src/main/java/com/woniu/common/ResultUtil.java b/pccenter/src/main/java/com/woniu/common/ResultUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..36aabc043f22423b6de11eba73462e628458a092 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/common/ResultUtil.java @@ -0,0 +1,32 @@ +package com.woniu.common; + +public enum ResultUtil { + SUCCESS(200L,"操作成功"), + FAILED(500L,"操作失败"), + VALIDATE_FAILED(400L,"参数验证失败"), + UNAUTORIED(401L,"未认证或token过期"), + FORBIDDEN(403L,"未授权"); + private Long code; + private String message; + + private ResultUtil(Long code,String message){ + this.code = code; + this.message = message; + } + + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/pccenter/src/main/java/com/woniu/config/ShiroConfig.java b/pccenter/src/main/java/com/woniu/config/ShiroConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..adaa03d167ab1148d2b4c758f0907a904a6c775d --- /dev/null +++ b/pccenter/src/main/java/com/woniu/config/ShiroConfig.java @@ -0,0 +1,88 @@ +package com.woniu.config; + +import at.pollux.thymeleaf.shiro.dialect.ShiroDialect; +import com.woniu.realm.CustomRealm; +import org.apache.shiro.authc.credential.HashedCredentialsMatcher; +import org.apache.shiro.cache.MemoryConstrainedCacheManager; +import org.apache.shiro.spring.web.ShiroFilterFactoryBean; +import org.apache.shiro.web.mgt.CookieRememberMeManager; +import org.apache.shiro.web.mgt.DefaultWebSecurityManager; +import org.apache.shiro.web.servlet.SimpleCookie; +import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.LinkedHashMap; +import java.util.Map; + +@Configuration +public class ShiroConfig { + + @Bean + public CustomRealm customRealm(HashedCredentialsMatcher credentialsMatcher, MemoryConstrainedCacheManager cacheManager) { + CustomRealm customRealm = new CustomRealm(); + customRealm.setCredentialsMatcher(credentialsMatcher); + customRealm.setCacheManager(cacheManager); + return customRealm; + } + + @Bean + public DefaultWebSecurityManager securityManager(CustomRealm customRealm, CookieRememberMeManager rememberMeManager) { + DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); + securityManager.setRealm(customRealm); + securityManager.setRememberMeManager(rememberMeManager); + return securityManager; + } + + @Bean + public ShiroFilterFactoryBean shiroFilterFactoryBean(DefaultWebSecurityManager securityManager) { + ShiroFilterFactoryBean filterFactoryBean = new ShiroFilterFactoryBean(); + filterFactoryBean.setSecurityManager(securityManager); + filterFactoryBean.setUnauthorizedUrl("/403"); + filterFactoryBean.setLoginUrl("/login"); + Map map = new LinkedHashMap(); + map.put("/login", "anon");//访问登录 + map.put("/admin/subLogin", "anon"); + map.put("/src/**", "anon"); + map.put("/admin/list","perms[sys:admin:list]"); + map.put("/**", "authc"); + filterFactoryBean.setFilterChainDefinitionMap(map); + return filterFactoryBean; + } + + @Bean + public HashedCredentialsMatcher credentialsMatcher() { + HashedCredentialsMatcher credentialsMatcher = new HashedCredentialsMatcher(); + credentialsMatcher.setHashAlgorithmName("md5"); + credentialsMatcher.setHashIterations(1024); + return credentialsMatcher; + } + + @Bean + public MemoryConstrainedCacheManager cacheManager() { + return new MemoryConstrainedCacheManager(); + } + + @Bean //thymeleaf整合shiro;支持 shiro标签 + public ShiroDialect shiroDialect() { + return new ShiroDialect(); + } + + @Bean + public CookieRememberMeManager rememberMeManager(SimpleCookie cookie) { + CookieRememberMeManager rememberMeManager = new CookieRememberMeManager(); + rememberMeManager.setCookie(cookie); + return rememberMeManager; + } + + @Bean + public SimpleCookie simpleCookie() { + SimpleCookie cookie = new SimpleCookie(); + cookie.setName("rememberMe"); + cookie.setMaxAge(1800); + return cookie; + } + + + +} diff --git a/pccenter/src/main/java/com/woniu/config/WebMvcConfig.java b/pccenter/src/main/java/com/woniu/config/WebMvcConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..4e12a6ccab8d27c3ebc56653bd46c001a6402a61 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/config/WebMvcConfig.java @@ -0,0 +1,19 @@ +package com.woniu.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebMvcConfig implements WebMvcConfigurer { + @Override + public void addViewControllers(ViewControllerRegistry registry) { + registry.addViewController("sys/adminList").setViewName("/sys/adminList"); + registry.addViewController("/").setViewName("/login"); + registry.addViewController("login").setViewName("/login"); + registry.addViewController("sys/index").setViewName("/sys/index"); + registry.addViewController("sys/main").setViewName("/sys/main"); + registry.addViewController("sys/roleList").setViewName("/sys/roleList"); + registry.addViewController("sys/addRole").setViewName("/sys/addRole"); + } +} diff --git a/pccenter/src/main/java/com/woniu/controller/AdminController.java b/pccenter/src/main/java/com/woniu/controller/AdminController.java new file mode 100644 index 0000000000000000000000000000000000000000..1f8ac6130e65db298aaf831e40ef0a086ca09245 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/AdminController.java @@ -0,0 +1,199 @@ +package com.woniu.controller; + + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.pojo.Admin; +import com.woniu.pojo.Roles; +import com.woniu.service.AdminService; +import com.woniu.service.RolesService; +import org.apache.shiro.SecurityUtils; +import org.apache.shiro.authc.AuthenticationException; +import org.apache.shiro.authc.IncorrectCredentialsException; +import org.apache.shiro.authc.UnknownAccountException; +import org.apache.shiro.authc.UsernamePasswordToken; +import org.apache.shiro.subject.Subject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + + +@Controller +@RequestMapping("/admin") +public class AdminController { + + @Autowired + private AdminService adminService; + + @Autowired + private RolesService rolesService; + + /** + * 分页查询管理员列表的数据 + * @param currentPage + * @param pageSize + * @return + */ + @RequestMapping("/list") + @ResponseBody + public CommonResult list(@RequestParam(value = "page",defaultValue = "1",required = false) Integer currentPage, + @RequestParam(value = "limit",defaultValue = "10",required = false)Integer pageSize){ + PageInfo info=null; + try { + //根据传入的分页参数查询admin表的数据 + List list = adminService.findAdminByPage(currentPage,pageSize); + //查询结果放入info中 + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + + } + /** + * 导航到添加页面 + * @param modelAndView + * @return + */ + @RequestMapping("/addAdmin") + public ModelAndView addAdmin(ModelAndView modelAndView){ + List roles = rolesService.findAll(); + modelAndView.addObject("roles",roles); + modelAndView.setViewName("/sys/addAdmin"); + return modelAndView; + } + + /** + * 添加管理员 + * @param admin + * @return + */ + @PostMapping("/saveAdmin") + @ResponseBody + public CommonResult saveAdmin(Admin admin){ + + //验证用户名是否重复 + Admin dbAdmin = adminService.checkName(admin); + if(dbAdmin != null){ + return CommonResult.failed("该用户名已经存在"); + } + try { + adminService.saveAdmin(admin); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("添加失败"); + } + return CommonResult.success("添加成功"); + } + + /** + * 批量删除 + * @param keys + * @return + */ + @DeleteMapping("/delAdmin/{keys}") + @ResponseBody + public CommonResult delAdmin(@PathVariable("keys") String keys){ + List list = Arrays.stream(keys.split(",")).map(s->Long.parseLong(s)).collect(Collectors.toList()); + try { + adminService.batchDel(list); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("删除失败"); + } + return CommonResult.success("删除成功"); + } + + /** + * 导航到编辑页面 + * @return + */ + @RequestMapping("/editAdmin/{id}") + public ModelAndView editAdmin(@PathVariable("id")Integer id){ + Admin admin = adminService.findById(id); + ModelAndView modelAndView = new ModelAndView("/sys/editAdmin"); + modelAndView.addObject("admin",admin); + //查询角色列表 + List roles = rolesService.findAll(); + modelAndView.addObject("roles",roles); + return modelAndView; + } + + /** + * 更新管理员 + * @return + */ + @PutMapping("/updateAdmin") + @ResponseBody + public CommonResult updateAdmin(Admin admin){ + Admin dbAdmin = adminService.checkName(admin); + if (dbAdmin != null) { + if(!dbAdmin.getId().equals(admin.getId())){ + return CommonResult.failed("该用户名已经存在"); + } + } + try { + adminService.updateAdmin(admin); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("更新失败"); + } + return CommonResult.success("更新成功"); + } + + /** + * 删除管理员 + * @return + */ + @DeleteMapping("/deleteAdmin/{id}") + @ResponseBody + public CommonResult deleteAdmin(@PathVariable("id")Integer id){ + try { + adminService.deleteById(id); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("删除失败"); + } + return CommonResult.success("删除成功"); + } + + + + + //平台管理员登录 + @PostMapping("/subLogin") + @ResponseBody + public CommonResult subLogin(Admin admin){ + if(StringUtils.isEmpty(admin.getUsername())){ + return CommonResult.failed("用户名不能为空"); + } + if(StringUtils.isEmpty(admin.getPassword())){ + return CommonResult.failed("密码不能为空"); + } + Subject subject = SecurityUtils.getSubject(); + UsernamePasswordToken token = new UsernamePasswordToken(admin.getUsername(),admin.getPassword()); + try { + subject.login(token); + } catch (UnknownAccountException e) { + e.printStackTrace(); + return CommonResult.failed("账号不存在"); + }catch (IncorrectCredentialsException e) { + e.printStackTrace(); + return CommonResult.failed("账号或密码错误"); + }catch (AuthenticationException e) { + e.printStackTrace(); + return CommonResult.failed("认证失败"); + } + return CommonResult.success("登录成功"); + + } + + +} diff --git a/pccenter/src/main/java/com/woniu/dao/AdminMapper.java b/pccenter/src/main/java/com/woniu/dao/AdminMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..f13fc5e8871e0c8c2c67a60615f79ed6383cced3 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/AdminMapper.java @@ -0,0 +1,33 @@ +package com.woniu.dao; + +import com.woniu.pojo.Admin; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface AdminMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Admin record); + + int insertSelective(Admin record); + + Admin selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Admin record); + + int updateByPrimaryKey(Admin record); + + @Select("select * from pc_admin where username = #{username}") + Admin selectByUserName(String userName); + + List selectByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); + + void batchDel(List list); + + @Select("select * from pc_admin where role_id = #{value}") + List selectByRoleId(Integer roleId); + + List selectAdminByRoleId(List rolesId); +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dao/InformationMapper.java b/pccenter/src/main/java/com/woniu/dao/InformationMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..41e2c3df2a224efbc6693275ff6eb021aea5f96f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/InformationMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.Information; + +public interface InformationMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Information record); + + int insertSelective(Information record); + + Information selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Information record); + + int updateByPrimaryKey(Information record); +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dao/MenusMapper.java b/pccenter/src/main/java/com/woniu/dao/MenusMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..7d66df2f251ffa6ed33e1d976e23be3f1529953c --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/MenusMapper.java @@ -0,0 +1,23 @@ +package com.woniu.dao; + +import com.woniu.pojo.Menus; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface MenusMapper { + int deleteByPrimaryKey(Integer menuId); + + int insert(Menus record); + + int insertSelective(Menus record); + + Menus selectByPrimaryKey(Integer menuId); + + int updateByPrimaryKeySelective(Menus record); + + int updateByPrimaryKey(Menus record); + @Select("select perms from pc_menus m left join pc_roles_menus rm on m.menu_id = rm.menu_id left join " + + "pc_roles r on rm.role_id = r.role_id where r.role_id = #{value}") + List findPermsByRoles(Integer roleId); +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dao/RolesMapper.java b/pccenter/src/main/java/com/woniu/dao/RolesMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..b53bb8ea281d8ac18b4a3e10ac6798257db03e6e --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/RolesMapper.java @@ -0,0 +1,28 @@ +package com.woniu.dao; + +import com.woniu.pojo.Roles; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface RolesMapper { + int deleteByPrimaryKey(Integer roleId); + + int insert(Roles record); + + int insertSelective(Roles record); + + Roles selectByPrimaryKey(Integer roleId); + + int updateByPrimaryKeySelective(Roles record); + + int updateByPrimaryKey(Roles record); + + + @Select("select * from pc_roles") + List selectAll(); + + @Select("select * from pc_roles") + List selectByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dao/RolesMenusMapper.java b/pccenter/src/main/java/com/woniu/dao/RolesMenusMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..d46fb825c5f7cddb6afc395a858b12a1baaa9166 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/RolesMenusMapper.java @@ -0,0 +1,9 @@ +package com.woniu.dao; + +import com.woniu.pojo.RolesMenus; + +public interface RolesMenusMapper { + int insert(RolesMenus record); + + int insertSelective(RolesMenus record); +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dao/UsersMapper.java b/pccenter/src/main/java/com/woniu/dao/UsersMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..f9fbcb05b87dbcd11c3506fdf54fe1b26c06a894 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/UsersMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.Users; + +public interface UsersMapper { + int deleteByPrimaryKey(Integer uid); + + int insert(Users record); + + int insertSelective(Users record); + + Users selectByPrimaryKey(Integer uid); + + int updateByPrimaryKeySelective(Users record); + + int updateByPrimaryKey(Users record); +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/pojo/Admin.java b/pccenter/src/main/java/com/woniu/pojo/Admin.java new file mode 100644 index 0000000000000000000000000000000000000000..2ad2fe50ed24c2c17a5d9dd3f428d662f079c5cd --- /dev/null +++ b/pccenter/src/main/java/com/woniu/pojo/Admin.java @@ -0,0 +1,115 @@ +package com.woniu.pojo; + +import java.util.Date; + +public class Admin { + private Integer id; + + private String username; + + private String password; + + private String salt; + + private String fullname; + + private String email; + + private String sex; + + private Date birthday; + + private String address; + + private String phone; + + private Integer roleId; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSalt() { + return salt; + } + + public void setSalt(String salt) { + this.salt = salt; + } + + public String getFullname() { + return fullname; + } + + public void setFullname(String fullname) { + this.fullname = fullname; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public Date getBirthday() { + return birthday; + } + + public void setBirthday(Date birthday) { + this.birthday = birthday; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Integer getRoleId() { + return roleId; + } + + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/pojo/Information.java b/pccenter/src/main/java/com/woniu/pojo/Information.java new file mode 100644 index 0000000000000000000000000000000000000000..2f1c550ed63f67536b3cad7dd41853ebc0927bd5 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/pojo/Information.java @@ -0,0 +1,93 @@ +package com.woniu.pojo; + +public class Information { + private Integer id; + + private Integer account; + + private String password; + + private String name; + + private String nickname; + + private String roletype; + + private String stage; + + private Integer phone; + + private String adress; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getAccount() { + return account; + } + + public void setAccount(Integer account) { + this.account = account; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public String getRoletype() { + return roletype; + } + + public void setRoletype(String roletype) { + this.roletype = roletype; + } + + public String getStage() { + return stage; + } + + public void setStage(String stage) { + this.stage = stage; + } + + public Integer getPhone() { + return phone; + } + + public void setPhone(Integer phone) { + this.phone = phone; + } + + public String getAdress() { + return adress; + } + + public void setAdress(String adress) { + this.adress = adress; + } +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/pojo/Menus.java b/pccenter/src/main/java/com/woniu/pojo/Menus.java new file mode 100644 index 0000000000000000000000000000000000000000..d2499e51fbfc88b90314e8b134a9d91e79fbcedb --- /dev/null +++ b/pccenter/src/main/java/com/woniu/pojo/Menus.java @@ -0,0 +1,83 @@ +package com.woniu.pojo; + +public class Menus { + private Integer menuId; + + private String title; + + private String icon; + + private String href; + + private String perms; + + private String spread; + + private Integer parentId; + + private Integer sorting; + + public Integer getMenuId() { + return menuId; + } + + public void setMenuId(Integer menuId) { + this.menuId = menuId; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public String getPerms() { + return perms; + } + + public void setPerms(String perms) { + this.perms = perms; + } + + public String getSpread() { + return spread; + } + + public void setSpread(String spread) { + this.spread = spread; + } + + public Integer getParentId() { + return parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public Integer getSorting() { + return sorting; + } + + public void setSorting(Integer sorting) { + this.sorting = sorting; + } +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/pojo/Roles.java b/pccenter/src/main/java/com/woniu/pojo/Roles.java new file mode 100644 index 0000000000000000000000000000000000000000..f560464ff2da4e020a9987ad0368035a6f976d6e --- /dev/null +++ b/pccenter/src/main/java/com/woniu/pojo/Roles.java @@ -0,0 +1,33 @@ +package com.woniu.pojo; + +public class Roles { + private Integer roleId; + + private String roleName; + + private String roleRemark; + + public Integer getRoleId() { + return roleId; + } + + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } + + public String getRoleName() { + return roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public String getRoleRemark() { + return roleRemark; + } + + public void setRoleRemark(String roleRemark) { + this.roleRemark = roleRemark; + } +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/pojo/RolesMenus.java b/pccenter/src/main/java/com/woniu/pojo/RolesMenus.java new file mode 100644 index 0000000000000000000000000000000000000000..4a6169d6ed62712df1ac20f52642870a8dab79a0 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/pojo/RolesMenus.java @@ -0,0 +1,23 @@ +package com.woniu.pojo; + +public class RolesMenus { + private Integer menuId; + + private Integer roleId; + + public Integer getMenuId() { + return menuId; + } + + public void setMenuId(Integer menuId) { + this.menuId = menuId; + } + + public Integer getRoleId() { + return roleId; + } + + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/pojo/Users.java b/pccenter/src/main/java/com/woniu/pojo/Users.java new file mode 100644 index 0000000000000000000000000000000000000000..73ad250df14b70561c34b2a273fd43a1f05cf8e3 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/pojo/Users.java @@ -0,0 +1,93 @@ +package com.woniu.pojo; + +public class Users { + private Integer uid; + + private Integer account; + + private String name; + + private String password; + + private Integer phone; + + private String adress; + + private String status; + + private String nickname; + + private String roleType; + + public Integer getUid() { + return uid; + } + + public void setUid(Integer uid) { + this.uid = uid; + } + + public Integer getAccount() { + return account; + } + + public void setAccount(Integer account) { + this.account = account; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Integer getPhone() { + return phone; + } + + public void setPhone(Integer phone) { + this.phone = phone; + } + + public String getAdress() { + return adress; + } + + public void setAdress(String adress) { + this.adress = adress; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public String getRoleType() { + return roleType; + } + + public void setRoleType(String roleType) { + this.roleType = roleType; + } +} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/realm/CustomRealm.java b/pccenter/src/main/java/com/woniu/realm/CustomRealm.java new file mode 100644 index 0000000000000000000000000000000000000000..ae780f7b8e22ccacbd4280e0f0fffd691c3da9ba --- /dev/null +++ b/pccenter/src/main/java/com/woniu/realm/CustomRealm.java @@ -0,0 +1,53 @@ +package com.woniu.realm; + +import com.woniu.dao.AdminMapper; +import com.woniu.dao.MenusMapper; +import com.woniu.pojo.Admin; +import org.apache.shiro.authc.*; +import org.apache.shiro.authz.AuthorizationInfo; +import org.apache.shiro.authz.SimpleAuthorizationInfo; +import org.apache.shiro.realm.AuthorizingRealm; +import org.apache.shiro.subject.PrincipalCollection; +import org.apache.shiro.util.ByteSource; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 自定义域 + */ +public class CustomRealm extends AuthorizingRealm { + + @Autowired + private AdminMapper adminMapper; + + @Autowired + private MenusMapper menusMapper; + + @Override + protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { + //获取登录认证成功的主体 + Admin admin = (Admin)principals.getPrimaryPrincipal(); + //根据角色Id查询权限 + List perms = menusMapper.findPermsByRoles(admin.getRoleId()); + //对集合中的字符串做过滤处理,去除 空字符串及null + perms = perms.stream().filter(s->s != null && !s.isEmpty()).collect(Collectors.toList()); + SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); + info.addStringPermissions(perms); + return info; + } + + @Override + protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { + //获取通过subject提交的主体信息 + String userName = (String)token.getPrincipal(); + Admin admin = adminMapper.selectByUserName(userName); + if(admin == null){ + throw new UnknownAccountException("账号不存在"); + } + SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(admin,admin.getPassword(),ByteSource.Util.bytes(admin.getSalt()),super.getName()); + //info.setCredentialsSalt(ByteSource.Util.bytes(admin.getSalt())); + return info; + } +} diff --git a/pccenter/src/main/java/com/woniu/service/AdminService.java b/pccenter/src/main/java/com/woniu/service/AdminService.java new file mode 100644 index 0000000000000000000000000000000000000000..b856a28025c66b9487814cab74c4411d2549d536 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/AdminService.java @@ -0,0 +1,21 @@ +package com.woniu.service; + +import com.woniu.pojo.Admin; + +import java.util.List; + +public interface AdminService { + List findAdminByPage(Integer currentPage, Integer pageSize); + + void saveAdmin(Admin admin); + + void batchDel(List list); + + Admin findById(Integer id); + + Admin checkName(Admin admin); + + void updateAdmin(Admin admin); + + void deleteById(Integer id); +} diff --git a/pccenter/src/main/java/com/woniu/service/RolesService.java b/pccenter/src/main/java/com/woniu/service/RolesService.java new file mode 100644 index 0000000000000000000000000000000000000000..5bf9c0f85777b5f68d5ce57ca2821a3ee5b4bd03 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/RolesService.java @@ -0,0 +1,11 @@ +package com.woniu.service; + +import com.woniu.pojo.Roles; + +import java.util.List; + +public interface RolesService { + List findAll(); + + List findByPage(Integer currentPage, Integer pageSize); +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/AdminServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/AdminServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..6138c96c3012e5b3734fb59de20f68b5a419dbc5 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/AdminServiceImpl.java @@ -0,0 +1,52 @@ +package com.woniu.service.impl; + +import com.woniu.dao.AdminMapper; +import com.woniu.pojo.Admin; +import com.woniu.service.AdminService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class AdminServiceImpl implements AdminService { + + @Autowired + private AdminMapper adminMapper; + + @Override + public List findAdminByPage(Integer currentPage, Integer pageSize) { + + return adminMapper.selectByPage(currentPage, pageSize); + } + + @Override + public void saveAdmin(Admin admin) { + adminMapper.insertSelective(admin); + } + + @Override + public void batchDel(List list) { + adminMapper.batchDel(list); + } + + @Override + public Admin findById(Integer id) { + return adminMapper.selectByPrimaryKey(id); + } + + @Override + public Admin checkName(Admin admin) { + return adminMapper.selectByUserName(admin.getUsername()); + } + + @Override + public void updateAdmin(Admin admin) { + adminMapper.updateByPrimaryKeySelective(admin); + } + + @Override + public void deleteById(Integer id) { + adminMapper.deleteByPrimaryKey(id); + } +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/RolesServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/RolesServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..e68717253ae6f96d58c48c8945278fd18885f27d --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/RolesServiceImpl.java @@ -0,0 +1,24 @@ +package com.woniu.service.impl; + +import com.woniu.dao.RolesMapper; +import com.woniu.pojo.Roles; +import com.woniu.service.RolesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +@Service +public class RolesServiceImpl implements RolesService { + @Autowired + private RolesMapper rolesMapper; + + @Override + public List findAll() { + return rolesMapper.selectAll(); + } + + @Override + public List findByPage(Integer currentPage, Integer pageSize) { + return rolesMapper.selectByPage(currentPage, pageSize); + } +} diff --git a/pccenter/src/main/resources/application.yml b/pccenter/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..2f77018e71769e6720f946bec164ef3612e7916b --- /dev/null +++ b/pccenter/src/main/resources/application.yml @@ -0,0 +1,31 @@ +spring: + datasource: + username: root + password: root + url: jdbc:mysql://localhost:3306/pccenter?serverTimezone=GMT%2B8 + driver-class-name: com.mysql.jdbc.Driver + druid: + filters: stat,wall,logback + use-global-data-source-stat: true + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500 + thymeleaf: + cache: false + mvc: + date-format: yyyy-MM-dd + jackson: + date-format: yyyy-MM-dd + time-zone: GMT+8 +mybatis: + mapper-locations: classpath:mapper/*.xml + configuration: + map-underscore-to-camel-case: true +server: + port: 80 +pagehelper: + params: pageNum=currentPage,pageSize=pageSize + reasonable: true + support-methods-arguments: true + helper-dialect: mysql +logging: + level: + com.woniu.dao: debug diff --git a/pccenter/src/main/resources/generatorConfig.xml b/pccenter/src/main/resources/generatorConfig.xml new file mode 100644 index 0000000000000000000000000000000000000000..2a08fdde051556eec363d275facfac95fa8bcc80 --- /dev/null +++ b/pccenter/src/main/resources/generatorConfig.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ +
+ + + +
+
\ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/AdminMapper.xml b/pccenter/src/main/resources/mapper/AdminMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..96fa4e28a4e9c0537766f3a41d6fac9da44d4eec --- /dev/null +++ b/pccenter/src/main/resources/mapper/AdminMapper.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + id, username, password, salt, fullname, email, sex, birthday, address, phone, role_id + + + + delete from pc_admin + where id = #{id,jdbcType=INTEGER} + + + insert into pc_admin (id, username, password, + salt, fullname, email, + sex, birthday, address, + phone, role_id) + values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, + #{salt,jdbcType=VARCHAR}, #{fullname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, + #{sex,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE}, #{address,jdbcType=VARCHAR}, + #{phone,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}) + + + insert into pc_admin + + + id, + + + username, + + + password, + + + salt, + + + fullname, + + + email, + + + sex, + + + birthday, + + + address, + + + phone, + + + role_id, + + + + + #{id,jdbcType=INTEGER}, + + + #{username,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{salt,jdbcType=VARCHAR}, + + + #{fullname,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{sex,jdbcType=VARCHAR}, + + + #{birthday,jdbcType=DATE}, + + + #{address,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{roleId,jdbcType=INTEGER}, + + + + + update pc_admin + + + username = #{username,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + salt = #{salt,jdbcType=VARCHAR}, + + + fullname = #{fullname,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=VARCHAR}, + + + birthday = #{birthday,jdbcType=DATE}, + + + address = #{address,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + role_id = #{roleId,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update pc_admin + set username = #{username,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + salt = #{salt,jdbcType=VARCHAR}, + fullname = #{fullname,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=VARCHAR}, + birthday = #{birthday,jdbcType=DATE}, + address = #{address,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + role_id = #{roleId,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + + + + + delete from pc_admin where id in + + #{id} + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/InformationMapper.xml b/pccenter/src/main/resources/mapper/InformationMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec8f53a53d648b6e7496b57e1b3264a92a09211f --- /dev/null +++ b/pccenter/src/main/resources/mapper/InformationMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + id, account, password, name, nickname, roletype, stage, phone, adress + + + + delete from pc_information + where id = #{id,jdbcType=INTEGER} + + + insert into pc_information (id, account, password, + name, nickname, roletype, + stage, phone, adress + ) + values (#{id,jdbcType=INTEGER}, #{account,jdbcType=INTEGER}, #{password,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{roletype,jdbcType=VARCHAR}, + #{stage,jdbcType=VARCHAR}, #{phone,jdbcType=INTEGER}, #{adress,jdbcType=VARCHAR} + ) + + + insert into pc_information + + + id, + + + account, + + + password, + + + name, + + + nickname, + + + roletype, + + + stage, + + + phone, + + + adress, + + + + + #{id,jdbcType=INTEGER}, + + + #{account,jdbcType=INTEGER}, + + + #{password,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{nickname,jdbcType=VARCHAR}, + + + #{roletype,jdbcType=VARCHAR}, + + + #{stage,jdbcType=VARCHAR}, + + + #{phone,jdbcType=INTEGER}, + + + #{adress,jdbcType=VARCHAR}, + + + + + update pc_information + + + account = #{account,jdbcType=INTEGER}, + + + password = #{password,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + nickname = #{nickname,jdbcType=VARCHAR}, + + + roletype = #{roletype,jdbcType=VARCHAR}, + + + stage = #{stage,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=INTEGER}, + + + adress = #{adress,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update pc_information + set account = #{account,jdbcType=INTEGER}, + password = #{password,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + nickname = #{nickname,jdbcType=VARCHAR}, + roletype = #{roletype,jdbcType=VARCHAR}, + stage = #{stage,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=INTEGER}, + adress = #{adress,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/MenusMapper.xml b/pccenter/src/main/resources/mapper/MenusMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..f763123d5ae6b5837c7c422185be243cc22ac5c1 --- /dev/null +++ b/pccenter/src/main/resources/mapper/MenusMapper.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + menu_id, title, icon, href, perms, spread, parent_id, sorting + + + + delete from pc_menus + where menu_id = #{menuId,jdbcType=INTEGER} + + + insert into pc_menus (menu_id, title, icon, + href, perms, spread, + parent_id, sorting) + values (#{menuId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, + #{href,jdbcType=VARCHAR}, #{perms,jdbcType=VARCHAR}, #{spread,jdbcType=VARCHAR}, + #{parentId,jdbcType=INTEGER}, #{sorting,jdbcType=INTEGER}) + + + insert into pc_menus + + + menu_id, + + + title, + + + icon, + + + href, + + + perms, + + + spread, + + + parent_id, + + + sorting, + + + + + #{menuId,jdbcType=INTEGER}, + + + #{title,jdbcType=VARCHAR}, + + + #{icon,jdbcType=VARCHAR}, + + + #{href,jdbcType=VARCHAR}, + + + #{perms,jdbcType=VARCHAR}, + + + #{spread,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=INTEGER}, + + + #{sorting,jdbcType=INTEGER}, + + + + + update pc_menus + + + title = #{title,jdbcType=VARCHAR}, + + + icon = #{icon,jdbcType=VARCHAR}, + + + href = #{href,jdbcType=VARCHAR}, + + + perms = #{perms,jdbcType=VARCHAR}, + + + spread = #{spread,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=INTEGER}, + + + sorting = #{sorting,jdbcType=INTEGER}, + + + where menu_id = #{menuId,jdbcType=INTEGER} + + + update pc_menus + set title = #{title,jdbcType=VARCHAR}, + icon = #{icon,jdbcType=VARCHAR}, + href = #{href,jdbcType=VARCHAR}, + perms = #{perms,jdbcType=VARCHAR}, + spread = #{spread,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=INTEGER}, + sorting = #{sorting,jdbcType=INTEGER} + where menu_id = #{menuId,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/RolesMapper.xml b/pccenter/src/main/resources/mapper/RolesMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..73d61312d4fc3936d04dcca566a1bbed23384190 --- /dev/null +++ b/pccenter/src/main/resources/mapper/RolesMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + role_id, role_name, role_remark + + + + delete from pc_roles + where role_id = #{roleId,jdbcType=INTEGER} + + + insert into pc_roles (role_id, role_name, role_remark + ) + values (#{roleId,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR}, #{roleRemark,jdbcType=VARCHAR} + ) + + + insert into pc_roles + + + role_id, + + + role_name, + + + role_remark, + + + + + #{roleId,jdbcType=INTEGER}, + + + #{roleName,jdbcType=VARCHAR}, + + + #{roleRemark,jdbcType=VARCHAR}, + + + + + update pc_roles + + + role_name = #{roleName,jdbcType=VARCHAR}, + + + role_remark = #{roleRemark,jdbcType=VARCHAR}, + + + where role_id = #{roleId,jdbcType=INTEGER} + + + update pc_roles + set role_name = #{roleName,jdbcType=VARCHAR}, + role_remark = #{roleRemark,jdbcType=VARCHAR} + where role_id = #{roleId,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/RolesMenusMapper.xml b/pccenter/src/main/resources/mapper/RolesMenusMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..eb23a5899e8b84739926221ce95e017bdfee1a27 --- /dev/null +++ b/pccenter/src/main/resources/mapper/RolesMenusMapper.xml @@ -0,0 +1,31 @@ + + + + + + + + + insert into pc_roles_menus (menu_id, role_id) + values (#{menuId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}) + + + insert into pc_roles_menus + + + menu_id, + + + role_id, + + + + + #{menuId,jdbcType=INTEGER}, + + + #{roleId,jdbcType=INTEGER}, + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/UsersMapper.xml b/pccenter/src/main/resources/mapper/UsersMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..5249caf6da48f1f9cfcecf9c26f22e290a0df70b --- /dev/null +++ b/pccenter/src/main/resources/mapper/UsersMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + uid, account, name, password, phone, adress, status, nickname, role_type + + + + delete from pc_users + where uid = #{uid,jdbcType=INTEGER} + + + insert into pc_users (uid, account, name, + password, phone, adress, + status, nickname, role_type + ) + values (#{uid,jdbcType=INTEGER}, #{account,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, + #{password,jdbcType=VARCHAR}, #{phone,jdbcType=INTEGER}, #{adress,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{roleType,jdbcType=VARCHAR} + ) + + + insert into pc_users + + + uid, + + + account, + + + name, + + + password, + + + phone, + + + adress, + + + status, + + + nickname, + + + role_type, + + + + + #{uid,jdbcType=INTEGER}, + + + #{account,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{phone,jdbcType=INTEGER}, + + + #{adress,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{nickname,jdbcType=VARCHAR}, + + + #{roleType,jdbcType=VARCHAR}, + + + + + update pc_users + + + account = #{account,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=INTEGER}, + + + adress = #{adress,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + nickname = #{nickname,jdbcType=VARCHAR}, + + + role_type = #{roleType,jdbcType=VARCHAR}, + + + where uid = #{uid,jdbcType=INTEGER} + + + update pc_users + set account = #{account,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=INTEGER}, + adress = #{adress,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + nickname = #{nickname,jdbcType=VARCHAR}, + role_type = #{roleType,jdbcType=VARCHAR} + where uid = #{uid,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/app/bodyTab.js b/pccenter/src/main/resources/static/src/app/bodyTab.js new file mode 100644 index 0000000000000000000000000000000000000000..08774b9133ac680921c676dd0417fe6e3d987382 --- /dev/null +++ b/pccenter/src/main/resources/static/src/app/bodyTab.js @@ -0,0 +1,261 @@ +var tabFilter,menu=[],liIndex,curNav,delMenu; +layui.define(["element","jquery"],function(exports){ + var element = layui.element, + $ = layui.jquery, + layId, + Tab = function(){ + this.tabConfig = { + closed : true, + openTabNum : undefined, //最大可打开窗口数量 + tabFilter : "bodyTab", //添加窗口的filter + url : undefined //获取菜单json地址 + } + }; + + //获取二级菜单数据 + Tab.prototype.render = function() { + var url = this.tabConfig.url; + $.get(url,function(data){ + //显示左侧菜单 + if($(".navBar").html() == ''){ + var _this = this; + //在左侧导航栏中添加拼接的html字符串 + $(".navBar").html(navBar(data)).height($(window).height()-245); + element.init(); //初始化页面元素 + $(window).resize(function(){ + $(".navBar").height($(window).height()-245); + }) + } + }) + } + + //参数设置 + Tab.prototype.set = function(option) { + var _this = this; + $.extend(true, _this.tabConfig, option); + return _this; + }; + + //通过title获取lay-id + Tab.prototype.getLayId = function(title){ + $(".layui-tab-title.top_tab li").each(function(){ + if($(this).find("cite").text() == title){ + layId = $(this).attr("lay-id"); + } + }) + return layId; + } + //通过title判断tab是否存在 + Tab.prototype.hasTab = function(title){ + var tabIndex = -1; + $(".layui-tab-title.top_tab li").each(function(){ + if($(this).find("cite").text() == title){ + tabIndex = 1; + } + }) + return tabIndex; + } + + //右侧内容tab操作 + var tabIdIndex = 0; + Tab.prototype.tabAdd = function(_this){ + if(window.sessionStorage.getItem("menu")){ + menu = JSON.parse(window.sessionStorage.getItem("menu")); + } + var that = this; + var closed = that.tabConfig.closed, + openTabNum = that.tabConfig.openTabNum; + tabFilter = that.tabConfig.tabFilter; + if(_this.attr("target") == "_blank"){ + window.location.href = _this.attr("data-url"); + }else if(_this.attr("data-url") != undefined){ + var title = ''; + if(_this.find("i.iconfont,i.layui-icon").attr("data-icon") != undefined){ + if(_this.find("i.iconfont").attr("data-icon") != undefined){ + title += ''; + }else{ + title += ''+_this.find("i.layui-icon").attr("data-icon")+''; + } + } + //已打开的窗口中不存在 + if(that.hasTab(_this.find("cite").text()) == -1 && _this.siblings("dl.layui-nav-child").length == 0){ + if($(".layui-tab-title.top_tab li").length == openTabNum){ + layer.msg('只能同时打开'+openTabNum+'个选项卡哦。不然系统会卡的!'); + return; + } + tabIdIndex++; + title += ''+_this.find("cite").text()+''; + title += ''; + element.tabAdd(tabFilter, { + title : title, + content :"' + ,'' + ,''].join('')) + + //编辑器不兼容ie8以下 + if(device.ie && device.ie < 8){ + return textArea.removeClass('layui-hide').addClass(SHOW); + } + + haveBuild[0] && (haveBuild.remove()); + + setIframe.call(that, editor, textArea[0], set) + textArea.addClass('layui-hide').after(editor); + + return that.index; + }; + + //获得编辑器中内容 + Edit.prototype.getContent = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + return toLower(iframeWin[0].document.body.innerHTML); + }; + + //获得编辑器中纯文本内容 + Edit.prototype.getText = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + return $(iframeWin[0].document.body).text(); + }; + /** + * 设置编辑器内容 + * @param {[type]} index 编辑器索引 + * @param {[type]} content 要设置的内容 + * @param {[type]} flag 是否追加模式 + */ + Edit.prototype.setContent = function(index, content, flag){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + if(flag){ + $(iframeWin[0].document.body).append(content) + }else{ + $(iframeWin[0].document.body).html(content) + }; + layedit.sync(index) + }; + //将编辑器内容同步到textarea(一般用于异步提交时) + Edit.prototype.sync = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + var textarea = $('#'+iframeWin[1].attr('textarea')); + textarea.val(toLower(iframeWin[0].document.body.innerHTML)); + }; + + //获取编辑器选中内容 + Edit.prototype.getSelection = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + var range = Range(iframeWin[0].document); + return document.selection ? range.text : range.toString(); + }; + + //iframe初始化 + var setIframe = function(editor, textArea, set){ + var that = this, iframe = editor.find('iframe'); + + iframe.css({ + height: set.height + }).on('load', function(){ + var conts = iframe.contents() + ,iframeWin = iframe.prop('contentWindow') + ,head = conts.find('head') + ,style = $([''].join('')) + ,body = conts.find('body'); + + head.append(style); + body.attr('contenteditable', 'true').css({ + 'min-height': set.height + }).html(textArea.value||''); + + hotkey.apply(that, [iframeWin, iframe, textArea, set]); //快捷键处理 + toolActive.call(that, iframeWin, editor, set); //触发工具 + + }); + } + + //获得iframe窗口对象 + ,getWin = function(index){ + var iframe = $('#LAY_layedit_'+ index) + ,iframeWin = iframe.prop('contentWindow'); + return [iframeWin, iframe]; + } + + //IE8下将标签处理成小写 + ,toLower = function(html){ + if(device.ie == 8){ + html = html.replace(/<.+>/g, function(str){ + return str.toLowerCase(); + }); + } + return html; + } + + //快捷键处理 + ,hotkey = function(iframeWin, iframe, textArea, set){ + var iframeDOM = iframeWin.document, body = $(iframeDOM.body); + body.on('keydown', function(e){ + var keycode = e.keyCode; + //处理回车 + if(keycode === 13){ + var range = Range(iframeDOM); + var container = getContainer(range) + ,parentNode = container.parentNode; + + if(parentNode.tagName.toLowerCase() === 'pre'){ + if(e.shiftKey) return + layer.msg('请暂时用shift+enter'); + return false; + } + iframeDOM.execCommand('formatBlock', false, '

'); + } + }); + + //给textarea同步内容 + $(textArea).parents('form').on('submit', function(){ + var html = body.html(); + //IE8下将标签处理成小写 + if(device.ie == 8){ + html = html.replace(/<.+>/g, function(str){ + return str.toLowerCase(); + }); + } + textArea.value = html; + }); + + //处理粘贴 + body.on('paste', function(e){ + iframeDOM.execCommand('formatBlock', false, '

'); + setTimeout(function(){ + filter.call(iframeWin, body); + textArea.value = body.html(); + }, 100); + }); + } + + //标签过滤 + ,filter = function(body){ + var iframeWin = this + ,iframeDOM = iframeWin.document; + + //清除影响版面的css属性 + body.find('*[style]').each(function(){ + var textAlign = this.style.textAlign; + this.removeAttribute('style'); + $(this).css({ + 'text-align': textAlign || '' + }) + }); + + //修饰表格 + body.find('table').addClass('layui-table'); + + //移除不安全的标签 + body.find('script,link').remove(); + } + + //Range对象兼容性处理 + ,Range = function(iframeDOM){ + return iframeDOM.selection + ? iframeDOM.selection.createRange() + : iframeDOM.getSelection().getRangeAt(0); + } + + //当前Range对象的endContainer兼容性处理 + ,getContainer = function(range){ + return range.endContainer || range.parentElement().childNodes[0] + } + + //在选区插入内联元素 + ,insertInline = function(tagName, attr, range){ + var iframeDOM = this.document + ,elem = document.createElement(tagName) + for(var key in attr){ + elem.setAttribute(key, attr[key]); + } + elem.removeAttribute('text'); + + if(iframeDOM.selection){ //IE + var text = range.text || attr.text; + if(tagName === 'a' && !text) return; + if(text){ + elem.innerHTML = text; + } + range.pasteHTML($(elem).prop('outerHTML')); + range.select(); + } else { //非IE + var text = range.toString() || attr.text; + if(tagName === 'a' && !text) return; + if(text){ + elem.innerHTML = text; + } + range.deleteContents(); + range.insertNode(elem); + } + } + + //工具选中 + ,toolCheck = function(tools, othis){ + var iframeDOM = this.document + ,CHECK = 'layedit-tool-active' + ,container = getContainer(Range(iframeDOM)) + ,item = function(type){ + return tools.find('.layedit-tool-'+type) + } + + if(othis){ + othis[othis.hasClass(CHECK) ? 'removeClass' : 'addClass'](CHECK); + } + + tools.find('>i').removeClass(CHECK); + item('unlink').addClass(ABLED); + + $(container).parents().each(function(){ + var tagName = this.tagName.toLowerCase() + ,textAlign = this.style.textAlign; + + //文字 + if(tagName === 'b' || tagName === 'strong'){ + item('b').addClass(CHECK) + } + if(tagName === 'i' || tagName === 'em'){ + item('i').addClass(CHECK) + } + if(tagName === 'u'){ + item('u').addClass(CHECK) + } + if(tagName === 'strike'){ + item('d').addClass(CHECK) + } + + //对齐 + if(tagName === 'p'){ + if(textAlign === 'center'){ + item('center').addClass(CHECK); + } else if(textAlign === 'right'){ + item('right').addClass(CHECK); + } else { + item('left').addClass(CHECK); + } + } + + //超链接 + if(tagName === 'a'){ + item('link').addClass(CHECK); + item('unlink').removeClass(ABLED); + } + }); + } + + //触发工具 + ,toolActive = function(iframeWin, editor, set){ + var iframeDOM = iframeWin.document + ,body = $(iframeDOM.body) + ,toolEvent = { + //超链接 + link: function(range){ + var container = getContainer(range) + ,parentNode = $(container).parent(); + + link.call(body, { + href: parentNode.attr('href') + ,target: parentNode.attr('target') + }, function(field){ + var parent = parentNode[0]; + if(parent.tagName === 'A'){ + parent.href = field.url; + } else { + insertInline.call(iframeWin, 'a', { + target: field.target + ,href: field.url + ,text: field.url + }, range); + } + }); + } + //清除超链接 + ,unlink: function(range){ + iframeDOM.execCommand('unlink'); + } + //表情 + ,face: function(range){ + face.call(this, function(img){ + insertInline.call(iframeWin, 'img', { + src: img.src + ,alt: img.alt + }, range); + }); + } + //图片 + ,image: function(range){ + var that = this; + layui.use('upload', function(upload){ + var uploadImage = set.uploadImage || {}; + upload.render({ + url: uploadImage.url + ,method: uploadImage.type + ,elem: $(that).find('input')[0] + ,done: function(res){ + if(res.code == 0){ + res.data = res.data || {}; + insertInline.call(iframeWin, 'img', { + src: res.data.src + ,alt: res.data.title + }, range); + } else { + layer.msg(res.msg||'上传失败'); + } + } + }); + }); + } + //插入代码 + ,code: function(range){ + code.call(body, function(pre){ + insertInline.call(iframeWin, 'pre', { + text: pre.code + ,'lay-lang': pre.lang + }, range); + }); + } + //帮助 + ,help: function(){ + layer.open({ + type: 2 + ,title: '帮助' + ,area: ['600px', '380px'] + ,shadeClose: true + ,shade: 0.1 + ,skin: 'layui-layer-msg' + ,content: ['http://www.layui.com/about/layedit/help.html', 'no'] + }); + } + } + ,tools = editor.find('.layui-layedit-tool') + + ,click = function(){ + var othis = $(this) + ,events = othis.attr('layedit-event') + ,command = othis.attr('lay-command'); + + if(othis.hasClass(ABLED)) return; + + body.focus(); + + var range = Range(iframeDOM) + ,container = range.commonAncestorContainer + + if(command){ + iframeDOM.execCommand(command); + if(/justifyLeft|justifyCenter|justifyRight/.test(command)){ + iframeDOM.execCommand('formatBlock', false, '

'); + } + setTimeout(function(){ + body.focus(); + }, 10); + } else { + toolEvent[events] && toolEvent[events].call(this, range); + } + toolCheck.call(iframeWin, tools, othis); + } + + ,isClick = /image/ + + tools.find('>i').on('mousedown', function(){ + var othis = $(this) + ,events = othis.attr('layedit-event'); + if(isClick.test(events)) return; + click.call(this) + }).on('click', function(){ + var othis = $(this) + ,events = othis.attr('layedit-event'); + if(!isClick.test(events)) return; + click.call(this) + }); + + //触发内容区域 + body.on('click', function(){ + toolCheck.call(iframeWin, tools); + layer.close(face.index); + }); + } + + //超链接面板 + ,link = function(options, callback){ + var body = this, index = layer.open({ + type: 1 + ,id: 'LAY_layedit_link' + ,area: '350px' + ,shade: 0.05 + ,shadeClose: true + ,moveType: 1 + ,title: '超链接' + ,skin: 'layui-layer-msg' + ,content: ['

    ' + ,'
  • ' + ,'' + ,'
    ' + ,'' + ,'
    ' + ,'
  • ' + ,'
  • ' + ,'' + ,'
    ' + ,'' + ,'' + ,'
    ' + ,'
  • ' + ,'
  • ' + ,'' + ,'' + ,'
  • ' + ,'
'].join('') + ,success: function(layero, index){ + var eventFilter = 'submit(layedit-link-yes)'; + form.render('radio'); + layero.find('.layui-btn-primary').on('click', function(){ + layer.close(index); + body.focus(); + }); + form.on(eventFilter, function(data){ + layer.close(link.index); + callback && callback(data.field); + }); + } + }); + link.index = index; + } + + //表情面板 + ,face = function(callback){ + //表情库 + var faces = function(){ + var alt = ["[微笑]", "[嘻嘻]", "[哈哈]", "[可爱]", "[可怜]", "[挖鼻]", "[吃惊]", "[害羞]", "[挤眼]", "[闭嘴]", "[鄙视]", "[爱你]", "[泪]", "[偷笑]", "[亲亲]", "[生病]", "[太开心]", "[白眼]", "[右哼哼]", "[左哼哼]", "[嘘]", "[衰]", "[委屈]", "[吐]", "[哈欠]", "[抱抱]", "[怒]", "[疑问]", "[馋嘴]", "[拜拜]", "[思考]", "[汗]", "[困]", "[睡]", "[钱]", "[失望]", "[酷]", "[色]", "[哼]", "[鼓掌]", "[晕]", "[悲伤]", "[抓狂]", "[黑线]", "[阴险]", "[怒骂]", "[互粉]", "[心]", "[伤心]", "[猪头]", "[熊猫]", "[兔子]", "[ok]", "[耶]", "[good]", "[NO]", "[赞]", "[来]", "[弱]", "[草泥马]", "[神马]", "[囧]", "[浮云]", "[给力]", "[围观]", "[威武]", "[奥特曼]", "[礼物]", "[钟]", "[话筒]", "[蜡烛]", "[蛋糕]"], arr = {}; + layui.each(alt, function(index, item){ + arr[item] = layui.cache.dir + 'images/face/'+ index + '.gif'; + }); + return arr; + }(); + face.hide = face.hide || function(e){ + if($(e.target).attr('layedit-event') !== 'face'){ + layer.close(face.index); + } + } + return face.index = layer.tips(function(){ + var content = []; + layui.each(faces, function(key, item){ + content.push('
  • '+ key +'
  • '); + }); + return '
      ' + content.join('') + '
    '; + }(), this, { + tips: 1 + ,time: 0 + ,skin: 'layui-box layui-util-face' + ,maxWidth: 500 + ,success: function(layero, index){ + layero.css({ + marginTop: -4 + ,marginLeft: -10 + }).find('.layui-clear>li').on('click', function(){ + callback && callback({ + src: faces[this.title] + ,alt: this.title + }); + layer.close(index); + }); + $(document).off('click', face.hide).on('click', face.hide); + } + }); + } + + //插入代码面板 + ,code = function(callback){ + var body = this, index = layer.open({ + type: 1 + ,id: 'LAY_layedit_code' + ,area: '550px' + ,shade: 0.05 + ,shadeClose: true + ,moveType: 1 + ,title: '插入代码' + ,skin: 'layui-layer-msg' + ,content: ['
      ' + ,'
    • ' + ,'' + ,'
      ' + ,'' + ,'
      ' + ,'
    • ' + ,'
    • ' + ,'' + ,'
      ' + ,'' + ,'
      ' + ,'
    • ' + ,'
    • ' + ,'' + ,'' + ,'
    • ' + ,'
    '].join('') + ,success: function(layero, index){ + var eventFilter = 'submit(layedit-code-yes)'; + form.render('select'); + layero.find('.layui-btn-primary').on('click', function(){ + layer.close(index); + body.focus(); + }); + form.on(eventFilter, function(data){ + layer.close(code.index); + callback && callback(data.field); + }); + } + }); + code.index = index; + } + + //全部工具 + ,tools = { + html: '' + ,strong: '' + ,italic: '' + ,underline: '' + ,del: '' + + ,'|': '' + + ,left: '' + ,center: '' + ,right: '' + ,link: '' + ,unlink: '' + ,face: '' + ,image: '' + ,code: '' + + ,help: '' + } + + ,edit = new Edit(); + + exports(MOD_NAME, edit); +}); diff --git a/pccenter/src/main/resources/static/src/lay/modules/layer.js b/pccenter/src/main/resources/static/src/lay/modules/layer.js new file mode 100644 index 0000000000000000000000000000000000000000..8912fcce8eb6a746105ddd9d04aecc9c59fdc80c --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/layer.js @@ -0,0 +1,1304 @@ +/** + + @Name:layer v3.1.2 Web弹层组件 + @Author:贤心 + @Site:http://layer.layui.com + @License:MIT + + */ + +;!function(window, undefined){ +"use strict"; + +var isLayui = window.layui && layui.define, $, win, ready = { + getPath: function(){ + var jsPath = document.currentScript ? document.currentScript.src : function(){ + var js = document.scripts + ,last = js.length - 1 + ,src; + for(var i = last; i > 0; i--){ + if(js[i].readyState === 'interactive'){ + src = js[i].src; + break; + } + } + return src || js[last].src; + }(); + return jsPath.substring(0, jsPath.lastIndexOf('/') + 1); + }(), + + config: {}, end: {}, minIndex: 0, minLeft: [], + btn: ['确定', '取消'], + + //五种原始层模式 + type: ['dialog', 'page', 'iframe', 'loading', 'tips'], + + //获取节点的style属性值 + getStyle: function(node, name){ + var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null); + return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name); + }, + + //载入CSS配件 + link: function(href, fn, cssname){ + + //未设置路径,则不主动加载css + if(!layer.path) return; + + var head = document.getElementsByTagName("head")[0], link = document.createElement('link'); + if(typeof fn === 'string') cssname = fn; + var app = (cssname || href).replace(/\.|\//g, ''); + var id = 'layuicss-'+ app, timeout = 0; + + link.rel = 'stylesheet'; + link.href = layer.path + href; + link.id = id; + + if(!document.getElementById(id)){ + head.appendChild(link); + } + + if(typeof fn !== 'function') return; + + //轮询css是否加载完毕 + (function poll() { + if(++timeout > 8 * 1000 / 100){ + return window.console && console.error('layer.css: Invalid'); + }; + parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 100); + }()); + } +}; + +//默认内置方法。 +var layer = { + v: '3.1.1', + ie: function(){ //ie版本 + var agent = navigator.userAgent.toLowerCase(); + return (!!window.ActiveXObject || "ActiveXObject" in window) ? ( + (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识 + ) : false; + }(), + index: (window.layer && window.layer.v) ? 100000 : 0, + path: ready.getPath, + config: function(options, fn){ + options = options || {}; + layer.cache = ready.config = $.extend({}, ready.config, options); + layer.path = ready.config.path || layer.path; + typeof options.extend === 'string' && (options.extend = [options.extend]); + + if(ready.config.path) layer.ready(); + + if(!options.extend) return this; + + isLayui + ? layui.addcss('modules/layer/' + options.extend) + : ready.link('theme/' + options.extend); + + return this; + }, + + //主体CSS等待事件 + ready: function(callback){ + var cssname = 'layer', ver = '' + ,path = (isLayui ? 'modules/layer/' : 'theme/') + 'default/layer.css?v='+ layer.v + ver; + isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname); + return this; + }, + + //各种快捷引用 + alert: function(content, options, yes){ + var type = typeof options === 'function'; + if(type) yes = options; + return layer.open($.extend({ + content: content, + yes: yes + }, type ? {} : options)); + }, + + confirm: function(content, options, yes, cancel){ + var type = typeof options === 'function'; + if(type){ + cancel = yes; + yes = options; + } + return layer.open($.extend({ + content: content, + btn: ready.btn, + yes: yes, + btn2: cancel + }, type ? {} : options)); + }, + + msg: function(content, options, end){ //最常用提示层 + var type = typeof options === 'function', rskin = ready.config.skin; + var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg'; + var anim = doms.anim.length - 1; + if(type) end = options; + return layer.open($.extend({ + content: content, + time: 3000, + shade: false, + skin: skin, + title: false, + closeBtn: false, + btn: false, + resize: false, + end: end + }, (type && !ready.config.skin) ? { + skin: skin + ' layui-layer-hui', + anim: anim + } : function(){ + options = options || {}; + if(options.icon === -1 || options.icon === undefined && !ready.config.skin){ + options.skin = skin + ' ' + (options.skin||'layui-layer-hui'); + } + return options; + }())); + }, + + load: function(icon, options){ + return layer.open($.extend({ + type: 3, + icon: icon || 0, + resize: false, + shade: 0.01 + }, options)); + }, + + tips: function(content, follow, options){ + return layer.open($.extend({ + type: 4, + content: [content, follow], + closeBtn: false, + time: 3000, + shade: false, + resize: false, + fixed: false, + maxWidth: 210 + }, options)); + } +}; + +var Class = function(setings){ + var that = this; + that.index = ++layer.index; + that.config = $.extend({}, that.config, ready.config, setings); + document.body ? that.creat() : setTimeout(function(){ + that.creat(); + }, 30); +}; + +Class.pt = Class.prototype; + +//缓存常用字符 +var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close']; +doms.anim = ['layer-anim-00', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06']; + +//默认配置 +Class.pt.config = { + type: 0, + shade: 0.3, + fixed: true, + move: doms[1], + title: '信息', + offset: 'auto', + area: 'auto', + closeBtn: 1, + time: 0, //0表示不自动关闭 + zIndex: 19891014, + maxWidth: 360, + anim: 0, + isOutAnim: true, + icon: -1, + moveType: 1, + resize: true, + scrollbar: true, //是否允许浏览器滚动条 + tips: 2 +}; + +//容器 +Class.pt.vessel = function(conType, callback){ + var that = this, times = that.index, config = that.config; + var zIndex = config.zIndex + times, titype = typeof config.title === 'object'; + var ismax = config.maxmin && (config.type === 1 || config.type === 2); + var titleHTML = (config.title ? '
    ' + + (titype ? config.title[0] : config.title) + + '
    ' : ''); + + config.zIndex = zIndex; + callback([ + //遮罩 + config.shade ? ('
    ') : '', + + //主体 + '
    ' + + (conType && config.type != 2 ? '' : titleHTML) + + '
    ' + + (config.type == 0 && config.icon !== -1 ? '' : '') + + (config.type == 1 && conType ? '' : (config.content||'')) + + '
    ' + + ''+ function(){ + var closebtn = ismax ? '' : ''; + config.closeBtn && (closebtn += ''); + return closebtn; + }() + '' + + (config.btn ? function(){ + var button = ''; + typeof config.btn === 'string' && (config.btn = [config.btn]); + for(var i = 0, len = config.btn.length; i < len; i++){ + button += ''+ config.btn[i] +'' + } + return '
    '+ button +'
    ' + }() : '') + + (config.resize ? '' : '') + + '
    ' + ], titleHTML, $('
    ')); + return that; +}; + +//创建骨架 +Class.pt.creat = function(){ + var that = this + ,config = that.config + ,times = that.index, nodeIndex + ,content = config.content + ,conType = typeof content === 'object' + ,body = $('body'); + + if(config.id && $('#'+config.id)[0]) return; + + if(typeof config.area === 'string'){ + config.area = config.area === 'auto' ? ['', ''] : [config.area, '']; + } + + //anim兼容旧版shift + if(config.shift){ + config.anim = config.shift; + } + + if(layer.ie == 6){ + config.fixed = false; + } + + switch(config.type){ + case 0: + config.btn = ('btn' in config) ? config.btn : ready.btn[0]; + layer.closeAll('dialog'); + break; + case 2: + var content = config.content = conType ? config.content : [config.content||'', 'auto']; + config.content = ''; + break; + case 3: + delete config.title; + delete config.closeBtn; + config.icon === -1 && (config.icon === 0); + layer.closeAll('loading'); + break; + case 4: + conType || (config.content = [config.content, 'body']); + config.follow = config.content[1]; + config.content = config.content[0] + ''; + delete config.title; + config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true]; + config.tipsMore || layer.closeAll('tips'); + break; + } + + //建立容器 + that.vessel(conType, function(html, titleHTML, moveElem){ + body.append(html[0]); + conType ? function(){ + (config.type == 2 || config.type == 4) ? function(){ + $('body').append(html[1]); + }() : function(){ + if(!content.parents('.'+doms[0])[0]){ + content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]); + $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML); + } + }(); + }() : body.append(html[1]); + $('.layui-layer-move')[0] || body.append(ready.moveElem = moveElem); + that.layero = $('#'+ doms[0] + times); + config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times); + }).auto(times); + + //遮罩 + $('#layui-layer-shade'+ that.index).css({ + 'background-color': config.shade[1] || '#000' + ,'opacity': config.shade[0]||config.shade + }); + + config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]); + + //坐标自适应浏览器窗口尺寸 + config.type == 4 ? that.tips() : that.offset(); + if(config.fixed){ + win.on('resize', function(){ + that.offset(); + (/^\d+%$/.test(config.area[0]) || /^\d+%$/.test(config.area[1])) && that.auto(times); + config.type == 4 && that.tips(); + }); + } + + config.time <= 0 || setTimeout(function(){ + layer.close(that.index) + }, config.time); + that.move().callback(); + + //为兼容jQuery3.0的css动画影响元素尺寸计算 + if(doms.anim[config.anim]){ + var animClass = 'layer-anim '+ doms.anim[config.anim]; + that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ + $(this).removeClass(animClass); + }); + }; + + //记录关闭动画 + if(config.isOutAnim){ + that.layero.data('isOutAnim', true); + } +}; + +//自适应 +Class.pt.auto = function(index){ + var that = this, config = that.config, layero = $('#'+ doms[0] + index); + + if(config.area[0] === '' && config.maxWidth > 0){ + //为了修复IE7下一个让人难以理解的bug + if(layer.ie && layer.ie < 8 && config.btn){ + layero.width(layero.innerWidth()); + } + layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth); + } + + var area = [layero.innerWidth(), layero.innerHeight()] + ,titHeight = layero.find(doms[1]).outerHeight() || 0 + ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0 + ,setHeight = function(elem){ + elem = layero.find(elem); + elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0)); + }; + + switch(config.type){ + case 2: + setHeight('iframe'); + break; + default: + if(config.area[1] === ''){ + if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){ + area[1] = config.maxHeight; + setHeight('.'+doms[5]); + } else if(config.fixed && area[1] >= win.height()){ + area[1] = win.height(); + setHeight('.'+doms[5]); + } + } else { + setHeight('.'+doms[5]); + } + break; + }; + + return that; +}; + +//计算坐标 +Class.pt.offset = function(){ + var that = this, config = that.config, layero = that.layero; + var area = [layero.outerWidth(), layero.outerHeight()]; + var type = typeof config.offset === 'object'; + that.offsetTop = (win.height() - area[1])/2; + that.offsetLeft = (win.width() - area[0])/2; + + if(type){ + that.offsetTop = config.offset[0]; + that.offsetLeft = config.offset[1]||that.offsetLeft; + } else if(config.offset !== 'auto'){ + + if(config.offset === 't'){ //上 + that.offsetTop = 0; + } else if(config.offset === 'r'){ //右 + that.offsetLeft = win.width() - area[0]; + } else if(config.offset === 'b'){ //下 + that.offsetTop = win.height() - area[1]; + } else if(config.offset === 'l'){ //左 + that.offsetLeft = 0; + } else if(config.offset === 'lt'){ //左上角 + that.offsetTop = 0; + that.offsetLeft = 0; + } else if(config.offset === 'lb'){ //左下角 + that.offsetTop = win.height() - area[1]; + that.offsetLeft = 0; + } else if(config.offset === 'rt'){ //右上角 + that.offsetTop = 0; + that.offsetLeft = win.width() - area[0]; + } else if(config.offset === 'rb'){ //右下角 + that.offsetTop = win.height() - area[1]; + that.offsetLeft = win.width() - area[0]; + } else { + that.offsetTop = config.offset; + } + + } + + if(!config.fixed){ + that.offsetTop = /%$/.test(that.offsetTop) ? + win.height()*parseFloat(that.offsetTop)/100 + : parseFloat(that.offsetTop); + that.offsetLeft = /%$/.test(that.offsetLeft) ? + win.width()*parseFloat(that.offsetLeft)/100 + : parseFloat(that.offsetLeft); + that.offsetTop += win.scrollTop(); + that.offsetLeft += win.scrollLeft(); + } + + if(layero.attr('minLeft')){ + that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0); + that.offsetLeft = layero.css('left'); + } + + layero.css({top: that.offsetTop, left: that.offsetLeft}); +}; + +//Tips +Class.pt.tips = function(){ + var that = this, config = that.config, layero = that.layero; + var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow); + if(!follow[0]) follow = $('body'); + var goal = { + width: follow.outerWidth(), + height: follow.outerHeight(), + top: follow.offset().top, + left: follow.offset().left + }, tipsG = layero.find('.layui-layer-TipsG'); + + var guide = config.tips[0]; + config.tips[1] || tipsG.remove(); + + goal.autoLeft = function(){ + if(goal.left + layArea[0] - win.width() > 0){ + goal.tipLeft = goal.left + goal.width - layArea[0]; + tipsG.css({right: 12, left: 'auto'}); + } else { + goal.tipLeft = goal.left; + }; + }; + + //辨别tips的方位 + goal.where = [function(){ //上 + goal.autoLeft(); + goal.tipTop = goal.top - layArea[1] - 10; + tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]); + }, function(){ //右 + goal.tipLeft = goal.left + goal.width + 10; + goal.tipTop = goal.top; + tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]); + }, function(){ //下 + goal.autoLeft(); + goal.tipTop = goal.top + goal.height + 10; + tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]); + }, function(){ //左 + goal.tipLeft = goal.left - layArea[0] - 10; + goal.tipTop = goal.top; + tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]); + }]; + goal.where[guide-1](); + + /* 8*2为小三角形占据的空间 */ + if(guide === 1){ + goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2](); + } else if(guide === 2){ + win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]() + } else if(guide === 3){ + (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0](); + } else if(guide === 4){ + layArea[0] + 8*2 - goal.left > 0 && goal.where[1]() + } + + layero.find('.'+doms[5]).css({ + 'background-color': config.tips[1], + 'padding-right': (config.closeBtn ? '30px' : '') + }); + layero.css({ + left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0), + top: goal.tipTop - (config.fixed ? win.scrollTop() : 0) + }); +} + +//拖拽层 +Class.pt.move = function(){ + var that = this + ,config = that.config + ,_DOC = $(document) + ,layero = that.layero + ,moveElem = layero.find(config.move) + ,resizeElem = layero.find('.layui-layer-resize') + ,dict = {}; + + if(config.move){ + moveElem.css('cursor', 'move'); + } + + moveElem.on('mousedown', function(e){ + e.preventDefault(); + if(config.move){ + dict.moveStart = true; + dict.offset = [ + e.clientX - parseFloat(layero.css('left')) + ,e.clientY - parseFloat(layero.css('top')) + ]; + ready.moveElem.css('cursor', 'move').show(); + } + }); + + resizeElem.on('mousedown', function(e){ + e.preventDefault(); + dict.resizeStart = true; + dict.offset = [e.clientX, e.clientY]; + dict.area = [ + layero.outerWidth() + ,layero.outerHeight() + ]; + ready.moveElem.css('cursor', 'se-resize').show(); + }); + + _DOC.on('mousemove', function(e){ + + //拖拽移动 + if(dict.moveStart){ + var X = e.clientX - dict.offset[0] + ,Y = e.clientY - dict.offset[1] + ,fixed = layero.css('position') === 'fixed'; + + e.preventDefault(); + + dict.stX = fixed ? 0 : win.scrollLeft(); + dict.stY = fixed ? 0 : win.scrollTop(); + + //控制元素不被拖出窗口外 + if(!config.moveOut){ + var setRig = win.width() - layero.outerWidth() + dict.stX + ,setBot = win.height() - layero.outerHeight() + dict.stY; + X < dict.stX && (X = dict.stX); + X > setRig && (X = setRig); + Y < dict.stY && (Y = dict.stY); + Y > setBot && (Y = setBot); + } + + layero.css({ + left: X + ,top: Y + }); + } + + //Resize + if(config.resize && dict.resizeStart){ + var X = e.clientX - dict.offset[0] + ,Y = e.clientY - dict.offset[1]; + + e.preventDefault(); + + layer.style(that.index, { + width: dict.area[0] + X + ,height: dict.area[1] + Y + }) + dict.isResize = true; + config.resizing && config.resizing(layero); + } + }).on('mouseup', function(e){ + if(dict.moveStart){ + delete dict.moveStart; + ready.moveElem.hide(); + config.moveEnd && config.moveEnd(layero); + } + if(dict.resizeStart){ + delete dict.resizeStart; + ready.moveElem.hide(); + } + }); + + return that; +}; + +Class.pt.callback = function(){ + var that = this, layero = that.layero, config = that.config; + that.openLayer(); + if(config.success){ + if(config.type == 2){ + layero.find('iframe').on('load', function(){ + config.success(layero, that.index); + }); + } else { + config.success(layero, that.index); + } + } + layer.ie == 6 && that.IE6(layero); + + //按钮 + layero.find('.'+ doms[6]).children('a').on('click', function(){ + var index = $(this).index(); + if(index === 0){ + if(config.yes){ + config.yes(that.index, layero) + } else if(config['btn1']){ + config['btn1'](that.index, layero) + } else { + layer.close(that.index); + } + } else { + var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero); + close === false || layer.close(that.index); + } + }); + + //取消 + function cancel(){ + var close = config.cancel && config.cancel(that.index, layero); + close === false || layer.close(that.index); + } + + //右上角关闭回调 + layero.find('.'+ doms[7]).on('click', cancel); + + //点遮罩关闭 + if(config.shadeClose){ + $('#layui-layer-shade'+ that.index).on('click', function(){ + layer.close(that.index); + }); + } + + //最小化 + layero.find('.layui-layer-min').on('click', function(){ + var min = config.min && config.min(layero); + min === false || layer.min(that.index, config); + }); + + //全屏/还原 + layero.find('.layui-layer-max').on('click', function(){ + if($(this).hasClass('layui-layer-maxmin')){ + layer.restore(that.index); + config.restore && config.restore(layero); + } else { + layer.full(that.index, config); + setTimeout(function(){ + config.full && config.full(layero); + }, 100); + } + }); + + config.end && (ready.end[that.index] = config.end); +}; + +//for ie6 恢复select +ready.reselect = function(){ + $.each($('select'), function(index , value){ + var sthis = $(this); + if(!sthis.parents('.'+doms[0])[0]){ + (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show(); + } + sthis = null; + }); +}; + +Class.pt.IE6 = function(layero){ + //隐藏select + $('select').each(function(index , value){ + var sthis = $(this); + if(!sthis.parents('.'+doms[0])[0]){ + sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide(); + } + sthis = null; + }); +}; + +//需依赖原型的对外方法 +Class.pt.openLayer = function(){ + var that = this; + + //置顶当前窗口 + layer.zIndex = that.config.zIndex; + layer.setTop = function(layero){ + var setZindex = function(){ + layer.zIndex++; + layero.css('z-index', layer.zIndex + 1); + }; + layer.zIndex = parseInt(layero[0].style.zIndex); + layero.on('mousedown', setZindex); + return layer.zIndex; + }; +}; + +ready.record = function(layero){ + var area = [ + layero.width(), + layero.height(), + layero.position().top, + layero.position().left + parseFloat(layero.css('margin-left')) + ]; + layero.find('.layui-layer-max').addClass('layui-layer-maxmin'); + layero.attr({area: area}); +}; + +ready.rescollbar = function(index){ + if(doms.html.attr('layer-full') == index){ + if(doms.html[0].style.removeProperty){ + doms.html[0].style.removeProperty('overflow'); + } else { + doms.html[0].style.removeAttribute('overflow'); + } + doms.html.removeAttr('layer-full'); + } +}; + +/** 内置成员 */ + +window.layer = layer; + +//获取子iframe的DOM +layer.getChildFrame = function(selector, index){ + index = index || $('.'+doms[4]).attr('times'); + return $('#'+ doms[0] + index).find('iframe').contents().find(selector); +}; + +//得到当前iframe层的索引,子iframe时使用 +layer.getFrameIndex = function(name){ + return $('#'+ name).parents('.'+doms[4]).attr('times'); +}; + +//iframe层自适应宽高 +layer.iframeAuto = function(index){ + if(!index) return; + var heg = layer.getChildFrame('html', index).outerHeight(); + var layero = $('#'+ doms[0] + index); + var titHeight = layero.find(doms[1]).outerHeight() || 0; + var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0; + layero.css({height: heg + titHeight + btnHeight}); + layero.find('iframe').css({height: heg}); +}; + +//重置iframe url +layer.iframeSrc = function(index, url){ + $('#'+ doms[0] + index).find('iframe').attr('src', url); +}; + +//设定层的样式 +layer.style = function(index, options, limit){ + var layero = $('#'+ doms[0] + index) + ,contElem = layero.find('.layui-layer-content') + ,type = layero.attr('type') + ,titHeight = layero.find(doms[1]).outerHeight() || 0 + ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0 + ,minLeft = layero.attr('minLeft'); + + if(type === ready.type[3] || type === ready.type[4]){ + return; + } + + if(!limit){ + if(parseFloat(options.width) <= 260){ + options.width = 260; + }; + + if(parseFloat(options.height) - titHeight - btnHeight <= 64){ + options.height = 64 + titHeight + btnHeight; + }; + } + + layero.css(options); + btnHeight = layero.find('.'+doms[6]).outerHeight(); + + if(type === ready.type[2]){ + layero.find('iframe').css({ + height: parseFloat(options.height) - titHeight - btnHeight + }); + } else { + contElem.css({ + height: parseFloat(options.height) - titHeight - btnHeight + - parseFloat(contElem.css('padding-top')) + - parseFloat(contElem.css('padding-bottom')) + }) + } +}; + +//最小化 +layer.min = function(index, options){ + var layero = $('#'+ doms[0] + index) + ,titHeight = layero.find(doms[1]).outerHeight() || 0 + ,left = layero.attr('minLeft') || (181*ready.minIndex)+'px' + ,position = layero.css('position'); + + ready.record(layero); + + if(ready.minLeft[0]){ + left = ready.minLeft[0]; + ready.minLeft.shift(); + } + + layero.attr('position', position); + + layer.style(index, { + width: 180 + ,height: titHeight + ,left: left + ,top: win.height() - titHeight + ,position: 'fixed' + ,overflow: 'hidden' + }, true); + + layero.find('.layui-layer-min').hide(); + layero.attr('type') === 'page' && layero.find(doms[4]).hide(); + ready.rescollbar(index); + + if(!layero.attr('minLeft')){ + ready.minIndex++; + } + layero.attr('minLeft', left); +}; + +//还原 +layer.restore = function(index){ + var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(','); + var type = layero.attr('type'); + layer.style(index, { + width: parseFloat(area[0]), + height: parseFloat(area[1]), + top: parseFloat(area[2]), + left: parseFloat(area[3]), + position: layero.attr('position'), + overflow: 'visible' + }, true); + layero.find('.layui-layer-max').removeClass('layui-layer-maxmin'); + layero.find('.layui-layer-min').show(); + layero.attr('type') === 'page' && layero.find(doms[4]).show(); + ready.rescollbar(index); +}; + +//全屏 +layer.full = function(index){ + var layero = $('#'+ doms[0] + index), timer; + ready.record(layero); + if(!doms.html.attr('layer-full')){ + doms.html.css('overflow','hidden').attr('layer-full', index); + } + clearTimeout(timer); + timer = setTimeout(function(){ + var isfix = layero.css('position') === 'fixed'; + layer.style(index, { + top: isfix ? 0 : win.scrollTop(), + left: isfix ? 0 : win.scrollLeft(), + width: win.width(), + height: win.height() + }, true); + layero.find('.layui-layer-min').hide(); + }, 100); +}; + +//改变title +layer.title = function(name, index){ + var title = $('#'+ doms[0] + (index||layer.index)).find(doms[1]); + title.html(name); +}; + +//关闭layer总方法 +layer.close = function(index){ + var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close'; + if(!layero[0]) return; + var WRAP = 'layui-layer-wrap', remove = function(){ + if(type === ready.type[1] && layero.attr('conType') === 'object'){ + layero.children(':not(.'+ doms[5] +')').remove(); + var wrap = layero.find('.'+WRAP); + for(var i = 0; i < 2; i++){ + wrap.unwrap(); + } + wrap.css('display', wrap.data('display')).removeClass(WRAP); + } else { + //低版本IE 回收 iframe + if(type === ready.type[2]){ + try { + var iframe = $('#'+doms[4]+index)[0]; + iframe.contentWindow.document.write(''); + iframe.contentWindow.close(); + layero.find('.'+doms[5])[0].removeChild(iframe); + } catch(e){} + } + layero[0].innerHTML = ''; + layero.remove(); + } + typeof ready.end[index] === 'function' && ready.end[index](); + delete ready.end[index]; + }; + + if(layero.data('isOutAnim')){ + layero.addClass('layer-anim '+ closeAnim); + } + + $('#layui-layer-moves, #layui-layer-shade' + index).remove(); + layer.ie == 6 && ready.reselect(); + ready.rescollbar(index); + if(layero.attr('minLeft')){ + ready.minIndex--; + ready.minLeft.push(layero.attr('minLeft')); + } + + if((layer.ie && layer.ie < 10) || !layero.data('isOutAnim')){ + remove() + } else { + setTimeout(function(){ + remove(); + }, 200); + } +}; + +//关闭所有层 +layer.closeAll = function(type){ + $.each($('.'+doms[0]), function(){ + var othis = $(this); + var is = type ? (othis.attr('type') === type) : 1; + is && layer.close(othis.attr('times')); + is = null; + }); +}; + +/** + + 拓展模块,layui开始合并在一起 + + */ + +var cache = layer.cache||{}, skin = function(type){ + return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : ''); +}; + +//仿系统prompt +layer.prompt = function(options, yes){ + var style = ''; + options = options || {}; + + if(typeof options === 'function') yes = options; + + if(options.area){ + var area = options.area; + style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"'; + delete options.area; + } + var prompt, content = options.formType == 2 ? '' : function(){ + return ''; + }(); + + var success = options.success; + delete options.success; + + return layer.open($.extend({ + type: 1 + ,btn: ['确定','取消'] + ,content: content + ,skin: 'layui-layer-prompt' + skin('prompt') + ,maxWidth: win.width() + ,success: function(layero){ + prompt = layero.find('.layui-layer-input'); + prompt.val(options.value || '').focus(); + typeof success === 'function' && success(layero); + } + ,resize: false + ,yes: function(index){ + var value = prompt.val(); + if(value === ''){ + prompt.focus(); + } else if(value.length > (options.maxlength||500)) { + layer.tips('最多输入'+ (options.maxlength || 500) +'个字数', prompt, {tips: 1}); + } else { + yes && yes(value, index, prompt); + } + } + }, options)); +}; + +//tab层 +layer.tab = function(options){ + options = options || {}; + + var tab = options.tab || {} + ,THIS = 'layui-this' + ,success = options.success; + + delete options.success; + + return layer.open($.extend({ + type: 1, + skin: 'layui-layer-tab' + skin('tab'), + resize: false, + title: function(){ + var len = tab.length, ii = 1, str = ''; + if(len > 0){ + str = ''+ tab[0].title +''; + for(; ii < len; ii++){ + str += ''+ tab[ii].title +''; + } + } + return str; + }(), + content: '
      '+ function(){ + var len = tab.length, ii = 1, str = ''; + if(len > 0){ + str = '
    • '+ (tab[0].content || 'no content') +'
    • '; + for(; ii < len; ii++){ + str += '
    • '+ (tab[ii].content || 'no content') +'
    • '; + } + } + return str; + }() +'
    ', + success: function(layero){ + var btn = layero.find('.layui-layer-title').children(); + var main = layero.find('.layui-layer-tabmain').children(); + btn.on('mousedown', function(e){ + e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; + var othis = $(this), index = othis.index(); + othis.addClass(THIS).siblings().removeClass(THIS); + main.eq(index).show().siblings().hide(); + typeof options.change === 'function' && options.change(index); + }); + typeof success === 'function' && success(layero); + } + }, options)); +}; + +//相册层 +layer.photos = function(options, loop, key){ + var dict = {}; + options = options || {}; + if(!options.photos) return; + var type = options.photos.constructor === Object; + var photos = type ? options.photos : {}, data = photos.data || []; + var start = photos.start || 0; + dict.imgIndex = (start|0) + 1; + + options.img = options.img || 'img'; + + var success = options.success; + delete options.success; + + if(!type){ //页面直接获取 + var parent = $(options.photos), pushData = function(){ + data = []; + parent.find(options.img).each(function(index){ + var othis = $(this); + othis.attr('layer-index', index); + data.push({ + alt: othis.attr('alt'), + pid: othis.attr('layer-pid'), + src: othis.attr('layer-src') || othis.attr('src'), + thumb: othis.attr('src') + }); + }) + }; + + pushData(); + + if (data.length === 0) return; + + loop || parent.on('click', options.img, function(){ + var othis = $(this), index = othis.attr('layer-index'); + layer.photos($.extend(options, { + photos: { + start: index, + data: data, + tab: options.tab + }, + full: options.full + }), true); + pushData(); + }) + + //不直接弹出 + if(!loop) return; + + } else if (data.length === 0){ + return layer.msg('没有图片'); + } + + //上一张 + dict.imgprev = function(key){ + dict.imgIndex--; + if(dict.imgIndex < 1){ + dict.imgIndex = data.length; + } + dict.tabimg(key); + }; + + //下一张 + dict.imgnext = function(key,errorMsg){ + dict.imgIndex++; + if(dict.imgIndex > data.length){ + dict.imgIndex = 1; + if (errorMsg) {return}; + } + dict.tabimg(key) + }; + + //方向键 + dict.keyup = function(event){ + if(!dict.end){ + var code = event.keyCode; + event.preventDefault(); + if(code === 37){ + dict.imgprev(true); + } else if(code === 39) { + dict.imgnext(true); + } else if(code === 27) { + layer.close(dict.index); + } + } + } + + //切换 + dict.tabimg = function(key){ + if(data.length <= 1) return; + photos.start = dict.imgIndex - 1; + layer.close(dict.index); + return layer.photos(options, true, key); + setTimeout(function(){ + layer.photos(options, true, key); + }, 200); + } + + //一些动作 + dict.event = function(){ + dict.bigimg.hover(function(){ + dict.imgsee.show(); + }, function(){ + dict.imgsee.hide(); + }); + + dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){ + event.preventDefault(); + dict.imgprev(); + }); + + dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){ + event.preventDefault(); + dict.imgnext(); + }); + + $(document).on('keyup', dict.keyup); + }; + + //图片预加载 + function loadImage(url, callback, error) { + var img = new Image(); + img.src = url; + if(img.complete){ + return callback(img); + } + img.onload = function(){ + img.onload = null; + callback(img); + }; + img.onerror = function(e){ + img.onerror = null; + error(e); + }; + }; + + dict.loadi = layer.load(1, { + shade: 'shade' in options ? false : 0.9, + scrollbar: false + }); + + loadImage(data[start].src, function(img){ + layer.close(dict.loadi); + dict.index = layer.open($.extend({ + type: 1, + id: 'layui-layer-photos', + area: function(){ + var imgarea = [img.width, img.height]; + var winarea = [$(window).width() - 100, $(window).height() - 100]; + + //如果 实际图片的宽或者高比 屏幕大(那么进行缩放) + if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){ + var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];//取宽度缩放比例、高度缩放比例 + if(wh[0] > wh[1]){//取缩放比例最大的进行缩放 + imgarea[0] = imgarea[0]/wh[0]; + imgarea[1] = imgarea[1]/wh[0]; + } else if(wh[0] < wh[1]){ + imgarea[0] = imgarea[0]/wh[1]; + imgarea[1] = imgarea[1]/wh[1]; + } + } + + return [imgarea[0]+'px', imgarea[1]+'px']; + }(), + title: false, + shade: 0.9, + shadeClose: true, + closeBtn: false, + move: '.layui-layer-phimg img', + moveType: 1, + scrollbar: false, + moveOut: true, + //anim: Math.random()*5|0, + isOutAnim: false, + skin: 'layui-layer-photos' + skin('photos'), + content: '
    ' + +''+ (data[start].alt||'') +'' + +'
    ' + +(data.length > 1 ? '' : '') + +'
    '+ (data[start].alt||'') +''+ dict.imgIndex +'/'+ data.length +'
    ' + +'
    ' + +'
    ', + success: function(layero, index){ + dict.bigimg = layero.find('.layui-layer-phimg'); + dict.imgsee = layero.find('.layui-layer-imguide,.layui-layer-imgbar'); + dict.event(layero); + options.tab && options.tab(data[start], layero); + typeof success === 'function' && success(layero); + }, end: function(){ + dict.end = true; + $(document).off('keyup', dict.keyup); + } + }, options)); + }, function(){ + layer.close(dict.loadi); + layer.msg('当前图片地址异常
    是否继续查看下一张?', { + time: 30000, + btn: ['下一张', '不看了'], + yes: function(){ + data.length > 1 && dict.imgnext(true,true); + } + }); + }); +}; + +//主入口 +ready.run = function(_$){ + $ = _$; + win = $(window); + doms.html = $('html'); + layer.open = function(deliver){ + var o = new Class(deliver); + return o.index; + }; +}; + +//加载方式 +window.layui && layui.define ? ( + layer.ready() + ,layui.define('jquery', function(exports){ //layui加载 + layer.path = layui.cache.dir; + ready.run(layui.$); + + //暴露模块 + window.layer = layer; + exports('layer', layer); + }) +) : ( + (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ //requirejs加载 + ready.run(window.jQuery); + return layer; + }) : function(){ //普通script标签加载 + ready.run(window.jQuery); + layer.ready(); + }() +); + +}(window); diff --git a/pccenter/src/main/resources/static/src/lay/modules/laypage.js b/pccenter/src/main/resources/static/src/lay/modules/laypage.js new file mode 100644 index 0000000000000000000000000000000000000000..e29d0bf6412a59acaa80400b07f9bbcf2b5c3e69 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/laypage.js @@ -0,0 +1,310 @@ +/** + + @Name : layui.laypage 分页组件 + @Author:贤心 + @License:MIT + + */ + +layui.define(function(exports){ + "use strict"; + + var doc = document + ,id = 'getElementById' + ,tag = 'getElementsByTagName' + + //字符常量 + ,MOD_NAME = 'laypage', DISABLED = 'layui-disabled' + + //构造器 + ,Class = function(options){ + var that = this; + that.config = options || {}; + that.config.index = ++laypage.index; + that.render(true); + }; + + //判断传入的容器类型 + Class.prototype.type = function(){ + var config = this.config; + if(typeof config.elem === 'object'){ + return config.elem.length === undefined ? 2 : 3; + } + }; + + //分页视图 + Class.prototype.view = function(){ + var that = this + ,config = that.config + ,groups = config.groups = 'groups' in config ? (config.groups|0) : 5; //连续页码个数 + + //排版 + config.layout = typeof config.layout === 'object' + ? config.layout + : ['prev', 'page', 'next']; + + config.count = config.count|0; //数据总数 + config.curr = (config.curr|0) || 1; //当前页 + + //每页条数的选择项 + config.limits = typeof config.limits === 'object' + ? config.limits + : [10, 20, 30, 40, 50]; + config.limit = (config.limit|0) || 10; //默认条数 + + //总页数 + config.pages = Math.ceil(config.count/config.limit) || 1; + + //当前页不能超过总页数 + if(config.curr > config.pages){ + config.curr = config.pages; + } + + //连续分页个数不能低于0且不能大于总页数 + if(groups < 0){ + groups = 1; + } else if (groups > config.pages){ + groups = config.pages; + } + + config.prev = 'prev' in config ? config.prev : '上一页'; //上一页文本 + config.next = 'next' in config ? config.next : '下一页'; //下一页文本 + + //计算当前组 + var index = config.pages > groups + ? Math.ceil( (config.curr + (groups > 1 ? 1 : 0)) / (groups > 0 ? groups : 1) ) + : 1 + + //视图片段 + ,views = { + //上一页 + prev: function(){ + return config.prev + ? ''+ config.prev +'' + : ''; + }() + + //页码 + ,page: function(){ + var pager = []; + + //数据量为0时,不输出页码 + if(config.count < 1){ + return ''; + } + + //首页 + if(index > 1 && config.first !== false && groups !== 0){ + pager.push(''+ (config.first || 1) +''); + } + + //计算当前页码组的起始页 + var halve = Math.floor((groups-1)/2) //页码数等分 + ,start = index > 1 ? config.curr - halve : 1 + ,end = index > 1 ? (function(){ + var max = config.curr + (groups - halve - 1); + return max > config.pages ? config.pages : max; + }()) : groups; + + //防止最后一组出现“不规定”的连续页码数 + if(end - start < groups - 1){ + start = end - groups + 1; + } + + //输出左分割符 + if(config.first !== false && start > 2){ + pager.push('') + } + + //输出连续页码 + for(; start <= end; start++){ + if(start === config.curr){ + //当前页 + pager.push(''+ start +''); + } else { + pager.push(''+ start +''); + } + } + + //输出输出右分隔符 & 末页 + if(config.pages > groups && config.pages > end && config.last !== false){ + if(end + 1 < config.pages){ + pager.push(''); + } + if(groups !== 0){ + pager.push(''+ (config.last || config.pages) +''); + } + } + + return pager.join(''); + }() + + //下一页 + ,next: function(){ + return config.next + ? ''+ config.next +'' + : ''; + }() + + //数据总数 + ,count: '共 '+ config.count +' 条' + + //每页条数 + ,limit: function(){ + var options = [''; + }() + + //刷新当前页 + ,refresh: ['' + ,'' + ,''].join('') + + //跳页区域 + ,skip: function(){ + return ['到第' + ,'' + ,'页' + ,''].join(''); + }() + }; + + return ['
    ' + ,function(){ + var plate = []; + layui.each(config.layout, function(index, item){ + if(views[item]){ + plate.push(views[item]) + } + }); + return plate.join(''); + }() + ,'
    '].join(''); + }; + + //跳页的回调 + Class.prototype.jump = function(elem, isskip){ + if(!elem) return; + var that = this + ,config = that.config + ,childs = elem.children + ,btn = elem[tag]('button')[0] + ,input = elem[tag]('input')[0] + ,select = elem[tag]('select')[0] + ,skip = function(){ + var curr = input.value.replace(/\s|\D/g, '')|0; + if(curr){ + config.curr = curr; + that.render(); + } + }; + + if(isskip) return skip(); + + //页码 + for(var i = 0, len = childs.length; i < len; i++){ + if(childs[i].nodeName.toLowerCase() === 'a'){ + laypage.on(childs[i], 'click', function(){ + var curr = this.getAttribute('data-page')|0; + if(curr < 1 || curr > config.pages) return; + config.curr = curr; + that.render(); + }); + } + } + + //条数 + if(select){ + laypage.on(select, 'change', function(){ + var value = this.value; + if(config.curr*value > config.count){ + config.curr = Math.ceil(config.count/value); + } + config.limit = value; + that.render(); + }); + } + + //确定 + if(btn){ + laypage.on(btn, 'click', function(){ + skip(); + }); + } + }; + + //输入页数字控制 + Class.prototype.skip = function(elem){ + if(!elem) return; + var that = this, input = elem[tag]('input')[0]; + if(!input) return; + laypage.on(input, 'keyup', function(e){ + var value = this.value + ,keyCode = e.keyCode; + if(/^(37|38|39|40)$/.test(keyCode)) return; + if(/\D/.test(value)){ + this.value = value.replace(/\D/, ''); + } + if(keyCode === 13){ + that.jump(elem, true) + } + }); + }; + + //渲染分页 + Class.prototype.render = function(load){ + var that = this + ,config = that.config + ,type = that.type() + ,view = that.view(); + + if(type === 2){ + config.elem && (config.elem.innerHTML = view); + } else if(type === 3){ + config.elem.html(view); + } else { + if(doc[id](config.elem)){ + doc[id](config.elem).innerHTML = view; + } + } + + config.jump && config.jump(config, load); + + var elem = doc[id]('layui-laypage-' + config.index); + that.jump(elem); + + if(config.hash && !load){ + location.hash = '!'+ config.hash +'='+ config.curr; + } + + that.skip(elem); + }; + + //外部接口 + var laypage = { + //分页渲染 + render: function(options){ + var o = new Class(options); + return o.index; + } + ,index: layui.laypage ? (layui.laypage.index + 10000) : 0 + ,on: function(elem, even, fn){ + elem.attachEvent ? elem.attachEvent('on'+ even, function(e){ //for ie + e.target = e.srcElement; + fn.call(elem, e); + }) : elem.addEventListener(even, fn, false); + return this; + } + } + + exports(MOD_NAME, laypage); +}); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/laytpl.js b/pccenter/src/main/resources/static/src/lay/modules/laytpl.js new file mode 100644 index 0000000000000000000000000000000000000000..9e91d964dc4cbf1b6379978577f5d295afb98eab --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/laytpl.js @@ -0,0 +1,123 @@ +/** + + @Name : layui.laytpl 模板引擎 + @Author:贤心 + @License:MIT + + */ + +layui.define(function(exports){ + + "use strict"; + + var config = { + open: '{{', + close: '}}' + }; + + var tool = { + exp: function(str){ + return new RegExp(str, 'g'); + }, + //匹配满足规则内容 + query: function(type, _, __){ + var types = [ + '#([\\s\\S])+?', //js语句 + '([^{#}])*?' //普通字段 + ][type || 0]; + return exp((_||'') + config.open + types + config.close + (__||'')); + }, + escape: function(html){ + return String(html||'').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') + .replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"'); + }, + error: function(e, tplog){ + var error = 'Laytpl Error:'; + typeof console === 'object' && console.error(error + e + '\n'+ (tplog || '')); + return error + e; + } + }; + + var exp = tool.exp, Tpl = function(tpl){ + this.tpl = tpl; + }; + + Tpl.pt = Tpl.prototype; + + window.errors = 0; + + //编译模版 + Tpl.pt.parse = function(tpl, data){ + var that = this, tplog = tpl; + var jss = exp('^'+config.open+'#', ''), jsse = exp(config.close+'$', ''); + + tpl = tpl.replace(/\s+|\r|\t|\n/g, ' ') + .replace(exp(config.open+'#'), config.open+'# ') + .replace(exp(config.close+'}'), '} '+config.close).replace(/\\/g, '\\\\') + + //不匹配指定区域的内容 + .replace(exp(config.open + '!(.+?)!' + config.close), function(str){ + str = str.replace(exp('^'+ config.open + '!'), '') + .replace(exp('!'+ config.close), '') + .replace(exp(config.open + '|' + config.close), function(tag){ + return tag.replace(/(.)/g, '\\$1') + }); + return str + }) + + //匹配JS规则内容 + .replace(/(?="|')/g, '\\').replace(tool.query(), function(str){ + str = str.replace(jss, '').replace(jsse, ''); + return '";' + str.replace(/\\/g, '') + ';view+="'; + }) + + //匹配普通字段 + .replace(tool.query(1), function(str){ + var start = '"+('; + if(str.replace(/\s/g, '') === config.open+config.close){ + return ''; + } + str = str.replace(exp(config.open+'|'+config.close), ''); + if(/^=/.test(str)){ + str = str.replace(/^=/, ''); + start = '"+_escape_('; + } + return start + str.replace(/\\/g, '') + ')+"'; + }); + + tpl = '"use strict";var view = "' + tpl + '";return view;'; + + try{ + that.cache = tpl = new Function('d, _escape_', tpl); + return tpl(data, tool.escape); + } catch(e){ + delete that.cache; + return tool.error(e, tplog); + } + }; + + Tpl.pt.render = function(data, callback){ + var that = this, tpl; + if(!data) return tool.error('no data'); + tpl = that.cache ? that.cache(data, tool.escape) : that.parse(that.tpl, data); + if(!callback) return tpl; + callback(tpl); + }; + + var laytpl = function(tpl){ + if(typeof tpl !== 'string') return tool.error('Template not found'); + return new Tpl(tpl); + }; + + laytpl.config = function(options){ + options = options || {}; + for(var i in options){ + config[i] = options[i]; + } + }; + + laytpl.v = '1.2.0'; + + exports('laytpl', laytpl); + +}); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/mobile.js b/pccenter/src/main/resources/static/src/lay/modules/mobile.js new file mode 100644 index 0000000000000000000000000000000000000000..e6f00164d865ce676e918f7efab459b28fcb513f --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/mobile.js @@ -0,0 +1,30 @@ +/** + + @Name:layui 移动模块入口 | 构建后则为移动模块集合 + @Author:贤心 + @License:MIT + + */ + + +if(!layui['layui.mobile']){ + layui.config({ + base: layui.cache.dir + 'lay/modules/mobile/' + }).extend({ + 'layer-mobile': 'layer-mobile' + ,'zepto': 'zepto' + ,'upload-mobile': 'upload-mobile' + ,'layim-mobile': 'layim-mobile' + }); +} + +layui.define([ + 'layer-mobile' + ,'zepto' + ,'layim-mobile' +], function(exports){ + exports('mobile', { + layer: layui['layer-mobile'] //弹层 + ,layim: layui['layim-mobile'] //WebIM + }); +}); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/mobile/layer-mobile.js b/pccenter/src/main/resources/static/src/lay/modules/mobile/layer-mobile.js new file mode 100644 index 0000000000000000000000000000000000000000..1b9ff1f37190120ba8a1ea240c8517c673cb5197 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/mobile/layer-mobile.js @@ -0,0 +1,189 @@ +/*! + + @Name:layer mobile v2.0.0 弹层组件移动版 + @Author:贤心 + @Site:http://layer.layui.com/mobie/ + @License:MIT + + */ + +layui.define(function(exports){ + + "use strict"; + + var win = window, doc = document, query = 'querySelectorAll', claname = 'getElementsByClassName', S = function(s){ + return doc[query](s); + }; + + //默认配置 + var config = { + type: 0 + ,shade: true + ,shadeClose: true + ,fixed: true + ,anim: 'scale' //默认动画类型 + }; + + var ready = { + extend: function(obj){ + var newobj = JSON.parse(JSON.stringify(config)); + for(var i in obj){ + newobj[i] = obj[i]; + } + return newobj; + }, + timer: {}, end: {} + }; + + //点触事件 + ready.touch = function(elem, fn){ + elem.addEventListener('click', function(e){ + fn.call(this, e); + }, false); + }; + + var index = 0, classs = ['layui-m-layer'], Layer = function(options){ + var that = this; + that.config = ready.extend(options); + that.view(); + }; + + Layer.prototype.view = function(){ + var that = this, config = that.config, layerbox = doc.createElement('div'); + + that.id = layerbox.id = classs[0] + index; + layerbox.setAttribute('class', classs[0] + ' ' + classs[0]+(config.type || 0)); + layerbox.setAttribute('index', index); + + //标题区域 + var title = (function(){ + var titype = typeof config.title === 'object'; + return config.title + ? '

    '+ (titype ? config.title[0] : config.title) +'

    ' + : ''; + }()); + + //按钮区域 + var button = (function(){ + typeof config.btn === 'string' && (config.btn = [config.btn]); + var btns = (config.btn || []).length, btndom; + if(btns === 0 || !config.btn){ + return ''; + } + btndom = ''+ config.btn[0] +'' + if(btns === 2){ + btndom = ''+ config.btn[1] +'' + btndom; + } + return '
    '+ btndom + '
    '; + }()); + + if(!config.fixed){ + config.top = config.hasOwnProperty('top') ? config.top : 100; + config.style = config.style || ''; + config.style += ' top:'+ ( doc.body.scrollTop + config.top) + 'px'; + } + + if(config.type === 2){ + config.content = '

    '+ (config.content||'') +'

    '; + } + + if(config.skin) config.anim = 'up'; + if(config.skin === 'msg') config.shade = false; + + layerbox.innerHTML = (config.shade ? '
    ' : '') + +'
    ' + +'
    ' + +'
    ' + + title + +'
    '+ config.content +'
    ' + + button + +'
    ' + +'
    ' + +'
    '; + + if(!config.type || config.type === 2){ + var dialogs = doc[claname](classs[0] + config.type), dialen = dialogs.length; + if(dialen >= 1){ + layer.close(dialogs[0].getAttribute('index')) + } + } + + document.body.appendChild(layerbox); + var elem = that.elem = S('#'+that.id)[0]; + config.success && config.success(elem); + + that.index = index++; + that.action(config, elem); + }; + + Layer.prototype.action = function(config, elem){ + var that = this; + + //自动关闭 + if(config.time){ + ready.timer[that.index] = setTimeout(function(){ + layer.close(that.index); + }, config.time*1000); + } + + //确认取消 + var btn = function(){ + var type = this.getAttribute('type'); + if(type == 0){ + config.no && config.no(); + layer.close(that.index); + } else { + config.yes ? config.yes(that.index) : layer.close(that.index); + } + }; + if(config.btn){ + var btns = elem[claname]('layui-m-layerbtn')[0].children, btnlen = btns.length; + for(var ii = 0; ii < btnlen; ii++){ + ready.touch(btns[ii], btn); + } + } + + //点遮罩关闭 + if(config.shade && config.shadeClose){ + var shade = elem[claname]('layui-m-layershade')[0]; + ready.touch(shade, function(){ + layer.close(that.index, config.end); + }); + } + + config.end && (ready.end[that.index] = config.end); + }; + + var layer = { + v: '2.0 m', + index: index, + + //核心方法 + open: function(options){ + var o = new Layer(options || {}); + return o.index; + }, + + close: function(index){ + var ibox = S('#'+classs[0]+index)[0]; + if(!ibox) return; + ibox.innerHTML = ''; + doc.body.removeChild(ibox); + clearTimeout(ready.timer[index]); + delete ready.timer[index]; + typeof ready.end[index] === 'function' && ready.end[index](); + delete ready.end[index]; + }, + + //关闭所有layer层 + closeAll: function(){ + var boxs = doc[claname](classs[0]); + for(var i = 0, len = boxs.length; i < len; i++){ + layer.close((boxs[0].getAttribute('index')|0)); + } + } + }; + + exports('layer-mobile', layer); + +}); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/mobile/layim-mobile-open.js b/pccenter/src/main/resources/static/src/lay/modules/mobile/layim-mobile-open.js new file mode 100644 index 0000000000000000000000000000000000000000..bd623c548dfa99fe0cfcd0e271dd472e1c694aea --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/mobile/layim-mobile-open.js @@ -0,0 +1,11 @@ +/** + + @Name:layim mobile 开源包 + @Author:贤心 + @License:MIT + + */ + +layui.define(function(exports){ + exports('layim-mobile', layui.v); +}); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/mobile/zepto.js b/pccenter/src/main/resources/static/src/lay/modules/mobile/zepto.js new file mode 100644 index 0000000000000000000000000000000000000000..404ec0b8cbc8c73ec7ee40de2db16be2746f7253 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/mobile/zepto.js @@ -0,0 +1,1646 @@ +/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */ + +layui.define(function(exports){ + + var Zepto = (function() { + var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice, + document = window.document, + elementDisplay = {}, classCache = {}, + cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 }, + fragmentRE = /^\s*<(\w+|!)[^>]*>/, + singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rootNodeRE = /^(?:body|html)$/i, + capitalRE = /([A-Z])/g, + + // special attributes that should be get/set via method calls + methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'], + + adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ], + table = document.createElement('table'), + tableRow = document.createElement('tr'), + containers = { + 'tr': document.createElement('tbody'), + 'tbody': table, 'thead': table, 'tfoot': table, + 'td': tableRow, 'th': tableRow, + '*': document.createElement('div') + }, + readyRE = /complete|loaded|interactive/, + simpleSelectorRE = /^[\w-]*$/, + class2type = {}, + toString = class2type.toString, + zepto = {}, + camelize, uniq, + tempParent = document.createElement('div'), + propMap = { + 'tabindex': 'tabIndex', + 'readonly': 'readOnly', + 'for': 'htmlFor', + 'class': 'className', + 'maxlength': 'maxLength', + 'cellspacing': 'cellSpacing', + 'cellpadding': 'cellPadding', + 'rowspan': 'rowSpan', + 'colspan': 'colSpan', + 'usemap': 'useMap', + 'frameborder': 'frameBorder', + 'contenteditable': 'contentEditable' + }, + isArray = Array.isArray || + function(object){ return object instanceof Array } + + zepto.matches = function(element, selector) { + if (!selector || !element || element.nodeType !== 1) return false + var matchesSelector = element.matches || element.webkitMatchesSelector || + element.mozMatchesSelector || element.oMatchesSelector || + element.matchesSelector + if (matchesSelector) return matchesSelector.call(element, selector) + // fall back to performing a selector: + var match, parent = element.parentNode, temp = !parent + if (temp) (parent = tempParent).appendChild(element) + match = ~zepto.qsa(parent, selector).indexOf(element) + temp && tempParent.removeChild(element) + return match + } + + function type(obj) { + return obj == null ? String(obj) : + class2type[toString.call(obj)] || "object" + } + + function isFunction(value) { return type(value) == "function" } + function isWindow(obj) { return obj != null && obj == obj.window } + function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE } + function isObject(obj) { return type(obj) == "object" } + function isPlainObject(obj) { + return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype + } + + function likeArray(obj) { + var length = !!obj && 'length' in obj && obj.length, + type = $.type(obj) + + return 'function' != type && !isWindow(obj) && ( + 'array' == type || length === 0 || + (typeof length == 'number' && length > 0 && (length - 1) in obj) + ) + } + + function compact(array) { return filter.call(array, function(item){ return item != null }) } + function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array } + camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) } + function dasherize(str) { + return str.replace(/::/g, '/') + .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') + .replace(/([a-z\d])([A-Z])/g, '$1_$2') + .replace(/_/g, '-') + .toLowerCase() + } + uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) } + + function classRE(name) { + return name in classCache ? + classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)')) + } + + function maybeAddPx(name, value) { + return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value + } + + function defaultDisplay(nodeName) { + var element, display + if (!elementDisplay[nodeName]) { + element = document.createElement(nodeName) + document.body.appendChild(element) + display = getComputedStyle(element, '').getPropertyValue("display") + element.parentNode.removeChild(element) + display == "none" && (display = "block") + elementDisplay[nodeName] = display + } + return elementDisplay[nodeName] + } + + function children(element) { + return 'children' in element ? + slice.call(element.children) : + $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node }) + } + + function Z(dom, selector) { + var i, len = dom ? dom.length : 0 + for (i = 0; i < len; i++) this[i] = dom[i] + this.length = len + this.selector = selector || '' + } + + // `$.zepto.fragment` takes a html string and an optional tag name + // to generate DOM nodes from the given html string. + // The generated DOM nodes are returned as an array. + // This function can be overridden in plugins for example to make + // it compatible with browsers that don't support the DOM fully. + zepto.fragment = function(html, name, properties) { + var dom, nodes, container + + // A special case optimization for a single tag + if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1)) + + if (!dom) { + if (html.replace) html = html.replace(tagExpanderRE, "<$1>") + if (name === undefined) name = fragmentRE.test(html) && RegExp.$1 + if (!(name in containers)) name = '*' + + container = containers[name] + container.innerHTML = '' + html + dom = $.each(slice.call(container.childNodes), function(){ + container.removeChild(this) + }) + } + + if (isPlainObject(properties)) { + nodes = $(dom) + $.each(properties, function(key, value) { + if (methodAttributes.indexOf(key) > -1) nodes[key](value) + else nodes.attr(key, value) + }) + } + + return dom + } + + // `$.zepto.Z` swaps out the prototype of the given `dom` array + // of nodes with `$.fn` and thus supplying all the Zepto functions + // to the array. This method can be overridden in plugins. + zepto.Z = function(dom, selector) { + return new Z(dom, selector) + } + + // `$.zepto.isZ` should return `true` if the given object is a Zepto + // collection. This method can be overridden in plugins. + zepto.isZ = function(object) { + return object instanceof zepto.Z + } + + // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and + // takes a CSS selector and an optional context (and handles various + // special cases). + // This method can be overridden in plugins. + zepto.init = function(selector, context) { + var dom + // If nothing given, return an empty Zepto collection + if (!selector) return zepto.Z() + // Optimize for string selectors + else if (typeof selector == 'string') { + selector = selector.trim() + // If it's a html fragment, create nodes from it + // Note: In both Chrome 21 and Firefox 15, DOM error 12 + // is thrown if the fragment doesn't begin with < + if (selector[0] == '<' && fragmentRE.test(selector)) + dom = zepto.fragment(selector, RegExp.$1, context), selector = null + // If there's a context, create a collection on that context first, and select + // nodes from there + else if (context !== undefined) return $(context).find(selector) + // If it's a CSS selector, use it to select nodes. + else dom = zepto.qsa(document, selector) + } + // If a function is given, call it when the DOM is ready + else if (isFunction(selector)) return $(document).ready(selector) + // If a Zepto collection is given, just return it + else if (zepto.isZ(selector)) return selector + else { + // normalize array if an array of nodes is given + if (isArray(selector)) dom = compact(selector) + // Wrap DOM nodes. + else if (isObject(selector)) + dom = [selector], selector = null + // If it's a html fragment, create nodes from it + else if (fragmentRE.test(selector)) + dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null + // If there's a context, create a collection on that context first, and select + // nodes from there + else if (context !== undefined) return $(context).find(selector) + // And last but no least, if it's a CSS selector, use it to select nodes. + else dom = zepto.qsa(document, selector) + } + // create a new Zepto collection from the nodes found + return zepto.Z(dom, selector) + } + + // `$` will be the base `Zepto` object. When calling this + // function just call `$.zepto.init, which makes the implementation + // details of selecting nodes and creating Zepto collections + // patchable in plugins. + $ = function(selector, context){ + return zepto.init(selector, context) + } + + function extend(target, source, deep) { + for (key in source) + if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { + if (isPlainObject(source[key]) && !isPlainObject(target[key])) + target[key] = {} + if (isArray(source[key]) && !isArray(target[key])) + target[key] = [] + extend(target[key], source[key], deep) + } + else if (source[key] !== undefined) target[key] = source[key] + } + + // Copy all but undefined properties from one or more + // objects to the `target` object. + $.extend = function(target){ + var deep, args = slice.call(arguments, 1) + if (typeof target == 'boolean') { + deep = target + target = args.shift() + } + args.forEach(function(arg){ extend(target, arg, deep) }) + return target + } + + // `$.zepto.qsa` is Zepto's CSS selector implementation which + // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`. + // This method can be overridden in plugins. + zepto.qsa = function(element, selector){ + var found, + maybeID = selector[0] == '#', + maybeClass = !maybeID && selector[0] == '.', + nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked + isSimple = simpleSelectorRE.test(nameOnly) + return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById + ( (found = element.getElementById(nameOnly)) ? [found] : [] ) : + (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] : + slice.call( + isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName + maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class + element.getElementsByTagName(selector) : // Or a tag + element.querySelectorAll(selector) // Or it's not simple, and we need to query all + ) + } + + function filtered(nodes, selector) { + return selector == null ? $(nodes) : $(nodes).filter(selector) + } + + $.contains = document.documentElement.contains ? + function(parent, node) { + return parent !== node && parent.contains(node) + } : + function(parent, node) { + while (node && (node = node.parentNode)) + if (node === parent) return true + return false + } + + function funcArg(context, arg, idx, payload) { + return isFunction(arg) ? arg.call(context, idx, payload) : arg + } + + function setAttribute(node, name, value) { + value == null ? node.removeAttribute(name) : node.setAttribute(name, value) + } + + // access className property while respecting SVGAnimatedString + function className(node, value){ + var klass = node.className || '', + svg = klass && klass.baseVal !== undefined + + if (value === undefined) return svg ? klass.baseVal : klass + svg ? (klass.baseVal = value) : (node.className = value) + } + + // "true" => true + // "false" => false + // "null" => null + // "42" => 42 + // "42.5" => 42.5 + // "08" => "08" + // JSON => parse if valid + // String => self + function deserializeValue(value) { + try { + return value ? + value == "true" || + ( value == "false" ? false : + value == "null" ? null : + +value + "" == value ? +value : + /^[\[\{]/.test(value) ? $.parseJSON(value) : + value ) + : value + } catch(e) { + return value + } + } + + $.type = type + $.isFunction = isFunction + $.isWindow = isWindow + $.isArray = isArray + $.isPlainObject = isPlainObject + + $.isEmptyObject = function(obj) { + var name + for (name in obj) return false + return true + } + + $.isNumeric = function(val) { + var num = Number(val), type = typeof val + return val != null && type != 'boolean' && + (type != 'string' || val.length) && + !isNaN(num) && isFinite(num) || false + } + + $.inArray = function(elem, array, i){ + return emptyArray.indexOf.call(array, elem, i) + } + + $.camelCase = camelize + $.trim = function(str) { + return str == null ? "" : String.prototype.trim.call(str) + } + + // plugin compatibility + $.uuid = 0 + $.support = { } + $.expr = { } + $.noop = function() {} + + $.map = function(elements, callback){ + var value, values = [], i, key + if (likeArray(elements)) + for (i = 0; i < elements.length; i++) { + value = callback(elements[i], i) + if (value != null) values.push(value) + } + else + for (key in elements) { + value = callback(elements[key], key) + if (value != null) values.push(value) + } + return flatten(values) + } + + $.each = function(elements, callback){ + var i, key + if (likeArray(elements)) { + for (i = 0; i < elements.length; i++) + if (callback.call(elements[i], i, elements[i]) === false) return elements + } else { + for (key in elements) + if (callback.call(elements[key], key, elements[key]) === false) return elements + } + + return elements + } + + $.grep = function(elements, callback){ + return filter.call(elements, callback) + } + + if (window.JSON) $.parseJSON = JSON.parse + + // Populate the class2type map + $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase() + }) + + // Define methods that will be available on all + // Zepto collections + $.fn = { + constructor: zepto.Z, + length: 0, + + // Because a collection acts like an array + // copy over these useful array functions. + forEach: emptyArray.forEach, + reduce: emptyArray.reduce, + push: emptyArray.push, + sort: emptyArray.sort, + splice: emptyArray.splice, + indexOf: emptyArray.indexOf, + concat: function(){ + var i, value, args = [] + for (i = 0; i < arguments.length; i++) { + value = arguments[i] + args[i] = zepto.isZ(value) ? value.toArray() : value + } + return concat.apply(zepto.isZ(this) ? this.toArray() : this, args) + }, + + // `map` and `slice` in the jQuery API work differently + // from their array counterparts + map: function(fn){ + return $($.map(this, function(el, i){ return fn.call(el, i, el) })) + }, + slice: function(){ + return $(slice.apply(this, arguments)) + }, + + ready: function(callback){ + // need to check if document.body exists for IE as that browser reports + // document ready when it hasn't yet created the body element + if (readyRE.test(document.readyState) && document.body) callback($) + else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false) + return this + }, + get: function(idx){ + return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length] + }, + toArray: function(){ return this.get() }, + size: function(){ + return this.length + }, + remove: function(){ + return this.each(function(){ + if (this.parentNode != null) + this.parentNode.removeChild(this) + }) + }, + each: function(callback){ + emptyArray.every.call(this, function(el, idx){ + return callback.call(el, idx, el) !== false + }) + return this + }, + filter: function(selector){ + if (isFunction(selector)) return this.not(this.not(selector)) + return $(filter.call(this, function(element){ + return zepto.matches(element, selector) + })) + }, + add: function(selector,context){ + return $(uniq(this.concat($(selector,context)))) + }, + is: function(selector){ + return this.length > 0 && zepto.matches(this[0], selector) + }, + not: function(selector){ + var nodes=[] + if (isFunction(selector) && selector.call !== undefined) + this.each(function(idx){ + if (!selector.call(this,idx)) nodes.push(this) + }) + else { + var excludes = typeof selector == 'string' ? this.filter(selector) : + (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector) + this.forEach(function(el){ + if (excludes.indexOf(el) < 0) nodes.push(el) + }) + } + return $(nodes) + }, + has: function(selector){ + return this.filter(function(){ + return isObject(selector) ? + $.contains(this, selector) : + $(this).find(selector).size() + }) + }, + eq: function(idx){ + return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1) + }, + first: function(){ + var el = this[0] + return el && !isObject(el) ? el : $(el) + }, + last: function(){ + var el = this[this.length - 1] + return el && !isObject(el) ? el : $(el) + }, + find: function(selector){ + var result, $this = this + if (!selector) result = $() + else if (typeof selector == 'object') + result = $(selector).filter(function(){ + var node = this + return emptyArray.some.call($this, function(parent){ + return $.contains(parent, node) + }) + }) + else if (this.length == 1) result = $(zepto.qsa(this[0], selector)) + else result = this.map(function(){ return zepto.qsa(this, selector) }) + return result + }, + closest: function(selector, context){ + var nodes = [], collection = typeof selector == 'object' && $(selector) + this.each(function(_, node){ + while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) + node = node !== context && !isDocument(node) && node.parentNode + if (node && nodes.indexOf(node) < 0) nodes.push(node) + }) + return $(nodes) + }, + parents: function(selector){ + var ancestors = [], nodes = this + while (nodes.length > 0) + nodes = $.map(nodes, function(node){ + if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) { + ancestors.push(node) + return node + } + }) + return filtered(ancestors, selector) + }, + parent: function(selector){ + return filtered(uniq(this.pluck('parentNode')), selector) + }, + children: function(selector){ + return filtered(this.map(function(){ return children(this) }), selector) + }, + contents: function() { + return this.map(function() { return this.contentDocument || slice.call(this.childNodes) }) + }, + siblings: function(selector){ + return filtered(this.map(function(i, el){ + return filter.call(children(el.parentNode), function(child){ return child!==el }) + }), selector) + }, + empty: function(){ + return this.each(function(){ this.innerHTML = '' }) + }, + // `pluck` is borrowed from Prototype.js + pluck: function(property){ + return $.map(this, function(el){ return el[property] }) + }, + show: function(){ + return this.each(function(){ + this.style.display == "none" && (this.style.display = '') + if (getComputedStyle(this, '').getPropertyValue("display") == "none") + this.style.display = defaultDisplay(this.nodeName) + }) + }, + replaceWith: function(newContent){ + return this.before(newContent).remove() + }, + wrap: function(structure){ + var func = isFunction(structure) + if (this[0] && !func) + var dom = $(structure).get(0), + clone = dom.parentNode || this.length > 1 + + return this.each(function(index){ + $(this).wrapAll( + func ? structure.call(this, index) : + clone ? dom.cloneNode(true) : dom + ) + }) + }, + wrapAll: function(structure){ + if (this[0]) { + $(this[0]).before(structure = $(structure)) + var children + // drill down to the inmost element + while ((children = structure.children()).length) structure = children.first() + $(structure).append(this) + } + return this + }, + wrapInner: function(structure){ + var func = isFunction(structure) + return this.each(function(index){ + var self = $(this), contents = self.contents(), + dom = func ? structure.call(this, index) : structure + contents.length ? contents.wrapAll(dom) : self.append(dom) + }) + }, + unwrap: function(){ + this.parent().each(function(){ + $(this).replaceWith($(this).children()) + }) + return this + }, + clone: function(){ + return this.map(function(){ return this.cloneNode(true) }) + }, + hide: function(){ + return this.css("display", "none") + }, + toggle: function(setting){ + return this.each(function(){ + var el = $(this) + ;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide() + }) + }, + prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') }, + next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') }, + html: function(html){ + return 0 in arguments ? + this.each(function(idx){ + var originHtml = this.innerHTML + $(this).empty().append( funcArg(this, html, idx, originHtml) ) + }) : + (0 in this ? this[0].innerHTML : null) + }, + text: function(text){ + return 0 in arguments ? + this.each(function(idx){ + var newText = funcArg(this, text, idx, this.textContent) + this.textContent = newText == null ? '' : ''+newText + }) : + (0 in this ? this.pluck('textContent').join("") : null) + }, + attr: function(name, value){ + var result + return (typeof name == 'string' && !(1 in arguments)) ? + (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) : + this.each(function(idx){ + if (this.nodeType !== 1) return + if (isObject(name)) for (key in name) setAttribute(this, key, name[key]) + else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name))) + }) + }, + removeAttr: function(name){ + return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){ + setAttribute(this, attribute) + }, this)}) + }, + prop: function(name, value){ + name = propMap[name] || name + return (1 in arguments) ? + this.each(function(idx){ + this[name] = funcArg(this, value, idx, this[name]) + }) : + (this[0] && this[0][name]) + }, + removeProp: function(name){ + name = propMap[name] || name + return this.each(function(){ delete this[name] }) + }, + data: function(name, value){ + var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase() + + var data = (1 in arguments) ? + this.attr(attrName, value) : + this.attr(attrName) + + return data !== null ? deserializeValue(data) : undefined + }, + val: function(value){ + if (0 in arguments) { + if (value == null) value = "" + return this.each(function(idx){ + this.value = funcArg(this, value, idx, this.value) + }) + } else { + return this[0] && (this[0].multiple ? + $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') : + this[0].value) + } + }, + offset: function(coordinates){ + if (coordinates) return this.each(function(index){ + var $this = $(this), + coords = funcArg(this, coordinates, index, $this.offset()), + parentOffset = $this.offsetParent().offset(), + props = { + top: coords.top - parentOffset.top, + left: coords.left - parentOffset.left + } + + if ($this.css('position') == 'static') props['position'] = 'relative' + $this.css(props) + }) + if (!this.length) return null + if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0])) + return {top: 0, left: 0} + var obj = this[0].getBoundingClientRect() + return { + left: obj.left + window.pageXOffset, + top: obj.top + window.pageYOffset, + width: Math.round(obj.width), + height: Math.round(obj.height) + } + }, + css: function(property, value){ + if (arguments.length < 2) { + var element = this[0] + if (typeof property == 'string') { + if (!element) return + return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property) + } else if (isArray(property)) { + if (!element) return + var props = {} + var computedStyle = getComputedStyle(element, '') + $.each(property, function(_, prop){ + props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop)) + }) + return props + } + } + + var css = '' + if (type(property) == 'string') { + if (!value && value !== 0) + this.each(function(){ this.style.removeProperty(dasherize(property)) }) + else + css = dasherize(property) + ":" + maybeAddPx(property, value) + } else { + for (key in property) + if (!property[key] && property[key] !== 0) + this.each(function(){ this.style.removeProperty(dasherize(key)) }) + else + css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';' + } + + return this.each(function(){ this.style.cssText += ';' + css }) + }, + index: function(element){ + return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]) + }, + hasClass: function(name){ + if (!name) return false + return emptyArray.some.call(this, function(el){ + return this.test(className(el)) + }, classRE(name)) + }, + addClass: function(name){ + if (!name) return this + return this.each(function(idx){ + if (!('className' in this)) return + classList = [] + var cls = className(this), newName = funcArg(this, name, idx, cls) + newName.split(/\s+/g).forEach(function(klass){ + if (!$(this).hasClass(klass)) classList.push(klass) + }, this) + classList.length && className(this, cls + (cls ? " " : "") + classList.join(" ")) + }) + }, + removeClass: function(name){ + return this.each(function(idx){ + if (!('className' in this)) return + if (name === undefined) return className(this, '') + classList = className(this) + funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){ + classList = classList.replace(classRE(klass), " ") + }) + className(this, classList.trim()) + }) + }, + toggleClass: function(name, when){ + if (!name) return this + return this.each(function(idx){ + var $this = $(this), names = funcArg(this, name, idx, className(this)) + names.split(/\s+/g).forEach(function(klass){ + (when === undefined ? !$this.hasClass(klass) : when) ? + $this.addClass(klass) : $this.removeClass(klass) + }) + }) + }, + scrollTop: function(value){ + if (!this.length) return + var hasScrollTop = 'scrollTop' in this[0] + if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset + return this.each(hasScrollTop ? + function(){ this.scrollTop = value } : + function(){ this.scrollTo(this.scrollX, value) }) + }, + scrollLeft: function(value){ + if (!this.length) return + var hasScrollLeft = 'scrollLeft' in this[0] + if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset + return this.each(hasScrollLeft ? + function(){ this.scrollLeft = value } : + function(){ this.scrollTo(value, this.scrollY) }) + }, + position: function() { + if (!this.length) return + + var elem = this[0], + // Get *real* offsetParent + offsetParent = this.offsetParent(), + // Get correct offsets + offset = this.offset(), + parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset() + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( $(elem).css('margin-top') ) || 0 + offset.left -= parseFloat( $(elem).css('margin-left') ) || 0 + + // Add offsetParent borders + parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0 + parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0 + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + } + }, + offsetParent: function() { + return this.map(function(){ + var parent = this.offsetParent || document.body + while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") + parent = parent.offsetParent + return parent + }) + } + } + + // for now + $.fn.detach = $.fn.remove + + // Generate the `width` and `height` functions + ;['width', 'height'].forEach(function(dimension){ + var dimensionProperty = + dimension.replace(/./, function(m){ return m[0].toUpperCase() }) + + $.fn[dimension] = function(value){ + var offset, el = this[0] + if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] : + isDocument(el) ? el.documentElement['scroll' + dimensionProperty] : + (offset = this.offset()) && offset[dimension] + else return this.each(function(idx){ + el = $(this) + el.css(dimension, funcArg(this, value, idx, el[dimension]())) + }) + } + }) + + function traverseNode(node, fun) { + fun(node) + for (var i = 0, len = node.childNodes.length; i < len; i++) + traverseNode(node.childNodes[i], fun) + } + + // Generate the `after`, `prepend`, `before`, `append`, + // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods. + adjacencyOperators.forEach(function(operator, operatorIndex) { + var inside = operatorIndex % 2 //=> prepend, append + + $.fn[operator] = function(){ + // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings + var argType, nodes = $.map(arguments, function(arg) { + var arr = [] + argType = type(arg) + if (argType == "array") { + arg.forEach(function(el) { + if (el.nodeType !== undefined) return arr.push(el) + else if ($.zepto.isZ(el)) return arr = arr.concat(el.get()) + arr = arr.concat(zepto.fragment(el)) + }) + return arr + } + return argType == "object" || arg == null ? + arg : zepto.fragment(arg) + }), + parent, copyByClone = this.length > 1 + if (nodes.length < 1) return this + + return this.each(function(_, target){ + parent = inside ? target : target.parentNode + + // convert all methods to a "before" operation + target = operatorIndex == 0 ? target.nextSibling : + operatorIndex == 1 ? target.firstChild : + operatorIndex == 2 ? target : + null + + var parentInDocument = $.contains(document.documentElement, parent) + + nodes.forEach(function(node){ + if (copyByClone) node = node.cloneNode(true) + else if (!parent) return $(node).remove() + + parent.insertBefore(node, target) + if (parentInDocument) traverseNode(node, function(el){ + if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && + (!el.type || el.type === 'text/javascript') && !el.src){ + var target = el.ownerDocument ? el.ownerDocument.defaultView : window + target['eval'].call(target, el.innerHTML) + } + }) + }) + }) + } + + // after => insertAfter + // prepend => prependTo + // before => insertBefore + // append => appendTo + $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){ + $(html)[operator](this) + return this + } + }) + + zepto.Z.prototype = Z.prototype = $.fn + + // Export internal API functions in the `$.zepto` namespace + zepto.uniq = uniq + zepto.deserializeValue = deserializeValue + $.zepto = zepto + + return $ +})() + +;(function($){ + var _zid = 1, undefined, + slice = Array.prototype.slice, + isFunction = $.isFunction, + isString = function(obj){ return typeof obj == 'string' }, + handlers = {}, + specialEvents={}, + focusinSupported = 'onfocusin' in window, + focus = { focus: 'focusin', blur: 'focusout' }, + hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' } + + specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents' + + function zid(element) { + return element._zid || (element._zid = _zid++) + } + function findHandlers(element, event, fn, selector) { + event = parse(event) + if (event.ns) var matcher = matcherFor(event.ns) + return (handlers[zid(element)] || []).filter(function(handler) { + return handler + && (!event.e || handler.e == event.e) + && (!event.ns || matcher.test(handler.ns)) + && (!fn || zid(handler.fn) === zid(fn)) + && (!selector || handler.sel == selector) + }) + } + function parse(event) { + var parts = ('' + event).split('.') + return {e: parts[0], ns: parts.slice(1).sort().join(' ')} + } + function matcherFor(ns) { + return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)') + } + + function eventCapture(handler, captureSetting) { + return handler.del && + (!focusinSupported && (handler.e in focus)) || + !!captureSetting + } + + function realEvent(type) { + return hover[type] || (focusinSupported && focus[type]) || type + } + + function add(element, events, fn, data, selector, delegator, capture){ + var id = zid(element), set = (handlers[id] || (handlers[id] = [])) + events.split(/\s/).forEach(function(event){ + if (event == 'ready') return $(document).ready(fn) + var handler = parse(event) + handler.fn = fn + handler.sel = selector + // emulate mouseenter, mouseleave + if (handler.e in hover) fn = function(e){ + var related = e.relatedTarget + if (!related || (related !== this && !$.contains(this, related))) + return handler.fn.apply(this, arguments) + } + handler.del = delegator + var callback = delegator || fn + handler.proxy = function(e){ + e = compatible(e) + if (e.isImmediatePropagationStopped()) return + e.data = data + var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args)) + if (result === false) e.preventDefault(), e.stopPropagation() + return result + } + handler.i = set.length + set.push(handler) + if ('addEventListener' in element) + element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) + }) + } + function remove(element, events, fn, selector, capture){ + var id = zid(element) + ;(events || '').split(/\s/).forEach(function(event){ + findHandlers(element, event, fn, selector).forEach(function(handler){ + delete handlers[id][handler.i] + if ('removeEventListener' in element) + element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) + }) + }) + } + + $.event = { add: add, remove: remove } + + $.proxy = function(fn, context) { + var args = (2 in arguments) && slice.call(arguments, 2) + if (isFunction(fn)) { + var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) } + proxyFn._zid = zid(fn) + return proxyFn + } else if (isString(context)) { + if (args) { + args.unshift(fn[context], fn) + return $.proxy.apply(null, args) + } else { + return $.proxy(fn[context], fn) + } + } else { + throw new TypeError("expected function") + } + } + + $.fn.bind = function(event, data, callback){ + return this.on(event, data, callback) + } + $.fn.unbind = function(event, callback){ + return this.off(event, callback) + } + $.fn.one = function(event, selector, data, callback){ + return this.on(event, selector, data, callback, 1) + } + + var returnTrue = function(){return true}, + returnFalse = function(){return false}, + ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/, + eventMethods = { + preventDefault: 'isDefaultPrevented', + stopImmediatePropagation: 'isImmediatePropagationStopped', + stopPropagation: 'isPropagationStopped' + } + + function compatible(event, source) { + if (source || !event.isDefaultPrevented) { + source || (source = event) + + $.each(eventMethods, function(name, predicate) { + var sourceMethod = source[name] + event[name] = function(){ + this[predicate] = returnTrue + return sourceMethod && sourceMethod.apply(source, arguments) + } + event[predicate] = returnFalse + }) + + event.timeStamp || (event.timeStamp = Date.now()) + + if (source.defaultPrevented !== undefined ? source.defaultPrevented : + 'returnValue' in source ? source.returnValue === false : + source.getPreventDefault && source.getPreventDefault()) + event.isDefaultPrevented = returnTrue + } + return event + } + + function createProxy(event) { + var key, proxy = { originalEvent: event } + for (key in event) + if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key] + + return compatible(proxy, event) + } + + $.fn.delegate = function(selector, event, callback){ + return this.on(event, selector, callback) + } + $.fn.undelegate = function(selector, event, callback){ + return this.off(event, selector, callback) + } + + $.fn.live = function(event, callback){ + $(document.body).delegate(this.selector, event, callback) + return this + } + $.fn.die = function(event, callback){ + $(document.body).undelegate(this.selector, event, callback) + return this + } + + $.fn.on = function(event, selector, data, callback, one){ + var autoRemove, delegator, $this = this + if (event && !isString(event)) { + $.each(event, function(type, fn){ + $this.on(type, selector, data, fn, one) + }) + return $this + } + + if (!isString(selector) && !isFunction(callback) && callback !== false) + callback = data, data = selector, selector = undefined + if (callback === undefined || data === false) + callback = data, data = undefined + + if (callback === false) callback = returnFalse + + return $this.each(function(_, element){ + if (one) autoRemove = function(e){ + remove(element, e.type, callback) + return callback.apply(this, arguments) + } + + if (selector) delegator = function(e){ + var evt, match = $(e.target).closest(selector, element).get(0) + if (match && match !== element) { + evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element}) + return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1))) + } + } + + add(element, event, callback, data, selector, delegator || autoRemove) + }) + } + $.fn.off = function(event, selector, callback){ + var $this = this + if (event && !isString(event)) { + $.each(event, function(type, fn){ + $this.off(type, selector, fn) + }) + return $this + } + + if (!isString(selector) && !isFunction(callback) && callback !== false) + callback = selector, selector = undefined + + if (callback === false) callback = returnFalse + + return $this.each(function(){ + remove(this, event, callback, selector) + }) + } + + $.fn.trigger = function(event, args){ + event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event) + event._args = args + return this.each(function(){ + // handle focus(), blur() by calling them directly + if (event.type in focus && typeof this[event.type] == "function") this[event.type]() + // items in the collection might not be DOM elements + else if ('dispatchEvent' in this) this.dispatchEvent(event) + else $(this).triggerHandler(event, args) + }) + } + + // triggers event handlers on current element just as if an event occurred, + // doesn't trigger an actual event, doesn't bubble + $.fn.triggerHandler = function(event, args){ + var e, result + this.each(function(i, element){ + e = createProxy(isString(event) ? $.Event(event) : event) + e._args = args + e.target = element + $.each(findHandlers(element, event.type || event), function(i, handler){ + result = handler.proxy(e) + if (e.isImmediatePropagationStopped()) return false + }) + }) + return result + } + + // shortcut methods for `.bind(event, fn)` for each event type + ;('focusin focusout focus blur load resize scroll unload click dblclick '+ + 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+ + 'change select keydown keypress keyup error').split(' ').forEach(function(event) { + $.fn[event] = function(callback) { + return (0 in arguments) ? + this.bind(event, callback) : + this.trigger(event) + } + }) + + $.Event = function(type, props) { + if (!isString(type)) props = type, type = props.type + var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true + if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name]) + event.initEvent(type, bubbles, true) + return compatible(event) + } + +})(Zepto) + +;(function($){ + var jsonpID = +new Date(), + document = window.document, + key, + name, + rscript = /)<[^<]*)*<\/script>/gi, + scriptTypeRE = /^(?:text|application)\/javascript/i, + xmlTypeRE = /^(?:text|application)\/xml/i, + jsonType = 'application/json', + htmlType = 'text/html', + blankRE = /^\s*$/, + originAnchor = document.createElement('a') + + originAnchor.href = window.location.href + + // trigger a custom event and return false if it was cancelled + function triggerAndReturn(context, eventName, data) { + var event = $.Event(eventName) + $(context).trigger(event, data) + return !event.isDefaultPrevented() + } + + // trigger an Ajax "global" event + function triggerGlobal(settings, context, eventName, data) { + if (settings.global) return triggerAndReturn(context || document, eventName, data) + } + + // Number of active Ajax requests + $.active = 0 + + function ajaxStart(settings) { + if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart') + } + function ajaxStop(settings) { + if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop') + } + + // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable + function ajaxBeforeSend(xhr, settings) { + var context = settings.context + if (settings.beforeSend.call(context, xhr, settings) === false || + triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) + return false + + triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]) + } + function ajaxSuccess(data, xhr, settings, deferred) { + var context = settings.context, status = 'success' + settings.success.call(context, data, status, xhr) + if (deferred) deferred.resolveWith(context, [data, status, xhr]) + triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]) + ajaxComplete(status, xhr, settings) + } + // type: "timeout", "error", "abort", "parsererror" + function ajaxError(error, type, xhr, settings, deferred) { + var context = settings.context + settings.error.call(context, xhr, type, error) + if (deferred) deferred.rejectWith(context, [xhr, type, error]) + triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type]) + ajaxComplete(type, xhr, settings) + } + // status: "success", "notmodified", "error", "timeout", "abort", "parsererror" + function ajaxComplete(status, xhr, settings) { + var context = settings.context + settings.complete.call(context, xhr, status) + triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]) + ajaxStop(settings) + } + + function ajaxDataFilter(data, type, settings) { + if (settings.dataFilter == empty) return data + var context = settings.context + return settings.dataFilter.call(context, data, type) + } + + // Empty function, used as default callback + function empty() {} + + $.ajaxJSONP = function(options, deferred){ + if (!('type' in options)) return $.ajax(options) + + var _callbackName = options.jsonpCallback, + callbackName = ($.isFunction(_callbackName) ? + _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)), + script = document.createElement('script'), + originalCallback = window[callbackName], + responseData, + abort = function(errorType) { + $(script).triggerHandler('error', errorType || 'abort') + }, + xhr = { abort: abort }, abortTimeout + + if (deferred) deferred.promise(xhr) + + $(script).on('load error', function(e, errorType){ + clearTimeout(abortTimeout) + $(script).off().remove() + + if (e.type == 'error' || !responseData) { + ajaxError(null, errorType || 'error', xhr, options, deferred) + } else { + ajaxSuccess(responseData[0], xhr, options, deferred) + } + + window[callbackName] = originalCallback + if (responseData && $.isFunction(originalCallback)) + originalCallback(responseData[0]) + + originalCallback = responseData = undefined + }) + + if (ajaxBeforeSend(xhr, options) === false) { + abort('abort') + return xhr + } + + window[callbackName] = function(){ + responseData = arguments + } + + script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName) + document.head.appendChild(script) + + if (options.timeout > 0) abortTimeout = setTimeout(function(){ + abort('timeout') + }, options.timeout) + + return xhr + } + + $.ajaxSettings = { + // Default type of request + type: 'GET', + // Callback that is executed before request + beforeSend: empty, + // Callback that is executed if the request succeeds + success: empty, + // Callback that is executed the the server drops error + error: empty, + // Callback that is executed on request complete (both: error and success) + complete: empty, + // The context for the callbacks + context: null, + // Whether to trigger "global" Ajax events + global: true, + // Transport + xhr: function () { + return new window.XMLHttpRequest() + }, + // MIME types mapping + // IIS returns Javascript as "application/x-javascript" + accepts: { + script: 'text/javascript, application/javascript, application/x-javascript', + json: jsonType, + xml: 'application/xml, text/xml', + html: htmlType, + text: 'text/plain' + }, + // Whether the request is to another domain + crossDomain: false, + // Default timeout + timeout: 0, + // Whether data should be serialized to string + processData: true, + // Whether the browser should be allowed to cache GET responses + cache: true, + //Used to handle the raw response data of XMLHttpRequest. + //This is a pre-filtering function to sanitize the response. + //The sanitized response should be returned + dataFilter: empty + } + + function mimeToDataType(mime) { + if (mime) mime = mime.split(';', 2)[0] + return mime && ( mime == htmlType ? 'html' : + mime == jsonType ? 'json' : + scriptTypeRE.test(mime) ? 'script' : + xmlTypeRE.test(mime) && 'xml' ) || 'text' + } + + function appendQuery(url, query) { + if (query == '') return url + return (url + '&' + query).replace(/[&?]{1,2}/, '?') + } + + // serialize payload and append it to the URL for GET requests + function serializeData(options) { + if (options.processData && options.data && $.type(options.data) != "string") + options.data = $.param(options.data, options.traditional) + if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType)) + options.url = appendQuery(options.url, options.data), options.data = undefined + } + + $.ajax = function(options){ + var settings = $.extend({}, options || {}), + deferred = $.Deferred && $.Deferred(), + urlAnchor, hashIndex + for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key] + + ajaxStart(settings) + + if (!settings.crossDomain) { + urlAnchor = document.createElement('a') + urlAnchor.href = settings.url + // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049 + urlAnchor.href = urlAnchor.href + settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host) + } + + if (!settings.url) settings.url = window.location.toString() + if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex) + serializeData(settings) + + var dataType = settings.dataType, hasPlaceholder = /\?.+=\?/.test(settings.url) + if (hasPlaceholder) dataType = 'jsonp' + + if (settings.cache === false || ( + (!options || options.cache !== true) && + ('script' == dataType || 'jsonp' == dataType) + )) + settings.url = appendQuery(settings.url, '_=' + Date.now()) + + if ('jsonp' == dataType) { + if (!hasPlaceholder) + settings.url = appendQuery(settings.url, + settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?') + return $.ajaxJSONP(settings, deferred) + } + + var mime = settings.accepts[dataType], + headers = { }, + setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] }, + protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol, + xhr = settings.xhr(), + nativeSetHeader = xhr.setRequestHeader, + abortTimeout + + if (deferred) deferred.promise(xhr) + + if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest') + setHeader('Accept', mime || '*/*') + if (mime = settings.mimeType || mime) { + if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0] + xhr.overrideMimeType && xhr.overrideMimeType(mime) + } + if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET')) + setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded') + + if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name]) + xhr.setRequestHeader = setHeader + + xhr.onreadystatechange = function(){ + if (xhr.readyState == 4) { + xhr.onreadystatechange = empty + clearTimeout(abortTimeout) + var result, error = false + if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) { + dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type')) + + if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob') + result = xhr.response + else { + result = xhr.responseText + + try { + // http://perfectionkills.com/global-eval-what-are-the-options/ + // sanitize response accordingly if data filter callback provided + result = ajaxDataFilter(result, dataType, settings) + if (dataType == 'script') (1,eval)(result) + else if (dataType == 'xml') result = xhr.responseXML + else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result) + } catch (e) { error = e } + + if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred) + } + + ajaxSuccess(result, xhr, settings, deferred) + } else { + ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred) + } + } + } + + if (ajaxBeforeSend(xhr, settings) === false) { + xhr.abort() + ajaxError(null, 'abort', xhr, settings, deferred) + return xhr + } + + var async = 'async' in settings ? settings.async : true + xhr.open(settings.type, settings.url, async, settings.username, settings.password) + + if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name] + + for (name in headers) nativeSetHeader.apply(xhr, headers[name]) + + if (settings.timeout > 0) abortTimeout = setTimeout(function(){ + xhr.onreadystatechange = empty + xhr.abort() + ajaxError(null, 'timeout', xhr, settings, deferred) + }, settings.timeout) + + // avoid sending empty string (#319) + xhr.send(settings.data ? settings.data : null) + return xhr + } + + // handle optional data/success arguments + function parseArguments(url, data, success, dataType) { + if ($.isFunction(data)) dataType = success, success = data, data = undefined + if (!$.isFunction(success)) dataType = success, success = undefined + return { + url: url + , data: data + , success: success + , dataType: dataType + } + } + + $.get = function(/* url, data, success, dataType */){ + return $.ajax(parseArguments.apply(null, arguments)) + } + + $.post = function(/* url, data, success, dataType */){ + var options = parseArguments.apply(null, arguments) + options.type = 'POST' + return $.ajax(options) + } + + $.getJSON = function(/* url, data, success */){ + var options = parseArguments.apply(null, arguments) + options.dataType = 'json' + return $.ajax(options) + } + + $.fn.load = function(url, data, success){ + if (!this.length) return this + var self = this, parts = url.split(/\s/), selector, + options = parseArguments(url, data, success), + callback = options.success + if (parts.length > 1) options.url = parts[0], selector = parts[1] + options.success = function(response){ + self.html(selector ? + $('
    ').html(response.replace(rscript, "")).find(selector) + : response) + callback && callback.apply(self, arguments) + } + $.ajax(options) + return this + } + + var escape = encodeURIComponent + + function serialize(params, obj, traditional, scope){ + var type, array = $.isArray(obj), hash = $.isPlainObject(obj) + $.each(obj, function(key, value) { + type = $.type(value) + if (scope) key = traditional ? scope : + scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']' + // handle data in serializeArray() format + if (!scope && array) params.add(value.name, value.value) + // recurse into nested objects + else if (type == "array" || (!traditional && type == "object")) + serialize(params, value, traditional, key) + else params.add(key, value) + }) + } + + $.param = function(obj, traditional){ + var params = [] + params.add = function(key, value) { + if ($.isFunction(value)) value = value() + if (value == null) value = "" + this.push(escape(key) + '=' + escape(value)) + } + serialize(params, obj, traditional) + return params.join('&').replace(/%20/g, '+') + } +})(Zepto) + +;(function($){ + $.fn.serializeArray = function() { + var name, type, result = [], + add = function(value) { + if (value.forEach) return value.forEach(add) + result.push({ name: name, value: value }) + } + if (this[0]) $.each(this[0].elements, function(_, field){ + type = field.type, name = field.name + if (name && field.nodeName.toLowerCase() != 'fieldset' && + !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' && + ((type != 'radio' && type != 'checkbox') || field.checked)) + add($(field).val()) + }) + return result + } + + $.fn.serialize = function(){ + var result = [] + this.serializeArray().forEach(function(elm){ + result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value)) + }) + return result.join('&') + } + + $.fn.submit = function(callback) { + if (0 in arguments) this.bind('submit', callback) + else if (this.length) { + var event = $.Event('submit') + this.eq(0).trigger(event) + if (!event.isDefaultPrevented()) this.get(0).submit() + } + return this + } + +})(Zepto) + +;(function(){ + // getComputedStyle shouldn't freak out when called + // without a valid element as argument + try { + getComputedStyle(undefined) + } catch(e) { + var nativeGetComputedStyle = getComputedStyle + window.getComputedStyle = function(element, pseudoElement){ + try { + return nativeGetComputedStyle(element, pseudoElement) + } catch(e) { + return null + } + } + } +})() + + + exports('zepto', Zepto) +}); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/rate.js b/pccenter/src/main/resources/static/src/lay/modules/rate.js new file mode 100644 index 0000000000000000000000000000000000000000..b18cb1bb91c1320b7f0aff9ef709cf5dcaf03661 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/rate.js @@ -0,0 +1,214 @@ +/** + + @Title: layui.rate 评分评星 + @Author: star1029 + @License:MIT + + */ + +layui.define('jquery',function(exports){ + "use strict"; + var $ = layui.jquery + + //外部接口 + ,rate = { + config: {} + ,index: layui.rate ? (layui.rate.index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件监听 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisRate = function(){ + var that = this + ,options = that.config; + + return { + setvalue: function(value){ + that.setvalue.call(that, value); + } + ,config: options + } + } + + //字符常量 + ,MOD_NAME = 'rate',ELEM_VIEW = 'layui-rate', ICON_RATE = 'layui-icon-rate', ICON_RATE_SOLID = 'layui-icon-rate-solid', ICON_RATE_HALF = 'layui-icon-rate-half' + + ,ICON_SOLID_HALF = 'layui-icon-rate-solid layui-icon-rate-half', ICON_SOLID_RATE = 'layui-icon-rate-solid layui-icon-rate', ICON_HALF_RATE = 'layui-icon-rate layui-icon-rate-half' + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++rate.index; + that.config = $.extend({}, that.config, rate.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + length: 5 //初始长度 + ,text: false //是否显示评分等级 + ,readonly: false //是否只读 + ,half: false //是否可以半星 + ,value: 0 //星星选中个数 + ,theme: '' + }; + + //评分渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config + ,style = options.theme ? ('style="color: '+ options.theme + ';"') : ''; + + options.elem = $(options.elem); + + //如果没有选择半星的属性,却给了小数的数值,统一向上或向下取整 + if(parseInt(options.value) !== options.value){ + if(!options.half){ + options.value = (Math.ceil(options.value) - options.value) < 0.5 ? Math.ceil(options.value): Math.floor(options.value) + } + } + + //组件模板 + var temp = '
      '; + for(var i = 1;i <= options.length;i++){ + var item = '
    • '; + + if(options.half){ + if(parseInt(options.value) !== options.value){ + if(i == Math.ceil(options.value)){ + temp = temp + '
    • '; + }else{ + temp = temp + item + } + }else{ + temp = temp + item + } + }else{ + temp = temp +item; + } + } + temp += '
    ' + (options.text ? (''+ options.value + '星') : '') + ''; + + //开始插入替代元素 + var othis = options.elem + ,hasRender = othis.next('.' + ELEM_VIEW); + + //生成替代元素 + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + + that.elemTemp = $(temp); + + options.span = that.elemTemp.next('span'); + + options.setText && options.setText(options.value); + + othis.html(that.elemTemp); + + othis.addClass("layui-inline"); + + //如果不是只读,那么进行触控事件 + if(!options.readonly) that.action(); + + }; + + //评分重置 + Class.prototype.setvalue = function(value){ + var that = this + ,options = that.config ; + + options.value = value ; + that.render(); + }; + + //li触控事件 + Class.prototype.action = function(){ + var that = this + ,options = that.config + ,_ul = that.elemTemp + ,wide = _ul.find("i").width(); + + _ul.children("li").each(function(index){ + var ind = index + 1 + ,othis = $(this); + + //点击 + othis.on('click', function(e){ + //将当前点击li的索引值赋给value + options.value = ind; + if(options.half){ + //获取鼠标在li上的位置 + var x = e.pageX - $(this).offset().left; + if(x <= wide / 2){ + options.value = options.value - 0.5; + } + } + + if(options.text) _ul.next("span").text(options.value + "星"); + + options.choose && options.choose(options.value); + options.setText && options.setText(options.value); + }); + + //移入 + othis.on('mousemove', function(e){ + _ul.find("i").each(function(){ + $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF) + }); + _ul.find("i:lt(" + ind + ")").each(function(){ + $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE) + }); + // 如果设置可选半星,那么判断鼠标相对li的位置 + if(options.half){ + var x = e.pageX - $(this).offset().left; + if(x <= wide / 2){ + othis.children("i").addClass(ICON_RATE_HALF).removeClass(ICON_RATE_SOLID) + } + } + }) + + //移出 + othis.on('mouseleave', function(){ + _ul.find("i").each(function(){ + $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF) + }); + _ul.find("i:lt(" + Math.floor(options.value) + ")").each(function(){ + $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE) + }); + //如果设置可选半星,根据分数判断是否有半星 + if(options.half){ + if(parseInt(options.value) !== options.value){ + _ul.children("li:eq(" + Math.floor(options.value) + ")").children("i").addClass(ICON_RATE_HALF).removeClass(ICON_SOLID_RATE) + } + } + }) + + }) + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + }; + + //核心入口 + rate.render = function(options){ + var inst = new Class(options); + return thisRate.call(inst); + }; + + exports(MOD_NAME, rate); +}) \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/slider.js b/pccenter/src/main/resources/static/src/lay/modules/slider.js new file mode 100644 index 0000000000000000000000000000000000000000..cc7c0e2e4883b75108a597e71ba14b4a95a21a15 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/slider.js @@ -0,0 +1,393 @@ +/** + + @Title: layui.slider 滑块 + @Author: star1029 + @License:MIT + + */ + +layui.define('jquery', function(exports){ + "use strict"; + var $ = layui.jquery + + //外部接口 + ,slider = { + config: {} + ,index: layui.slider ? (layui.slider.index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件监听 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisSlider = function(){ + var that = this + ,options = that.config; + + return { + setValue: function(value, index){ //设置值 + return that.slide('set', value, index || 0); + } + ,config: options + } + } + + //字符常量 + ,MOD_NAME = 'slider', DISABLED = 'layui-disabled', ELEM_VIEW = 'layui-slider', SLIDER_BAR = 'layui-slider-bar', SLIDER_WRAP = 'layui-slider-wrap', SLIDER_WRAP_BTN = 'layui-slider-wrap-btn', SLIDER_TIPS = 'layui-slider-tips', SLIDER_INPUT = 'layui-slider-input', SLIDER_INPUT_TXT = 'layui-slider-input-txt', SLIDER_INPUT_BTN = 'layui-slider-input-btn', ELEM_HOVER = 'layui-slider-hover' + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++slider.index; + that.config = $.extend({}, that.config, slider.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + type: 'default' //滑块类型,垂直:vertical + ,min: 0 //最小值 + ,max: 100 //最大值,默认100 + ,value: 0 //初始值,默认为0 + ,step: 1 //间隔值 + ,showstep: false //间隔点开启 + ,tips: true //文字提示,开启 + ,input: false //输入框,关闭 + ,range: false //范围选择,与输入框不能同时开启,默认关闭 + ,height: 200 //配合 type:"vertical" 使用,默认200px + ,disabled: false //滑块禁用,默认关闭 + ,theme: '#009688' //主题颜色 + }; + + //滑块渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + //间隔值不能小于 1 + if(options.step < 1) options.step = 1; + + //最大值不能小于最小值 + if(options.max < options.min) options.max = options.min + options.step; + + + + //判断是否开启双滑块 + if(options.range){ + options.value = typeof(options.value) == 'object' ? options.value : [options.min, options.value]; + var minValue = Math.min(options.value[0], options.value[1]) + ,maxValue = Math.max(options.value[0], options.value[1]); + options.value[0] = minValue > options.min ? minValue : options.min; + options.value[1] = maxValue > options.min ? maxValue : options.min; + options.value[0] = options.value[0] > options.max ? options.max : options.value[0]; + options.value[1] = options.value[1] > options.max ? options.max : options.value[1]; + + var scaleFir = Math.floor((options.value[0] - options.min) / (options.max - options.min) * 100) + ,scaleSec = Math.floor((options.value[1] - options.min) / (options.max - options.min) * 100) + ,scale = scaleSec - scaleFir + '%'; + scaleFir = scaleFir + '%'; + scaleSec = scaleSec + '%'; + } else { + //如果初始值是一个数组,则获取数组的最小值 + if(typeof options.value == 'object'){ + options.value = Math.min.apply(null, options.value); + } + + //初始值不能小于最小值且不能大于最大值 + if(options.value < options.min) options.value = options.min; + if(options.value > options.max) options.value = options.max; + + var scale = Math.floor((options.value - options.min) / (options.max - options.min) * 100) + '%'; + }; + + + //如果禁用,颜色为统一的灰色 + var theme = options.disabled ? '#c2c2c2' : options.theme; + + //滑块 + var temp = '
    '+ (options.tips ? '
    ' : '') + + '
    ' + + '
    '+ (options.range ? '
    ' : '') +'
    '; + + var othis = $(options.elem) + ,hasRender = othis.next('.' + ELEM_VIEW); + //生成替代元素 + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + that.elemTemp = $(temp); + + //把数据缓存到滑块上 + if(options.range){ + that.elemTemp.find('.' + SLIDER_WRAP).eq(0).data('value', options.value[0]); + that.elemTemp.find('.' + SLIDER_WRAP).eq(1).data('value', options.value[1]); + }else{ + that.elemTemp.find('.' + SLIDER_WRAP).data('value', options.value); + }; + + //插入替代元素 + othis.html(that.elemTemp); + + //垂直滑块 + if(options.type === 'vertical'){ + that.elemTemp.height(options.height + 'px'); + }; + + //显示间断点 + if(options.showstep){ + var number = (options.max - options.min) / options.step, item = ''; + for(var i = 1; i < number + 1; i++) { + var step = i * 100 / number; + if(step < 100){ + item += '
    ' + } + }; + that.elemTemp.append(item); + }; + + //插入输入框 + if(options.input && !options.range){ + var elemInput = $('
    '); + othis.css("position","relative"); + othis.append(elemInput); + othis.find('.' + SLIDER_INPUT_TXT).children('input').val(options.value); + if(options.type === 'vertical'){ + elemInput.css({ + left: 0 + ,top: -48 + }); + } else { + that.elemTemp.css("margin-right", elemInput.outerWidth() + 15); + } + }; + + //给未禁止的滑块滑动事件 + if(!options.disabled){ + that.slide(); + }else{ + that.elemTemp.addClass(DISABLED); + that.elemTemp.find('.' + SLIDER_WRAP_BTN).addClass(DISABLED); + }; + + //划过滑块显示数值 + that.elemTemp.find('.' + SLIDER_WRAP_BTN).on('mouseover', function(){ + var sliderWidth = options.type === 'vertical' ? options.height : that.elemTemp[0].offsetWidth + ,sliderWrap = that.elemTemp.find('.' + SLIDER_WRAP) + ,tipsLeft = options.type === 'vertical' ? (sliderWidth - $(this).parent()[0].offsetTop - sliderWrap.height()) : $(this).parent()[0].offsetLeft + ,left = tipsLeft / sliderWidth * 100 + ,value = $(this).parent().data('value') + ,tipsTxt = options.setTips ? options.setTips(value) : value; + that.elemTemp.find('.' + SLIDER_TIPS).html(tipsTxt); + if(options.type === 'vertical'){ + that.elemTemp.find('.' + SLIDER_TIPS).css({"bottom":left + '%', "margin-bottom":"20px", "display":"inline-block"}); + }else{ + that.elemTemp.find('.' + SLIDER_TIPS).css({"left":left + '%', "display":"inline-block"}); + }; + }).on('mouseout', function(){ + that.elemTemp.find('.' + SLIDER_TIPS).css("display", "none"); + }); + }; + + //滑块滑动 + Class.prototype.slide = function(setValue, value, i){ + var that = this + ,options = that.config + ,sliderAct = that.elemTemp + ,sliderWidth = function(){ + return options.type === 'vertical' ? options.height : sliderAct[0].offsetWidth + } + ,sliderWrap = sliderAct.find('.' + SLIDER_WRAP) + ,sliderTxt = sliderAct.next('.' + SLIDER_INPUT) + ,inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val() + ,step = 100 / ((options.max - options.min) / Math.ceil(options.step)) + ,change = function(offsetValue, index){ + if(Math.ceil(offsetValue) * step > 100){ + offsetValue = Math.ceil(offsetValue) * step + }else{ + offsetValue = Math.round(offsetValue) * step + }; + offsetValue = offsetValue > 100 ? 100: offsetValue; + sliderWrap.eq(index).css((options.type === 'vertical' ?'bottom':'left'), offsetValue + '%'); + var firLeft = valueTo(sliderWrap[0].offsetLeft) + ,secLeft = options.range ? valueTo(sliderWrap[1].offsetLeft) : 0; + if(options.type === 'vertical'){ + sliderAct.find('.' + SLIDER_TIPS).css({"bottom":offsetValue + '%', "margin-bottom":"20px"}); + firLeft = valueTo(sliderWidth() - sliderWrap[0].offsetTop - sliderWrap.height()); + secLeft = options.range ? valueTo(sliderWidth() - sliderWrap[1].offsetTop - sliderWrap.height()) : 0; + }else{ + sliderAct.find('.' + SLIDER_TIPS).css("left",offsetValue + '%'); + }; + firLeft = firLeft > 100 ? 100: firLeft; + secLeft = secLeft > 100 ? 100: secLeft; + var minLeft = Math.min(firLeft, secLeft) + ,wrapWidth = Math.abs(firLeft - secLeft); + if(options.type === 'vertical'){ + sliderAct.find('.' + SLIDER_BAR).css({"height":wrapWidth + '%', "bottom":minLeft + '%'}); + }else{ + sliderAct.find('.' + SLIDER_BAR).css({"width":wrapWidth + '%', "left":minLeft + '%'}); + }; + var selfValue = options.min + Math.round((options.max - options.min) * offsetValue / 100); + + inputValue = selfValue; + sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val(inputValue); + sliderWrap.eq(index).data('value', selfValue); + selfValue = options.setTips ? options.setTips(selfValue) : selfValue; + sliderAct.find('.' + SLIDER_TIPS).html(selfValue); + + //如果开启范围选择,则返回数组值 + if(options.range){ + var arrValue = [ + sliderWrap.eq(0).data('value') + ,sliderWrap.eq(1).data('value') + ]; + if(arrValue[0] > arrValue[1]) arrValue.reverse(); //如果前面的圆点超过了后面的圆点值,则调换顺序 + } + + //回调 + options.change && options.change(options.range ? arrValue : selfValue); + } + ,valueTo = function(value){ + var oldLeft = value / sliderWidth() * 100 / step + ,left = Math.round(oldLeft) * step; + if(value == sliderWidth()){ + left = Math.ceil(oldLeft) * step; + }; + return left; + } + + //拖拽元素 + ,elemMove = $(['
    sliderWidth())left = sliderWidth(); + var reaLeft = left / sliderWidth() * 100 / step; + change(reaLeft, index); + othis.addClass(ELEM_HOVER); + sliderAct.find('.' + SLIDER_TIPS).show(); + e.preventDefault(); + }; + + var up = function(){ + othis.removeClass(ELEM_HOVER); + sliderAct.find('.' + SLIDER_TIPS).hide(); + }; + + createMoveElem(move, up) + }); + }); + + //点击滑块 + sliderAct.on('click', function(e){ + var main = $('.' + SLIDER_WRAP_BTN); + if(!main.is(event.target) && main.has(event.target).length === 0 && main.length){ + var left = options.type === 'vertical' ? (sliderWidth() - e.clientY + $(this).offset().top):(e.clientX - $(this).offset().left), index; + if(left < 0)left = 0; + if(left > sliderWidth())left = sliderWidth(); + var reaLeft = left / sliderWidth() * 100 / step; + if(options.range){ + if(options.type === 'vertical'){ + index = Math.abs(left - parseInt($(sliderWrap[0]).css('bottom'))) > Math.abs(left - parseInt($(sliderWrap[1]).css('bottom'))) ? 1 : 0; + }else{ + index = Math.abs(left - sliderWrap[0].offsetLeft) > Math.abs(left - sliderWrap[1].offsetLeft) ? 1 : 0; + } + }else{ + index = 0; + }; + change(reaLeft, index); + e.preventDefault(); + } + }); + + //输入框移入事件 + sliderTxt.hover(function(){ + var othis = $(this); + othis.children('.' + SLIDER_INPUT_BTN).fadeIn('fast'); + }, function(){ + var othis = $(this); + othis.children('.' + SLIDER_INPUT_BTN).fadeOut('fast'); + }); + + //点击加减输入框 + sliderTxt.children('.' + SLIDER_INPUT_BTN).children('i').each(function(index){ + $(this).on('click', function(){ + if(index == 1){ + inputValue = inputValue - options.step < options.min + ? options.min + : Number(inputValue) - options.step; + }else{ + inputValue = Number(inputValue) + options.step > options.max + ? options.max + : Number(inputValue) + options.step; + }; + var inputScale = (inputValue - options.min) / (options.max - options.min) * 100 / step; + change(inputScale, 0); + }); + }); + + //获取输入框值 + var getInputValue = function(){ + var realValue = this.value; + realValue = isNaN(realValue) ? 0 : realValue; + realValue = realValue < options.min ? options.min : realValue; + realValue = realValue > options.max ? options.max : realValue; + this.value = realValue; + var inputScale = (realValue - options.min) / (options.max - options.min) * 100 / step; + change(inputScale, 0); + }; + sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').on('keydown', function(e){ + if(e.keyCode === 13){ + e.preventDefault(); + getInputValue.call(this); + } + }).on('change', getInputValue); + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + }; + + //核心入口 + slider.render = function(options){ + var inst = new Class(options); + return thisSlider.call(inst); + }; + + exports(MOD_NAME, slider); +}) \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/table.js b/pccenter/src/main/resources/static/src/lay/modules/table.js new file mode 100644 index 0000000000000000000000000000000000000000..a4c5f43dd3921a78e86766ca79b14cb29de8a3c7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/table.js @@ -0,0 +1,1983 @@ +/** + + @Name:layui.table 表格操作 + @Author:贤心 + @License:MIT + + */ + +layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){ + "use strict"; + + var $ = layui.$ + ,laytpl = layui.laytpl + ,laypage = layui.laypage + ,layer = layui.layer + ,form = layui.form + ,util = layui.util + ,hint = layui.hint() + ,device = layui.device() + + //外部接口 + ,table = { + config: { + checkName: 'LAY_CHECKED' //是否选中状态的字段名 + ,indexName: 'LAY_TABLE_INDEX' //下标索引名 + } //全局配置项 + ,cache: {} //数据缓存 + ,index: layui.table ? (layui.table.index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件监听 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisTable = function(){ + var that = this + ,options = that.config + ,id = options.id || options.index; + + if(id){ + thisTable.that[id] = that; //记录当前实例对象 + thisTable.config[id] = options; //记录当前实例配置项 + } + + return { + config: options + ,reload: function(options){ + that.reload.call(that, options); + } + ,setColsWidth: function(){ + that.setColsWidth.call(that); + } + ,resize: function(){ //重置表格尺寸/结构 + that.resize.call(that); + } + } + } + + //获取当前实例配置项 + ,getThisTableConfig = function(id){ + var config = thisTable.config[id]; + if(!config) hint.error('The ID option was not found in the table instance'); + return config || null; + } + + //解析自定义模板数据 + ,parseTempData = function(item3, content, tplData, text){ //表头数据、原始内容、表体数据、是否只返回文本 + var str = item3.templet ? function(){ + return typeof item3.templet === 'function' + ? item3.templet(tplData) + : laytpl($(item3.templet).html() || String(content)).render(tplData) + }() : content; + return text ? $('
    '+ str +'
    ').text() : str; + } + + //字符常量 + ,MOD_NAME = 'table', ELEM = '.layui-table', THIS = 'layui-this', SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled', NONE = 'layui-none' + + ,ELEM_VIEW = 'layui-table-view', ELEM_TOOL = '.layui-table-tool', ELEM_BOX = '.layui-table-box', ELEM_INIT = '.layui-table-init', ELEM_HEADER = '.layui-table-header', ELEM_BODY = '.layui-table-body', ELEM_MAIN = '.layui-table-main', ELEM_FIXED = '.layui-table-fixed', ELEM_FIXL = '.layui-table-fixed-l', ELEM_FIXR = '.layui-table-fixed-r', ELEM_TOTAL = '.layui-table-total', ELEM_PAGE = '.layui-table-page', ELEM_SORT = '.layui-table-sort', ELEM_EDIT = 'layui-table-edit', ELEM_HOVER = 'layui-table-hover' + + //thead区域模板 + ,TPL_HEADER = function(options){ + var rowCols = '{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}'; + + options = options || {}; + return ['' + ,'' + ,'{{# layui.each(d.data.cols, function(i1, item1){ }}' + ,'' + ,'{{# layui.each(item1, function(i2, item2){ }}' + ,'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}' + ,'{{# if(item2.fixed === "right"){ right = true; } }}' + ,function(){ + if(options.fixed && options.fixed !== 'right'){ + return '{{# if(item2.fixed && item2.fixed !== "right"){ }}'; + } + if(options.fixed === 'right'){ + return '{{# if(item2.fixed === "right"){ }}'; + } + return ''; + }() + ,'{{# var isSort = !(item2.colGroup) && item2.sort; }}' + ,'' + ,(options.fixed ? '{{# }; }}' : '') + ,'{{# }); }}' + ,'' + ,'{{# }); }}' + ,'' + ,'
    ' + ,'
    ' + ,'{{# if(item2.type === "checkbox"){ }}' //复选框 + ,'' + ,'{{# } else { }}' + ,'{{item2.title||""}}' + ,'{{# if(isSort){ }}' + ,'' + ,'{{# } }}' + ,'{{# } }}' + ,'
    ' + ,'
    '].join(''); + } + + //tbody区域模板 + ,TPL_BODY = ['' + ,'' + ,'
    '].join('') + + //主模板 + ,TPL_MAIN = ['
    ' + + ,'{{# if(d.data.toolbar){ }}' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'{{# } }}' + + ,'
    ' + ,'{{# if(d.data.loading){ }}' + ,'
    ' + ,'' + ,'
    ' + ,'{{# } }}' + + ,'{{# var left, right; }}' + ,'
    ' + ,TPL_HEADER() + ,'
    ' + ,'
    ' + ,TPL_BODY + ,'
    ' + + ,'{{# if(left){ }}' + ,'
    ' + ,'
    ' + ,TPL_HEADER({fixed: true}) + ,'
    ' + ,'
    ' + ,TPL_BODY + ,'
    ' + ,'
    ' + ,'{{# }; }}' + + ,'{{# if(right){ }}' + ,'
    ' + ,'
    ' + ,TPL_HEADER({fixed: 'right'}) + ,'
    ' + ,'
    ' + ,'
    ' + ,TPL_BODY + ,'
    ' + ,'
    ' + ,'{{# }; }}' + ,'
    ' + + ,'{{# if(d.data.totalRow){ }}' + ,'
    ' + ,'' + ,'' + , '
    ' + ,'
    ' + ,'{{# } }}' + + ,'{{# if(d.data.page){ }}' + ,'
    ' + ,'
    ' + ,'
    ' + ,'{{# } }}' + + ,'' + ,'
    '].join('') + + ,_WIN = $(window) + ,_DOC = $(document) + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++table.index; + that.config = $.extend({}, that.config, table.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + limit: 10 //每页显示的数量 + ,loading: true //请求数据时,是否显示loading + ,cellMinWidth: 60 //所有单元格默认最小宽度 + ,defaultToolbar: ['filter', 'exports', 'print'] //工具栏右侧图标 + ,autoSort: true //是否前端自动排序。如果否,则需自主排序(通常为服务端处理好排序) + ,text: { + none: '无数据' + } + }; + + //表格渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + options.elem = $(options.elem); + options.where = options.where || {}; + options.id = options.id || options.elem.attr('id') || that.index; + + //请求参数的自定义格式 + options.request = $.extend({ + pageName: 'page' + ,limitName: 'limit' + }, options.request) + + //响应数据的自定义格式 + options.response = $.extend({ + statusName: 'code' + ,statusCode: 0 + ,msgName: 'msg' + ,dataName: 'data' + ,countName: 'count' + }, options.response); + + //如果 page 传入 laypage 对象 + if(typeof options.page === 'object'){ + options.limit = options.page.limit || options.limit; + options.limits = options.page.limits || options.limits; + that.page = options.page.curr = options.page.curr || 1; + delete options.page.elem; + delete options.page.jump; + } + + if(!options.elem[0]) return that; + + //高度铺满:full-差距值 + if(options.height && /^full-\d+$/.test(options.height)){ + that.fullHeightGap = options.height.split('-')[1]; + options.height = _WIN.height() - that.fullHeightGap; + } + + //初始化一些参数 + that.setInit(); + + //开始插入替代元素 + var othis = options.elem + ,hasRender = othis.next('.' + ELEM_VIEW) + + //主容器 + ,reElem = that.elem = $(laytpl(TPL_MAIN).render({ + VIEW_CLASS: ELEM_VIEW + ,data: options + ,index: that.index //索引 + })); + + options.index = that.index; + that.key = options.id || options.index; + + //生成替代元素 + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + othis.after(reElem); + + //各级容器 + that.layTool = reElem.find(ELEM_TOOL); + that.layBox = reElem.find(ELEM_BOX); + that.layHeader = reElem.find(ELEM_HEADER); + that.layMain = reElem.find(ELEM_MAIN); + that.layBody = reElem.find(ELEM_BODY); + that.layFixed = reElem.find(ELEM_FIXED); + that.layFixLeft = reElem.find(ELEM_FIXL); + that.layFixRight = reElem.find(ELEM_FIXR); + that.layTotal = reElem.find(ELEM_TOTAL); + that.layPage = reElem.find(ELEM_PAGE); + + //初始化工具栏 + that.renderToolbar(); + + //让表格平铺 + that.fullSize(); + + //如果多级表头,则填补表头高度 + if(options.cols.length > 1){ + //补全高度 + var th = that.layFixed.find(ELEM_HEADER).find('th'); + th.height(that.layHeader.height() - 1 - parseFloat(th.css('padding-top')) - parseFloat(th.css('padding-bottom'))); + } + + that.pullData(that.page); //请求数据 + that.events(); //事件 + }; + + //根据列类型,定制化参数 + Class.prototype.initOpts = function(item){ + var that = this + ,options = that.config + ,initWidth = { + checkbox: 48 + ,radio: 48 + ,space: 15 + ,numbers: 40 + }; + + //让 type 参数兼容旧版本 + if(item.checkbox) item.type = "checkbox"; + if(item.space) item.type = "space"; + if(!item.type) item.type = "normal"; + + if(item.type !== "normal"){ + item.unresize = true; + item.width = item.width || initWidth[item.type]; + } + }; + + //初始化一些参数 + Class.prototype.setInit = function(type){ + var that = this + ,options = that.config; + + options.clientWidth = options.width || function(){ //获取容器宽度 + //如果父元素宽度为0(一般为隐藏元素),则继续查找上层元素,直到找到真实宽度为止 + var getWidth = function(parent){ + var width, isNone; + parent = parent || options.elem.parent() + width = parent.width(); + try { + isNone = parent.css('display') === 'none'; + } catch(e){} + if(parent[0] && (!width || isNone)) return getWidth(parent.parent()); + return width; + }; + return getWidth(); + }(); + + if(type === 'width') return options.clientWidth; + + //初始化列参数 + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + + //如果列参数为空,则移除 + if(!item2){ + item1.splice(i2, 1); + return; + } + + item2.key = i1 + '-' + i2; + item2.hide = item2.hide || false; + + //设置列的父列索引 + //如果是组合列,则捕获对应的子列 + if(item2.colGroup || item2.colspan > 1){ + var childIndex = 0; + layui.each(options.cols[i1 + 1], function(i22, item22){ + //如果子列已经被标注为{HAS_PARENT},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环 + if(item22.HAS_PARENT || (childIndex > 1 && childIndex == item2.colspan)) return; + + item22.HAS_PARENT = true; + item22.parentKey = i1 + '-' + i2; + + childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1); + }); + item2.colGroup = true; //标注是组合列 + } + + //根据列类型,定制化参数 + that.initOpts(item2); + }); + }); + + }; + + //初始工具栏 + Class.prototype.renderToolbar = function(){ + var that = this + ,options = that.config + + //添加工具栏左侧模板 + var leftDefaultTemp = [ + '
    ' + ,'
    ' + ,'
    ' + ].join('') + ,elemToolTemp = that.layTool.find('.layui-table-tool-temp'); + + if(options.toolbar === 'default'){ + elemToolTemp.html(leftDefaultTemp); + } else if(typeof options.toolbar === 'string'){ + var toolbarHtml = $(options.toolbar).html() || ''; + toolbarHtml && elemToolTemp.html( + laytpl(toolbarHtml).render(options) + ); + } + + //添加工具栏右侧面板 + var layout = { + filter: { + title: '筛选列' + ,layEvent: 'LAYTABLE_COLS' + ,icon: 'layui-icon-cols' + } + ,exports: { + title: '导出' + ,layEvent: 'LAYTABLE_EXPORT' + ,icon: 'layui-icon-export' + } + ,print: { + title: '打印' + ,layEvent: 'LAYTABLE_PRINT' + ,icon: 'layui-icon-print' + } + }, iconElem = []; + + if(typeof options.defaultToolbar === 'object'){ + layui.each(options.defaultToolbar, function(i, item){ + var thisItem = typeof item === 'string' ? layout[item] : item; + if(thisItem){ + iconElem.push('
    ' + +'' + +'
    '); + } + }); + } + that.layTool.find('.layui-table-tool-self').html(iconElem.join('')); + } + + //同步表头父列的相关值 + Class.prototype.setParentCol = function(hide, parentKey){ + var that = this + ,options = that.config + + ,parentTh = that.layHeader.find('th[data-key="'+ options.index +'-'+ parentKey +'"]') //获取父列元素 + ,parentColspan = parseInt(parentTh.attr('colspan')) || 0; + + if(parentTh[0]){ + var arrParentKey = parentKey.split('-') + ,getThisCol = options.cols[arrParentKey[0]][arrParentKey[1]]; + + hide ? parentColspan-- : parentColspan++; + + parentTh.attr('colspan', parentColspan); + parentTh[parentColspan < 1 ? 'addClass' : 'removeClass'](HIDE); + + getThisCol.colspan = parentColspan; //同步 colspan 参数 + getThisCol.hide = parentColspan < 1; //同步 hide 参数 + + //递归,继续往上查询是否有父列 + var nextParentKey = parentTh.data('parentkey'); + nextParentKey && that.setParentCol(hide, nextParentKey); + } + }; + + //多级表头补丁 + Class.prototype.setColsPatch = function(){ + var that = this + ,options = that.config + + //同步表头父列的相关值 + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + if(item2.hide){ + that.setParentCol(item2.hide, item2.parentKey); + } + }); + }); + }; + + //动态分配列宽 + Class.prototype.setColsWidth = function(){ + var that = this + ,options = that.config + ,colNums = 0 //列个数 + ,autoColNums = 0 //自动列宽的列个数 + ,autoWidth = 0 //自动列分配的宽度 + ,countWidth = 0 //所有列总宽度和 + ,cntrWidth = that.setInit('width'); + + //统计列个数 + that.eachCols(function(i, item){ + item.hide || colNums++; + }); + + //减去边框差和滚动条宽 + cntrWidth = cntrWidth - function(){ + return (options.skin === 'line' || options.skin === 'nob') ? 2 : colNums + 1; + }() - that.getScrollWidth(that.layMain[0]) - 1; + + //计算自动分配的宽度 + var getAutoWidth = function(back){ + //遍历所有列 + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + var width = 0 + ,minWidth = item2.minWidth || options.cellMinWidth; //最小宽度 + + if(!item2){ + item1.splice(i2, 1); + return; + } + + if(item2.colGroup || item2.hide) return; + + if(!back){ + width = item2.width || 0; + if(/\d+%$/.test(width)){ //列宽为百分比 + width = Math.floor((parseFloat(width) / 100) * cntrWidth); + width < minWidth && (width = minWidth); + } else if(!width){ //列宽未填写 + item2.width = width = 0; + autoColNums++; + } + } else if(autoWidth && autoWidth < minWidth){ + autoColNums--; + width = minWidth; + } + + if(item2.hide) width = 0; + countWidth = countWidth + width; + }); + }); + + //如果未填充满,则将剩余宽度平分 + (cntrWidth > countWidth && autoColNums) && ( + autoWidth = (cntrWidth - countWidth) / autoColNums + ); + } + + getAutoWidth(); + getAutoWidth(true); //重新检测分配的宽度是否低于最小列宽 + + //记录自动列数 + that.autoColNums = autoColNums; + + //设置列宽 + that.eachCols(function(i3, item3){ + var minWidth = item3.minWidth || options.cellMinWidth; + if(item3.colGroup || item3.hide) return; + + //给位分配宽的列平均分配宽 + if(item3.width === 0){ + that.getCssRule(options.index +'-'+ item3.key, function(item){ + item.style.width = Math.floor(autoWidth >= minWidth ? autoWidth : minWidth) + 'px'; + }); + } + + //给设定百分比的列分配列宽 + else if(/\d+%$/.test(item3.width)){ + that.getCssRule(options.index +'-'+ item3.key, function(item){ + item.style.width = Math.floor((parseFloat(item3.width) / 100) * cntrWidth) + 'px'; + }); + } + }); + + //填补 Math.floor 造成的数差 + var patchNums = that.layMain.width() - that.getScrollWidth(that.layMain[0]) + - that.layMain.children('table').outerWidth(); + + if(that.autoColNums && patchNums >= -colNums && patchNums <= colNums){ + var getEndTh = function(th){ + var field; + th = th || that.layHeader.eq(0).find('thead th:last-child') + field = th.data('field'); + if(!field && th.prev()[0]){ + return getEndTh(th.prev()) + } + return th + } + ,th = getEndTh() + ,key = th.data('key'); + + that.getCssRule(key, function(item){ + var width = item.style.width || th.outerWidth(); + item.style.width = (parseFloat(width) + patchNums) + 'px'; + + //二次校验,如果仍然出现横向滚动条(通常是 1px 的误差导致) + if(that.layMain.height() - that.layMain.prop('clientHeight') > 0){ + item.style.width = (parseFloat(item.style.width) - 1) + 'px'; + } + }); + } + + that.loading(!0); + }; + + //重置表格尺寸/结构 + Class.prototype.resize = function(){ + var that = this; + that.fullSize(); //让表格铺满 + that.setColsWidth(); //自适应列宽 + that.scrollPatch(); //滚动条补丁 + }; + + //表格重载 + Class.prototype.reload = function(options){ + var that = this; + + options = options || {}; + delete that.haveInit; + + if(options.data && options.data.constructor === Array) delete that.config.data; + that.config = $.extend(true, {}, that.config, options); + + that.render(); + }; + + //异常提示 + Class.prototype.errorView = function(html){ + var that = this + ,elemNone = that.layMain.find('.'+ NONE) + ,layNone = $('
    '+ (html || 'Error') +'
    '); + + if(elemNone[0]){ + that.layNone.remove(); + elemNone.remove(); + } + + that.layFixed.addClass(HIDE); + that.layMain.find('tbody').html(''); + + that.layMain.append(that.layNone = layNone); + + table.cache[that.key] = []; //格式化缓存数据 + }; + + //页码 + Class.prototype.page = 1; + + //获得数据 + Class.prototype.pullData = function(curr){ + var that = this + ,options = that.config + ,request = options.request + ,response = options.response + ,sort = function(){ + if(typeof options.initSort === 'object'){ + that.sort(options.initSort.field, options.initSort.type); + } + }; + + that.startTime = new Date().getTime(); //渲染开始时间 + + if(options.url){ //Ajax请求 + var params = {}; + params[request.pageName] = curr; + params[request.limitName] = options.limit; + + //参数 + var data = $.extend(params, options.where); + if(options.contentType && options.contentType.indexOf("application/json") == 0){ //提交 json 格式 + data = JSON.stringify(data); + } + + that.loading(); + + $.ajax({ + type: options.method || 'get' + ,url: options.url + ,contentType: options.contentType + ,data: data + ,dataType: 'json' + ,headers: options.headers || {} + ,success: function(res){ + //如果有数据解析的回调,则获得其返回的数据 + if(typeof options.parseData === 'function'){ + res = options.parseData(res) || res; + } + //检查数据格式是否符合规范 + if(res[response.statusName] != response.statusCode){ + that.renderForm(); + that.errorView( + res[response.msgName] || + ('返回的数据不符合规范,正确的成功状态码应为:"'+ response.statusName +'": '+ response.statusCode) + ); + } else { + that.renderData(res, curr, res[response.countName]), sort(); + options.time = (new Date().getTime() - that.startTime) + ' ms'; //耗时(接口请求+视图渲染) + } + that.setColsWidth(); + typeof options.done === 'function' && options.done(res, curr, res[response.countName]); + } + ,error: function(e, m){ + that.errorView('数据接口请求异常:'+ m); + + that.renderForm(); + that.setColsWidth(); + } + }); + } else if(options.data && options.data.constructor === Array){ //已知数据 + var res = {} + ,startLimit = curr*options.limit - options.limit + + res[response.dataName] = options.data.concat().splice(startLimit, options.limit); + res[response.countName] = options.data.length; + + that.renderData(res, curr, res[response.countName]), sort(); + that.setColsWidth(); + typeof options.done === 'function' && options.done(res, curr, res[response.countName]); + } + }; + + //遍历表头 + Class.prototype.eachCols = function(callback){ + var that = this; + table.eachCols(null, callback, that.config.cols); + return that; + }; + + //数据渲染 + Class.prototype.renderData = function(res, curr, count, sort){ + var that = this + ,options = that.config + ,data = res[options.response.dataName] || [] + ,trs = [] + ,trs_fixed = [] + ,trs_fixed_r = [] + + //渲染视图 + ,render = function(){ //后续性能提升的重点 + var thisCheckedRowIndex; + if(!sort && that.sortKey){ + return that.sort(that.sortKey.field, that.sortKey.sort, true); + } + layui.each(data, function(i1, item1){ + var tds = [], tds_fixed = [], tds_fixed_r = [] + ,numbers = i1 + options.limit*(curr - 1) + 1; //序号 + + if(item1.length === 0) return; + + if(!sort){ + item1[table.config.indexName] = i1; + } + + that.eachCols(function(i3, item3){ + var field = item3.field || i3 + ,key = options.index + '-' + item3.key + ,content = item1[field]; + + if(content === undefined || content === null) content = ''; + if(item3.colGroup) return; + + //td内容 + var td = ['' + ,'
    ' + function(){ + var tplData = $.extend(true, { + LAY_INDEX: numbers + }, item1) + ,checkName = table.config.checkName; + + //渲染不同风格的列 + switch(item3.type){ + case 'checkbox': + return ''; + break; + case 'radio': + if(tplData[checkName]){ + thisCheckedRowIndex = i1; + } + return ''; + break; + case 'numbers': + return numbers; + break; + }; + + //解析工具列模板 + if(item3.toolbar){ + return laytpl($(item3.toolbar).html()||'').render(tplData); + } + return parseTempData(item3, content, tplData); + }() + ,'
    '].join(''); + + tds.push(td); + if(item3.fixed && item3.fixed !== 'right') tds_fixed.push(td); + if(item3.fixed === 'right') tds_fixed_r.push(td); + }); + + trs.push(''+ tds.join('') + ''); + trs_fixed.push(''+ tds_fixed.join('') + ''); + trs_fixed_r.push(''+ tds_fixed_r.join('') + ''); + }); + + that.layBody.scrollTop(0); + that.layMain.find('.'+ NONE).remove(); + that.layMain.find('tbody').html(trs.join('')); + that.layFixLeft.find('tbody').html(trs_fixed.join('')); + that.layFixRight.find('tbody').html(trs_fixed_r.join('')); + + that.renderForm(); + typeof thisCheckedRowIndex === 'number' && that.setThisRowChecked(thisCheckedRowIndex); + that.syncCheckAll(); + + //滚动条补丁 + that.haveInit ? that.scrollPatch() : setTimeout(function(){ + that.scrollPatch(); + }, 50); + that.haveInit = true; + + layer.close(that.tipsIndex); + + //同步表头父列的相关值 + options.HAS_SET_COLS_PATCH || that.setColsPatch(); + options.HAS_SET_COLS_PATCH = true; + }; + + table.cache[that.key] = data; //记录数据 + + //显示隐藏分页栏 + that.layPage[(count == 0 || (data.length === 0 && curr == 1)) ? 'addClass' : 'removeClass'](HIDE); + + //排序 + if(sort){ + return render(); + } + + if(data.length === 0){ + that.renderForm(); + return that.errorView(options.text.none); + } else { + that.layFixed.removeClass(HIDE); + } + + render(); //渲染数据 + that.renderTotal(data); //数据合计 + + //同步分页状态 + if(options.page){ + options.page = $.extend({ + elem: 'layui-table-page' + options.index + ,count: count + ,limit: options.limit + ,limits: options.limits || [10,20,30,40,50,60,70,80,90] + ,groups: 3 + ,layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'] + ,prev: '' + ,next: '' + ,jump: function(obj, first){ + if(!first){ + //分页本身并非需要做以下更新,下面参数的同步,主要是因为其它处理统一用到了它们 + //而并非用的是 options.page 中的参数(以确保分页未开启的情况仍能正常使用) + that.page = obj.curr; //更新页码 + options.limit = obj.limit; //更新每页条数 + + that.pullData(obj.curr); + } + } + }, options.page); + options.page.count = count; //更新总条数 + laypage.render(options.page); + } + }; + + //数据合计行 + Class.prototype.renderTotal = function(data){ + var that = this + ,options = that.config + ,totalNums = {}; + + if(!options.totalRow) return; + + layui.each(data, function(i1, item1){ + if(item1.length === 0) return; + + that.eachCols(function(i3, item3){ + var field = item3.field || i3 + ,content = item1[field]; + + if(item3.totalRow){ + totalNums[field] = (totalNums[field] || 0) + (parseFloat(content) || 0); + } + }); + }); + + that.dataTotal = {}; + + var tds = []; + that.eachCols(function(i3, item3){ + var field = item3.field || i3; + + //td内容 + var content = function(){ + var text = item3.totalRowText || '' + ,thisTotalNum = parseFloat(totalNums[field]).toFixed(2) + ,tplData = {}; + + tplData[field] = thisTotalNum; + thisTotalNum = parseTempData(item3, thisTotalNum, tplData); + + return item3.totalRow ? (thisTotalNum || text) : text; + }() + ,td = ['' + ,'
    ' + content + ,'
    '].join(''); + + item3.field && (that.dataTotal[field] = content); + tds.push(td); + }); + + that.layTotal.find('tbody').html('' + tds.join('') + ''); + }; + + //找到对应的列元素 + Class.prototype.getColElem = function(parent, key){ + var that = this + ,options = that.config; + return parent.eq(0).find('.laytable-cell-'+ (options.index + '-' + key) + ':eq(0)'); + }; + + //渲染表单 + Class.prototype.renderForm = function(type){ + form.render(type, 'LAY-table-'+ this.index); + }; + + //标记当前行选中状态 + Class.prototype.setThisRowChecked = function(index){ + var that = this + ,options = that.config + ,ELEM_CLICK = 'layui-table-click' + ,tr = that.layBody.find('tr[data-index="'+ index +'"]'); + + tr.addClass(ELEM_CLICK).siblings('tr').removeClass(ELEM_CLICK); + }; + + //数据排序 + Class.prototype.sort = function(th, type, pull, formEvent){ + var that = this + ,field + ,res = {} + ,options = that.config + ,filter = options.elem.attr('lay-filter') + ,data = table.cache[that.key], thisData; + + //字段匹配 + if(typeof th === 'string'){ + that.layHeader.find('th').each(function(i, item){ + var othis = $(this) + ,_field = othis.data('field'); + if(_field === th){ + th = othis; + field = _field; + return false; + } + }); + } + + try { + var field = field || th.data('field') + ,key = th.data('key'); + + //如果欲执行的排序已在状态中,则不执行渲染 + if(that.sortKey && !pull){ + if(field === that.sortKey.field && type === that.sortKey.sort){ + return; + } + } + + var elemSort = that.layHeader.find('th .laytable-cell-'+ key).find(ELEM_SORT); + that.layHeader.find('th').find(ELEM_SORT).removeAttr('lay-sort'); //清除其它标题排序状态 + elemSort.attr('lay-sort', type || null); + that.layFixed.find('th') + } catch(e){ + return hint.error('Table modules: Did not match to field'); + } + + //记录排序索引和类型 + that.sortKey = { + field: field + ,sort: type + }; + + //默认为前端自动排序。如果否,则需自主排序(通常为服务端处理好排序) + if(options.autoSort){ + if(type === 'asc'){ //升序 + thisData = layui.sort(data, field); + } else if(type === 'desc'){ //降序 + thisData = layui.sort(data, field, true); + } else { //清除排序 + thisData = layui.sort(data, table.config.indexName); + delete that.sortKey; + } + } + + res[options.response.dataName] = thisData || data; + that.renderData(res, that.page, that.count, true); + + if(formEvent){ + layui.event.call(th, MOD_NAME, 'sort('+ filter +')', { + field: field + ,type: type + }); + } + }; + + //请求loading + Class.prototype.loading = function(hide){ + var that = this + ,options = that.config; + if(options.loading){ + if(hide){ + that.layInit && that.layInit.remove(); + delete that.layInit; + that.layBox.find(ELEM_INIT).remove(); + } else { + that.layInit = $(['
    ' + ,'' + ,'
    '].join('')); + that.layBox.append(that.layInit); + } + } + }; + + //同步选中值状态 + Class.prototype.setCheckData = function(index, checked){ + var that = this + ,options = that.config + ,thisData = table.cache[that.key]; + if(!thisData[index]) return; + if(thisData[index].constructor === Array) return; + thisData[index][options.checkName] = checked; + }; + + //同步全选按钮状态 + Class.prototype.syncCheckAll = function(){ + var that = this + ,options = that.config + ,checkAllElem = that.layHeader.find('input[name="layTableCheckbox"]') + ,syncColsCheck = function(checked){ + that.eachCols(function(i, item){ + if(item.type === 'checkbox'){ + item[options.checkName] = checked; + } + }); + return checked; + }; + + if(!checkAllElem[0]) return; + + if(table.checkStatus(that.key).isAll){ + if(!checkAllElem[0].checked){ + checkAllElem.prop('checked', true); + that.renderForm('checkbox'); + } + syncColsCheck(true); + } else { + if(checkAllElem[0].checked){ + checkAllElem.prop('checked', false); + that.renderForm('checkbox'); + } + syncColsCheck(false); + } + }; + + //获取cssRule + Class.prototype.getCssRule = function(key, callback){ + var that = this + ,style = that.elem.find('style')[0] + ,sheet = style.sheet || style.styleSheet || {} + ,rules = sheet.cssRules || sheet.rules; + layui.each(rules, function(i, item){ + if(item.selectorText === ('.laytable-cell-'+ key)){ + return callback(item), true; + } + }); + }; + + //让表格铺满 + Class.prototype.fullSize = function(){ + var that = this + ,options = that.config + ,height = options.height, bodyHeight; + + if(that.fullHeightGap){ + height = _WIN.height() - that.fullHeightGap; + if(height < 135) height = 135; + that.elem.css('height', height); + } + + if(!height) return; + + //减去列头区域的高度 + bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 38); //此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,暂时只对默认尺寸的表格做支持。 + + //减去工具栏的高度 + if(options.toolbar){ + bodyHeight = bodyHeight - (that.layTool.outerHeight() || 50); + } + + //减去统计朗的高度 + if(options.totalRow){ + bodyHeight = bodyHeight - (that.layTotal.outerHeight() || 40); + } + + //减去分页栏的高度 + if(options.page){ + bodyHeight = bodyHeight - (that.layPage.outerHeight() || 41); + } + + that.layMain.css('height', bodyHeight - 2); + }; + + //获取滚动条宽度 + Class.prototype.getScrollWidth = function(elem){ + var width = 0; + if(elem){ + width = elem.offsetWidth - elem.clientWidth; + } else { + elem = document.createElement('div'); + elem.style.width = '100px'; + elem.style.height = '100px'; + elem.style.overflowY = 'scroll'; + + document.body.appendChild(elem); + width = elem.offsetWidth - elem.clientWidth; + document.body.removeChild(elem); + } + return width; + }; + + //滚动条补丁 + Class.prototype.scrollPatch = function(){ + var that = this + ,layMainTable = that.layMain.children('table') + ,scollWidth = that.layMain.width() - that.layMain.prop('clientWidth') //纵向滚动条宽度 + ,scollHeight = that.layMain.height() - that.layMain.prop('clientHeight') //横向滚动条高度 + ,getScrollWidth = that.getScrollWidth(that.layMain[0]) //获取主容器滚动条宽度,如果有的话 + ,outWidth = layMainTable.outerWidth() - that.layMain.width() //表格内容器的超出宽度 + + //添加补丁 + ,addPatch = function(elem){ + if(scollWidth && scollHeight){ + elem = elem.eq(0); + if(!elem.find('.layui-table-patch')[0]){ + var patchElem = $('
    '); //补丁元素 + patchElem.find('div').css({ + width: scollWidth + }); + elem.find('tr').append(patchElem); + } + } else { + elem.find('.layui-table-patch').remove(); + } + } + + addPatch(that.layHeader); + addPatch(that.layTotal); + + //固定列区域高度 + var mainHeight = that.layMain.height() + ,fixHeight = mainHeight - scollHeight; + that.layFixed.find(ELEM_BODY).css('height', layMainTable.height() >= fixHeight ? fixHeight : 'auto'); + + //表格宽度小于容器宽度时,隐藏固定列 + that.layFixRight[outWidth > 0 ? 'removeClass' : 'addClass'](HIDE); + + //操作栏 + that.layFixRight.css('right', scollWidth - 1); + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config + ,_BODY = $('body') + ,dict = {} + ,th = that.layHeader.find('th') + ,resizing + ,ELEM_CELL = '.layui-table-cell' + ,filter = options.elem.attr('lay-filter'); + + //工具栏操作事件 + that.layTool.on('click', '*[lay-event]', function(e){ + var othis = $(this) + ,events = othis.attr('lay-event') + ,openPanel = function(sets){ + var list = $(sets.list) + ,panel = $('
      '); + + panel.html(list); + + //限制最大高度 + if(options.height){ + panel.css('max-height', options.height - (that.layTool.outerHeight() || 50)); + } + + //插入元素 + othis.find('.layui-table-tool-panel')[0] || othis.append(panel); + that.renderForm(); + + panel.on('click', function(e){ + layui.stope(e); + }); + + sets.done && sets.done(panel, list) + }; + + layui.stope(e); + _DOC.trigger('table.tool.panel.remove'); + layer.close(that.tipsIndex); + + switch(events){ + case 'LAYTABLE_COLS': //筛选列 + openPanel({ + list: function(){ + var lis = []; + that.eachCols(function(i, item){ + if(item.field && item.type == 'normal'){ + lis.push('
    • '); + } + }); + return lis.join(''); + }() + ,done: function(){ + form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(obj){ + var othis = $(obj.elem) + ,checked = this.checked + ,key = othis.data('key') + ,parentKey = othis.data('parentkey'); + + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + if(i1+ '-'+ i2 === key){ + var hide = item2.hide; + + //同步勾选列的 hide 值和隐藏样式 + item2.hide = !checked; + that.elem.find('*[data-key="'+ options.index +'-'+ key +'"]') + [checked ? 'removeClass' : 'addClass'](HIDE); + + //根据列的显示隐藏,同步多级表头的父级相关属性值 + if(hide != item2.hide){ + that.setParentCol(!checked, parentKey); + } + + //重新适配尺寸 + that.resize(); + } + }); + }); + }); + } + }); + break; + case 'LAYTABLE_EXPORT': //导出 + if(device.ie){ + layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', this, { + tips: 3 + }) + } else { + openPanel({ + list: function(){ + return [ + '
    • 导出到 Csv 文件
    • ' + ,'
    • 导出到 Excel 文件
    • ' + ].join('') + }() + ,done: function(panel, list){ + list.on('click', function(){ + var type = $(this).data('type') + table.exportFile.call(that, options.id, null, type); + }); + } + }); + } + break; + case 'LAYTABLE_PRINT': //打印 + var printWin = window.open('打印窗口', '_blank') + ,style = [''].join('') + ,html = $(that.layHeader.html()); //输出表头 + + html.append(that.layMain.find('table').html()); //输出表体 + html.append(that.layTotal.find('table').html()) //输出合计行 + + html.find('th.layui-table-patch').remove(); //移除补丁 + html.find('.layui-table-col-special').remove(); //移除特殊列 + + printWin.document.write(style + html.prop('outerHTML')); + printWin.document.close(); + printWin.print(); + printWin.close(); + break; + } + + layui.event.call(this, MOD_NAME, 'toolbar('+ filter +')', $.extend({ + event: events + ,config: options + },{})); + }); + + //拖拽调整宽度 + th.on('mousemove', function(e){ + var othis = $(this) + ,oLeft = othis.offset().left + ,pLeft = e.clientX - oLeft; + if(othis.data('unresize') || dict.resizeStart){ + return; + } + dict.allowResize = othis.width() - pLeft <= 10; //是否处于拖拽允许区域 + _BODY.css('cursor', (dict.allowResize ? 'col-resize' : '')); + }).on('mouseleave', function(){ + var othis = $(this); + if(dict.resizeStart) return; + _BODY.css('cursor', ''); + }).on('mousedown', function(e){ + var othis = $(this); + if(dict.allowResize){ + var key = othis.data('key'); + e.preventDefault(); + dict.resizeStart = true; //开始拖拽 + dict.offset = [e.clientX, e.clientY]; //记录初始坐标 + + that.getCssRule(key, function(item){ + var width = item.style.width || othis.outerWidth(); + dict.rule = item; + dict.ruleWidth = parseFloat(width); + dict.minWidth = othis.data('minwidth') || options.cellMinWidth; + }); + } + }); + + //拖拽中 + _DOC.on('mousemove', function(e){ + if(dict.resizeStart){ + e.preventDefault(); + if(dict.rule){ + var setWidth = dict.ruleWidth + e.clientX - dict.offset[0]; + if(setWidth < dict.minWidth) setWidth = dict.minWidth; + dict.rule.style.width = setWidth + 'px'; + layer.close(that.tipsIndex); + } + resizing = 1 + } + }).on('mouseup', function(e){ + if(dict.resizeStart){ + dict = {}; + _BODY.css('cursor', ''); + that.scrollPatch(); + } + if(resizing === 2){ + resizing = null; + } + }); + + //排序 + th.on('click', function(e){ + var othis = $(this) + ,elemSort = othis.find(ELEM_SORT) + ,nowType = elemSort.attr('lay-sort') + ,type; + + if(!elemSort[0] || resizing === 1) return resizing = 2; + + if(nowType === 'asc'){ + type = 'desc'; + } else if(nowType === 'desc'){ + type = null; + } else { + type = 'asc'; + } + that.sort(othis, type, null, true); + }).find(ELEM_SORT+' .layui-edge ').on('click', function(e){ + var othis = $(this) + ,index = othis.index() + ,field = othis.parents('th').eq(0).data('field') + layui.stope(e); + if(index === 0){ + that.sort(field, 'asc', null, true); + } else { + that.sort(field, 'desc', null, true); + } + }); + + //数据行中的事件监听返回的公共对象成员 + var commonMember = function(sets){ + var othis = $(this) + ,index = othis.parents('tr').eq(0).data('index') + ,tr = that.layBody.find('tr[data-index="'+ index +'"]') + ,data = table.cache[that.key] || []; + + + data = data[index] || {}; + + return $.extend({ + tr: tr //行元素 + ,data: table.clearCacheKey(data) //当前行数据 + ,del: function(){ //删除行数据 + table.cache[that.key][index] = []; + tr.remove(); + that.scrollPatch(); + } + ,update: function(fields){ //修改行数据 + fields = fields || {}; + layui.each(fields, function(key, value){ + if(key in data){ + var templet, td = tr.children('td[data-field="'+ key +'"]'); + data[key] = value; + that.eachCols(function(i, item2){ + if(item2.field == key && item2.templet){ + templet = item2.templet; + } + }); + td.children(ELEM_CELL).html(parseTempData({ + templet: templet + }, value, data)); + td.data('content', value); + } + }); + } + }, sets); + }; + + //复选框选择 + that.elem.on('click', 'input[name="layTableCheckbox"]+', function(){ //替代元素的 click 事件 + var checkbox = $(this).prev() + ,childs = that.layBody.find('input[name="layTableCheckbox"]') + ,index = checkbox.parents('tr').eq(0).data('index') + ,checked = checkbox[0].checked + ,isAll = checkbox.attr('lay-filter') === 'layTableAllChoose'; + + //全选 + if(isAll){ + childs.each(function(i, item){ + item.checked = checked; + that.setCheckData(i, checked); + }); + that.syncCheckAll(); + that.renderForm('checkbox'); + } else { + that.setCheckData(index, checked); + that.syncCheckAll(); + } + + layui.event.call(checkbox[0], MOD_NAME, 'checkbox('+ filter +')', commonMember.call(checkbox[0], { + checked: checked + ,type: isAll ? 'all' : 'one' + })); + }); + + //单选框选择 + that.elem.on('click', 'input[lay-type="layTableRadio"]+', function(){ + var radio = $(this).prev() + ,checked = radio[0].checked + ,thisData = table.cache[that.key] + ,index = radio.parents('tr').eq(0).data('index'); + + //重置数据单选属性 + layui.each(thisData, function(i, item){ + if(index === i){ + item.LAY_CHECKED = true; + } else { + delete item.LAY_CHECKED; + } + }); + that.setThisRowChecked(index); + + layui.event.call(this, MOD_NAME, 'radio('+ filter +')', commonMember.call(this, { + checked: checked + })); + }); + + //行事件 + that.layBody.on('mouseenter', 'tr', function(){ //鼠标移入行 + var othis = $(this) + ,index = othis.index(); + if(othis.data('off')) return; //不触发事件 + that.layBody.find('tr:eq('+ index +')').addClass(ELEM_HOVER) + }).on('mouseleave', 'tr', function(){ //鼠标移出行 + var othis = $(this) + ,index = othis.index(); + if(othis.data('off')) return; //不触发事件 + that.layBody.find('tr:eq('+ index +')').removeClass(ELEM_HOVER) + }).on('click', 'tr', function(){ //单击行 + setRowEvent.call(this, 'row'); + }).on('dblclick', 'tr', function(){ //双击行 + setRowEvent.call(this, 'rowDouble'); + }); + + //创建行单击、双击事件监听 + var setRowEvent = function(eventType){ + var othis = $(this); + if(othis.data('off')) return; //不触发事件 + layui.event.call(this, + MOD_NAME, eventType + '('+ filter +')' + ,commonMember.call(othis.children('td')[0]) + ); + }; + + //单元格编辑 + that.layBody.on('change', '.'+ELEM_EDIT, function(){ + var othis = $(this) + ,value = this.value + ,field = othis.parent().data('field') + ,index = othis.parents('tr').eq(0).data('index') + ,data = table.cache[that.key][index]; + + data[field] = value; //更新缓存中的值 + + layui.event.call(this, MOD_NAME, 'edit('+ filter +')', commonMember.call(this, { + value: value + ,field: field + })); + }).on('blur', '.'+ELEM_EDIT, function(){ + var templet + ,othis = $(this) + ,thisElem = this + ,field = othis.parent().data('field') + ,index = othis.parents('tr').eq(0).data('index') + ,data = table.cache[that.key][index]; + that.eachCols(function(i, item){ + if(item.field == field && item.templet){ + templet = item.templet; + } + }); + othis.siblings(ELEM_CELL).html(function(value){ + return parseTempData({ + templet: templet + }, value, data); + }(thisElem.value)); + othis.parent().data('content', thisElem.value); + othis.remove(); + }); + + //单元格单击事件 + that.layBody.on('click', 'td', function(e){ + var othis = $(this) + ,field = othis.data('field') + ,editType = othis.data('edit') + ,elemCell = othis.children(ELEM_CELL); + + if(othis.data('off')) return; //不触发事件 + + //显示编辑表单 + if(editType){ + var input = $(''); + input[0].value = othis.data('content') || elemCell.text(); + othis.find('.'+ELEM_EDIT)[0] || othis.append(input); + input.focus(); + layui.stope(e); + return; + } + }).on('mouseenter', 'td', function(){ + gridExpand.call(this) + }).on('mouseleave', 'td', function(){ + gridExpand.call(this, 'hide'); + }); + + //单元格展开图标 + var ELEM_GRID = 'layui-table-grid', ELEM_GRID_DOWN = 'layui-table-grid-down', ELEM_GRID_PANEL = 'layui-table-grid-panel' + ,gridExpand = function(hide){ + var othis = $(this) + ,elemCell = othis.children(ELEM_CELL); + + if(othis.data('off')) return; //不触发事件 + + if(hide){ + othis.find('.layui-table-grid-down').remove(); + } else if(elemCell.prop('scrollWidth') > elemCell.outerWidth()){ + if(elemCell.find('.'+ ELEM_GRID_DOWN)[0]) return; + othis.append('
      '); + } + }; + + //单元格展开事件 + that.layBody.on('click', '.'+ ELEM_GRID_DOWN, function(e){ + var othis = $(this) + ,td = othis.parent() + ,elemCell = td.children(ELEM_CELL); + + that.tipsIndex = layer.tips([ + '
      ' + ,elemCell.html() + ,'
      ' + ,'' + ].join(''), elemCell[0], { + tips: [3, ''] + ,time: -1 + ,anim: -1 + ,maxWidth: (device.ios || device.android) ? 300 : that.elem.width()/2 + ,isOutAnim: false + ,skin: 'layui-table-tips' + ,success: function(layero, index){ + layero.find('.layui-table-tips-c').on('click', function(){ + layer.close(index); + }); + } + }); + + layui.stope(e); + }); + + //行工具条操作事件 + that.layBody.on('click', '*[lay-event]', function(){ + var othis = $(this) + ,index = othis.parents('tr').eq(0).data('index'); + layui.event.call(this, MOD_NAME, 'tool('+ filter +')', commonMember.call(this, { + event: othis.attr('lay-event') + })); + that.setThisRowChecked(index); + }); + + //同步滚动条 + that.layMain.on('scroll', function(){ + var othis = $(this) + ,scrollLeft = othis.scrollLeft() + ,scrollTop = othis.scrollTop(); + + that.layHeader.scrollLeft(scrollLeft); + that.layTotal.scrollLeft(scrollLeft); + that.layFixed.find(ELEM_BODY).scrollTop(scrollTop); + + layer.close(that.tipsIndex); + }); + + //自适应 + _WIN.on('resize', function(){ + that.resize(); + }); + }; + + //一次性事件 + ;(function(){ + //全局点击 + _DOC.on('click', function(){ + _DOC.trigger('table.remove.tool.panel'); + }); + + //工具面板移除事件 + _DOC.on('table.remove.tool.panel', function(){ + $('.layui-table-tool-panel').remove(); + }); + })(); + + //初始化 + table.init = function(filter, settings){ + settings = settings || {}; + var that = this + ,elemTable = filter ? $('table[lay-filter="'+ filter +'"]') : $(ELEM + '[lay-data]') + ,errorTips = 'Table element property lay-data configuration item has a syntax error: '; + + //遍历数据表格 + elemTable.each(function(){ + var othis = $(this), tableData = othis.attr('lay-data'); + + try{ + tableData = new Function('return '+ tableData)(); + } catch(e){ + hint.error(errorTips + tableData) + } + + var cols = [], options = $.extend({ + elem: this + ,cols: [] + ,data: [] + ,skin: othis.attr('lay-skin') //风格 + ,size: othis.attr('lay-size') //尺寸 + ,even: typeof othis.attr('lay-even') === 'string' //偶数行背景 + }, table.config, settings, tableData); + + filter && othis.hide(); + + //获取表头数据 + othis.find('thead>tr').each(function(i){ + options.cols[i] = []; + $(this).children().each(function(ii){ + var th = $(this), itemData = th.attr('lay-data'); + + try{ + itemData = new Function('return '+ itemData)(); + } catch(e){ + return hint.error(errorTips + itemData) + } + + var row = $.extend({ + title: th.text() + ,colspan: th.attr('colspan') || 0 //列单元格 + ,rowspan: th.attr('rowspan') || 0 //行单元格 + }, itemData); + + if(row.colspan < 2) cols.push(row); + options.cols[i].push(row); + }); + }); + + //获取表体数据 + othis.find('tbody>tr').each(function(i1){ + var tr = $(this), row = {}; + //如果定义了字段名 + tr.children('td').each(function(i2, item2){ + var td = $(this) + ,field = td.data('field'); + if(field){ + return row[field] = td.html(); + } + }); + //如果未定义字段名 + layui.each(cols, function(i3, item3){ + var td = tr.children('td').eq(i3); + row[item3.field] = td.html(); + }); + options.data[i1] = row; + }); + table.render(options); + }); + + return that; + }; + + //记录所有实例 + thisTable.that = {}; //记录所有实例对象 + thisTable.config = {}; //记录所有实例配置项 + + //遍历表头 + table.eachCols = function(id, callback, cols){ + var config = thisTable.config[id] || {} + ,arrs = [], index = 0; + + cols = $.extend(true, [], cols || config.cols); + + //重新整理表头结构 + layui.each(cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + + //如果是组合列,则捕获对应的子列 + if(item2.colGroup){ + var childIndex = 0; + index++ + item2.CHILD_COLS = []; + + layui.each(cols[i1 + 1], function(i22, item22){ + //如果子列已经被标注为{PARENT_COL_INDEX},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环 + if(item22.PARENT_COL_INDEX || (childIndex > 1 && childIndex == item2.colspan)) return; + + item22.PARENT_COL_INDEX = index; + + item2.CHILD_COLS.push(item22); + childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1); + }); + } + + if(item2.PARENT_COL_INDEX) return; //如果是子列,则不进行追加,因为已经存储在父列中 + arrs.push(item2) + }); + }); + + //重新遍历列,如果有子列,则进入递归 + var eachArrs = function(obj){ + layui.each(obj || arrs, function(i, item){ + if(item.CHILD_COLS) return eachArrs(item.CHILD_COLS); + typeof callback === 'function' && callback(i, item); + }); + }; + + eachArrs(); + }; + + //表格选中状态 + table.checkStatus = function(id){ + var nums = 0 + ,invalidNum = 0 + ,arr = [] + ,data = table.cache[id] || []; + //计算全选个数 + layui.each(data, function(i, item){ + if(item.constructor === Array){ + invalidNum++; //无效数据,或已删除的 + return; + } + if(item[table.config.checkName]){ + nums++; + arr.push(table.clearCacheKey(item)); + } + }); + return { + data: arr //选中的数据 + ,isAll: data.length ? (nums === (data.length - invalidNum)) : false //是否全选 + }; + }; + + //表格导出 + table.exportFile = function(id, data, type){ + var that = this; + + data = data || table.clearCacheKey(table.cache[id]); + type = type || 'csv'; + + var config = thisTable.config[id] || {} + ,textType = ({ + csv: 'text/csv' + ,xls: 'application/vnd.ms-excel' + })[type] + ,alink = document.createElement("a"); + + if(device.ie) return hint.error('IE_NOT_SUPPORT_EXPORTS'); + + alink.href = 'data:'+ textType +';charset=utf-8,\ufeff'+ encodeURIComponent(function(){ + var dataTitle = [], dataMain = [], dataTotal = []; + + //表头和表体 + layui.each(data, function(i1, item1){ + var vals = []; + if(typeof id === 'object'){ //如果 id 参数直接为表头数据 + layui.each(id, function(i, item){ + i1 == 0 && dataTitle.push(item || ''); + }); + layui.each(table.clearCacheKey(item1), function(i2, item2){ + vals.push('"'+ (item2 || '') +'"'); + }); + } else { + table.eachCols(id, function(i3, item3){ + if(item3.field && item3.type == 'normal' && !item3.hide){ + var content = item1[item3.field]; + if(content === undefined || content === null) content = ''; + + i1 == 0 && dataTitle.push(item3.title || ''); + vals.push('"'+ parseTempData(item3, content, item1, 'text') + '"'); + } + }); + } + dataMain.push(vals.join(',')); + }); + + //表合计 + layui.each(that.dataTotal, function(key, value){ + dataTotal.push(value); + }); + + return dataTitle.join(',') + '\r\n' + dataMain.join('\r\n') + '\r\n' + dataTotal.join(','); + }()); + + alink.download = (config.title || 'table_'+ (config.index || '')) + '.' + type; + document.body.appendChild(alink); + alink.click(); + document.body.removeChild(alink); + }; + + //重置表格尺寸结构 + table.resize = function(id){ + //如果指定表格唯一 id,则只执行该 id 对应的表格实例 + if(id){ + var config = getThisTableConfig(id); //获取当前实例配置项 + if(!config) return; + + thisTable.that[id].resize(); + + } else { //否则重置所有表格实例尺寸 + layui.each(thisTable.that, function(){ + this.resize(); + }); + } + }; + + //表格重载 + table.reload = function(id, options){ + var config = getThisTableConfig(id); //获取当前实例配置项 + if(!config) return; + + var that = thisTable.that[id]; + that.reload(options); + + return thisTable.call(that); + }; + + //核心入口 + table.render = function(options){ + var inst = new Class(options); + return thisTable.call(inst); + }; + + //清除临时Key + table.clearCacheKey = function(data){ + data = $.extend({}, data); + delete data[table.config.checkName]; + delete data[table.config.indexName]; + return data; + }; + + //自动完成渲染 + table.init(); + + exports(MOD_NAME, table); +}); + + diff --git a/pccenter/src/main/resources/static/src/lay/modules/transfer.js b/pccenter/src/main/resources/static/src/lay/modules/transfer.js new file mode 100644 index 0000000000000000000000000000000000000000..a221c4276afcc10023626319f95fe127b9704d83 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/transfer.js @@ -0,0 +1,443 @@ +/** + + @Name:layui.transfer 穿梭框 + @Author:贤心 + @License:MIT + + */ + +layui.define(['laytpl', 'form'], function(exports){ + "use strict"; + + var $ = layui.$ + ,laytpl = layui.laytpl + ,form = layui.form + + //模块名 + ,MOD_NAME = 'transfer' + + //外部接口 + ,transfer = { + config: {} + ,index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件监听 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisModule = function(){ + var that = this + ,options = that.config + ,id = options.id || that.index; + + thisModule.that[id] = that; //记录当前实例对象 + thisModule.config[id] = options; //记录当前实例配置项 + + return { + config: options + //重置实例 + ,reload: function(options){ + that.reload.call(that, options); + } + //获取右侧数据 + ,getData: function(){ + return that.getData.call(that); + } + } + } + + //获取当前实例配置项 + ,getThisModuleConfig = function(id){ + var config = thisModule.config[id]; + if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance'); + return config || null; + } + + //字符常量 + ,ELEM = 'layui-transfer', HIDE = 'layui-hide', DISABLED = 'layui-btn-disabled', NONE = 'layui-none' + ,ELEM_BOX = 'layui-transfer-box', ELEM_HEADER = 'layui-transfer-header', ELEM_SEARCH = 'layui-transfer-search', ELEM_ACTIVE = 'layui-transfer-active', ELEM_DATA = 'layui-transfer-data' + + //穿梭框模板 + ,TPL_BOX = function(obj){ + obj = obj || {}; + return ['
      ' + ,'
      ' + ,'' + ,'
      ' + ,'{{# if(d.data.showSearch){ }}' + ,'' + ,'{{# } }}' + ,'
        ' + ,'
        '].join(''); + } + + //主模板 + ,TPL_MAIN = ['
        ' + ,TPL_BOX({ + index: 0 + ,checkAllName: 'layTransferLeftCheckAll' + }) + ,'
        ' + ,'' + ,'' + ,'
        ' + ,TPL_BOX({ + index: 1 + ,checkAllName: 'layTransferRightCheckAll' + }) + ,'
        '].join('') + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++transfer.index; + that.config = $.extend({}, that.config, transfer.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + title: ['列表一', '列表二'] + ,width: 200 + ,height: 360 + ,data: [] //数据源 + ,value: [] //选中的数据 + ,showSearch: false //是否开启搜索 + ,id: '' //唯一索引,默认自增 index + ,text: { + none: '无数据' + ,searchNone: '无匹配数据' + } + }; + + //重载实例 + Class.prototype.reload = function(options){ + var that = this; + + layui.each(options, function(key, item){ + if(item.constructor === Array) delete that.config[key]; + }); + + that.config = $.extend(true, {}, that.config, options); + that.render(); + }; + + //渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + //解析模板 + var thisElem = that.elem = $(laytpl(TPL_MAIN).render({ + data: options + ,index: that.index //索引 + })); + + var othis = options.elem = $(options.elem); + if(!othis[0]) return; + + //初始化属性 + options.data = options.data || []; + options.value = options.value || []; + + //索引 + that.key = options.id || that.index; + + //插入组件结构 + othis.html(that.elem); + + //各级容器 + that.layBox = that.elem.find('.'+ ELEM_BOX) + that.layHeader = that.elem.find('.'+ ELEM_HEADER) + that.laySearch = that.elem.find('.'+ ELEM_SEARCH) + that.layData = thisElem.find('.'+ ELEM_DATA); + that.layBtn = thisElem.find('.'+ ELEM_ACTIVE + ' .layui-btn'); + + //初始化尺寸 + that.layBox.css({ + width: options.width + ,height: options.height + }); + that.layData.css({ + height: function(){ + return options.height - that.layHeader.outerHeight() - that.laySearch.outerHeight() - 2 + }() + }); + + that.renderData(); //渲染数据 + that.events(); //事件 + }; + + //渲染数据 + Class.prototype.renderData = function(){ + var that = this + ,options = that.config; + + //左右穿梭框差异数据 + var arr = [{ + checkName: 'layTransferLeftCheck' + ,views: [] + }, { + checkName: 'layTransferRightCheck' + ,views: [] + }]; + + //解析格式 + that.parseData(function(item){ + //标注为 selected 的为右边的数据 + var _index = item.selected ? 1 : 0 + ,listElem = ['
      • ' + ,'' + ,'
      • '].join(''); + arr[_index].views.push(listElem); + delete item.selected; + }); + + that.layData.eq(0).html(arr[0].views.join('')); + that.layData.eq(1).html(arr[1].views.join('')); + + that.renderCheckBtn(); + } + + //渲染表单 + Class.prototype.renderForm = function(type){ + form.render(type, 'LAY-transfer-'+ this.index); + }; + + //同步复选框和按钮状态 + Class.prototype.renderCheckBtn = function(obj){ + var that = this + ,options = that.config; + + obj = obj || {}; + + that.layBox.each(function(_index){ + var othis = $(this) + ,thisDataElem = othis.find('.'+ ELEM_DATA) + ,allElemCheckbox = othis.find('.'+ ELEM_HEADER).find('input[type="checkbox"]') + ,listElemCheckbox = thisDataElem.find('input[type="checkbox"]'); + + //同步复选框和按钮状态 + var nums = 0 + ,haveChecked = false; + listElemCheckbox.each(function(){ + var isHide = $(this).data('hide'); + if(this.checked || this.disabled || isHide){ + nums++; + } + if(this.checked && !isHide){ + haveChecked = true; + } + }); + + allElemCheckbox.prop('checked', haveChecked && nums === listElemCheckbox.length); //全选复选框状态 + that.layBtn.eq(_index)[haveChecked ? 'removeClass' : 'addClass'](DISABLED); //对应的按钮状态 + + //无数据视图 + if(!obj.stopNone){ + var isNone = thisDataElem.children('li:not(.'+ HIDE +')').length + that.noneView(thisDataElem, isNone ? '' : options.text.none); + } + }); + + that.renderForm('checkbox'); + }; + + //无数据视图 + Class.prototype.noneView = function(thisDataElem, text){ + var createNoneElem = $('

        '+ (text || '') +'

        '); + if(thisDataElem.find('.'+ NONE)[0]){ + thisDataElem.find('.'+ NONE).remove(); + } + text.replace(/\s/g, '') && thisDataElem.append(createNoneElem); + }; + + //同步 value 属性值 + Class.prototype.setValue = function(){ + var that = this + ,options = that.config + ,arr = []; + that.layBox.eq(1).find('.'+ ELEM_DATA +' input[type="checkbox"]').each(function(){ + var isHide = $(this).data('hide'); + isHide || arr.push(this.value); + }); + options.value = arr; + + return that; + }; + + //解析数据 + Class.prototype.parseData = function(callback){ + var that = this + ,options = that.config + ,newData = []; + + layui.each(options.data, function(index, item){ + //解析格式 + item = (typeof options.parseData === 'function' + ? options.parseData(item) + : item) || item; + + newData.push(item = $.extend({}, item)) + + layui.each(options.value, function(index2, item2){ + if(item2 == item.value){ + item.selected = true; + } + }); + callback && callback(item); + }); + + options.data = newData; + return that; + }; + + //获得右侧面板数据 + Class.prototype.getData = function(value){ + var that = this + ,options = that.config + ,selectedData = []; + + that.setValue(); + + layui.each(value || options.value, function(index, item){ + layui.each(options.data, function(index2, item2){ + delete item2.selected; + if(item == item2.value){ + selectedData.push(item2); + }; + }); + }); + return selectedData; + }; + + //事件 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + + //左右复选框 + that.elem.on('click', 'input[lay-filter="layTransferCheckbox"]+', function(){ + var thisElemCheckbox = $(this).prev() + ,checked = thisElemCheckbox[0].checked + ,thisDataElem = thisElemCheckbox.parents('.'+ ELEM_BOX).eq(0).find('.'+ ELEM_DATA); + + if(thisElemCheckbox[0].disabled) return; + + //判断是否全选 + if(thisElemCheckbox.attr('lay-type') === 'all'){ + thisDataElem.find('input[type="checkbox"]').each(function(){ + if(this.disabled) return; + this.checked = checked; + }); + } + + that.renderCheckBtn({stopNone: true}); + }); + + //按钮事件 + that.layBtn.on('click', function(){ + var othis = $(this) + ,_index = othis.data('index') + ,thisBoxElem = that.layBox.eq(_index) + ,arr = []; + if(othis.hasClass(DISABLED)) return; + + that.layBox.eq(_index).each(function(_index){ + var othis = $(this) + ,thisDataElem = othis.find('.'+ ELEM_DATA); + + thisDataElem.children('li').each(function(){ + var thisList = $(this) + ,thisElemCheckbox = thisList.find('input[type="checkbox"]') + ,isHide = thisElemCheckbox.data('hide'); + + if(thisElemCheckbox[0].checked && !isHide){ + thisElemCheckbox[0].checked = false; + thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone()); + thisList.remove(); + + //记录当前穿梭的数据 + arr.push(thisElemCheckbox[0].value); + } + + that.setValue(); + }); + }); + + that.renderCheckBtn(); + + //穿梭时,如果另外一个框正在搜索,则触发匹配 + var siblingInput = thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_SEARCH +' input') + siblingInput.val() === '' || siblingInput.trigger('keyup'); + + //穿梭时的回调 + options.onchange && options.onchange(that.getData(arr), _index); + }); + + //搜索 + that.laySearch.find('input').on('keyup', function(){ + var value = this.value + ,thisDataElem = $(this).parents('.'+ ELEM_SEARCH).eq(0).siblings('.'+ ELEM_DATA) + ,thisListElem = thisDataElem.children('li'); + + thisListElem.each(function(){ + var thisList = $(this) + ,thisElemCheckbox = thisList.find('input[type="checkbox"]') + ,isMatch = thisElemCheckbox[0].title.indexOf(value) !== -1; + + thisList[isMatch ? 'removeClass': 'addClass'](HIDE); + thisElemCheckbox.data('hide', isMatch ? false : true); + }); + + that.renderCheckBtn(); + + //无匹配数据视图 + var isNone = thisListElem.length === thisDataElem.children('li.'+ HIDE).length; + that.noneView(thisDataElem, isNone ? options.text.searchNone : ''); + }); + }; + + //记录所有实例 + thisModule.that = {}; //记录所有实例对象 + thisModule.config = {}; //记录所有实例配置项 + + //重载实例 + transfer.reload = function(id, options){ + var that = thisModule.that[id]; + that.reload(options); + + return thisModule.call(that); + }; + + //获得选中的数据(右侧面板) + transfer.getData = function(id){ + var that = thisModule.that[id]; + return that.getData(); + }; + + //核心入口 + transfer.render = function(options){ + var inst = new Class(options); + return thisModule.call(inst); + }; + + exports(MOD_NAME, transfer); +}); diff --git a/pccenter/src/main/resources/static/src/lay/modules/tree.js b/pccenter/src/main/resources/static/src/lay/modules/tree.js new file mode 100644 index 0000000000000000000000000000000000000000..a1040f7cdc2c76ff29655e3684b411d7a5677774 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/tree.js @@ -0,0 +1,817 @@ +/** + + @Name:layui.tree 树 + @Author:star1029 + @License:MIT + + */ + +layui.define('form', function(exports){ + "use strict"; + + var $ = layui.$ + ,form = layui.form + ,layer = layui.layer + + //模块名 + ,MOD_NAME = 'tree' + + //外部接口 + ,tree = { + config: {} + ,index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件监听 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisModule = function(){ + var that = this + ,options = that.config + ,id = options.id || that.index; + + thisModule.that[id] = that; //记录当前实例对象 + thisModule.config[id] = options; //记录当前实例配置项 + + return { + config: options + //重置实例 + ,reload: function(options){ + that.reload.call(that, options); + } + ,getChecked: function(){ + return that.getChecked.call(that); + } + ,setChecked: function(id){//设置值 + return that.setChecked.call(that, id); + } + } + } + + //获取当前实例配置项 + ,getThisModuleConfig = function(id){ + var config = thisModule.config[id]; + if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance'); + return config || null; + } + + //字符常量 + ,SHOW = 'layui-show', HIDE = 'layui-hide', NONE = 'layui-none', DISABLED = 'layui-disabled' + + ,ELEM_VIEW = 'layui-tree', ELEM_SET = 'layui-tree-set', ICON_CLICK = 'layui-tree-iconClick' + ,ICON_ADD = 'layui-icon-addition', ICON_SUB = 'layui-icon-subtraction', ELEM_ENTRY = 'layui-tree-entry', ELEM_MAIN = 'layui-tree-main', ELEM_TEXT = 'layui-tree-txt', ELEM_PACK = 'layui-tree-pack', ELEM_SPREAD = 'layui-tree-spread' + ,ELEM_LINE_SHORT = 'layui-tree-setLineShort', ELEM_SHOW = 'layui-tree-showLine', ELEM_EXTEND = 'layui-tree-lineExtend' + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++tree.index; + that.config = $.extend({}, that.config, tree.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + data: [] //数据 + + ,showCheckbox: false //是否显示复选框 + ,showLine: true //是否开启连接线 + ,accordion: false //是否开启手风琴模式 + ,onlyIconControl: false //是否仅允许节点左侧图标控制展开收缩 + ,isJump: false //是否允许点击节点时弹出新窗口跳转 + ,edit: false //是否开启节点的操作图标 + + ,text: { + defaultNodeName: '未命名' //节点默认名称 + ,none: '无数据' //数据为空时的文本提示 + } + }; + + //重载实例 + Class.prototype.reload = function(options){ + var that = this; + + layui.each(options, function(key, item){ + if(item.constructor === Array) delete that.config[key]; + }); + + that.config = $.extend(true, {}, that.config, options); + that.render(); + }; + + //主体渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + that.checkids = []; + + var temp = $('
        '); + that.tree(temp); + + var othis = options.elem = $(options.elem); + if(!othis[0]) return; + + //索引 + that.key = options.id || that.index; + + //插入组件结构 + that.elem = temp; + that.elemNone = $('
        '+ options.text.none +'
        '); + othis.html(that.elem); + + if(that.elem.find('.layui-tree-set').length == 0){ + return that.elem.append(that.elemNone); + }; + + //复选框渲染 + if(options.showCheckbox){ + that.renderForm('checkbox'); + }; + + that.elem.find('.layui-tree-set').each(function(){ + var othis = $(this); + //最外层 + if(!othis.parent('.layui-tree-pack')[0]){ + othis.addClass('layui-tree-setHide'); + }; + + //没有下一个节点 上一层父级有延伸线 + if(!othis.next()[0] && othis.parents('.layui-tree-pack').eq(1).hasClass('layui-tree-lineExtend')){ + othis.addClass(ELEM_LINE_SHORT); + }; + + //没有下一个节点 外层最后一个 + if(!othis.next()[0] && !othis.parents('.layui-tree-set').eq(0).next()[0]){ + othis.addClass(ELEM_LINE_SHORT); + }; + }); + + that.events(); + }; + + //渲染表单 + Class.prototype.renderForm = function(type){ + form.render(type, 'LAY-tree-'+ this.index); + }; + + //节点解析 + Class.prototype.tree = function(elem, children){ + var that = this + ,options = that.config + ,data = children || options.data; + + //遍历数据 + layui.each(data, function(index, item){ + var hasChild = item.children && item.children.length > 0 + ,packDiv = $('
        ') + ,entryDiv = $(['
        ' + ,'
        ' + ,'
        ' + //箭头 + ,function(){ + if(options.showLine){ + if(hasChild){ + return ''; + }else{ + return ''; + }; + }else{ + return ''; + }; + }() + + //复选框 + ,function(){ + return options.showCheckbox ? '' : ''; + }() + + //节点 + ,function(){ + if(options.isJump && item.href){ + return ''+ (item.title || item.label || options.text.defaultNodeName) +''; + }else{ + return ''+ (item.title || item.label || options.text.defaultNodeName) +''; + } + }() + ,'
        ' + + //节点操作图标 + ,function(){ + if(!options.edit) return ''; + + var editIcon = { + add: '' + ,update: '' + ,del: '' + }, arr = ['
        ']; + + if(options.edit === true){ + options.edit = ['update', 'del'] + } + + if(typeof options.edit === 'object'){ + layui.each(options.edit, function(i, val){ + arr.push(editIcon[val] || '') + }); + return arr.join('') + '
        '; + } + }() + ,'
        '].join('')); + + //如果有子节点,则递归继续生成树 + if(hasChild){ + entryDiv.append(packDiv); + that.tree(packDiv, item.children); + }; + + elem.append(entryDiv); + + //若有前置节点,前置节点加连接线 + if(entryDiv.prev('.'+ELEM_SET)[0]){ + entryDiv.prev().children('.layui-tree-pack').addClass('layui-tree-showLine'); + }; + + //若无子节点,则父节点加延伸线 + if(!hasChild){ + entryDiv.parent('.layui-tree-pack').addClass('layui-tree-lineExtend'); + }; + + //展开节点操作 + that.spread(entryDiv, item); + + //选择框 + if(options.showCheckbox){ + item.checked && that.checkids.push(item.id); + that.checkClick(entryDiv, item); + } + + //操作节点 + options.edit && that.operate(entryDiv, item); + + }); + }; + + //展开节点 + Class.prototype.spread = function(elem, item){ + var that = this + ,options = that.config + ,entry = elem.children('.'+ELEM_ENTRY) + ,elemMain = entry.children('.'+ ELEM_MAIN) + ,elemIcon = entry.find('.'+ ICON_CLICK) + ,elemText = entry.find('.'+ ELEM_TEXT) + ,touchOpen = options.onlyIconControl ? elemIcon : elemMain //判断展开通过节点还是箭头图标 + ,state = ''; + + //展开收缩 + touchOpen.on('click', function(e){ + var packCont = elem.children('.'+ELEM_PACK) + ,iconClick = touchOpen.children('.layui-icon')[0] ? touchOpen.children('.layui-icon') : touchOpen.find('.layui-tree-icon').children('.layui-icon'); + + //若没有子节点 + if(!packCont[0]){ + state = 'normal'; + }else{ + if(elem.hasClass(ELEM_SPREAD)){ + elem.removeClass(ELEM_SPREAD); + packCont.slideUp(200); + iconClick.removeClass(ICON_SUB).addClass(ICON_ADD); + }else{ + elem.addClass(ELEM_SPREAD); + packCont.slideDown(200); + iconClick.addClass(ICON_SUB).removeClass(ICON_ADD); + + //是否手风琴 + if(options.accordion){ + var sibls = elem.siblings('.'+ELEM_SET); + sibls.removeClass(ELEM_SPREAD); + sibls.children('.'+ELEM_PACK).slideUp(200); + sibls.find('.layui-tree-icon').children('.layui-icon').removeClass(ICON_SUB).addClass(ICON_ADD); + }; + }; + }; + }); + + //点击回调 + elemText.on('click', function(){ + var othis = $(this); + + //判断是否禁用状态 + if(othis.hasClass(DISABLED)) return; + + //判断展开收缩状态 + if(elem.hasClass(ELEM_SPREAD)){ + state = options.onlyIconControl ? 'open' : 'close'; + } else { + state = options.onlyIconControl ? 'close' : 'open'; + } + + //点击产生的回调 + options.click && options.click({ + elem: elem + ,state: state + ,data: item + }); + }); + }; + + //计算复选框选中状态 + Class.prototype.setCheckbox = function(elem, item, elemCheckbox){ + var that = this + ,options = that.config + ,checked = elemCheckbox.prop('checked'); + + if(elemCheckbox.prop('disabled')) return; + + //同步子节点选中状态 + if(typeof item.children === 'object' || elem.find('.'+ELEM_PACK)[0]){ + var childs = elem.find('.'+ ELEM_PACK).find('input[same="layuiTreeCheck"]'); + childs.each(function(){ + if(this.disabled) return; //不可点击则跳过 + this.checked = checked; + }); + }; + + //同步父节点选中状态 + var setParentsChecked = function(thisNodeElem){ + //若无父节点,则终止递归 + if(!thisNodeElem.parents('.'+ ELEM_SET)[0]) return; + + var state + ,parentPack = thisNodeElem.parent('.'+ ELEM_PACK) + ,parentNodeElem = parentPack.parent() + ,parentCheckbox = parentPack.prev().find('input[same="layuiTreeCheck"]'); + + //如果子节点有任意一条选中,则父节点为选中状态 + if(checked){ + parentCheckbox.prop('checked', checked); + } else { //如果当前节点取消选中,则根据计算“兄弟和子孙”节点选中状态,来同步父节点选中状态 + parentPack.find('input[same="layuiTreeCheck"]').each(function(){ + if(this.checked){ + state = true; + } + }); + + //如果兄弟子孙节点全部未选中,则父节点也应为非选中状态 + state || parentCheckbox.prop('checked', false); + } + + //向父节点递归 + setParentsChecked(parentNodeElem); + }; + + setParentsChecked(elem); + + that.renderForm('checkbox'); + }; + + //复选框选择 + Class.prototype.checkClick = function(elem, item){ + var that = this + ,options = that.config + ,entry = elem.children('.'+ ELEM_ENTRY) + ,elemMain = entry.children('.'+ ELEM_MAIN); + + + + //点击复选框 + elemMain.on('click', 'input[same="layuiTreeCheck"]+', function(e){ + layui.stope(e); //阻止点击节点事件 + + var elemCheckbox = $(this).prev() + ,checked = elemCheckbox.prop('checked'); + + if(elemCheckbox.prop('disabled')) return; + + that.setCheckbox(elem, item, elemCheckbox); + + //复选框点击产生的回调 + options.oncheck && options.oncheck({ + elem: elem + ,checked: checked + ,data: item + }); + }); + }; + + //节点操作 + Class.prototype.operate = function(elem, item){ + var that = this + ,options = that.config + ,entry = elem.children('.'+ ELEM_ENTRY) + ,elemMain = entry.children('.'+ ELEM_MAIN); + + entry.children('.layui-tree-btnGroup').on('click', '.layui-icon', function(e){ + layui.stope(e); //阻止节点操作 + + var type = $(this).data("type") + ,packCont = elem.children('.'+ELEM_PACK) + ,returnObj = { + data: item + ,type: type + ,elem:elem + }; + //增加 + if(type == 'add'){ + //若节点本身无子节点 + if(!packCont[0]){ + //若开启连接线,更改图标样式 + if(options.showLine){ + elemMain.find('.'+ICON_CLICK).addClass('layui-tree-icon'); + elemMain.find('.'+ICON_CLICK).children('.layui-icon').addClass(ICON_ADD).removeClass('layui-icon-file'); + //若未开启连接线,显示箭头 + }else{ + elemMain.find('.layui-tree-iconArrow').removeClass(HIDE); + }; + //节点添加子节点容器 + elem.append('
        '); + }; + + //新增节点 + var key = options.operate && options.operate(returnObj) + ,obj = {}; + obj.title = options.text.defaultNodeName; + obj.id = key; + that.tree(elem.children('.'+ELEM_PACK), [obj]); + + //放在新增后面,因为要对元素进行操作 + if(options.showLine){ + //节点本身无子节点 + if(!packCont[0]){ + //遍历兄弟节点,判断兄弟节点是否有子节点 + var siblings = elem.siblings('.'+ELEM_SET), num = 1 + ,parentPack = elem.parent('.'+ELEM_PACK); + layui.each(siblings, function(index, i){ + if(!$(i).children('.'+ELEM_PACK)[0]){ + num = 0; + }; + }); + + //若兄弟节点都有子节点 + if(num == 1){ + //兄弟节点添加连接线 + siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW); + siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT); + elem.children('.'+ELEM_PACK).addClass(ELEM_SHOW); + //父级移除延伸线 + parentPack.removeClass(ELEM_EXTEND); + //同层节点最后一个更改线的状态 + parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }else{ + elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).addClass(ELEM_LINE_SHORT); + }; + }else{ + //添加延伸线 + if(!packCont.hasClass(ELEM_EXTEND)){ + packCont.addClass(ELEM_EXTEND); + }; + //子节点添加延伸线 + elem.find('.'+ELEM_PACK).each(function(){ + $(this).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }); + //如果前一个节点有延伸线 + if(packCont.children('.'+ELEM_SET).last().prev().hasClass(ELEM_LINE_SHORT)){ + packCont.children('.'+ELEM_SET).last().prev().removeClass(ELEM_LINE_SHORT); + }else{ + //若之前的没有,说明处于连接状态 + packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT); + }; + //若是最外层,要始终保持相连的状态 + if(!elem.parent('.'+ELEM_PACK)[0] && elem.next()[0]){ + packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT); + }; + }; + }; + if(!options.showCheckbox) return; + //若开启复选框,同步新增节点状态 + if(elemMain.find('input[same="layuiTreeCheck"]')[0].checked){ + var packLast = elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).last(); + packLast.find('input[same="layuiTreeCheck"]')[0].checked = true; + }; + that.renderForm('checkbox'); + + //修改 + }else if(type == 'update'){ + var text = elemMain.children('.'+ ELEM_TEXT).html(); + elemMain.children('.'+ ELEM_TEXT).html(''); + //添加输入框,覆盖在文字上方 + elemMain.append(''); + //获取焦点 + elemMain.children('.layui-tree-editInput').val(text).focus(); + //嵌入文字移除输入框 + var getVal = function(input){ + var textNew = input.val().trim(); + textNew = textNew ? textNew : options.text.defaultNodeName; + input.remove(); + elemMain.children('.'+ ELEM_TEXT).html(textNew); + + //同步数据 + returnObj.data.title = textNew; + + //节点修改的回调 + options.operate && options.operate(returnObj); + }; + //失去焦点 + elemMain.children('.layui-tree-editInput').blur(function(){ + getVal($(this)); + }); + //回车 + elemMain.children('.layui-tree-editInput').on('keydown', function(e){ + if(e.keyCode === 13){ + e.preventDefault(); + getVal($(this)); + }; + }); + + //删除 + } else { + layer.confirm('确认删除该节点 "'+ (item.title || '') +'" 吗?', function(index){ + options.operate && options.operate(returnObj); //节点删除的回调 + returnObj.status = 'remove'; //标注节点删除 + + layer.close(index); + + //若删除最后一个,显示空数据提示 + if(!elem.prev('.'+ELEM_SET)[0] && !elem.next('.'+ELEM_SET)[0] && !elem.parent('.'+ELEM_PACK)[0]){ + elem.remove(); + that.elem.append(that.elemNone); + return; + }; + //若有兄弟节点 + if(elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY)[0]){ + //若开启复选框 + if(options.showCheckbox){ + //若开启复选框,进行下步操作 + var elemDel = function(elem){ + //若无父结点,则不执行 + if(!elem.parents('.'+ELEM_SET)[0]) return; + var siblingTree = elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY) + ,parentTree = elem.parent('.'+ELEM_PACK).prev() + ,checkState = parentTree.find('input[same="layuiTreeCheck"]')[0] + ,state = 1, num = 0; + //若父节点未勾选 + if(checkState.checked == false){ + //遍历兄弟节点 + siblingTree.each(function(i, item1){ + var input = $(item1).find('input[same="layuiTreeCheck"]')[0] + if(input.checked == false && !input.disabled){ + state = 0; + }; + //判断是否全为不可勾选框 + if(!input.disabled){ + num = 1; + }; + }); + //若有可勾选选择框并且已勾选 + if(state == 1 && num == 1){ + //勾选父节点 + checkState.checked = true; + that.renderForm('checkbox'); + //向上遍历祖先节点 + elemDel(parentTree.parent('.'+ELEM_SET)); + }; + }; + }; + elemDel(elem); + }; + //若开启连接线 + if(options.showLine){ + //遍历兄弟节点,判断兄弟节点是否有子节点 + var siblings = elem.siblings('.'+ELEM_SET), num = 1 + ,parentPack = elem.parent('.'+ELEM_PACK); + layui.each(siblings, function(index, i){ + if(!$(i).children('.'+ELEM_PACK)[0]){ + num = 0; + }; + }); + //若兄弟节点都有子节点 + if(num == 1){ + //若节点本身无子节点 + if(!packCont[0]){ + //父级去除延伸线,因为此时子节点里没有空节点 + parentPack.removeClass(ELEM_EXTEND); + siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW); + siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT); + }; + //若为最后一个节点 + if(!elem.next()[0]){ + elem.prev().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }else{ + parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }; + //若为最外层最后一个节点,去除前一个结点的连接线 + if(!elem.next()[0] && !elem.parents('.'+ELEM_SET)[1] && !elem.parents('.'+ELEM_SET).eq(0).next()[0]){ + elem.prev('.'+ELEM_SET).addClass(ELEM_LINE_SHORT); + }; + }else{ + //若为最后一个节点且有延伸线 + if(!elem.next()[0] && elem.hasClass(ELEM_LINE_SHORT)){ + elem.prev().addClass(ELEM_LINE_SHORT); + }; + }; + }; + + }else{ + //若无兄弟节点 + var prevDiv = elem.parent('.'+ELEM_PACK).prev(); + //若开启了连接线 + if(options.showLine){ + prevDiv.find('.'+ICON_CLICK).removeClass('layui-tree-icon'); + prevDiv.find('.'+ICON_CLICK).children('.layui-icon').removeClass(ICON_SUB).addClass('layui-icon-file'); + //父节点所在层添加延伸线 + var pare = prevDiv.parents('.'+ELEM_PACK).eq(0); + pare.addClass(ELEM_EXTEND); + + //兄弟节点最后子节点添加延伸线 + pare.children('.'+ELEM_SET).each(function(){ + $(this).children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }); + }else{ + //父节点隐藏箭头 + prevDiv.find('.layui-tree-iconArrow').addClass(HIDE); + }; + //移除展开属性 + elem.parents('.'+ELEM_SET).eq(0).removeClass(ELEM_SPREAD); + //移除节点容器 + elem.parent('.'+ELEM_PACK).remove(); + }; + + elem.remove(); + }); + + }; + }); + }; + + //部分事件 + Class.prototype.events = function(){ + var that = this + ,options = that.config + ,checkWarp = that.elem.find('.layui-tree-checkedFirst'); + + //初始选中 + that.setChecked(that.checkids); + + //搜索 + that.elem.find('.layui-tree-search').on('keyup', function(){ + var input = $(this) + ,val = input.val() + ,pack = input.nextAll() + ,arr = []; + + //遍历所有的值 + pack.find('.'+ ELEM_TEXT).each(function(){ + var entry = $(this).parents('.'+ELEM_ENTRY); + //若值匹配,加一个类以作标识 + if($(this).html().indexOf(val) != -1){ + arr.push($(this).parent()); + + var select = function(div){ + div.addClass('layui-tree-searchShow'); + //向上父节点渲染 + if(div.parent('.'+ELEM_PACK)[0]){ + select(div.parent('.'+ELEM_PACK).parent('.'+ELEM_SET)); + }; + }; + select(entry.parent('.'+ELEM_SET)); + }; + }); + + //根据标志剔除 + pack.find('.'+ELEM_ENTRY).each(function(){ + var parent = $(this).parent('.'+ELEM_SET); + if(!parent.hasClass('layui-tree-searchShow')){ + parent.addClass(HIDE); + }; + }); + if(pack.find('.layui-tree-searchShow').length == 0){ + that.elem.append(that.elemNone); + }; + + //节点过滤的回调 + options.onsearch && options.onsearch({ + elem: arr + }); + }); + + //还原搜索初始状态 + that.elem.find('.layui-tree-search').on('keydown', function(){ + $(this).nextAll().find('.'+ELEM_ENTRY).each(function(){ + var parent = $(this).parent('.'+ELEM_SET); + parent.removeClass('layui-tree-searchShow '+ HIDE); + }); + if($('.layui-tree-emptyText')[0]) $('.layui-tree-emptyText').remove(); + }); + }; + + //得到选中节点 + Class.prototype.getChecked = function(){ + var that = this + ,options = that.config + ,checkId = [] + ,checkData = []; + + //遍历节点找到选中索引 + that.elem.find('.layui-form-checked').each(function(){ + checkId.push($(this).prev()[0].value); + }); + + //遍历节点 + var eachNodes = function(data, checkNode){ + layui.each(data, function(index, item){ + layui.each(checkId, function(index2, item2){ + if(item.id == item2){ + var cloneItem = $.extend({}, item); + delete cloneItem.children; + + checkNode.push(cloneItem); + + if(item.children){ + cloneItem.children = []; + eachNodes(item.children, cloneItem.children); + } + return true + } + }); + }); + }; + + eachNodes($.extend({}, options.data), checkData); + + return checkData; + }; + + //设置选中节点 + Class.prototype.setChecked = function(checkedId){ + var that = this + ,options = that.config; + + //初始选中 + that.elem.find('.'+ELEM_SET).each(function(i, item){ + var thisId = $(this).data('id') + ,input = $(item).children('.'+ELEM_ENTRY).find('input[same="layuiTreeCheck"]') + ,reInput = input.next(); + + //若返回数字 + if(typeof checkedId === 'number'){ + if(thisId == checkedId){ + if(!input[0].checked){ + reInput.click(); + }; + return false; + }; + } + //若返回数组 + else if(typeof checkedId === 'object'){ + layui.each(checkedId, function(index, value){ + if(value == thisId && !input[0].checked){ + reInput.click(); + return true; + } + }); + }; + }); + }; + + //记录所有实例 + thisModule.that = {}; //记录所有实例对象 + thisModule.config = {}; //记录所有实例配置项 + + //重载实例 + tree.reload = function(id, options){ + var that = thisModule.that[id]; + that.reload(options); + + return thisModule.call(that); + }; + + //获得选中的节点数据 + tree.getChecked = function(id){ + var that = thisModule.that[id]; + return that.getChecked(); + }; + + //设置选中节点 + tree.setChecked = function(id, checkedId){ + var that = thisModule.that[id]; + return that.setChecked(checkedId); + }; + + //核心入口 + tree.render = function(options){ + var inst = new Class(options); + return thisModule.call(inst); + }; + + exports(MOD_NAME, tree); +}) \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/lay/modules/upload.js b/pccenter/src/main/resources/static/src/lay/modules/upload.js new file mode 100644 index 0000000000000000000000000000000000000000..51c6b26b460960269999cd668bc3829d185e59e4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/upload.js @@ -0,0 +1,563 @@ +/** + + @Title: layui.upload 文件上传 + @Author: 贤心 + @License:MIT + + */ + +layui.define('layer' , function(exports){ + "use strict"; + + var $ = layui.$ + ,layer = layui.layer + ,hint = layui.hint() + ,device = layui.device() + + //外部接口 + ,upload = { + config: {} //全局配置项 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件监听 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisUpload = function(){ + var that = this; + return { + upload: function(files){ + that.upload.call(that, files); + } + ,reload: function(options){ + that.reload.call(that, options); + } + ,config: that.config + } + } + + //字符常量 + ,MOD_NAME = 'upload', ELEM = '.layui-upload', THIS = 'layui-this', SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled' + + ,ELEM_FILE = 'layui-upload-file', ELEM_FORM = 'layui-upload-form', ELEM_IFRAME = 'layui-upload-iframe', ELEM_CHOOSE = 'layui-upload-choose', ELEM_DRAG = 'layui-upload-drag' + + + //构造器 + ,Class = function(options){ + var that = this; + that.config = $.extend({}, that.config, upload.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + accept: 'images' //允许上传的文件类型:images/file/video/audio + ,exts: '' //允许上传的文件后缀名 + ,auto: true //是否选完文件后自动上传 + ,bindAction: '' //手动上传触发的元素 + ,url: '' //上传地址 + ,field: 'file' //文件字段名 + ,acceptMime: '' //筛选出的文件类型,默认为所有文件 + ,method: 'post' //请求上传的 http 类型 + ,data: {} //请求上传的额外参数 + ,drag: true //是否允许拖拽上传 + ,size: 0 //文件限制大小,默认不限制 + ,number: 0 //允许同时上传的文件数,默认不限制 + ,multiple: false //是否允许多文件上传,不支持ie8-9 + }; + + //初始渲染 + Class.prototype.render = function(options){ + var that = this + ,options = that.config; + + options.elem = $(options.elem); + options.bindAction = $(options.bindAction); + + that.file(); + that.events(); + }; + + //追加文件域 + Class.prototype.file = function(){ + var that = this + ,options = that.config + ,elemFile = that.elemFile = $([ + '' + ].join('')) + ,next = options.elem.next(); + + if(next.hasClass(ELEM_FILE) || next.hasClass(ELEM_FORM)){ + next.remove(); + } + + //包裹ie8/9容器 + if(device.ie && device.ie < 10){ + options.elem.wrap('
        '); + } + + that.isFile() ? ( + that.elemFile = options.elem + ,options.field = options.elem[0].name + ) : options.elem.after(elemFile); + + //初始化ie8/9的Form域 + if(device.ie && device.ie < 10){ + that.initIE(); + } + }; + + //ie8-9初始化 + Class.prototype.initIE = function(){ + var that = this + ,options = that.config + ,iframe = $('') + ,elemForm = $(['
        ' + ,'
        '].join('')); + + //插入iframe + $('#'+ ELEM_IFRAME)[0] || $('body').append(iframe); + + //包裹文件域 + if(!options.elem.next().hasClass(ELEM_FORM)){ + that.elemFile.wrap(elemForm); + + //追加额外的参数 + options.elem.next('.'+ ELEM_FORM).append(function(){ + var arr = []; + layui.each(options.data, function(key, value){ + value = typeof value === 'function' ? value() : value; + arr.push('') + }); + return arr.join(''); + }()); + } + }; + + //异常提示 + Class.prototype.msg = function(content){ + return layer.msg(content, { + icon: 2 + ,shift: 6 + }); + }; + + //判断绑定元素是否为文件域本身 + Class.prototype.isFile = function(){ + var elem = this.config.elem[0]; + if(!elem) return; + return elem.tagName.toLocaleLowerCase() === 'input' && elem.type === 'file' + } + + //预读图片信息 + Class.prototype.preview = function(callback){ + var that = this; + if(window.FileReader){ + layui.each(that.chooseFiles, function(index, file){ + var reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = function(){ + callback && callback(index, file, this.result); + } + }); + } + }; + + //执行上传 + Class.prototype.upload = function(files, type){ + var that = this + ,options = that.config + ,elemFile = that.elemFile[0] + + //高级浏览器处理方式,支持跨域 + ,ajaxSend = function(){ + var successful = 0, aborted = 0 + ,items = files || that.files || that.chooseFiles || elemFile.files + ,allDone = function(){ //多文件全部上传完毕的回调 + if(options.multiple && successful + aborted === that.fileLength){ + typeof options.allDone === 'function' && options.allDone({ + total: that.fileLength + ,successful: successful + ,aborted: aborted + }); + } + }; + layui.each(items, function(index, file){ + var formData = new FormData(); + + formData.append(options.field, file); + + //追加额外的参数 + layui.each(options.data, function(key, value){ + value = typeof value === 'function' ? value() : value; + formData.append(key, value); + }); + + //提交文件 + $.ajax({ + url: options.url + ,type: 'post' + ,data: formData + ,contentType: false + ,processData: false + ,dataType: 'json' + ,headers: options.headers || {} + //成功回调 + ,success: function(res){ + successful++; + done(index, res); + allDone(); + } + //异常回调 + ,error: function(){ + aborted++; + that.msg('请求上传接口出现异常'); + error(index); + allDone(); + } + ,xhr: function(){ + var xhr = new XMLHttpRequest(); + //监听上传进度 + xhr.upload.addEventListener("progress", function (e) { + if(e.lengthComputable) { + var percent = Math.floor((e.loaded/e.total)* 100); //百分比 + typeof options.progress === 'function' && options.progress(percent, e); + } + }); + return xhr; + } + }); + + }); + } + + //低版本IE处理方式,不支持跨域 + ,iframeSend = function(){ + var iframe = $('#'+ ELEM_IFRAME); + + that.elemFile.parent().submit(); + + //获取响应信息 + clearInterval(Class.timer); + Class.timer = setInterval(function() { + var res, iframeBody = iframe.contents().find('body'); + try { + res = iframeBody.text(); + } catch(e) { + that.msg('获取上传后的响应信息出现异常'); + clearInterval(Class.timer); + error(); + } + if(res){ + clearInterval(Class.timer); + iframeBody.html(''); + done(0, res); + } + }, 30); + } + + //统一回调 + ,done = function(index, res){ + that.elemFile.next('.'+ ELEM_CHOOSE).remove(); + elemFile.value = ''; + if(typeof res !== 'object'){ + try { + res = JSON.parse(res); + } catch(e){ + res = {}; + return that.msg('请对上传接口返回有效JSON'); + } + } + typeof options.done === 'function' && options.done(res, index || 0, function(files){ + that.upload(files); + }); + } + + //统一网络异常回调 + ,error = function(index){ + if(options.auto){ + elemFile.value = ''; + } + typeof options.error === 'function' && options.error(index || 0, function(files){ + that.upload(files); + }); + } + + ,exts = options.exts + ,check ,value = function(){ + var arr = []; + layui.each(files || that.chooseFiles, function(i, item){ + arr.push(item.name); + }); + return arr; + }() + + //回调返回的参数 + ,args = { + //预览 + preview: function(callback){ + that.preview(callback); + } + //上传 + ,upload: function(index, file){ + var thisFile = {}; + thisFile[index] = file; + that.upload(thisFile); + } + //追加文件到队列 + ,pushFile: function(){ + that.files = that.files || {}; + layui.each(that.chooseFiles, function(index, item){ + that.files[index] = item; + }); + return that.files; + } + //重置文件 + ,resetFile: function(index, file, filename){ + var newFile = new File([file], filename); + that.files = that.files || {}; + that.files[index] = newFile; + } + } + + //提交上传 + ,send = function(){ + //选择文件的回调 + if(type === 'choose' || options.auto){ + options.choose && options.choose(args); + if(type === 'choose'){ + return; + } + } + + //上传前的回调 + options.before && options.before(args); + + //IE兼容处理 + if(device.ie){ + return device.ie > 9 ? ajaxSend() : iframeSend(); + } + + ajaxSend(); + } + + //校验文件格式 + value = value.length === 0 + ? ((elemFile.value.match(/[^\/\\]+\..+/g)||[]) || '') + : value; + + if(value.length === 0) return; + + switch(options.accept){ + case 'file': //一般文件 + if(exts && !RegExp('\\w\\.('+ exts +')$', 'i').test(escape(value))){ + that.msg('选择的文件中包含不支持的格式'); + return elemFile.value = ''; + } + break; + case 'video': //视频文件 + if(!RegExp('\\w\\.('+ (exts || 'avi|mp4|wma|rmvb|rm|flash|3gp|flv') +')$', 'i').test(escape(value))){ + that.msg('选择的视频中包含不支持的格式'); + return elemFile.value = ''; + } + break; + case 'audio': //音频文件 + if(!RegExp('\\w\\.('+ (exts || 'mp3|wav|mid') +')$', 'i').test(escape(value))){ + that.msg('选择的音频中包含不支持的格式'); + return elemFile.value = ''; + } + break; + default: //图片文件 + layui.each(value, function(i, item){ + if(!RegExp('\\w\\.('+ (exts || 'jpg|png|gif|bmp|jpeg$') +')', 'i').test(escape(item))){ + check = true; + } + }); + if(check){ + that.msg('选择的图片中包含不支持的格式'); + return elemFile.value = ''; + } + break; + } + + //检验文件数量 + that.fileLength = function(){ + var length = 0 + ,items = files || that.files || that.chooseFiles || elemFile.files; + layui.each(items, function(){ + length++; + }); + return length; + }(); + if(options.number && that.fileLength > options.number){ + return that.msg('同时最多只能上传的数量为:'+ options.number); + } + + //检验文件大小 + if(options.size > 0 && !(device.ie && device.ie < 10)){ + var limitSize; + + layui.each(that.chooseFiles, function(index, file){ + if(file.size > 1024*options.size){ + var size = options.size/1024; + size = size >= 1 ? (size.toFixed(2) + 'MB') : options.size + 'KB' + elemFile.value = ''; + limitSize = size; + } + }); + if(limitSize) return that.msg('文件不能超过'+ limitSize); + } + send(); + }; + + //重置方法 + Class.prototype.reload = function(options){ + options = options || {}; + delete options.elem; + delete options.bindAction; + + var that = this + ,options = that.config = $.extend({}, that.config, upload.config, options) + ,next = options.elem.next(); + + //更新文件域相关属性 + next.attr({ + name: options.name + ,accept: options.acceptMime + ,multiple: options.multiple + }); + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config + + //设置当前选择的文件队列 + ,setChooseFile = function(files){ + that.chooseFiles = {}; + layui.each(files, function(i, item){ + var time = new Date().getTime(); + that.chooseFiles[time + '-' + i] = item; + }); + } + + //设置选择的文本 + ,setChooseText = function(files, filename){ + var elemFile = that.elemFile + ,value = files.length > 1 + ? files.length + '个文件' + : ((files[0] || {}).name || (elemFile[0].value.match(/[^\/\\]+\..+/g)||[]) || ''); + + if(elemFile.next().hasClass(ELEM_CHOOSE)){ + elemFile.next().remove(); + } + that.upload(null, 'choose'); + if(that.isFile() || options.choose) return; + elemFile.after(''+ value +''); + }; + + //点击上传容器 + options.elem.off('upload.start').on('upload.start', function(){ + var othis = $(this), data = othis.attr('lay-data'); + + if(data){ + try{ + data = new Function('return '+ data)(); + that.config = $.extend({}, options, data); + } catch(e){ + hint.error('Upload element property lay-data configuration item has a syntax error: ' + data) + } + } + + that.config.item = othis; + that.elemFile[0].click(); + }); + + //拖拽上传 + if(!(device.ie && device.ie < 10)){ + options.elem.off('upload.over').on('upload.over', function(){ + var othis = $(this) + othis.attr('lay-over', ''); + }) + .off('upload.leave').on('upload.leave', function(){ + var othis = $(this) + othis.removeAttr('lay-over'); + }) + .off('upload.drop').on('upload.drop', function(e, param){ + var othis = $(this), files = param.originalEvent.dataTransfer.files || []; + + othis.removeAttr('lay-over'); + setChooseFile(files); + + if(options.auto){ + that.upload(files); + } else { + setChooseText(files); + } + }); + } + + //文件选择 + that.elemFile.off('upload.change').on('upload.change', function(){ + var files = this.files || []; + setChooseFile(files); + options.auto ? that.upload() : setChooseText(files); //是否自动触发上传 + }); + + //手动触发上传 + options.bindAction.off('upload.action').on('upload.action', function(){ + that.upload(); + }); + + //防止事件重复绑定 + if(options.elem.data('haveEvents')) return; + + that.elemFile.on('change', function(){ + $(this).trigger('upload.change'); + }); + + options.elem.on('click', function(){ + if(that.isFile()) return; + $(this).trigger('upload.start'); + }); + + if(options.drag){ + options.elem.on('dragover', function(e){ + e.preventDefault(); + $(this).trigger('upload.over'); + }).on('dragleave', function(e){ + $(this).trigger('upload.leave'); + }).on('drop', function(e){ + e.preventDefault(); + $(this).trigger('upload.drop', e); + }); + } + + options.bindAction.on('click', function(){ + $(this).trigger('upload.action'); + }); + + options.elem.data('haveEvents', true); + }; + + //核心入口 + upload.render = function(options){ + var inst = new Class(options); + return thisUpload.call(inst); + }; + + exports(MOD_NAME, upload); +}); + diff --git a/pccenter/src/main/resources/static/src/lay/modules/util.js b/pccenter/src/main/resources/static/src/lay/modules/util.js new file mode 100644 index 0000000000000000000000000000000000000000..c4df2db47f3973bf0f95759948a4a6bc3b1afa85 --- /dev/null +++ b/pccenter/src/main/resources/static/src/lay/modules/util.js @@ -0,0 +1,191 @@ +/** + + @Name:layui.util 工具集 + @Author:贤心 + @License:MIT + +*/ + +layui.define('jquery', function(exports){ + "use strict"; + + var $ = layui.$ + + //外部接口 + ,util = { + //固定块 + fixbar: function(options){ + var ELEM = 'layui-fixbar', TOP_BAR = 'layui-fixbar-top' + ,dom = $(document), body = $('body') + ,is, timer; + + options = $.extend({ + showHeight: 200 //出现TOP的滚动条高度临界值 + }, options); + + options.bar1 = options.bar1 === true ? '' : options.bar1; + options.bar2 = options.bar2 === true ? '' : options.bar2; + options.bgcolor = options.bgcolor ? ('background-color:' + options.bgcolor) : ''; + + var icon = [options.bar1, options.bar2, ''] //图标:信息、问号、TOP + ,elem = $(['
          ' + ,options.bar1 ? '
        • '+ icon[0] +'
        • ' : '' + ,options.bar2 ? '
        • '+ icon[1] +'
        • ' : '' + ,'
        • '+ icon[2] +'
        • ' + ,'
        '].join('')) + ,topBar = elem.find('.'+TOP_BAR) + ,scroll = function(){ + var stop = dom.scrollTop(); + if(stop >= (options.showHeight)){ + is || (topBar.show(), is = 1); + } else { + is && (topBar.hide(), is = 0); + } + }; + if($('.'+ ELEM)[0]) return; + + typeof options.css === 'object' && elem.css(options.css); + body.append(elem), scroll(); + + //bar点击事件 + elem.find('li').on('click', function(){ + var othis = $(this), type = othis.attr('lay-type'); + if(type === 'top'){ + $('html,body').animate({ + scrollTop : 0 + }, 200); + } + options.click && options.click.call(this, type); + }); + + //Top显示控制 + dom.on('scroll', function(){ + clearTimeout(timer); + timer = setTimeout(function(){ + scroll(); + }, 100); + }); + } + + //倒计时 + ,countdown: function(endTime, serverTime, callback){ + var that = this + ,type = typeof serverTime === 'function' + ,end = new Date(endTime).getTime() + ,now = new Date((!serverTime || type) ? new Date().getTime() : serverTime).getTime() + ,count = end - now + ,time = [ + Math.floor(count/(1000*60*60*24)) //天 + ,Math.floor(count/(1000*60*60)) % 24 //时 + ,Math.floor(count/(1000*60)) % 60 //分 + ,Math.floor(count/1000) % 60 //秒 + ]; + + if(type) callback = serverTime; + + var timer = setTimeout(function(){ + that.countdown(endTime, now + 1000, callback); + }, 1000); + + callback && callback(count > 0 ? time : [0,0,0,0], serverTime, timer); + + if(count <= 0) clearTimeout(timer); + return timer; + } + + //某个时间在当前时间的多久前 + ,timeAgo: function(time, onlyDate){ + var that = this + ,arr = [[], []] + ,stamp = new Date().getTime() - new Date(time).getTime(); + + //返回具体日期 + if(stamp > 1000*60*60*24*8){ + stamp = new Date(time); + arr[0][0] = that.digit(stamp.getFullYear(), 4); + arr[0][1] = that.digit(stamp.getMonth() + 1); + arr[0][2] = that.digit(stamp.getDate()); + + //是否输出时间 + if(!onlyDate){ + arr[1][0] = that.digit(stamp.getHours()); + arr[1][1] = that.digit(stamp.getMinutes()); + arr[1][2] = that.digit(stamp.getSeconds()); + } + return arr[0].join('-') + ' ' + arr[1].join(':'); + } + + //30天以内,返回“多久前” + if(stamp >= 1000*60*60*24){ + return ((stamp/1000/60/60/24)|0) + '天前'; + } else if(stamp >= 1000*60*60){ + return ((stamp/1000/60/60)|0) + '小时前'; + } else if(stamp >= 1000*60*2){ //2分钟以内为:刚刚 + return ((stamp/1000/60)|0) + '分钟前'; + } else if(stamp < 0){ + return '未来'; + } else { + return '刚刚'; + } + } + + //数字前置补零 + ,digit: function(num, length){ + var str = ''; + num = String(num); + length = length || 2; + for(var i = num.length; i < length; i++){ + str += '0'; + } + return num < Math.pow(10, length) ? str + (num|0) : num; + } + + //转化为日期格式字符 + ,toDateString: function(time, format){ + var that = this + ,date = new Date(time || new Date()) + ,ymd = [ + that.digit(date.getFullYear(), 4) + ,that.digit(date.getMonth() + 1) + ,that.digit(date.getDate()) + ] + ,hms = [ + that.digit(date.getHours()) + ,that.digit(date.getMinutes()) + ,that.digit(date.getSeconds()) + ]; + + format = format || 'yyyy-MM-dd HH:mm:ss'; + + return format.replace(/yyyy/g, ymd[0]) + .replace(/MM/g, ymd[1]) + .replace(/dd/g, ymd[2]) + .replace(/HH/g, hms[0]) + .replace(/mm/g, hms[1]) + .replace(/ss/g, hms[2]); + } + + //防 xss 攻击 + ,escape: function(html){ + return String(html || '').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') + .replace(//g, '>') + .replace(/'/g, ''').replace(/"/g, '"'); + } + + //批量事件 + ,event: function(attr, obj, eventType){ + obj = util.event[attr] = $.extend(true, util.event[attr], obj) || {}; + $('body').on(eventType || 'click', '*['+ attr +']', function(){ + var othis = $(this) + ,key = othis.attr(attr); + obj[key] && obj[key].call(this, othis); + }); + } + }; + + //监听 DOM 尺寸变化,该创意来自:http://benalman.com/projects/jquery-resize-plugin/ + !function(a,b,c){"$:nomunge";function l(){f=b[g](function(){d.each(function(){var b=a(this),c=b.width(),d=b.height(),e=a.data(this,i);(c!==e.w||d!==e.h)&&b.trigger(h,[e.w=c,e.h=d])}),l()},e[j])}var f,d=a([]),e=a.resize=a.extend(a.resize,{}),g="setTimeout",h="resize",i=h+"-special-event",j="delay",k="throttleWindow";e[j]=250,e[k]=!0,a.event.special[h]={setup:function(){if(!e[k]&&this[g])return!1;var b=a(this);d=d.add(b),a.data(this,i,{w:b.width(),h:b.height()}),1===d.length&&l()},teardown:function(){if(!e[k]&&this[g])return!1;var b=a(this);d=d.not(b),b.removeData(i),d.length||clearTimeout(f)},add:function(b){function f(b,e,f){var g=a(this),h=a.data(this,i)||{};h.w=e!==c?e:g.width(),h.h=f!==c?f:g.height(),d.apply(this,arguments)}if(!e[k]&&this[g])return!1;var d;return a.isFunction(b)?(d=b,f):(d=b.handler,b.handler=f,void 0)}}}($,window); + + //暴露接口 + exports('util', util); +}); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/layui.js b/pccenter/src/main/resources/static/src/layui.js new file mode 100644 index 0000000000000000000000000000000000000000..a3ea430b818fe8b80b1450639d372c5ea4b6113f --- /dev/null +++ b/pccenter/src/main/resources/static/src/layui.js @@ -0,0 +1,548 @@ +/*! + + @Title: layui + @Description:经典模块化前端 UI 框架 + @Site: www.layui.com + @Author: 贤心 + @License:MIT + + */ + +;!function(win){ + "use strict"; + + var doc = document, config = { + modules: {} //记录模块物理路径 + ,status: {} //记录模块加载状态 + ,timeout: 10 //符合规范的模块请求最长等待秒数 + ,event: {} //记录模块自定义事件 + } + + ,Layui = function(){ + this.v = '2.5.5'; //版本号 + } + + //获取layui所在目录 + ,getPath = function(){ + var jsPath = doc.currentScript ? doc.currentScript.src : function(){ + var js = doc.scripts + ,last = js.length - 1 + ,src; + for(var i = last; i > 0; i--){ + if(js[i].readyState === 'interactive'){ + src = js[i].src; + break; + } + } + return src || js[last].src; + }(); + return jsPath.substring(0, jsPath.lastIndexOf('/') + 1); + }() + + //异常提示 + ,error = function(msg){ + win.console && console.error && console.error('Layui hint: ' + msg); + } + + ,isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]' + + //内置模块 + ,modules = { + layer: 'modules/layer' //弹层 + ,laydate: 'modules/laydate' //日期 + ,laypage: 'modules/laypage' //分页 + ,laytpl: 'modules/laytpl' //模板引擎 + ,layim: 'modules/layim' //web通讯 + ,layedit: 'modules/layedit' //富文本编辑器 + ,form: 'modules/form' //表单集 + ,upload: 'modules/upload' //上传 + ,transfer: 'modules/transfer' //上传 + ,tree: 'modules/tree' //树结构 + ,table: 'modules/table' //表格 + ,element: 'modules/element' //常用元素操作 + ,rate: 'modules/rate' //评分组件 + ,colorpicker: 'modules/colorpicker' //颜色选择器 + ,slider: 'modules/slider' //滑块 + ,carousel: 'modules/carousel' //轮播 + ,flow: 'modules/flow' //流加载 + ,util: 'modules/util' //工具块 + ,code: 'modules/code' //代码修饰器 + ,jquery: 'modules/jquery' //DOM库(第三方) + + ,mobile: 'modules/mobile' //移动大模块 | 若当前为开发目录,则为移动模块入口,否则为移动模块集合 + ,'layui.all': '../layui.all' //PC模块合并版 + }; + + //记录基础数据 + Layui.prototype.cache = config; + + //定义模块 + Layui.prototype.define = function(deps, factory){ + var that = this + ,type = typeof deps === 'function' + ,callback = function(){ + var setApp = function(app, exports){ + layui[app] = exports; + config.status[app] = true; + }; + typeof factory === 'function' && factory(function(app, exports){ + setApp(app, exports); + config.callback[app] = function(){ + factory(setApp); + } + }); + return this; + }; + + type && ( + factory = deps, + deps = [] + ); + + if((!layui['layui.all'] && layui['layui.mobile'])){ + return callback.call(that); + } + + that.use(deps, callback); + return that; + }; + + //使用特定模块 + Layui.prototype.use = function(apps, callback, exports){ + var that = this + ,dir = config.dir = config.dir ? config.dir : getPath + ,head = doc.getElementsByTagName('head')[0]; + + apps = typeof apps === 'string' ? [apps] : apps; + + //如果页面已经存在jQuery1.7+库且所定义的模块依赖jQuery,则不加载内部jquery模块 + if(window.jQuery && jQuery.fn.on){ + that.each(apps, function(index, item){ + if(item === 'jquery'){ + apps.splice(index, 1); + } + }); + layui.jquery = layui.$ = jQuery; + } + + var item = apps[0] + ,timeout = 0; + exports = exports || []; + + //静态资源host + config.host = config.host || (dir.match(/\/\/([\s\S]+?)\//)||['//'+ location.host +'/'])[0]; + + //加载完毕 + function onScriptLoad(e, url){ + var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/ + if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) { + config.modules[item] = url; + head.removeChild(node); + (function poll() { + if(++timeout > config.timeout * 1000 / 4){ + return error(item + ' is not a valid module'); + }; + config.status[item] ? onCallback() : setTimeout(poll, 4); + }()); + } + } + + //回调 + function onCallback(){ + exports.push(layui[item]); + apps.length > 1 ? + that.use(apps.slice(1), callback, exports) + : ( typeof callback === 'function' && callback.apply(layui, exports) ); + } + + //如果引入了完整库(layui.all.js),内置的模块则不必再加载 + if(apps.length === 0 + || (layui['layui.all'] && modules[item]) + || (!layui['layui.all'] && layui['layui.mobile'] && modules[item]) + ){ + return onCallback(), that; + } + + //首次加载模块 + if(!config.modules[item]){ + var node = doc.createElement('script') + + //如果是内置模块,则按照 dir 参数拼接模块路径 + //如果是扩展模块,则判断模块路径值是否为 {/} 开头, + //如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。 + //否则,则按照 base 参数拼接模块路径 + ,url = ( modules[item] ? (dir + 'lay/') + : (/^\{\/\}/.test(that.modules[item]) ? '' : (config.base || '')) + ) + (that.modules[item] || item) + '.js'; + + url = url.replace(/^\{\/\}/, ''); + + node.async = true; + node.charset = 'utf-8'; + node.src = url + function(){ + var version = config.version === true + ? (config.v || (new Date()).getTime()) + : (config.version||''); + return version ? ('?v=' + version) : ''; + }(); + + head.appendChild(node); + + if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){ + node.attachEvent('onreadystatechange', function(e){ + onScriptLoad(e, url); + }); + } else { + node.addEventListener('load', function(e){ + onScriptLoad(e, url); + }, false); + } + + config.modules[item] = url; + } else { //缓存 + (function poll() { + if(++timeout > config.timeout * 1000 / 4){ + return error(item + ' is not a valid module'); + }; + (typeof config.modules[item] === 'string' && config.status[item]) + ? onCallback() + : setTimeout(poll, 4); + }()); + } + + return that; + }; + + //获取节点的style属性值 + Layui.prototype.getStyle = function(node, name){ + var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null); + return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name); + }; + + //css外部加载器 + Layui.prototype.link = function(href, fn, cssname){ + var that = this + ,link = doc.createElement('link') + ,head = doc.getElementsByTagName('head')[0]; + + if(typeof fn === 'string') cssname = fn; + + var app = (cssname || href).replace(/\.|\//g, '') + ,id = link.id = 'layuicss-'+app + ,timeout = 0; + + link.rel = 'stylesheet'; + link.href = href + (config.debug ? '?v='+new Date().getTime() : ''); + link.media = 'all'; + + if(!doc.getElementById(id)){ + head.appendChild(link); + } + + if(typeof fn !== 'function') return that; + + //轮询css是否加载完毕 + (function poll() { + if(++timeout > config.timeout * 1000 / 100){ + return error(href + ' timeout'); + }; + parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){ + fn(); + }() : setTimeout(poll, 100); + }()); + + return that; + }; + + //存储模块的回调 + config.callback = {}; + + //重新执行模块的工厂函数 + Layui.prototype.factory = function(modName){ + if(layui[modName]){ + return typeof config.callback[modName] === 'function' + ? config.callback[modName] + : null; + } + }; + + //css内部加载器 + Layui.prototype.addcss = function(firename, fn, cssname){ + return layui.link(config.dir + 'css/' + firename, fn, cssname); + }; + + //图片预加载 + Layui.prototype.img = function(url, callback, error) { + var img = new Image(); + img.src = url; + if(img.complete){ + return callback(img); + } + img.onload = function(){ + img.onload = null; + typeof callback === 'function' && callback(img); + }; + img.onerror = function(e){ + img.onerror = null; + typeof error === 'function' && error(e); + }; + }; + + //全局配置 + Layui.prototype.config = function(options){ + options = options || {}; + for(var key in options){ + config[key] = options[key]; + } + return this; + }; + + //记录全部模块 + Layui.prototype.modules = function(){ + var clone = {}; + for(var o in modules){ + clone[o] = modules[o]; + } + return clone; + }(); + + //拓展模块 + Layui.prototype.extend = function(options){ + var that = this; + + //验证模块是否被占用 + options = options || {}; + for(var o in options){ + if(that[o] || that.modules[o]){ + error('\u6A21\u5757\u540D '+ o +' \u5DF2\u88AB\u5360\u7528'); + } else { + that.modules[o] = options[o]; + } + } + + return that; + }; + + //路由解析 + Layui.prototype.router = function(hash){ + var that = this + ,hash = hash || location.hash + ,data = { + path: [] + ,search: {} + ,hash: (hash.match(/[^#](#.*$)/) || [])[1] || '' + }; + + if(!/^#\//.test(hash)) return data; //禁止非路由规范 + hash = hash.replace(/^#\//, ''); + data.href = '/' + hash; + hash = hash.replace(/([^#])(#.*$)/, '$1').split('/') || []; + + //提取Hash结构 + that.each(hash, function(index, item){ + /^\w+=/.test(item) ? function(){ + item = item.split('='); + data.search[item[0]] = item[1]; + }() : data.path.push(item); + }); + + return data; + }; + + //本地持久性存储 + Layui.prototype.data = function(table, settings, storage){ + table = table || 'layui'; + storage = storage || localStorage; + + if(!win.JSON || !win.JSON.parse) return; + + //如果settings为null,则删除表 + if(settings === null){ + return delete storage[table]; + } + + settings = typeof settings === 'object' + ? settings + : {key: settings}; + + try{ + var data = JSON.parse(storage[table]); + } catch(e){ + var data = {}; + } + + if('value' in settings) data[settings.key] = settings.value; + if(settings.remove) delete data[settings.key]; + storage[table] = JSON.stringify(data); + + return settings.key ? data[settings.key] : data; + }; + + //本地会话性存储 + Layui.prototype.sessionData = function(table, settings){ + return this.data(table, settings, sessionStorage); + } + + //设备信息 + Layui.prototype.device = function(key){ + var agent = navigator.userAgent.toLowerCase() + + //获取版本号 + ,getVersion = function(label){ + var exp = new RegExp(label + '/([^\\s\\_\\-]+)'); + label = (agent.match(exp)||[])[1]; + return label || false; + } + + //返回结果集 + ,result = { + os: function(){ //底层操作系统 + if(/windows/.test(agent)){ + return 'windows'; + } else if(/linux/.test(agent)){ + return 'linux'; + } else if(/iphone|ipod|ipad|ios/.test(agent)){ + return 'ios'; + } else if(/mac/.test(agent)){ + return 'mac'; + } + }() + ,ie: function(){ //ie版本 + return (!!win.ActiveXObject || "ActiveXObject" in win) ? ( + (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识 + ) : false; + }() + ,weixin: getVersion('micromessenger') //是否微信 + }; + + //任意的key + if(key && !result[key]){ + result[key] = getVersion(key); + } + + //移动设备 + result.android = /android/.test(agent); + result.ios = result.os === 'ios'; + + return result; + }; + + //提示 + Layui.prototype.hint = function(){ + return { + error: error + } + }; + + //遍历 + Layui.prototype.each = function(obj, fn){ + var key + ,that = this; + if(typeof fn !== 'function') return that; + obj = obj || []; + if(obj.constructor === Object){ + for(key in obj){ + if(fn.call(obj[key], key, obj[key])) break; + } + } else { + for(key = 0; key < obj.length; key++){ + if(fn.call(obj[key], key, obj[key])) break; + } + } + return that; + }; + + //将数组中的对象按其某个成员排序 + Layui.prototype.sort = function(obj, key, desc){ + var clone = JSON.parse( + JSON.stringify(obj || []) + ); + + if(!key) return clone; + + //如果是数字,按大小排序,如果是非数字,按字典序排序 + clone.sort(function(o1, o2){ + var isNum = /^-?\d+$/ + ,v1 = o1[key] + ,v2 = o2[key]; + + if(isNum.test(v1)) v1 = parseFloat(v1); + if(isNum.test(v2)) v2 = parseFloat(v2); + + if(v1 && !v2){ + return 1; + } else if(!v1 && v2){ + return -1; + } + + if(v1 > v2){ + return 1; + } else if (v1 < v2) { + return -1; + } else { + return 0; + } + }); + + desc && clone.reverse(); //倒序 + return clone; + }; + + //阻止事件冒泡 + Layui.prototype.stope = function(thisEvent){ + thisEvent = thisEvent || win.event; + try { thisEvent.stopPropagation() } catch(e){ + thisEvent.cancelBubble = true; + } + }; + + //自定义模块事件 + Layui.prototype.onevent = function(modName, events, callback){ + if(typeof modName !== 'string' + || typeof callback !== 'function') return this; + + return Layui.event(modName, events, null, callback); + }; + + //执行自定义模块事件 + Layui.prototype.event = Layui.event = function(modName, events, params, fn){ + var that = this + ,result = null + ,filter = events.match(/\((.*)\)$/)||[] //提取事件过滤器字符结构,如:select(xxx) + ,eventName = (modName + '.'+ events).replace(filter[0], '') //获取事件名称,如:form.select + ,filterName = filter[1] || '' //获取过滤器名称,,如:xxx + ,callback = function(_, item){ + var res = item && item.call(that, params); + res === false && result === null && (result = false); + }; + + //添加事件 + if(fn){ + config.event[eventName] = config.event[eventName] || {}; + + //这里不再对多次事件监听做支持,避免更多麻烦 + //config.event[eventName][filterName] ? config.event[eventName][filterName].push(fn) : + config.event[eventName][filterName] = [fn]; + return this; + } + + //执行事件回调 + layui.each(config.event[eventName], function(key, item){ + //执行当前模块的全部事件 + if(filterName === '{*}'){ + layui.each(item, callback); + return; + } + + //执行指定事件 + key === '' && layui.each(item, callback); + (filterName && key === filterName) && layui.each(item, callback); + }); + + return result; + }; + + win.layui = new Layui(); + +}(window); + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/.gitignore b/pccenter/src/main/resources/static/src/zTree_v3/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..5ebd21a16d61827ba9ee2b0353fbf6c8c8e88bca --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/.gitignore @@ -0,0 +1,163 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +.builds +*.dotCover + +## TODO: If you have NuGet Package Restore enabled, uncomment this +#packages/ + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# ReSharper is a .NET coding add-in +_ReSharper* + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Others +[Bb]in +[Oo]bj +sql +TestResults +*.Cache +ClientBin +stylecop.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + + + +############ +## Windows +############ + +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +# Mac crap +.DS_Store diff --git a/pccenter/src/main/resources/static/src/zTree_v3/README.md b/pccenter/src/main/resources/static/src/zTree_v3/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c536989aa4a18a81eaae002b87bece656a58fd34 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/README.md @@ -0,0 +1,48 @@ +jQuery Tree Plugin ---- zTree +============ +last verson : 3.5.42 + + +**Donate to zTree** : http://www.treejs.cn/v3/donate.php + + +zTree API : http://www.treejs.cn/v3/api.php + + +zTree Demo : http://www.treejs.cn/v3/demo.php + + +Introduction of zTree (简介) +============ +* zTree is a multi-functional "tree plug-ins." based on jQuery. The main advantages of zTree includes excellent performance, flexible configuration, and the combination of multiple functions. +(zTree 是一个依靠 jQuery 实现的多功能 “树插件”。优异的性能、灵活的配置、多种功能的组合是 zTree 最大优点。) + +* zTree is a free tree plug-in and uses the MIT license. +(zTree 是开源免费的软件, 使用 MIT 许可证) + +* The code of zTree v3.x has been seperated according to the various functions. You can only load the code you need. +(zTree v3.x 将核心代码按照功能进行了分割,不需要的代码可以不用加载) +* zTree v3.x uses delay loading technique, which can easily load tens of thousands of nodes in seconds even in IE6 browser. +(采用了 延迟加载 技术,上万节点轻松加载,即使在 IE6 下也能基本做到秒杀) +* Compatible with IE, FireFox?, Chrome, Opera, Safari and other browsers. +(兼容 IE、FireFox?、Chrome、Opera、Safari 等浏览器) +* Support for JSON data. +(支持 JSON 数据) +* Support for static and asynchronous data loading node. +(支持静态 和 Ajax 异步加载节点数据) +* Replace the skin / custom icon flexibllly. +(支持任意更换皮肤 / 自定义图标) +* Support extremely flexible checkbox or radio selection function. +(支持极其灵活的 checkbox 或 radio 选择功能) +* Provide enough incident response callback. +(提供多种事件响应回调) +* Flexible editing (add / delete / change / search) functions, such as drag and drop nodes,you can even drag and drop multiple nodes. +(灵活的编辑(增/删/改/查)功能,可随意拖拽节点,还可以多节点拖拽哟) +* Enable to generate multiple instances of zTree in one page. +(在一个页面内可同时生成多个 Tree 实例) +* Simple parameters to achieve flexible configuration capabilities. +(简单的参数配置实现 灵活多变的功能) +* To enhance performance, zTree transforms the js & css structure to provide excellent browser compatibility and make the development more easily +(zTree v3.x(JQuery Tree 插件),性能全面提升,js & css 架构全面调整,提供更好的兼容性和易开发性) + + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/API_cn.html b/pccenter/src/main/resources/static/src/zTree_v3/api/API_cn.html new file mode 100644 index 0000000000000000000000000000000000000000..c1997512e29a865f10c12aa7f316751c9f59c7de --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/API_cn.html @@ -0,0 +1,103 @@ + + + + + API 文档 [zTree -- jQuery 树插件] + + + + + +
        + +
        +
        +
        + + +
        +
        +
        +
        • setting 配置详解
        +
          +
          +
          +
          • zTree 方法详解
          +
            +
            • treeNode 节点数据详解
            +
              +
              +
              +
              +
              +
              +
              + + +
              +
              +
              + + + +
              + +
              +
              +
              +
              + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/API_en.html b/pccenter/src/main/resources/static/src/zTree_v3/api/API_en.html new file mode 100644 index 0000000000000000000000000000000000000000..5a169d3805ad6308665955a88476d97511a191ee --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/API_en.html @@ -0,0 +1,102 @@ + + + + + API Document [zTree -- jQuery tree plug-ins.] + + + + + +
              + +
              +
              +
              + + +
              +
              +
              +
              • setting details
              +
                +
                +
                +
                • zTree method details
                +
                  +
                  • treeNode data details
                  +
                    +
                    +
                    +
                    +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + +
                    +
                    +
                    +
                    + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/api.js b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/api.js new file mode 100644 index 0000000000000000000000000000000000000000..dbf6e01389a5bd3cdd0e6aafb8a7c2f0a2ac2465 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/api.js @@ -0,0 +1,599 @@ +var apiContent = { + zTree_Setting: null, + zTree_Node: null, + zTree_Function: null, + overlayDiv : null, + overlayContent : null, + overlayDetailDiv : null, + overlayCloseBtn: null, + overlayArrow: null, + contentBoxDiv : null, + settingDiv : null, + functionDiv : null, + overlaySearch: null, + searchKey: null, + searchResultInput: null, + searchPrevBtn: null, + searchNextBtn: null, + apiCache: {}, + lastValue: "", + searchNodes: [], + searchNodesCur: 0, + + _init: function() { + this.overlayDiv = $("#overlayDiv"); + this.overlayContent = $("#overlayContent"); + this.overlayDetailDiv = $("#overlayDetailDiv"); + this.overlayCloseBtn = $("#overlayDivCloseBtn"); + this.overlayArrow = $("#overlayDivArrow"); + this.contentBoxDiv = $("#contentBox"); + this.settingDiv = $("#api_setting"); + this.functionDiv = $("#api_function"); + this.searchKey = $(".searchKey"); + this.overlaySearch = $(".overlaySearch"); + this.searchResultInput = $(".searchResult"); + this.searchPrevBtn = $(".searchPrev"); + this.searchNextBtn = $(".searchNext"); + var setting = { + view: { + fontCss: this.getFontCss, + showLine: false, + showIcon: this.showIcon, + showTitle: this.getTitle, + selectedMulti: false, + dblClickExpand: false + }, + data: { + key: { + title: "tt" + }, + simpleData: { + enable:true, + idKey: "id", + pIdKey: "pId", + rootPId: "" + } + }, + callback: { + onNodeCreated: this.onNodeCreated, + beforeClick: this.beforeClick + } + }; + var setting_nodes =[ + {id:1, pId:0, t:"setting", name:"var setting = {", open:true}, + {id:11, pId:1, t:"treeId", name:"treeId : \"\",", iconSkin:"core", showAPI:true}, + {id:12, pId:1, t:"treeObj", name:"treeObj : null,", iconSkin:"core", showAPI:true}, + {id:121, pId:1, name:""}, + + {id:20, pId:1, t:"async", name:"async : {", open:true}, + {id:201, pId:20, t:"autoParam", name:"autoParam : [],", iconSkin:"core", showAPI:true}, + {id:208, pId:20, t:"contentType", name:"contentType : \"application...\",", iconSkin:"core", showAPI:true}, + {id:202, pId:20, t:"dataFilter", name:"dataFilter : null,", iconSkin:"core", showAPI:true}, + {id:203, pId:20, t:"dataType", name:"dataType : \"text\",", iconSkin:"core", showAPI:true}, + {id:204, pId:20, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true}, + {id:205, pId:20, t:"otherParam", name:"otherParam : [],", iconSkin:"core", showAPI:true}, + {id:206, pId:20, t:"type", name:"type : \"post\",", iconSkin:"core", showAPI:true}, + {id:209, pId:20, t:"headers", name:"headers : {},", iconSkin:"core", showAPI:true}, + {id:210, pId:20, t:"xhrFields", name:"xhrFields : {},", iconSkin:"core", showAPI:true}, + {id:207, pId:20, t:"url", name:"url : \"\"", iconSkin:"core", showAPI:true}, + {id:21, pId:1, name:"},"}, + {id:22, pId:1, name:""}, + + {id:30, pId:1, t:"callback", name:"callback : {", open:true}, + {id:3001, pId:30, t:"beforeAsync", name:"beforeAsync : null,", iconSkin:"core", showAPI:true}, + {id:3002, pId:30, t:"beforeCheck", name:"beforeCheck : null,", iconSkin:"check", showAPI:true}, + {id:3003, pId:30, t:"beforeClick", name:"beforeClick : null,", iconSkin:"core", showAPI:true}, + {id:3004, pId:30, t:"beforeCollapse", name:"beforeCollapse : null,", iconSkin:"core", showAPI:true}, + {id:3004, pId:30, t:"beforeDblClick", name:"beforeDblClick : null,", iconSkin:"core", showAPI:true}, + {id:3005, pId:30, t:"beforeDrag", name:"beforeDrag : null,", iconSkin:"edit", showAPI:true}, + {id:3006, pId:30, t:"beforeDragOpen", name:"beforeDragOpen : null,", iconSkin:"edit", showAPI:true}, + {id:3007, pId:30, t:"beforeDrop", name:"beforeDrop : null,", iconSkin:"edit", showAPI:true}, + {id:3029, pId:30, t:"beforeEditName", name:"beforeEditName : null,", iconSkin:"edit", showAPI:true}, + {id:3008, pId:30, t:"beforeExpand", name:"beforeExpand : null,", iconSkin:"core", showAPI:true}, + {id:3009, pId:30, t:"beforeMouseDown", name:"beforeMouseDown : null,", iconSkin:"core", showAPI:true}, + {id:3010, pId:30, t:"beforeMouseUp", name:"beforeMouseUp : null,", iconSkin:"core", showAPI:true}, + {id:3011, pId:30, t:"beforeRemove", name:"beforeRemove : null,", iconSkin:"edit", showAPI:true}, + {id:3012, pId:30, t:"beforeRename", name:"beforeRename : null,", iconSkin:"edit", showAPI:true}, + {id:3013, pId:30, t:"beforeRightClick", name:"beforeRightClick : null,", iconSkin:"core", showAPI:true}, + {id:3014, pId:30, name:""}, + {id:3015, pId:30, t:"onAsyncError", name:"onAsyncError : null,", iconSkin:"core", showAPI:true}, + {id:3016, pId:30, t:"onAsyncSuccess", name:"onAsyncSuccess : null,", iconSkin:"core", showAPI:true}, + {id:3017, pId:30, t:"onCheck", name:"onCheck : null,", iconSkin:"check", showAPI:true}, + {id:3018, pId:30, t:"onClick", name:"onClick : null,", iconSkin:"core", showAPI:true}, + {id:3019, pId:30, t:"onCollapse", name:"onCollapse : null,", iconSkin:"core", showAPI:true}, + {id:3029, pId:30, t:"onDblClick", name:"onDblClick : null,", iconSkin:"core", showAPI:true}, + {id:3020, pId:30, t:"onDrag", name:"onDrag : null,", iconSkin:"edit", showAPI:true}, + {id:3030, pId:30, t:"onDragMove", name:"onDragMove : null,", iconSkin:"edit", showAPI:true}, + {id:3021, pId:30, t:"onDrop", name:"onDrop : null,", iconSkin:"edit", showAPI:true}, + {id:3022, pId:30, t:"onExpand", name:"onExpand : null,", iconSkin:"core", showAPI:true}, + {id:3023, pId:30, t:"onMouseDown", name:"onMouseDown : null,", iconSkin:"core", showAPI:true}, + {id:3024, pId:30, t:"onMouseUp", name:"onMouseUp : null,", iconSkin:"core", showAPI:true}, + {id:3025, pId:30, t:"onNodeCreated", name:"onNodeCreated : null,", iconSkin:"core", showAPI:true}, + {id:3026, pId:30, t:"onRemove", name:"onRemove : null,", iconSkin:"edit", showAPI:true}, + {id:3027, pId:30, t:"onRename", name:"onRename : null,", iconSkin:"edit", showAPI:true}, + {id:3028, pId:30, t:"onRightClick", name:"onRightClick : null", iconSkin:"core", showAPI:true}, + {id:31, pId:1, name:"},"}, + {id:32, pId:1, name:""}, + + {id:40, pId:1, t:"check", name:"check : {", open:true}, + {id:405, pId:40, t:"autoCheckTrigger", name:"autoCheckTrigger : false,", iconSkin:"check", showAPI:true}, + {id:401, pId:40, t:"chkboxType", name:"chkboxType : {\"Y\": \"ps\", \"N\": \"ps\"},", iconSkin:"check", showAPI:true}, + {id:402, pId:40, t:"chkStyle", name:"chkStyle : \"checkbox\",", iconSkin:"check", showAPI:true}, + {id:403, pId:40, t:"enable", name:"enable : false,", iconSkin:"check", showAPI:true}, + {id:406, pId:40, t:"nocheckInherit", name:"nocheckInherit : false", iconSkin:"check", showAPI:true}, + {id:407, pId:40, t:"chkDisabledInherit", name:"chkDisabledInherit : false", iconSkin:"check", showAPI:true}, + {id:404, pId:40, t:"radioType", name:"radioType : \"level\"", iconSkin:"check", showAPI:true}, + {id:41, pId:1, name:"},"}, + {id:42, pId:1, name:""}, + + {id:50, pId:1, t:"data", name:"data : {", open:true}, + {id:500, pId:50, t:"keep", name:"keep : {", open:true}, + {id:5001, pId:500, t:"leaf", name:"leaf : false,", iconSkin:"core", showAPI:true}, + {id:5002, pId:500, t:"parent", name:"parent : false", iconSkin:"core", showAPI:true}, + {id:501, pId:50, name:"},"}, + + {id:510, pId:50, t:"key", name:"key : {", open:true}, + {id:5101, pId:510, t:"checked", name:"checked : \"checked\",", iconSkin:"check", showAPI:true}, + {id:5102, pId:510, t:"children", name:"children : \"children\",", iconSkin:"core", showAPI:true}, + {id:5106, pId:510, t:"isParent", name:"isParent : \"isParent\",", iconSkin:"core", showAPI:true}, + {id:5107, pId:510, t:"isHidden", name:"isHidden : \"isHidden\",", iconSkin:"hide", showAPI:true}, + {id:5103, pId:510, t:"name", name:"name : \"name\",", iconSkin:"core", showAPI:true}, + {id:5104, pId:510, t:"title", name:"title : \"\"", iconSkin:"core", showAPI:true}, + {id:5105, pId:510, t:"url", name:"url : \"url\"", iconSkin:"core", showAPI:true}, + {id:511, pId:50, name:"},"}, + + {id:520, pId:50, t:"simpleData", name:"simpleData : {", open:true}, + {id:5201, pId:520, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true}, + {id:5202, pId:520, t:"idKey", name:"idKey : \"id\",", iconSkin:"core", showAPI:true}, + {id:5203, pId:520, t:"pIdKey", name:"pIdKey : \"pId\",", iconSkin:"core", showAPI:true}, + {id:5204, pId:520, t:"rootPId", name:"rootPId : null", iconSkin:"core", showAPI:true}, + {id:521, pId:50, name:"}"}, + {id:51, pId:1, name:"},"}, + {id:52, pId:1, name:""}, + + {id:60, pId:1, t:"edit", name:"edit : {", open:true}, + {id:601, pId:60, t:"drag", name:"drag : {", open:true}, + {id:60111, pId:601, t:"autoExpandTrigger", name:"autoExpandTrigger : true,", iconSkin:"edit", showAPI:true}, + {id:60101, pId:601, t:"isCopy", name:"isCopy : true,", iconSkin:"edit", showAPI:true}, + {id:60102, pId:601, t:"isMove", name:"isMove : true,", iconSkin:"edit", showAPI:true}, + {id:60103, pId:601, t:"prev", name:"prev : true,", iconSkin:"edit", showAPI:true}, + {id:60104, pId:601, t:"next", name:"next : true,", iconSkin:"edit", showAPI:true}, + {id:60105, pId:601, t:"inner", name:"inner : true,", iconSkin:"edit", showAPI:true}, + {id:60107, pId:601, t:"borderMax", name:"borderMax : 10,", iconSkin:"edit", showAPI:true}, + {id:60108, pId:601, t:"borderMin", name:"borderMin : -5,", iconSkin:"edit", showAPI:true}, + {id:60106, pId:601, t:"minMoveSize", name:"minMoveSize : 5,", iconSkin:"edit", showAPI:true}, + {id:60109, pId:601, t:"maxShowNodeNum", name:"maxShowNodeNum : 5,", iconSkin:"edit", showAPI:true}, + {id:60110, pId:601, t:"autoOpenTime", name:"autoOpenTime : 500", iconSkin:"edit", showAPI:true}, + {id:602, pId:60, name:"},"}, + {id:608, pId:60, t:"editNameSelectAll", name:"editNameSelectAll : false,", iconSkin:"edit", showAPI:true}, + {id:603, pId:60, t:"enable", name:"enable : false,", iconSkin:"edit", showAPI:true}, + {id:604, pId:60, t:"removeTitle", name:"removeTitle : \"remove\",", iconSkin:"edit", showAPI:true}, + {id:605, pId:60, t:"renameTitle", name:"renameTitle : \"rename\",", iconSkin:"edit", showAPI:true}, + {id:606, pId:60, t:"showRemoveBtn", name:"showRemoveBtn : true,", iconSkin:"edit", showAPI:true}, + {id:607, pId:60, t:"showRenameBtn", name:"showRenameBtn : true", iconSkin:"edit", showAPI:true}, + {id:61, pId:1, name:"},"}, + {id:62, pId:1, name:""}, + + {id:70, pId:1, t:"view", name:"view : {", open:true}, + {id:7001, pId:70, t:"addDiyDom", name:"addDiyDom : null,", iconSkin:"core", showAPI:true}, + {id:7002, pId:70, t:"addHoverDom", name:"addHoverDom : null,", iconSkin:"edit", showAPI:true}, + {id:7003, pId:70, t:"autoCancelSelected", name:"autoCancelSelected : true,", iconSkin:"core", showAPI:true}, + {id:7004, pId:70, t:"dblClickExpand", name:"dblClickExpand : true,", iconSkin:"core", showAPI:true}, + {id:7005, pId:70, t:"expandSpeed", name:"expandSpeed : \"fast\",", iconSkin:"core", showAPI:true}, + {id:7006, pId:70, t:"fontCss", name:"fontCss : {},", iconSkin:"core", showAPI:true}, + {id:7012, pId:70, t:"nameIsHTML", name:"nameIsHTML : false,", iconSkin:"core", showAPI:true}, + {id:7007, pId:70, t:"removeHoverDom", name:"removeHoverDom : null,", iconSkin:"edit", showAPI:true}, + {id:7008, pId:70, t:"selectedMulti", name:"selectedMulti : true,", iconSkin:"core", showAPI:true}, + {id:7009, pId:70, t:"showIcon", name:"showIcon : true,", iconSkin:"core", showAPI:true}, + {id:7010, pId:70, t:"showLine", name:"showLine : true,", iconSkin:"core", showAPI:true}, + {id:7011, pId:70, t:"showTitle", name:"showTitle : true,", iconSkin:"core", showAPI:true}, + {id:7012, pId:70, t:"txtSelectedEnable", name:"txtSelectedEnable : false", iconSkin:"core", showAPI:true}, + {id:71, pId:1, name:"}"}, + + {id:2, pId:0, name:"}"} + ]; + + var treenode_nodes =[ + {id:1, pId:0, t:"treeNode", name:"treeNode : {", open:true}, + {id:101, pId:1, t:"checked", name:"checked", iconSkin:"check", showAPI:true}, + {id:102, pId:1, t:"children", name:"children", iconSkin:"core", showAPI:true}, + {id:128, pId:1, t:"chkDisabled", name:"chkDisabled", iconSkin:"check", showAPI:true}, + {id:127, pId:1, t:"click", name:"click", iconSkin:"core", showAPI:true}, + {id:103, pId:1, t:"getCheckStatus", name:"getCheckStatus ()", iconSkin:"check", showAPI:true}, + {id:135, pId:1, t:"getIndex", name:"getIndex ()", iconSkin:"core", showAPI:true}, + {id:104, pId:1, t:"getNextNode", name:"getNextNode ()", iconSkin:"core", showAPI:true}, + {id:105, pId:1, t:"getParentNode", name:"getParentNode ()", iconSkin:"core", showAPI:true}, + {id:136, pId:1, t:"getPath", name:"getPath ()", iconSkin:"core", showAPI:true}, + {id:106, pId:1, t:"getPreNode", name:"getPreNode ()", iconSkin:"core", showAPI:true}, + {id:129, pId:1, t:"halfCheck", name:"halfCheck", iconSkin:"check", showAPI:true}, + {id:107, pId:1, t:"icon", name:"icon", iconSkin:"core", showAPI:true}, + {id:108, pId:1, t:"iconClose", name:"iconClose", iconSkin:"core", showAPI:true}, + {id:109, pId:1, t:"iconOpen", name:"iconOpen", iconSkin:"core", showAPI:true}, + {id:110, pId:1, t:"iconSkin", name:"iconSkin", iconSkin:"core", showAPI:true}, + {id:131, pId:1, t:"isHidden", name:"isHidden", iconSkin:"hide", showAPI:true}, + {id:111, pId:1, t:"isParent", name:"isParent", iconSkin:"core", showAPI:true}, + {id:132, pId:1, t:"name", name:"name", iconSkin:"core", showAPI:true}, + {id:112, pId:1, t:"nocheck", name:"nocheck", iconSkin:"check", showAPI:true}, + {id:113, pId:1, t:"open", name:"open", iconSkin:"core", showAPI:true}, + {id:133, pId:1, t:"target", name:"target", iconSkin:"core", showAPI:true}, + {id:134, pId:1, t:"url", name:"url", iconSkin:"core", showAPI:true}, + {id:114, pId:1, t:"diy", name:"*DIY*", iconSkin:"core", showAPI:true}, + {id:115, pId:1, name:""}, + {id:116, pId:1, t:"check_Child_State", name:"[check_Child_State]", iconSkin:"check", showAPI:true}, + {id:117, pId:1, t:"check_Focus", name:"[check_Focus]", iconSkin:"check", showAPI:true}, + {id:118, pId:1, t:"checkedOld", name:"[checkedOld]", iconSkin:"check", showAPI:true}, + {id:119, pId:1, t:"editNameFlag", name:"[editNameFlag]", iconSkin:"edit", showAPI:true}, + {id:120, pId:1, t:"isAjaxing", name:"[isAjaxing]", iconSkin:"core", showAPI:true}, + {id:121, pId:1, t:"isFirstNode", name:"[isFirstNode]", iconSkin:"core", showAPI:true}, + {id:122, pId:1, t:"isHover", name:"[isHover]", iconSkin:"edit", showAPI:true}, + {id:123, pId:1, t:"isLastNode", name:"[isLastNode]", iconSkin:"core", showAPI:true}, + {id:124, pId:1, t:"level", name:"[level]", iconSkin:"core", showAPI:true}, + {id:125, pId:1, t:"parentTId", name:"[parentTId]", iconSkin:"core", showAPI:true}, + {id:126, pId:1, t:"tId", name:"[tId]", iconSkin:"core", showAPI:true}, + {id:130, pId:1, t:"zAsync", name:"[zAsync]", iconSkin:"core", showAPI:true}, + {id:2, pId:0, name:"}"} + ]; + + var function_nodes =[ + {id:1, pId:0, t:"$.fn.zTree", name:"$.fn.zTree : {", open:true}, + {id:11, pId:1, t:"init", name:"init (obj, zSetting, zNodes)", iconSkin:"core", showAPI:true}, + {id:12, pId:1, t:"getZTreeObj", name:"getZTreeObj (treeId)", iconSkin:"core", showAPI:true}, + {id:14, pId:1, t:"destroy", name:"destroy (treeId)", iconSkin:"core", showAPI:true}, + {id:13, pId:1, t:"_z", name:"_z : {tools, view, event, data}", iconSkin:"core", showAPI:true}, + {id:2, pId:0, name:"}"}, + {id:3, pId:0, name:""}, + {id:4, pId:0, t:"zTreeObj", name:"zTreeObj : {", open:true}, + {id:401, pId:4, t:"setting", name:"setting", iconSkin:"core", showAPI:true}, + {id:402, pId:4, t:"addNodes", name:"addNodes (parentNode, index, newNodes, isSilent)", iconSkin:"core", showAPI:true}, + {id:403, pId:4, t:"cancelEditName", name:"cancelEditName (newName)", iconSkin:"edit", showAPI:true}, + {id:404, pId:4, t:"cancelSelectedNode", name:"cancelSelectedNode (node)", iconSkin:"core", showAPI:true}, + {id:405, pId:4, t:"checkAllNodes", name:"checkAllNodes (checked)", iconSkin:"check", showAPI:true}, + {id:406, pId:4, t:"checkNode", name:"checkNode (node, checked, checkTypeFlag, callbackFlag)", iconSkin:"check", showAPI:true}, + {id:407, pId:4, t:"copyNode", name:"copyNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true}, + {id:436, pId:4, t:"destroy", name:"destroy ()", iconSkin:"core", showAPI:true}, + {id:408, pId:4, t:"editName", name:"editName (node)", iconSkin:"edit", showAPI:true}, + {id:409, pId:4, t:"expandAll", name:"expandAll (expandFlag)", iconSkin:"core", showAPI:true}, + {id:410, pId:4, t:"expandNode", name:"expandNode (node, expandFlag, sonSign, focus, callbackFlag)", iconSkin:"core", showAPI:true}, + {id:411, pId:4, t:"getChangeCheckedNodes", name:"getChangeCheckedNodes ()", iconSkin:"check", showAPI:true}, + {id:412, pId:4, t:"getCheckedNodes", name:"getCheckedNodes (checked)", iconSkin:"check", showAPI:true}, + {id:413, pId:4, t:"getNodeByParam", name:"getNodeByParam (key, value, parentNode)", iconSkin:"core", showAPI:true}, + {id:414, pId:4, t:"getNodeByTId", name:"getNodeByTId (tId)", iconSkin:"core", showAPI:true}, + {id:415, pId:4, t:"getNodeIndex", name:"getNodeIndex (node)", iconSkin:"core", showAPI:true}, + {id:416, pId:4, t:"getNodes", name:"getNodes ()", iconSkin:"core", showAPI:true}, + {id:431, pId:4, t:"getNodesByFilter", name:"getNodesByFilter (filter, isSingle, parentNode, invokeParam)", iconSkin:"core", showAPI:true}, + {id:417, pId:4, t:"getNodesByParam", name:"getNodesByParam (key, value, parentNode)", iconSkin:"core", showAPI:true}, + {id:418, pId:4, t:"getNodesByParamFuzzy", name:"getNodesByParamFuzzy (key, value, parentNode)", iconSkin:"core", showAPI:true}, + {id:419, pId:4, t:"getSelectedNodes", name:"getSelectedNodes ()", iconSkin:"core", showAPI:true}, + {id:432, pId:4, t:"hideNode", name:"hideNode (node)", iconSkin:"hide", showAPI:true}, + {id:433, pId:4, t:"hideNodes", name:"hideNodes (nodes)", iconSkin:"hide", showAPI:true}, + {id:420, pId:4, t:"moveNode", name:"moveNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true}, + {id:421, pId:4, t:"reAsyncChildNodes", name:"reAsyncChildNodes (parentNode, reloadType, isSilent, callback)", iconSkin:"core", showAPI:true}, + {id:437, pId:4, t:"reAsyncChildNodesPromise", name:"reAsyncChildNodesPromise(parentNode, reloadType, isSilent)", iconSkin:"core", showAPI:true}, + {id:422, pId:4, t:"refresh", name:"refresh ()", iconSkin:"core", showAPI:true}, + {id:423, pId:4, t:"removeChildNodes", name:"removeChildNodes (parentNode)", iconSkin:"core", showAPI:true}, + {id:424, pId:4, t:"removeNode", name:"removeNode (node, callbackFlag)", iconSkin:"core", showAPI:true}, + {id:425, pId:4, t:"selectNode", name:"selectNode (node, addFlag, isSilent)", iconSkin:"core", showAPI:true}, + {id:430, pId:4, t:"setChkDisabled", name:"setChkDisabled (node, disabled, inheritParent, inheritChildren)", iconSkin:"check", showAPI:true}, + {id:426, pId:4, t:"setEditable", name:"setEditable (editable)", iconSkin:"edit", showAPI:true}, + {id:434, pId:4, t:"showNode", name:"showNode (node)", iconSkin:"hide", showAPI:true}, + {id:435, pId:4, t:"showNodes", name:"showNodes (nodes)", iconSkin:"hide", showAPI:true}, + {id:427, pId:4, t:"transformToArray", name:"transformToArray (nodes)", iconSkin:"core", showAPI:true}, + {id:428, pId:4, t:"transformTozTreeNodes", name:"transformTozTreeNodes (simpleNodes)", iconSkin:"core", showAPI:true}, + {id:429, pId:4, t:"updateNode", name:"updateNode (node, checkTypeFlag)", iconSkin:"core", showAPI:true}, + {id:5, pId:0, name:"}"} + ]; + + apiContent.zTree_Setting = $.fn.zTree.init($("#settingTree"), $.fn.zTree._z.tools.clone(setting), setting_nodes); + apiContent.zTree_Node = $.fn.zTree.init($("#treenodeTree"), $.fn.zTree._z.tools.clone(setting), treenode_nodes); + apiContent.zTree_Function = $.fn.zTree.init($("#functionTree"), $.fn.zTree._z.tools.clone(setting), function_nodes); + this.bindEvent(); + + }, + bindEvent: function() { + $(document).bind("keydown", this.listenKeyDown) + this.overlayCloseBtn.bind("click", apiContent.overlayClose); + this.searchResultInput.bind("click", function(e) { + $(this).prev().get(0).focus(); + this.blur(); + }).bind("focus", function(e) { + this.blur(); + }); + this.searchKey.bind("focus", this.focusKey) + .bind("blur", this.blurKey) + .bind("propertychange", this.searchNode) + .bind("input", this.searchNode); + this.searchPrevBtn.bind("click", this.searchPrev); + this.searchNextBtn.bind("click", this.searchNext); + }, + setSameKey: function(value) { + apiContent.searchKey.attr("value", value); + }, + focusKey: function(e) { + if (apiContent.searchKey.hasClass("empty")) { + apiContent.searchKey.removeClass("empty"); + } + }, + blurKey: function(e) { + apiContent.setSameKey(e.target.value); + if (e.target.value === "") { + apiContent.searchKey.addClass("empty"); + } + }, + listenKeyDown: function(e) { + if (e.keyCode=="13" && apiContent.overlayDiv.is(":hidden")) { + apiContent.openAPI(); + } else if (e.keyCode=="37") { + apiContent.searchPrev(); + } else if (e.keyCode=="13" || e.keyCode=="39") { + apiContent.searchNext(); + } + }, + openAPI: function() { + if (apiContent.searchNodes.length > 0) { + var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"), + treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"), + function_zTree = $.fn.zTree.getZTreeObj("functionTree"); + if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) { + apiContent.searchNodesCur = 0; + } + var node = apiContent.searchNodes[apiContent.searchNodesCur]; + + if (node.tId.indexOf("setting") > -1) { + setting_zTree.selectNode(node); + } else if (node.tId.indexOf("treenode") > -1) { + treenode_zTree.selectNode(node); + } else { + function_zTree.selectNode(node); + } + apiContent.beforeClick(node.tId.substring(0, node.tId.indexOf("_")), node, true); + apiContent.searchCur(); + } + }, + searchNode: function(e) { + var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"), + treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"), + function_zTree = $.fn.zTree.getZTreeObj("functionTree"); + if (apiContent.curKey == e.target.value) return; + apiContent.curKey = e.target.value; + var value = $.trim(apiContent.curKey); + apiContent.setSameKey(apiContent.curKey); + if (apiContent.searchKey.hasClass("empty")) { + value = ""; + apiContent.searchResultInput.removeClass("noResult").attr("value",""); + } + if (apiContent.lastValue === value) return; + + apiContent.updateNodes(false); + apiContent.lastValue = value; + if (value === "" || value.length < 2) { + apiContent.searchNodes = []; + apiContent.searchNodesCur = -1; + apiContent.searchCur(true); + return; + } + + var settingNodeList = setting_zTree.getNodesByFilter(apiContent.searchFilter); + var functionNodeList = function_zTree.getNodesByFilter(apiContent.searchFilter); + var treenodeNodeList = treenode_zTree.getNodesByFilter(apiContent.searchFilter); + apiContent.searchNodes = settingNodeList.concat(functionNodeList).concat(treenodeNodeList); + apiContent.searchNodesCur = -1; + apiContent.searchCur(); + apiContent.updateNodes(true); + }, + searchFilter: function(node) { + var value = $.trim(apiContent.searchKey.get(0).value).toLowerCase(); + return (node.showAPI && node.name.toLowerCase().indexOf(value) > -1); + }, + searchPrev: function(e) { + if (apiContent.searchPrevBtn.hasClass("disabled")) return; + apiContent.searchNodesCur--; + if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) { + apiContent.searchNodesCur = apiContent.searchNodes.length -1; + } + apiContent.openAPI(); + }, + searchNext: function(e) { + if (apiContent.searchNextBtn.hasClass("disabled")) return; + apiContent.searchNodesCur++; + apiContent.openAPI(); + }, + searchCur: function(init) { + var result = apiContent.searchNodes; + if (init) { + apiContent.searchResultInput.removeClass("noResult").attr("value",""); + } else if (result.length == 0) { + apiContent.searchResultInput.addClass("noResult").attr("value"," [ 0 / 0 ] "); + } else { + apiContent.searchResultInput.removeClass("noResult").attr("value"," [ " + (apiContent.searchNodesCur > -1 ? apiContent.searchNodesCur+1 : "?")+ " / " + result.length + " ] "); + } + if (result.length > 0) { + apiContent.searchPrevBtn.removeClass("disabled"); + apiContent.searchNextBtn.removeClass("disabled"); + } else { + apiContent.searchPrevBtn.addClass("disabled"); + apiContent.searchNextBtn.addClass("disabled"); + } + }, + updateNodes: function(highlight) { + var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"), + treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"), + function_zTree = $.fn.zTree.getZTreeObj("functionTree"), + node = null; + for( var i=0, l=apiContent.searchNodes.length; i 0) { + node.highlight = highlight; + if (node.tId.indexOf("setting") > -1) { + setting_zTree.updateNode(node); + } else if (node.tId.indexOf("treenode") > -1) { + treenode_zTree.updateNode(node); + } else { + function_zTree.updateNode(node); + } + } + } + }, + getFontCss: function(treeId, treeNode) { + return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"}; + }, + getTitle: function(treeId, node) { + var t = [], n = node; + while (n && !!n.t) { + t.push(n.t); + n = n.getParentNode(); + } + t = t.reverse(); + node.tt = t.join('.'); + return true; + }, + showIcon: function(treeId, node) { + return (!!node.iconSkin); + }, + onNodeCreated: function (e, treeId, node) { + var a = $("#" + node.tId + "_a"); + if (node.showAPI) { + a.attr("rel", "#overlayDiv"); + } else { + a.css({cursor: "default"}); + } + }, + beforeClick: function (treeId, node, noClear) { + if (!node.showAPI) return false; + var o = $("#" + node.tId + "_a"); + if (!!apiContent.apiCache[node.tId]) { + apiContent.tmpDiv.html(apiContent.apiCache[node.tId]); + apiContent.overlayShow(o, (apiContent.lastNode === node)); + } else { + apiContent.overlayAjax(treeId, node); + } + apiContent.lastNode = node; + if (node.tId.indexOf("settingTree")>-1) { + apiContent.settingDiv.removeClass("right").addClass("left"); + apiContent.functionDiv.removeClass("left").addClass("right"); + } else { + apiContent.settingDiv.removeClass("left").addClass("right"); + apiContent.functionDiv.removeClass("right").addClass("left"); + } + + if (!noClear) { + apiContent.clearSelectedNode(); + } + return true; + }, + clearSelectedNode: function() { + apiContent.zTree_Setting.cancelSelectedNode(); + apiContent.zTree_Node.cancelSelectedNode(); + apiContent.zTree_Function.cancelSelectedNode(); + }, + overlayAutoClose: function(e) { + var eId = e.target.id, eRel = e.target.getAttribute("rel"), eClass = e.target.className; + if (eId === "overlayDiv" || eId === "overlayDivArrow" || eClass.indexOf("searchPrev") > -1 || eClass.indexOf("searchNext") > -1 || !!eRel) return; + if (!$(e.target).parents("[rel]").length && !$(e.target).parents("#overlayDiv").length) { + apiContent.overlayClose(); + } + }, + overlayClose: function() { + var o = apiContent.overlayDiv; + o.stop(); + apiContent.clearSelectedNode(); + if (ie) { + o.hide(); + } else { + setTimeout(function() {o.fadeTo("fast", 0, function(){o.hide();})}, 200); + } + $(document).unbind("click", apiContent.overlayAutoClose); + }, + overlayShow: function(target, isSameNode) { + var w = $(window), o = apiContent.overlayDiv, a = apiContent.overlayArrow, + oc = apiContent.overlayContent, c = apiContent.contentBoxDiv, + t = target.offset().top - 30, + cMaxLeft = c.offset().left + c.outerWidth({margin:true}) - o.outerWidth({margin:true}) - 10, + l = Math.min(cMaxLeft, target.offset().left + target.width() + 40), + arrowT = target.offset().top + 16, + wMinTop = 100, footerHeight = 50, onlyFade = false, + wHeight = w.height(), wScrollTop=w.scrollTop(), wMaxTop = wHeight + wScrollTop - footerHeight; + if (!apiContent.overlayMaxTop) { + apiContent.overlayMaxTop = apiContent.contentBoxDiv.offset().top + apiContent.contentBoxDiv.height(); + } + o.stop(); + if (o.css("display") !== "block") { + o.css({top: t, left: l}); + a.css({top:arrowT - t}); + $(document).bind("click", apiContent.overlayAutoClose); + } + if (ie) { + onlyFade = true; + o.show(); + } else { + o.fadeTo("fast", 1); + } + + var h = apiContent.tmpDiv.outerHeight({margin:true}) + apiContent.overlaySearch.outerHeight(); + if ((t + h) > wMaxTop) { + t = wMaxTop - h; + } + if ((t + h) > apiContent.overlayMaxTop) { + t = apiContent.overlayMaxTop - h; + } + t = Math.max(t, wScrollTop, wMinTop); + if ((t + h) > ($("body").height()-footerHeight-20)) { + o.css("padding-bottom", footerHeight + "px"); + } else { + o.css("padding-bottom", "0"); + } + apiContent.overlayDetailDiv.empty(); + apiContent.overlayDetailDiv.append(apiContent.tmpDiv.children()); + if (!onlyFade) { + onlyFade = (isSameNode && t === parseInt(o.css("top").replace("px", ""))); + } + + a.removeClass("reverse"); + if ( (arrowT - t) > (h-55) ) { + a.addClass("reverse"); + arrowT -= 55; + } + + if (onlyFade) { + o.css({top: t, left: l}); + oc.css({height: h}); + a.css({top:arrowT - t}); + } else { + o.animate({top: t, left: l}, {duration: "normal",easing: "swing", complete:null}); + oc.animate({height: h}, {duration: "fast",easing: "swing", complete:null}); + a.animate({top:arrowT - t}, {duration: "normal",easing: "linear", complete:null}); + } + }, + overlayAjax: function(treeId, node) { + var o = $("#" + node.tId + "_a"); + if (node.isAjax) return; + node.isAjax = true; + $.ajax({ + type: "get", + url: "" + lang + "/" + node.tt.replace("$.", "") + ".html", + data: null, + dataType: "text", + success: function(msg) { + if (!apiContent.tmpDiv) { + var tmpDiv = $(document.createElement("div")); + tmpDiv.addClass("baby_overlay_tmp"); + $("body").append(tmpDiv) + apiContent.tmpDiv = $(document.createElement("div")); + apiContent.tmpDiv.addClass("details"); + tmpDiv.append(apiContent.tmpDiv); + + } else { + apiContent.tmpDiv.empty(); + } + apiContent.tmpDiv.html(msg); + apiContent.overlayShow(o, false); + apiContent.apiCache[node.tId] = msg; + node.isAjax = false; + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + alert(ajaxMsg) + if (apiContent.tmpDiv) apiContent.tmpDiv.empty(); + node.isAjax = false; + } + }); + } +} \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/common.css b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/common.css new file mode 100644 index 0000000000000000000000000000000000000000..bc26d59d6c5f712ddcf0a86d91fd06866d1eda67 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/common.css @@ -0,0 +1,218 @@ +/* Resets */ +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;} +:focus {outline: 0;} +body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #528036 url(img/background.jpg) no-repeat fixed 0 0;} +p {padding-bottom: 20px;} +ol, ul {list-style: none;} +table {border-collapse: separate;border-spacing: 0;} +caption, th, td {text-align: left;font-weight: normal;} +strong {font-weight: bold;} +em {font-style: italic;} +hr {display: none;} +.font1 {color: white;background-color: #528036;} +.right {float: right;} +.left {float: left;} +.hide {display: none;} +.round {-moz-border-radius: 15px;-webkit-border-radius: 15px;-khtml-border-radius: 15px;border-radius: 15px;} +.clear {clear: both;} +.clearfix {display: block;} +.clearfix:after {content: ".";display: block;clear: both;visibility: hidden;line-height: 0;height: 0;} +html[xmlns] .clearfix {display: block;} +* html .clearfix {height: 1%;} + +/* Link Styles */ +a {color: #528036;} +a:link, a:visited {text-decoration: none;} +a:hover {color: #000;text-decoration: none;} +a:active {text-decoration: none;} + +/* Headings */ +h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;} +h1 {font-size: 36px;line-height: 44px;} +h2 {font-size: 20px;line-height: 20px;} +h3 {font-size: 14px;line-height: 14px;} +h4 {font-size: 14px;font-weight: normal;line-height: 25px;} + +/* Wraps */ +.header_wrap {position: relative;min-width: 940px;padding: 100px 30px 0 30px;} +.content_wrap {position: relative;min-width: 940px;padding: 0 30px 50px 30px;} +.footer_wrap {bottom: 0;height: 47px;width: 100%;background-color: #1b1b1b;border-top: 1px solid #749e58;} + +/* Header */ +.header {position: relative;width: 940px;margin: 0 auto;height: 160px;border: 1px solid white;background: transparent url(img/header-bg.png) repeat-x 0 -50px;} +.header-text {padding: 40px 25px 15px 120px;font-size: 18px;line-height: 24px;color: #747d67;font-family: Helvetica, sans-serif;} +.header-text img {padding-bottom: 5px;} +.shortcuts {white-space: nowrap;text-align: right;position: absolute;top: -45px;right: 5px;} +.shortcuts.language {top: -85px;right:0px;} +.shortcuts li {display: inline;font-size: 18px;line-height: 28px;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;margin-left: 30px;cursor: pointer;} +.shortcuts li button {cursor: pointer;} +.shortcuts li span {border-bottom: 1px dotted white;} +.shortcuts li span.selected {padding: 2px;background-color: #528036;} +.shortcuts li a {color: #fff;} +.ieSuggest {display:none;font-size: 12px;color: silver;position: absolute;left: 10px;top: 2px;} +.light-bulb {position: absolute;left: -20px;bottom: -35px;width:116px;height:180px;background-image:url(img/lightbulb.png);background-repeat: no-repeat;} + +/* Content */ +.content {position: relative;width: 940px;margin: 0 auto;} +.nav_section {position: relative;height: 20px;font-family: "Myriad Pro", "Trebuchet MS", sans-serif;font-size: 15px;color: #253;padding: 20px 0;} +.nav_section ul {position: absolute;right: 10px;} +.nav_section ul li {display: inline;line-height: 20px;margin: 0 5px 0 20px;border-bottom: 1px dotted white;} +.nav_section ul li.noline {border-bottom: 0;} +.nav_section ul li a {color: #fff;} +.nav_section ul li a.selected {padding: 2px;background-color: #528036;} +.nav_section ul li.first {border: none;} +.content .title {margin: 50px 30px 20px 70px;} +.content li {margin-bottom: 5px;} +.contentBox {position: relative;overflow: hidden;border: 1px solid white;min-height: 200px;line-height: 25px;background: transparent url(img/contact-bg.png) repeat-x 0 0;} + +.zTreeInfo {display:none;width: 940px;position: absolute;} +.zTreeInfo p {padding-bottom: 50px;} +.zTreeInfo-left {float: left;width: 280px;height:300px;padding: 0 50px 60px 75px;background:url(img/zTreeIntroduction.jpg) no-repeat 30px 30px;} +.zTreeInfo-right {position: relative;float: right;width: 475px;padding: 0 50px 60px 0;} +.zTreeInfo-right li {font-size: 12px;list-style-type: disc;} + +.license {display:none;width: 940px;position: absolute;} + +.donateInfo {display:block;width: 940px;position: absolute;} + +.links {display:none;width: 940px;position: absolute;} +.links .content {float: left;width: 160px;height:200px;padding: 0 10px 10px 2px;text-align: center;} +.links .content.first {margin-left: 30px;} + +.contact {display:none;width: 940px;position: absolute;} +.contact .myhome { position: absolute; top:10px; left:620px; width:300px; height:266px; background: transparent url(img/myhome.gif) scroll no-repeat 0 0;} + +.siteTag {position: absolute;left: -16px;top: 109px;z-index: 10;width: 65px;height: 46px;padding:0;margin:0 10px 0 0; + vertical-align:middle;border:0 none;background: transparent url(img/siteTag.png) scroll no-repeat 0 0;} +.siteTag.tag_zTreeInfo {background-position: 0 0} +.siteTag.tag_license {background-position: 0 -46px} +.siteTag.tag_donate {background-position: 0 -92px} +.siteTag.tag_contact {background-position: 0 -138px} + +.apiContent {width: 940px;} +.apiContent .right {float: right;padding-right: 100px;} +.apiContent .left {float: left;padding-right: 20px;border-right: 1px dotted silver;} +.api_setting {position: relative;margin:20px 0 20px 20px;} +.api_function {position: relative;margin:20px 0 20px 30px;padding-right: 10px;} +.api_content_title {text-align: center;font-weight: bold;} + +.demoContent {width: 940px;} +.demoContent .right {float: right;padding: 20px;width: 600px;} +.demoContent .left {float: left;padding: 20px;} +.demoContent iframe {width:600px;min-height: 530px;} + +.faqContent {width: 940px;} +.faqContent .right {float: right;padding: 20px;width: 600px;} +.faqContent .left {float: left;padding: 20px;} +.faqContent iframe {width:600px;min-height: 300px;} + +.baby_overlay_tmp {position: absolute;top:0; left:-5000px;display:block;visibility: hidden;width:640px;font-size:11px;} +.baby_overlay_tmp .details {padding: 20px;} +.baby_overlay {display:none;position:absolute;z-index:99;left:0; top:0;width:640px;color:#fff;font-size:11px;} +.baby_overlay .content {width:100%; height:100px;overflow: hidden;background: transparent url(img/overlay_bg.png) scroll repeat 0 0;} +.baby_overlay .details {padding:0 20px 20px 20px;} +.baby_overlay .close {background-image:url(img/close.png);position:absolute; right:5px; top:5px;cursor:pointer;height:36px;width:36px;} +.baby_overlay_arrow {background-image:url(img/overlay_arrow.png);background-position:0 0;position:absolute;height:40px;width:40px;left: -40px;} +.baby_overlay_arrow.reverse {background-position:0 -40px;} + +/* Footer */ +.footer {position: relative;min-width: 1000px;font: 14px/24px arial, helvetica, sans-serif;} +.footer ul {position:absolute;left: 0px;border:1px solid #393939;background:#262626;padding:12px 0px;line-height: 18px;display: none;list-style: none;} +.footer ul li a {display:block;padding: 2px 15px;color: #9c9c9c;text-indent: 0;} +.footer ul li a:hover {text-decoration:none;color: #fff;} +.footer-logo {position:absolute;margin: 10px 0 0 30px;width:122px; height:24px;top:0; left:0;background: transparent url(img/footer-logo.png) no-repeat 0 0;} +.footer_mii {position: absolute;right: 558px;top: 8px;z-index: 10;padding: 4px 0;} +.footer_mii a {font-size:10px;color:#649140} +.footer_mii a:hover {color:#B6D76F} +.footer_siteMap {position: absolute;right: 358px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;} +.footer_siteMap .footer_siteMap_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_siteMap.gif) no-repeat 0 0;} +.footer_siteMap ul {top:-202px;width:180px;} +.footer_siteMap:hover ul {left: 0} +.footer_contact {position: absolute;right: 193px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;} +.footer_contact .footer_contact_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_contact.gif) no-repeat 0px 0px;} +.footer_contact ul {top:-113px;width:153px;} +.footer_contact:hover ul {left: 0} +.footer_download {position: absolute;right: 60px;top: 8px;width: 123px;z-index: 10;padding: 4px 0;} +.footer_download .footer_download_header {width:123px;text-indent: -9999px;background: transparent url(img/footer_download.png) no-repeat 0px 0px;} +.footer_download ul {top:-113px;width:140px;} +.footer_download:hover ul {left: 0} + +/* button icon */ +button {vertical-align:middle;border:0 none;background: transparent no-repeat 0 0 scroll;} + +.shortcuts button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/menuIcon.png)} +.shortcuts button.home {background-position: 0 0} +.shortcuts button.demo {background-position: 0 -24px} +.shortcuts button.api {background-position: 0 -48px} +.shortcuts button.faq {background-position: 0 -72px} +.shortcuts button.donate {background-position: 0 -144px} +.shortcuts button.download {background-position: 0 -96px} +.shortcuts button.face {background-position: 0 -120px} +.shortcuts button.cn {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/chinese.png)} +.shortcuts button.en {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/english.png)} + +.content button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;} + +.content button.ico16 {width:16px; height:16px;padding:0; margin:0 5px 0 0;background-image:url("img/apiMenu.png");} +button.z_core {margin-top: -4px;background-position:0 0;} +button.z_check {margin-top: -4px;background-position:0 -16px;} +button.z_edit {margin-top: -4px;background-position:0 -32px;} +button.z_hide {margin-top: -4px;background-position:0 -64px;} +button.z_search {margin-top: -4px;background-position:0 -48px;} +button.searchPrev {margin-top: -4px;background-position:-16px 0;cursor:pointer} +button.searchNext {margin-top: -4px;background-position:-16px -16px;cursor:pointer} +button.searchPrev.disabled {margin-top: -4px;background-position:-16px -32px;cursor:auto} +button.searchNext.disabled {margin-top: -4px;background-position:-16px -48px;cursor:auto} +input.search {margin:0;padding:2px 0; border:0;} +input.searchKey {width:150px;} +input.searchResult {margin-left:-3px;width:65px;text-align:right;background-color:white;color:#707070} +input.searchResult.noResult {background-color:#ff6666;color:black} +.baby_overlay div.overlaySearch {text-align:right;padding-right:50px;padding-top:12px;} + +/* api overlay*/ +.apiDetail .topLine {border-top: 1px dashed #376B29;margin-top: 5px;padding-top: 5px;} +.apiDetail .highlight_red {color:#A60000;} +.apiDetail .highlight_green {color:#A7F43D;} +.apiDetail h1, .apiDetail h2, .apiDetail h3, .apiDetail h4, .apiDetail h5, .apiDetail h6 {color: white;padding: 0;} +.apiDetail h2 {color: #A7F43D;margin: 5px auto;padding: 5px;font-size: 20px;} +.apiDetail h2 span {font-size: 14px;float: right;font-weight: normal;margin: 2px 20px 0 0;vertical-align: bottom;} +.apiDetail h2 span.path {float: left;margin: 2px 0 0 0;vertical-align: bottom;} +.apiDetail h3 {margin: 5px auto;padding: 5px;font-size: 14px;font-weight: normal;} +.apiDetail h3 span.h3_info {margin-left: 20px;font-size: 12px;} +.apiDetail h4 {margin: 0 auto;padding: 0 5px;font-size: 12px;font-weight: normal;line-height: 16px;} +.apiDetail .desc h4 {color: black;} +.apiDetail h4 b{width: 150px;display:inline-block;} +.apiDetail h4 span{width: 230px;display:inline-block;} + +.apiDetail pre, .apiDetail .desc {background: #E8FCD6;color: black;margin: 10px;padding: 10px;display: block;} +.apiDetail pre {word-wrap: break-word;} +.apiDetail p{margin-left: 5px;padding: 0;} +.apiDetail .longdesc {margin-top: 5px;} +.apiDetail .longdesc p{font-size: 12px;line-height:1.5;margin:3px 0;} +.apiDetail .longdesc b{font-size: 14px;} +.apiDetail table {border-collapse:collapse;} +.apiDetail table td {border:1px solid silver;text-align: center;vertical-align: middle;} +.apiDetail table thead td {font-weight: bold} + +.apiDetail button {width:16px; height:16px; vertical-align:middle; border:0 none; cursor: pointer; + background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; + background-image:url("zTreeStyle/img/zTreeStandard.png");} + +.apiDetail button.chk {width:13px; height:13px; margin:0 3px 2px 0; cursor: auto} +.apiDetail button.chk.checkbox_false_full {background-position:0 0} +.apiDetail button.chk.checkbox_false_full_focus {background-position:0 -14px} +.apiDetail button.chk.checkbox_false_part {background-position:0 -28px} +.apiDetail button.chk.checkbox_false_part_focus {background-position:0 -42px} +.apiDetail button.chk.checkbox_true_full {background-position:-14px 0} +.apiDetail button.chk.checkbox_true_full_focus {background-position:-14px -14px} +.apiDetail button.chk.checkbox_true_part {background-position:-14px -28px} +.apiDetail button.chk.checkbox_true_part_focus {background-position:-14px -42px} +.apiDetail button.chk.radio_false_full {background-position:-28px 0} +.apiDetail button.chk.radio_false_full_focus {background-position:-28px -14px} +.apiDetail button.chk.radio_false_part {background-position:-28px -28px} +.apiDetail button.chk.radio_false_part_focus {background-position:-28px -42px} +.apiDetail button.chk.radio_true_full {background-position:-42px 0} +.apiDetail button.chk.radio_true_full_focus {background-position:-42px -14px} +.apiDetail button.chk.radio_true_part {background-position:-42px -28px} +.apiDetail button.chk.radio_true_part_focus {background-position:-42px -42px} \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/common_ie6.css b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/common_ie6.css new file mode 100644 index 0000000000000000000000000000000000000000..aacaf59cddbd677c701e7937e1e1c629f3997a30 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/common_ie6.css @@ -0,0 +1,23 @@ +* html{ +/* background-image:url(about:blank);*/ + background-attachment:fixed; +} +html pre {word-wrap: break-word} +.header {background-image: none;background-color: #F0F6E4;} + +.ieSuggest {display:block;} +.shortcuts button.cn {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/chinese.png');background-image: none;} +.shortcuts button.en {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/english.png');background-image: none;} + +.light-bulb {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/lightbulb.png');background-image: none;} +.contentBox {background-image: none;background-color: #F0F6E4;} +.zTreeInfo {background-image: none;background-color: #F0F6E4;} + +.content button.ico16 {*background-image:url("img/apiMenu.gif")} +.siteTag {background-image: none;} +.apiContent .right {float: right;padding-right: 50px;} + +div.baby_overlay {background-color: #3C6E31;background-image:none;color:#fff;} +div.baby_overlay .close {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/overlay_close_IE6.gif');background-image: none;} +.baby_overlay_arrow {background-image:url(img/overlay_arrow.gif);} +.apiDetail button {background-image:url("img/zTreeStandard.gif")} \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/apiMenu.gif b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/apiMenu.gif new file mode 100644 index 0000000000000000000000000000000000000000..066fc8e4d323888e61319185945c31dad3643ec5 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/apiMenu.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/apiMenu.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/apiMenu.png new file mode 100644 index 0000000000000000000000000000000000000000..9acec5057306867f42393ce18d9166d13d152633 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/apiMenu.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/background.jpg b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/background.jpg new file mode 100644 index 0000000000000000000000000000000000000000..003375ff46b1eb2e9e4bfff5fd76f12630a628b7 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/background.jpg differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/chinese.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/chinese.png new file mode 100644 index 0000000000000000000000000000000000000000..d3b57fc12cb718404a1116cf5f1e414bd10b2ce4 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/chinese.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/close.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/close.png new file mode 100644 index 0000000000000000000000000000000000000000..69e41e386cd4c674fce9de50565652114773c917 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/close.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/contact-bg.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/contact-bg.png new file mode 100644 index 0000000000000000000000000000000000000000..a3d7a5f16c47f8ffe87637e20d1b681d77b3b649 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/contact-bg.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/english.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/english.png new file mode 100644 index 0000000000000000000000000000000000000000..2ad2d7d5e8be30fb1677f22284abe0fb0d0d29d0 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/english.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/header-bg.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/header-bg.png new file mode 100644 index 0000000000000000000000000000000000000000..a2baacf2a8a302de4575a88a04e98f98546f30a3 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/header-bg.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/lightbulb.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/lightbulb.png new file mode 100644 index 0000000000000000000000000000000000000000..c99357a35221d96943f4bf05354611e4c398ac9a Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/lightbulb.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_arrow.gif b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_arrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..e7c3e6d46e470b6d6e02efcae4944fb41f28ce72 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_arrow.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_arrow.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..d790a1151ba2a62bcb3eeba22963a37b50f7c80d Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_arrow.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_bg.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..5f81ee69d530a8760630eccb3771f5f15091e9dd Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_bg.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_close_IE6.gif b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_close_IE6.gif new file mode 100644 index 0000000000000000000000000000000000000000..42cb8d83498f922fb6005864738917cab2eeb66c Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/overlay_close_IE6.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/zTreeStandard.gif b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/zTreeStandard.gif new file mode 100644 index 0000000000000000000000000000000000000000..3f69a5b1d370c02c65395f6a91f46b94cfeae7d9 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/zTreeStandard.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/zTreeStandard.png b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/zTreeStandard.png new file mode 100644 index 0000000000000000000000000000000000000000..33c9e8441e33300cbf10b56b065a4b8fcc997841 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/img/zTreeStandard.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/jquery-1.6.2.min.js b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/jquery-1.6.2.min.js new file mode 100644 index 0000000000000000000000000000000000000000..8cdc80eb85d8d90e4cd1dd32059e5c6c63fdf5e5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/jquery-1.6.2.min.js @@ -0,0 +1,18 @@ +/*! + * jQuery JavaScript Library v1.6.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Jun 30 14:16:56 2011 -0400 + */ +(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
                    a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
                    ",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
                    t
                    ",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. +shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

                    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
                    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
                    ","
                    "],thead:[1,"","
                    "],tr:[2,"","
                    "],td:[3,"","
                    "],col:[2,"","
                    "],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
                    ","
                    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j +)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
                    ").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
                    ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/jquery.ztree.core.js b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/jquery.ztree.core.js new file mode 100644 index 0000000000000000000000000000000000000000..6887da99302fb4f47b5613259498fb0941c99566 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/apiCss/jquery.ztree.core.js @@ -0,0 +1 @@ +!function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),data.nodeChildren(e,t,[]),t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(d){var e=d.treeObj,t=consts.event;e.bind(t.NODECREATED,function(e,t,n){tools.apply(d.callback.onNodeCreated,[e,t,n])}),e.bind(t.CLICK,function(e,t,n,o,a){tools.apply(d.callback.onClick,[t,n,o,a])}),e.bind(t.EXPAND,function(e,t,n){tools.apply(d.callback.onExpand,[e,t,n])}),e.bind(t.COLLAPSE,function(e,t,n){tools.apply(d.callback.onCollapse,[e,t,n])}),e.bind(t.ASYNC_SUCCESS,function(e,t,n,o){tools.apply(d.callback.onAsyncSuccess,[e,t,n,o])}),e.bind(t.ASYNC_ERROR,function(e,t,n,o,a,r){tools.apply(d.callback.onAsyncError,[e,t,n,o,a,r])}),e.bind(t.REMOVE,function(e,t,n){tools.apply(d.callback.onRemove,[e,t,n])}),e.bind(t.SELECTED,function(e,t,n){tools.apply(d.callback.onSelected,[t,n])}),e.bind(t.UNSELECTED,function(e,t,n){tools.apply(d.callback.onUnSelected,[t,n])})},_unbindEvent=function(e){var t=e.treeObj,n=consts.event;t.unbind(n.NODECREATED).unbind(n.CLICK).unbind(n.EXPAND).unbind(n.COLLAPSE).unbind(n.ASYNC_SUCCESS).unbind(n.ASYNC_ERROR).unbind(n.REMOVE).unbind(n.SELECTED).unbind(n.UNSELECTED)},_eventProxy=function(e){var t=e.target,n=data.getSetting(e.data.treeId),o="",a=null,r="",d="",i=null,s=null,l=null;if(tools.eqs(e.type,"mousedown")?d="mousedown":tools.eqs(e.type,"mouseup")?d="mouseup":tools.eqs(e.type,"contextmenu")?d="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(o=tools.getNodeMainDom(t).id,r="switchNode"):(l=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(o=tools.getNodeMainDom(l).id,r="clickNode"):tools.eqs(e.type,"dblclick")&&(d="dblclick",(l=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(o=tools.getNodeMainDom(l).id,r="switchNode")),0=r.length&&(n=-1):(r=data.nodeChildren(e,t,[]),n=-1),0=u.length-n.length)&&(a=-1);for(var p=0,f=n.length;p/g,">");e.push("",a,"")},makeDOMNodeLine:function(e,t,n){e.push("")},makeDOMNodeMainAfter:function(e,t,n){e.push("")},makeDOMNodeMainBefore:function(e,t,n){e.push("
                  • ")},makeDOMNodeNameAfter:function(e,t,n){e.push("")},makeDOMNodeNameBefore:function(e,t,n){var o=data.nodeTitle(t,n),a=view.makeNodeUrl(t,n),r=view.makeNodeFontCss(t,n),d=[];for(var i in r)d.push(i,":",r[i],";");e.push("/g,">"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var n=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return n&&"function"!=typeof n?n:{}},makeNodeIcoClass:function(e,t){var n=["ico"];if(!t.isAjaxing){var o=data.nodeIsParent(e,t);n[0]=(t.iconSkin?t.iconSkin+"_":"")+n[0],o?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU)}return consts.className.BUTTON+" "+n.join("_")},makeNodeIcoStyle:function(e,t){var n=[];if(!t.isAjaxing){var o=data.nodeIsParent(e,t)&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t[e.data.key.icon];o&&n.push("background:url(",o,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("display:none;")}return n.join("")},makeNodeLineClass:function(e,t){var n=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?n.push(consts.line.ROOT):0==t.level&&t.isFirstNode?n.push(consts.line.ROOTS):t.isLastNode?n.push(consts.line.BOTTOM):n.push(consts.line.CENTER):n.push(consts.line.NOLINE),data.nodeIsParent(e,t)?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+n.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var n=e.data.key.url;return t[n]?t[n]:null},makeUlHtml:function(e,t,n,o){n.push("
                      "),n.push(o),n.push("
                    ")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var n=data.nodeChildren(e,t);if(n){for(var o=0,a=n.length;on.bottom||o.right>n.right||o.left +
                    +

                    JSON$.fn.zTree._z

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree v3.x 内部的全部方法都可以通过 $.fn.zTree._z 进行调用,开放出来是为了更便于大家开发制作自己的 zTree 插件。

                    +

                    如无特殊需求请勿使用此对象,以及修改此对象内部的各个函数。

                    +
                    +
                    +
                    +
                  • \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.destroy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.destroy.html new file mode 100644 index 0000000000000000000000000000000000000000..71058076ed79dcbc69f549392210d52560b73d88 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.destroy.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Function(treeId)$.fn.zTree.destroy

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    从 zTree v3.4 开始提供销毁 zTree 的方法。

                    +

                    1、用此方法可以销毁指定 treeId 的 zTree,也可以销毁当前页面全部的 zTree。

                    +

                    2、销毁指定 treeId 的 zTree 也可以使用 zTreeObj.destroy() 方法。

                    +

                    3、重新使用已经被销毁的树,必须要使用 init 方法进行初始化。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    zTree 的 DOM 容器的 id

                    +

                    省略 treeId,表示销毁当前页面全部的 zTree

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 销毁 id 为 "treeDemo" 的 zTree

                    +
                    $.fn.zTree.destroy("treeDemo");
                    +

                    2. 销毁全部 的 zTree

                    +
                    $.fn.zTree.destroy();
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.getZTreeObj.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.getZTreeObj.html new file mode 100644 index 0000000000000000000000000000000000000000..b1d1db40453c9ea046327017a3ffdca780068c0e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.getZTreeObj.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Function(treeId)$.fn.zTree.getZTreeObj

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree v3.x 专门提供的根据 treeId 获取 zTree 对象的方法。

                    +

                    必须在初始化 zTree 以后才可以使用此方法。

                    +

                    有了这个方法,用户不再需要自己设定全局变量来保存 zTree 初始化后得到的对象了,而且在所有回调函数中全都会返回 treeId 属性,用户可以随时使用此方法获取需要进行操作的 zTree 对象

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    zTree 的 DOM 容器的 id

                    +

                    返回值JSON

                    +

                    zTree 对象,提供操作 zTree 的各种方法,对于通过 js 操作 zTree 来说必须通过此对象

                    +
                    +

                    function 举例

                    +

                    1. 获取 id 为 tree 的 zTree 对象

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.init.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.init.html new file mode 100644 index 0000000000000000000000000000000000000000..61da41a0db3de95a8f0c1ed8be5b7eace3dce6f2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/fn.zTree.init.html @@ -0,0 +1,74 @@ +
                    +
                    +

                    Function(obj, zSetting, zNodes)$.fn.zTree.init

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 初始化方法,创建 zTree 必须使用此方法

                    +

                    1、页面需要进行 W3C 申明,例如:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">。

                    +

                    2、需要首先加载 jquery-1.4.2.js 或其他更高版本的 jQuery 。

                    +

                    3、需要加载 jquery-ztree.core-3.0.js,如果需要用到 编辑功能 或 checkbox / radio 还需要分别加载 jquery-ztree.exedit-3.0.js 和 jquery-ztree.excheck-3.0.js 。

                    +

                    4、需要加载 zTreeStyle.css 以及 zTreeStyle 目录下的 img 文件。

                    +

                    5、如果需要使用自定义图标请参考相应的Demo。

                    +

                    6、请注意设置 zTree 的容器样式 class="ztree",其中 "ztree" 这个 className,可以根据需要随意修改,别忘了修改 css 中对应名字就是了,对于容器如果需要增加其他特殊样式,可根据自己的需要进行修改。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    objjQuery Object

                    +

                    用于展现 zTree 的 DOM 容器

                    +

                    zSettingJSON

                    +

                    zTree 的配置数据,具体请参考 “setting 配置详解”中的各个属性详细说明

                    +

                    zNodesArray(JSON) / JSON

                    +

                    zTree 的节点数据,具体请参考 “treeNode 节点数据详解”中的各个属性详细说明

                    +

                    1、v3.x 支持单独添加一个节点,即如果只新增一个节点,不用必须包在数组中

                    +

                    2、如果需要异步加载根节点,可以设置为 null 或 [ ]

                    +

                    3、使用简单数据模式,请参考 setting.data.simpleData 内的属性说明

                    +

                    返回值JSON

                    +

                    zTree 对象,提供操作 zTree 的各种方法,对于通过 js 操作 zTree 来说必须通过此对象

                    +

                    如果不需要自行设定全局变量保存,可以利用 $.fn.zTree.getZTreeObj 方法随时获取

                    +
                    +

                    setting & function 举例

                    +

                    1. 简单创建 zTree 演示

                    +
                    <!DOCTYPE html>
                    +<HTML>
                    + <HEAD>
                    +  <TITLE> ZTREE DEMO </TITLE>
                    +  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
                    +  <link rel="stylesheet" href="zTreeStyle/zTreeStyle.css" type="text/css">
                    +  <script type="text/javascript" src="jquery-1.4.2.js"></script>
                    +  <script type="text/javascript" src="jquery.ztree.core.js"></script>
                    +<!--
                    +  <script type="text/javascript" src="jquery.ztree.excheck.js"></script>
                    +  <script type="text/javascript" src="jquery.ztree.exedit.js"></script>
                    +-->
                    +  <SCRIPT type="text/javascript" >
                    +	var zTreeObj,
                    +	setting = {
                    +		view: {
                    +			selectedMulti: false
                    +		}
                    +	},
                    +	zTreeNodes = [
                    +		{"name":"网站导航", open:true, children: [
                    +			{ "name":"google", "url":"http://g.cn", "target":"_blank"},
                    +			{ "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
                    +			{ "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
                    +			]
                    +		}
                    +	];
                    +
                    +	$(document).ready(function(){
                    +		zTreeObj = $.fn.zTree.init($("#tree"), setting, zTreeNodes);
                    +
                    +	});
                    +  </SCRIPT>
                    + </HEAD>
                    +
                    +<BODY>
                    +<ul id="tree" class="ztree" style="width:230px; overflow:auto;"></ul>
                    + </BODY>
                    +</HTML>
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.autoParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.autoParam.html new file mode 100644 index 0000000000000000000000000000000000000000..6ce1dd725eee77e0213b82ac1d0d55f4d3cf3534 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.autoParam.html @@ -0,0 +1,49 @@ +
                    +
                    +

                    Array(String) / Function(treeId, treeNode)setting.async.autoParam

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    异步加载时需要自动提交父节点属性的参数。[setting.async.enable = true 时生效]

                    +

                    默认值:[ ]

                    +
                    +
                    +

                    Array(String) 格式说明

                    +
                    +

                    1、将需要作为参数提交的属性名称,制作成 Array 即可,例如:["id", "name"]

                    +

                    2、可以设置提交时的参数名称,例如 server 只接受 zId : ["id=zId"]

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要异步加载子节点的的父节点 JSON 数据对象

                    +

                    针对根进行异步加载时,treeNode = null

                    +

                    返回值Array(String)

                    +

                    返回值同 Array(String) 格式的数据

                    +
                    +

                    setting 举例

                    +

                    1. 设置 id 属性为自动提交的参数

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id"]
                    +	}
                    +};
                    +假设 异步加载 父节点(node = {id:1, name:"test"}) 的子节点时,将提交参数 id=1
                    +......
                    +

                    2. 设置 id 属性作为 zId 成为自动提交的参数

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id=zId"]
                    +	}
                    +};
                    +假设 对父节点 node = {id:1, name:"test"},进行异步加载时,将提交参数 zId=1
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.contentType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.contentType.html new file mode 100644 index 0000000000000000000000000000000000000000..db0c92feca78df4931f743ef93d52b36c2240fe2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.contentType.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Stringsetting.async.contentType

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    Ajax 提交参数的数据类型。[setting.async.enable = true 时生效]

                    +

                    默认值:"application/x-www-form-urlencoded"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    contentType = "application/x-www-form-urlencoded" 可以满足绝大部分请求,按照标准的 Form 格式提交参数

                    +

                    contentType = "application/json" 可以满足 .Net 的编程需要,按照 JSON 格式提交参数

                    +
                    +

                    setting 举例

                    +

                    1. 设置 Ajax 提交参数的数据类型为 JSON 格式

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		contentType: "application/json",
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.dataFilter.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.dataFilter.html new file mode 100644 index 0000000000000000000000000000000000000000..f174bf0fd4c56037c48958179974bfa8854396cd --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.dataFilter.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Function(treeId, parentNode, responseData)setting.async.dataFilter

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于对 Ajax 返回数据进行预处理的函数。[setting.async.enable = true 时生效]

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    parentNodeJSON

                    +

                    进行异步加载的父节点 JSON 数据对象

                    +

                    对根进行异步加载时,parentNode = null

                    +

                    responseDataArray(JSON) / JSON / String

                    +

                    异步加载获取到的数据转换后的 Array(JSON) / JSON / String 数据对象

                    +

                    v3.4开始 支持 XML 数据格式的 String

                    +

                    返回值Array(JSON) / JSON

                    +

                    返回值是 zTree 支持的JSON 数据结构即可。

                    +

                    v3.x 支持单个 JSON 节点数据进行加载

                    +
                    +

                    setting & function 举例

                    +

                    1. 修改异步获取到的节点name属性

                    +
                    function ajaxDataFilter(treeId, parentNode, responseData) {
                    +    if (responseData) {
                    +      for(var i =0; i < responseData.length; i++) {
                    +        responseData[i].name += "_filter";
                    +      }
                    +    }
                    +    return responseData;
                    +};
                    +var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		dataFilter: ajaxDataFilter
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.dataType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.dataType.html new file mode 100644 index 0000000000000000000000000000000000000000..6d639b7077d53bb44e815e85d6e1a982d684c01e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.dataType.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Stringsetting.async.dataType

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    Ajax 获取的数据类型。[setting.async.enable = true 时生效]

                    +

                    默认值:"text"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    dataType = "text" 可以满足绝大部分请求

                    +

                    其余 dataType 类型请参考 jQuery ajax 中的 dataType 参数

                    +
                    +

                    setting 举例

                    +

                    1. 设置 Ajax 获取的数据类型为 纯文本

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		dataType: "text",
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..9079ae1014de149ab36c68a38a7d78a0e2a777a5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.enable.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Booleansetting.async.enable

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 是否开启异步加载模式

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示 开启 异步加载模式

                    +

                    false 表示 关闭 异步加载模式

                    +

                    如果设置为 true,请务必设置 setting.async 内的其它参数。

                    +

                    如果需要根节点也异步加载,初始化时 treeNodes 参数设置为 null 即可。

                    +
                    +

                    setting 举例

                    +

                    1. 需要开启异步加载模式

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.headers.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.headers.html new file mode 100644 index 0000000000000000000000000000000000000000..222b9f85ec78954b4350ab1b14070e746f7dd376 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.headers.html @@ -0,0 +1,18 @@ +
                    +
                    +

                    Objectsetting.async.headers

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    [setting.async.enable = true 时生效]

                    +

                    默认值:"{}"

                    +

                    v3.5.36+

                    +
                    +
                    +

                    Object 格式说明

                    +
                    +

                    请参考 jQuery ajax 中的 headers 参数

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.otherParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.otherParam.html new file mode 100644 index 0000000000000000000000000000000000000000..bfb44c272efe4008470a67772649571971c586ef --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.otherParam.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    Array(String) / JSON / Function(treeId, treeNode)setting.async.otherParam

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    Ajax 请求提交的静态参数键值对。[setting.async.enable = true 时生效]

                    +

                    默认值:[ ]

                    +
                    +
                    +

                    Array(String) 格式说明

                    +
                    +

                    可以为空[ ],如果有 key,则必须存在 value。 例如:[key, value]

                    +
                    +

                    JSON 格式说明

                    +
                    +

                    直接用 JSON 格式制作键值对,例如:{ key1:value1, key2:value2 }

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要异步加载子节点的的父节点 JSON 数据对象

                    +

                    针对根进行异步加载时,treeNode = null

                    +

                    返回值Array(String) || JSON

                    +

                    返回值同 Array(String) || JSON 格式的数据

                    +
                    +

                    setting 举例

                    +

                    1. 设置 Array(String) 格式的参数

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		otherParam: ["id", "1", "name", "test"]
                    +	}
                    +};
                    +进行异步加载时,将提交参数 id=1&name=test
                    +

                    2. 设置 JSON 格式的参数

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		otherParam: { "id":"1", "name":"test"}
                    +	}
                    +};
                    +进行异步加载时,将提交参数 id=1&name=test
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.type.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.type.html new file mode 100644 index 0000000000000000000000000000000000000000..20d9a6b8cb5b98ac48e2cc3d0e4ed9200310323d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.type.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Stringsetting.async.type

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    Ajax 的 http 请求模式。[setting.async.enable = true 时生效]

                    +

                    默认值:"post"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    type = "post" 表示异步加载采用 post 方法请求

                    +

                    type = "get" 表示异步加载采用 get 方法请求

                    +

                    对应于 jQuery ajax 中的 type 参数

                    +
                    +

                    setting 举例

                    +

                    1. 设置使用 get 方式请求数据

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		type: "get",
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.url.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.url.html new file mode 100644 index 0000000000000000000000000000000000000000..a5209afada15c8d9e30eba76ebdc886e9d2d685b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.url.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    String / Function(treeId, treeNode)setting.async.url

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    Ajax 获取数据的 URL 地址。[setting.async.enable = true 时生效]

                    +

                    默认值:""

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    设置固定的异步加载 url 字符串,请注意地址的路径,确保页面能正常加载

                    +

                    url 内也可以带参数,这些参数就只能是通过 get 方式提交了,并且请注意进行转码

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要异步加载子节点的的父节点 JSON 数据对象

                    +

                    针对根进行异步加载时,treeNode = null

                    +

                    返回值String

                    +

                    返回值同 String 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置异步获取节点的 URL 为 nodes.php

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "nodes.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +

                    2. 设置异步获取节点的 URL 为 function 动态获取

                    +
                    function getAsyncUrl(treeId, treeNode) {
                    +    return treeNode.isParent ? "nodes1.php" : "nodes2.php";
                    +};
                    +var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: getAsyncUrl,
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.xhrFields.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.xhrFields.html new file mode 100644 index 0000000000000000000000000000000000000000..ed2079e614024acda6fa38539c1d6d0fa6e5bdf9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.async.xhrFields.html @@ -0,0 +1,18 @@ +
                    +
                    +

                    Objectsetting.async.xhrFields

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    [setting.async.enable = true 时生效]

                    +

                    默认值:"{}"

                    +

                    v3.5.36+

                    +
                    +
                    +

                    Object 格式说明

                    +
                    +

                    请参考 jQuery ajax 中的 xhrFields 参数

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeAsync.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeAsync.html new file mode 100644 index 0000000000000000000000000000000000000000..70ba0fc4619b199875058ac520eb202608c8de03 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeAsync.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeAsync

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获异步加载之前的事件回调函数,zTree 根据返回值确定是否允许进行异步加载

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    进行异步加载的父节点 JSON 数据对象

                    +

                    针对根进行异步加载时,treeNode = null

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将不进行异步加载,也无法触发 onAsyncSuccess / onAsyncError 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止 id 为 1 的父节点进行异步加载操作

                    +
                    function zTreeBeforeAsync(treeId, treeNode) {
                    +    return (treeNode.id !== 1);
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeAsync: zTreeBeforeAsync
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..a0e1f42fc3603e593c2a48aeb18bdd13a04bc437 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeCheck.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeCheck

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获 勾选 或 取消勾选 之前的事件回调函数,并且根据返回值确定是否允许 勾选 或 取消勾选

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    进行 勾选 或 取消勾选 的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,将不会改变勾选状态,并且无法触发 onCheck 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止所有勾选操作,保持初始化的勾选状态

                    +
                    function zTreeBeforeCheck(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeCheck: zTreeBeforeCheck
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeClick.html new file mode 100644 index 0000000000000000000000000000000000000000..6efe92868c848233dcf577cdf3dcab9b050252ee --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeClick.html @@ -0,0 +1,49 @@ +
                    +
                    +

                    Function(treeId, treeNode, clickFlag)setting.callback.beforeClick

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获单击节点之前的事件回调函数,并且根据返回值确定是否允许单击操作

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    被单击的节点 JSON 数据对象

                    +

                    clickFlagNumber

                    +

                    节点被点击后的选中操作类型,详细看下表

                    + + + + + + + + + + + + +
                    clickFlagselectedMultiautoCancelSelected
                    &&
                    event.ctrlKey / metaKey
                    isSelected选中操作
                    1truefalsefalse普通选中
                    1truefalsetrue普通选中
                    2truetruefalse追加选中
                    0truetruetrue取消选中
                    1falsefalsefalse普通选中
                    1falsefalsetrue普通选中
                    1falsetruefalse普通选中
                    0falsetruetrue取消选中
                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将不会选中节点,也无法触发 onClick 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止节点被选中

                    +
                    function zTreeBeforeClick(treeId, treeNode, clickFlag) {
                    +    return (treeNode.id !== 1);
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeClick: zTreeBeforeClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeCollapse.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeCollapse.html new file mode 100644 index 0000000000000000000000000000000000000000..d778e9c8975bf74b4b03a463191b45a4c3074b40 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeCollapse.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeCollapse

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获父节点折叠之前的事件回调函数,并且根据返回值确定是否允许折叠操作

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    要折叠的父节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将不会折叠节点,也无法触发 onCollapse 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止所有已展开的父节点折叠

                    +
                    function zTreeBeforeCollapse(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeCollapse: zTreeBeforeCollapse
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDblClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDblClick.html new file mode 100644 index 0000000000000000000000000000000000000000..ed7e4dc21c123b08548e7ba0783157d4cbc64573 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDblClick.html @@ -0,0 +1,36 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeDblClick

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标双击之前的事件回调函数,并且根据返回值确定触发 onDblClick 事件回调函数

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标双击时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,将仅仅无法触发 onDblClick 事件回调函数,对其他操作无任何影响

                    +

                    此事件回调函数对双击节点展开功能无任何影响,如果需要设置请参考 setting.view.dblClickExpand 属性

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止 onDblClick 事件

                    +
                    function zTreeBeforeDblClick(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeDblClick: zTreeBeforeDblClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDrag.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDrag.html new file mode 100644 index 0000000000000000000000000000000000000000..1e783a3cb5eac296600788f3f6736af752da7098 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDrag.html @@ -0,0 +1,39 @@ +
                    +
                    +

                    Function(treeId, treeNodes)setting.callback.beforeDrag

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点被拖拽之前的事件回调函数,并且根据返回值确定是否允许开启拖拽操作

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    被拖拽的节点 treeNodes 所在 zTree 的 treeId,便于用户操控

                    +

                    treeNodesArray(JSON)

                    +

                    要被拖拽的节点 JSON 数据集合

                    +

                    v3.x 允许多个同级节点同时被拖拽,因此将此参数修改为 Array(JSON)

                    +

                    如果拖拽时多个被选择的节点不是同级关系,则只能拖拽鼠标当前所在位置的节点

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将终止拖拽,也无法触发 onDrag / beforeDrop / onDrop 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止全部拖拽操作

                    +
                    function zTreeBeforeDrag(treeId, treeNodes) {
                    +    return false;
                    +};
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeDrag: zTreeBeforeDrag
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDragOpen.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDragOpen.html new file mode 100644 index 0000000000000000000000000000000000000000..ceab2d3429abc4ba4b29199503298b38ba2c9521 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDragOpen.html @@ -0,0 +1,37 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeDragOpen

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获拖拽节点移动到折叠状态的父节点后,即将自动展开该父节点之前的事件回调函数,并且根据返回值确定是否允许自动展开操作

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    需要被展开的父节点 treeNode 所在 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    要被自动展开的父节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将无法进行自动展开操作

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止全部拖拽时的自动展开操作

                    +
                    function zTreeBeforeDragOpen(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeDragOpen: zTreeBeforeDragOpen
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDrop.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDrop.html new file mode 100644 index 0000000000000000000000000000000000000000..41237434dea94705eeccd22f9c8195450e43a1b4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeDrop.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    Function(treeId, treeNodes, targetNode, moveType, isCopy)setting.callback.beforeDrop

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点拖拽操作结束之前的事件回调函数,并且根据返回值确定是否允许此拖拽操作

                    +

                    默认值:null

                    +

                    如未拖拽到有效位置,则不触发此回调函数,直接将节点恢复原位置

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    目标节点 targetNode 所在 zTree 的 treeId,便于用户操控

                    +

                    treeNodesArray(JSON)

                    +

                    被拖拽的节点 JSON 数据集合

                    +

                    无论拖拽操作为 复制 还是 移动,treeNodes 都是当前被拖拽节点的数据集合。

                    +

                    targetNodeJSON

                    +

                    treeNodes 被拖拽放开的目标节点 JSON 数据对象。

                    +

                    如果拖拽成为根节点,则 targetNode = null

                    +

                    moveTypeString

                    +

                    指定移动到目标节点的相对位置

                    +

                    "inner":成为子节点,"prev":成为同级前一个节点,"next":成为同级后一个节点

                    +

                    isCopyBoolean

                    +

                    拖拽节点操作是 复制 或 移动

                    +

                    true:复制;false:移动

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将恢复被拖拽的节点,也无法触发 onDrop 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止将节点拖拽成为根节点

                    +
                    function zTreeBeforeDrop(treeId, treeNodes, targetNode, moveType) {
                    +    return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
                    +};
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeDrop: zTreeBeforeDrop
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeEditName.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeEditName.html new file mode 100644 index 0000000000000000000000000000000000000000..9df3ca2cfc5d20fd8a1caa2749b62836cd20b6c2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeEditName.html @@ -0,0 +1,38 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeEditName

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点编辑按钮的 click 事件,并且根据返回值确定是否允许进入名称编辑状态

                    +

                    此事件回调函数最主要是用于捕获编辑按钮的点击事件,然后触发自定义的编辑界面操作。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    将要进入编辑名称状态的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,节点将无法进入 zTree 默认的编辑名称状态

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止修改父节点的名称

                    +
                    function zTreeBeforeEditName(treeId, treeNode) {
                    +	return !treeNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeEditName: zTreeBeforeEditName
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeExpand.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeExpand.html new file mode 100644 index 0000000000000000000000000000000000000000..350972b74c5ca4d0ef44ba7603ff61f4b252306e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeExpand.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeExpand

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获父节点展开之前的事件回调函数,并且根据返回值确定是否允许展开操作

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    要展开的父节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将不会展开节点,也无法触发 onExpand 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止所有已折叠的父节点展开

                    +
                    function zTreeBeforeExpand(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeExpand: zTreeBeforeExpand
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeMouseDown.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeMouseDown.html new file mode 100644 index 0000000000000000000000000000000000000000..2c3f28d8a29044329a91c6c23e41a88fd9d66af1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeMouseDown.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeMouseDown

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标按键按下之前的事件回调函数,并且根据返回值确定触发 onMouseDown 事件回调函数

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标按键按下时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,将仅仅无法触发 onMouseDown 事件回调函数,对其他操作无任何影响

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止 onMouseDown 事件

                    +
                    function zTreeBeforeMouseDown(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeMouseDown: zTreeBeforeMouseDown
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeMouseUp.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeMouseUp.html new file mode 100644 index 0000000000000000000000000000000000000000..f0b01b970095ec823cc9a1cd6fa159e00a01f378 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeMouseUp.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeMouseUp

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标按键松开之前的事件回调函数,并且根据返回值确定触发 onMouseUp 事件回调函数

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标按键松开时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,将仅仅无法触发 onMouseUp 事件回调函数,对其他操作无任何影响

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止 onMouseUp 事件

                    +
                    function zTreeBeforeMouseUp(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeMouseUp: zTreeBeforeMouseUp
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRemove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRemove.html new file mode 100644 index 0000000000000000000000000000000000000000..0edb3fd0b71933b9e688762cb1c2d03edc9c4b71 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRemove.html @@ -0,0 +1,37 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeRemove

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点被删除之前的事件回调函数,并且根据返回值确定是否允许删除操作

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    将要删除的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将不删除节点,也无法触发 onRemove 事件回调函数

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止全部删除操作

                    +
                    function zTreeBeforeRemove(treeId, treeNode) {
                    +	return false;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeRemove: zTreeBeforeRemove
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRename.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRename.html new file mode 100644 index 0000000000000000000000000000000000000000..070996197f0bc7487569b5e50df440ed89727c79 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRename.html @@ -0,0 +1,46 @@ +
                    +
                    +

                    Function(treeId, treeNode, newName, isCancel)setting.callback.beforeRename

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点编辑名称结束(Input 失去焦点 或 按下 Enter 键)之后,更新节点名称数据之前的事件回调函数,并且根据返回值确定是否允许更改名称的操作

                    +

                    节点进入编辑名称状态后,按 ESC 键可以放弃当前修改,恢复原名称,取消编辑名称状态

                    +

                    从 v3.5.13 开始,取消编辑状态也会触发此回调,根据 isCancel 参数判断

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    将要更改名称的节点 JSON 数据对象

                    +

                    newNameString

                    +

                    修改后的新名称

                    +

                    isCancelBoolean

                    +

                    是否取消操作 (v3.5.13+)

                    +

                    isCancel = true 表示取消编辑操作(按下 ESC 或 使用 cancelEditName 方法)

                    +

                    isCancel = false 表示确认修改操作

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,zTree 将保持名称编辑状态,无法触发 onRename 事件回调函数,并且会导致屏蔽其它事件,直到修改名称使得 beforeRename 返回 true

                    +

                    如果返回 false,不会让 input 输入框获取焦点,避免由于警告信息而导致反复触发 beforeRename。 请在关闭提示警告信息后,利用 editName 方法让 input 重新获取焦点。

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止修改的名称的长度小于 5

                    +
                    function zTreeBeforeRename(treeId, treeNode, newName, isCancel) {
                    +	return newName.length > 5;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeRename: zTreeBeforeRename
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRightClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRightClick.html new file mode 100644 index 0000000000000000000000000000000000000000..1a5bdaa391ae4ad2072daf3ec1974f496e6c7cd7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.beforeRightClick.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeRightClick

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标右键点击之前的事件回调函数,并且根据返回值确定触发 onRightClick 事件回调函数

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标右键点击时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +

                    返回值Boolean

                    +

                    返回值是 true / false

                    +

                    如果返回 false,将仅仅无法触发 onRightClick 事件回调函数,对其他操作无任何影响

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止 onRightClick 事件

                    +
                    function zTreeBeforeRightClick(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeRightClick: zTreeBeforeRightClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onAsyncError.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onAsyncError.html new file mode 100644 index 0000000000000000000000000000000000000000..c469e113d66706b23a6842d98a56d7c0abb36b6b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onAsyncError.html @@ -0,0 +1,42 @@ +
                    +
                    +

                    setting.callback.onAsyncError

                    +

                    Function(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) 

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获异步加载出现异常错误的事件回调函数

                    +

                    如果设置了 setting.callback.beforeAsync 方法,且返回 false,将无法触发 onAsyncSuccess / onAsyncError 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    进行异步加载的父节点 JSON 数据对象

                    +

                    针对根进行异步加载时,treeNode = null

                    +

                    XMLHttpRequestString

                    +

                    标准 XMLHttpRequest 对象,请参考 JQuery API 文档。

                    +

                    textStatusString

                    +

                    请求状态:success,error,请参考 JQuery API 文档。

                    +

                    errorThrownString

                    +

                    errorThrown 只有当异常发生时才会被传递,请参考 JQuery API 文档。

                    +
                    +

                    setting & function 举例

                    +

                    1. 异步加载出现异常后,弹出错误信息

                    +
                    function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
                    +    alert(XMLHttpRequest);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onAsyncError: zTreeOnAsyncError
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onAsyncSuccess.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onAsyncSuccess.html new file mode 100644 index 0000000000000000000000000000000000000000..081e9d737ba2c98bb95564371351c0577431e83b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onAsyncSuccess.html @@ -0,0 +1,38 @@ +
                    +
                    +

                    Function(event, treeId, treeNode, msg)setting.callback.onAsyncSuccess

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获异步加载正常结束的事件回调函数

                    +

                    如果设置了 setting.callback.beforeAsync 方法,且返回 false,将无法触发 onAsyncSuccess / onAsyncError 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    进行异步加载的父节点 JSON 数据对象

                    +

                    针对根进行异步加载时,treeNode = null

                    +

                    msgString / Object

                    +

                    异步获取的节点数据字符串,主要便于用户调试使用。

                    +

                    实际数据类型会受 setting.async.dataType 的设置影响,请参考 JQuery API 文档。

                    +
                    +

                    setting & function 举例

                    +

                    1. 异步加载成功后,弹出提示信息

                    +
                    function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) {
                    +    alert(msg);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onAsyncSuccess: zTreeOnAsyncSuccess
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..113eee97078fe3da87a2d9241485493708c33415 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onCheck.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onCheck

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获 checkbox / radio 被勾选 或 取消勾选的事件回调函数

                    +

                    如果设置了 setting.callback.beforeCheck 方法,且返回 false,将无法触发 onCheck 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    被勾选 或 取消勾选的节点 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次点击 checkbox 或 radio 后, 弹出该节点的 tId、name 以及当前勾选状态的信息

                    +
                    function zTreeOnCheck(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onCheck: zTreeOnCheck
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onClick.html new file mode 100644 index 0000000000000000000000000000000000000000..1f7a2664f22fcd355f6f2da67c5405f3c7f899da --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onClick.html @@ -0,0 +1,49 @@ +
                    +
                    +

                    Function(event, treeId, treeNode, clickFlag)setting.callback.onClick

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点被点击的事件回调函数

                    +

                    如果设置了 setting.callback.beforeClick 方法,且返回 false,将无法触发 onClick 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    被点击的节点 JSON 数据对象

                    +

                    clickFlagNumber

                    +

                    节点被点击后的选中操作类型,详细看下表

                    + + + + + + + + + + + + +
                    clickFlagselectedMultiautoCancelSelected
                    &&
                    event.ctrlKey / metaKey
                    isSelected选中操作
                    1truefalsefalse普通选中
                    1truefalsetrue普通选中
                    2truetruefalse追加选中
                    0truetruetrue取消选中
                    1falsefalsefalse普通选中
                    1falsefalsetrue普通选中
                    1falsetruefalse普通选中
                    0falsetruetrue取消选中
                    +
                    +

                    setting & function 举例

                    +

                    1. 每次点击节点后, 弹出该节点的 tId、name 的信息

                    +
                    function zTreeOnClick(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onClick: zTreeOnClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onCollapse.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onCollapse.html new file mode 100644 index 0000000000000000000000000000000000000000..1c816c20b6c5c75caa756587b737c0bdf9094e85 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onCollapse.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onCollapse

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点被折叠的事件回调函数

                    +

                    如果设置了 setting.callback.beforeCollapse 方法,且返回 false,将无法触发 onCollapse 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    被折叠的节点 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次折叠节点后, 弹出该节点的 tId、name 的信息

                    +
                    function zTreeOnCollapse(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onCollapse: zTreeOnCollapse
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDblClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDblClick.html new file mode 100644 index 0000000000000000000000000000000000000000..deb8e6266b63a6c66d5993bec513ac8f0545e115 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDblClick.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onDblClick

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标双击之后的事件回调函数

                    +

                    如果设置了 setting.callback.beforeDblClick 方法,且返回 false,将无法触发 onDblClick 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标双击时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次鼠标双击后, 弹出鼠标所在节点的 tId、name 的信息

                    +
                    function zTreeOnDblClick(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDblClick: zTreeOnDblClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDrag.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDrag.html new file mode 100644 index 0000000000000000000000000000000000000000..efd115bda6dfafff661361534ea3032f5ac45a86 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDrag.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNodes)setting.callback.onDrag

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点被拖拽的事件回调函数

                    +

                    如果设置了 setting.callback.beforeDrag 方法,且返回 false,将无法触发 onDragMove 和 onDrag 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    被拖拽的节点 treeNodes 所在 zTree 的 treeId,便于用户操控

                    +

                    treeNodesArray(JSON)

                    +

                    要被拖拽的节点 JSON 数据集合

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次开始进行拖拽节点后, 弹出被拖拽节点的个数信息

                    +
                    function zTreeOnDrag(event, treeId, treeNodes) {
                    +    alert(treeNodes.length);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDrag: zTreeOnDrag
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDragMove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDragMove.html new file mode 100644 index 0000000000000000000000000000000000000000..e6a8dd9efc9a3b74cd4b857889f5f3675385c494 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDragMove.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNodes)setting.callback.onDragMove

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点被拖拽过程中移动的事件回调函数

                    +

                    主要用于捕获 zTree 节点拖拽到的 DOM,从而操作对应的 DOM。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    被拖拽的节点 treeNodes 所在 zTree 的 treeId,便于用户操控

                    +

                    treeNodesArray(JSON)

                    +

                    要被拖拽的节点 JSON 数据集合

                    +
                    +

                    setting & function 举例

                    +

                    1. 拖拽节点时,随时输出 当前拖拽到的目标 DOM

                    +
                    function zTreeOnDragMove(event, treeId, treeNodes) {
                    +    console.log(event.target);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDragMove: zTreeOnDragMove
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDrop.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDrop.html new file mode 100644 index 0000000000000000000000000000000000000000..c6773a88fdf98332a882d56e0cf96b956b843009 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onDrop.html @@ -0,0 +1,46 @@ +
                    +
                    +

                    Function(event, treeId, treeNodes, targetNode, moveType, isCopy)setting.callback.onDrop

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点拖拽操作结束的事件回调函数

                    +

                    如果设置了 setting.callback.beforeDrop 方法,且返回 false,将无法触发 onDrop 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    目标节点 targetNode 所在 zTree 的 treeId,便于用户操控

                    +

                    treeNodesArray(JSON)

                    +

                    被拖拽的节点 JSON 数据集合

                    +

                    如果拖拽操作为 移动,treeNodes 是当前被拖拽节点的数据集合。

                    +

                    如果拖拽操作为 复制,treeNodes 是复制后 clone 得到的新节点数据。

                    +

                    targetNodeJSON

                    +

                    成为 treeNodes 拖拽结束的目标节点 JSON 数据对象。

                    +

                    如果拖拽成为根节点,则 targetNode = null

                    +

                    moveTypeString

                    +

                    指定移动到目标节点的相对位置

                    +

                    "inner":成为子节点,"prev":成为同级前一个节点,"next":成为同级后一个节点

                    +

                    如果 moveType = null,表明拖拽无效

                    +

                    isCopyBoolean

                    +

                    拖拽节点操作是 复制 或 移动

                    +

                    true:复制;false:移动

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次拖拽操作结束后, 弹出该被拖拽节点的个数以及目标节点的 tId、name 的信息

                    +
                    function zTreeOnDrop(event, treeId, treeNodes, targetNode, moveType) {
                    +    alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDrop: zTreeOnDrop
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onExpand.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onExpand.html new file mode 100644 index 0000000000000000000000000000000000000000..791c5f6fc0d4f7c4439a5d6b3a84c397ec031579 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onExpand.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onExpand

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点被展开的事件回调函数

                    +

                    如果设置了 setting.callback.beforeExpand 方法,且返回 false,将无法触发 onExpand 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    被展开的节点 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次展开节点后, 弹出该节点的 tId、name 的信息

                    +
                    function zTreeOnExpand(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onExpand: zTreeOnExpand
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onMouseDown.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onMouseDown.html new file mode 100644 index 0000000000000000000000000000000000000000..bc9d0ea7b0605efcbbf9be3d467122f71e0de95d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onMouseDown.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onMouseDown

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标按键按下后的事件回调函数

                    +

                    如果设置了 setting.callback.beforeMouseDown 方法,且返回 false,将无法触发 onMouseDown 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标按键按下时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次鼠标按键按下后, 弹出鼠标所在节点的 tId、name 的信息

                    +
                    function zTreeOnMouseDown(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onMouseDown: zTreeOnMouseDown
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onMouseUp.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onMouseUp.html new file mode 100644 index 0000000000000000000000000000000000000000..a969fef9ac8157fdfb217f26f22635dde257fe14 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onMouseUp.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onMouseUp

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标按键松开后的事件回调函数

                    +

                    如果设置了 setting.callback.beforeMouseUp 方法,且返回 false,将无法触发 onMouseUp 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标按键松开时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次鼠标按键松开后, 弹出鼠标所在节点的 tId、name 的信息

                    +
                    function zTreeOnMouseUp(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onMouseUp: zTreeOnMouseUp
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onNodeCreated.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onNodeCreated.html new file mode 100644 index 0000000000000000000000000000000000000000..2ebaee63bca10adfe870263f6b8913c5de46730d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onNodeCreated.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onNodeCreated

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点生成 DOM 后的事件回调函数

                    +

                    v3.x 采用了延迟加载技术,因此对于父节点未展开的子节点来说,初始化后是不会触发此回调函数,直到其父节点被展开

                    +

                    大数据量的节点加载请注意:不设置 onNodeCreated,可以提升一部分初始化性能

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    生成 DOM 完毕的节点的 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 创建节点 DOM 后, 弹出该节点的 tId、name 的信息

                    +
                    function zTreeOnNodeCreated(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onNodeCreated: zTreeOnNodeCreated
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRemove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRemove.html new file mode 100644 index 0000000000000000000000000000000000000000..e7e625d966c0a15a3a1cd09dfb603ba74ee371b9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRemove.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onRemove

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获删除节点之后的事件回调函数。

                    +

                    如果用户设置了 beforeRemove 回调函数,并返回 false,将无法触发 onRemove 事件回调函数。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    将要删除的节点 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 删除节点时,弹出被删除的节点的 tId 以及 name 信息

                    +
                    function zTreeOnRemove(event, treeId, treeNode) {
                    +	alert(treeNode.tId + ", " + treeNode.name);
                    +}
                    +var setting = {
                    +	callback: {
                    +		onRemove: zTreeOnRemove
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRename.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRename.html new file mode 100644 index 0000000000000000000000000000000000000000..f225463feec8402905b4c90afacb7cc65f623f6f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRename.html @@ -0,0 +1,40 @@ +
                    +
                    +

                    Function(event, treeId, treeNode, isCancel)setting.callback.onRename

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于捕获节点编辑名称结束之后的事件回调函数。

                    +

                    1、节点进入编辑名称状态,并且修改节点名称后触发此回调函数。如果用户设置了 beforeRename 回调函数,并返回 false,将无法触发 onRename 事件回调函数。

                    +

                    2、如果通过直接修改 treeNode 的数据,并且利用 updateNode 方法更新,是不会触发此回调函数的。

                    +

                    3、从 v3.5.13 开始,取消编辑状态也会触发此回调,根据 isCancel 参数判断

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    被修改名称的节点 JSON 数据对象

                    +

                    isCancelBoolean

                    +

                    是否取消操作 (v3.5.13+)

                    +

                    isCancel = true 表示取消编辑操作(按下 ESC 或 使用 cancelEditName 方法)

                    +

                    isCancel = false 表示确认修改操作

                    +
                    +

                    setting & function 举例

                    +

                    1. 修改名称后,弹出被修改名称的节点的 tId 以及 name 信息

                    +
                    function zTreeOnRename(event, treeId, treeNode, isCancel) {
                    +	alert(treeNode.tId + ", " + treeNode.name);
                    +}
                    +var setting = {
                    +	callback: {
                    +		onRename: zTreeOnRename
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRightClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRightClick.html new file mode 100644 index 0000000000000000000000000000000000000000..d51c68d1cdc895c02d72e670bd48f4ebe5d23e77 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.callback.onRightClick.html @@ -0,0 +1,36 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onRightClick

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于捕获 zTree 上鼠标右键点击之后的事件回调函数

                    +

                    1、如果设置了 setting.callback.beforeRightClick 方法,且返回 false,将无法触发 onRightClick 事件回调函数。

                    +

                    2、只要将 function 的引用赋给 onRightClick 属性,则右键点击 zTree 时,将屏蔽浏览器的右键菜单。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    eventjs event 对象

                    +

                    标准的 js event 对象

                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    鼠标右键点击时所在节点的 JSON 数据对象

                    +

                    如果不在节点上,则返回 null

                    +
                    +

                    setting & function 举例

                    +

                    1. 每次鼠标右键点击后, 弹出鼠标所在节点的 tId、name 的信息

                    +
                    function zTreeOnRightClick(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onRightClick: zTreeOnRightClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.autoCheckTrigger.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.autoCheckTrigger.html new file mode 100644 index 0000000000000000000000000000000000000000..d1efd77063a762f460df38783ab8cd47699c508d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.autoCheckTrigger.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.check.autoCheckTrigger

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    设置自动关联勾选时是否触发 beforeCheck / onCheck 事件回调函数。[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时生效]

                    +

                    1、如果设置 setting.check.chkboxType = { "Y": "", "N": "" },将不会有任何自动关联勾选的操作。

                    +

                    2、如果开启触发,对于节点较多的树将会影响性能,因为所有被联动勾选的操作都会触发事件回调函数,请根据需要决定是否使用此功能。

                    +

                    默认值: false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 触发 / 不触发 事件回调函数

                    +
                    +

                    setting 举例

                    +

                    1. 需要触发自动关联勾选操作

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		autoCheckTrigger: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkDisabledInherit.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkDisabledInherit.html new file mode 100644 index 0000000000000000000000000000000000000000..8af1c2c67d8dad9498185cca43c9d345d66daa84 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkDisabledInherit.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.check.chkDisabledInherit

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    当父节点设置 chkDisabled = true 时,设置子节点是否自动继承 chkDisabled = true 。[setting.check.enable = true 时生效]

                    +

                    1、只使用于初始化节点时,便于批量操作。 对于已存在的节点请利用 setChkDisabled 方法单个节点设置。

                    +

                    默认值: false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示 新加入子节点时,自动继承父节点 chkDisabled = true 的属性。

                    +

                    false 表示 新加入子节点时,不继承父节点 chkDisabled 的属性。

                    +
                    +

                    setting 举例

                    +

                    1. 需要子节点自动继承 chkDisabled = true

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkDisabledInherit: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkStyle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkStyle.html new file mode 100644 index 0000000000000000000000000000000000000000..9706c134544c3e32c679dba013f86cd766f872cd --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkStyle.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    Stringsetting.check.chkStyle

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    勾选框类型(checkbox 或 radio)[setting.check.enable = true 时生效]

                    +

                    默认值:"checkbox"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    chkStyle = "checkbox" 时,显示 checkbox 选择框,setting.check.chkboxType 属性有效。 +
                    chkStyle = "radio" 时,显示 radio 选择框, setting.check.radioType 属性有效。

                    +

                    请注意大小写,不要改变

                    +
                    +

                    checkbox 状态说明

                    +
                    +

                    +
                    +

                    未勾选;如果是父节点,则无子节点被勾选。鼠标移到该节点上显示为:

                    +

                    未勾选;(只有父节点存在此状态)存在被勾选的子节点。鼠标移到该节点上显示为:

                    +

                    被勾选;如果是父节点,则全部子节点都被勾选。鼠标移到该节点上显示为:

                    +

                    被勾选;(只有父节点存在此状态)且部分或无子节点被勾选。鼠标移到该节点上显示为:

                    +
                    +
                    +

                    radio 状态说明

                    +
                    +

                    +
                    +

                    未勾选;如果是父节点,则没有子节点被勾选。鼠标移到该节点上显示为:

                    +

                    未勾选;(只有父节点存在此状态)且存在被勾选的子节点。鼠标移到该节点上显示为:

                    +

                    被勾选;如果是父节点,则没有子节点被勾选。鼠标移到该节点上显示为:

                    +

                    被勾选;(只有父节点存在此状态)且存在被勾选的子节点。鼠标移到该节点上显示为:

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置选择框为 radio

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkStyle: "radio"
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkboxType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkboxType.html new file mode 100644 index 0000000000000000000000000000000000000000..da06b6cacb7d3c39b91cffc1481abe322ba32951 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.chkboxType.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    JSONsetting.check.chkboxType

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    勾选 checkbox 对于父子节点的关联关系。[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时生效]

                    +

                    默认值:{ "Y": "ps", "N": "ps" }

                    +
                    +
                    +

                    JSON 格式说明

                    +
                    +

                    Y 属性定义 checkbox 被勾选后的情况; +
                    N 属性定义 checkbox 取消勾选后的情况; +
                    "p" 表示操作会影响父级节点; +
                    "s" 表示操作会影响子级节点。

                    +

                    请注意大小写,不要改变

                    +
                    +

                    setting 举例

                    +

                    1. checkbox 勾选操作,只影响父级节点;取消勾选操作,只影响子级节点

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkStyle: "checkbox",
                    +		chkboxType: { "Y": "p", "N": "s" }
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..8b1387e39b0cd41badc3650efc2411fc84066532 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.enable.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Booleansetting.check.enable

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 的节点上是否显示 checkbox / radio

                    +

                    默认值: false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 显示 / 不显示 复选框或单选框

                    +
                    +

                    setting 举例

                    +

                    1. 需要显示 checkbox

                    +
                    var setting = {
                    +	check: {
                    +		enable: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.nocheckInherit.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.nocheckInherit.html new file mode 100644 index 0000000000000000000000000000000000000000..caf990288428693296f7cb4e68efcea993a9c044 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.nocheckInherit.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.check.nocheckInherit

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    当父节点设置 nocheck = true 时,设置子节点是否自动继承 nocheck = true 。[setting.check.enable = true 时生效]

                    +

                    1、只使用于初始化节点时,便于批量操作。 对于已存在的节点请利用 updateNode 方法单个节点设置。

                    +

                    默认值: false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示 新加入子节点时,自动继承父节点 nocheck = true 的属性。

                    +

                    false 表示 新加入子节点时,不继承父节点 nocheck 的属性。

                    +
                    +

                    setting 举例

                    +

                    1. 需要子节点自动继承 nocheck = true

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		nocheckInherit: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.radioType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.radioType.html new file mode 100644 index 0000000000000000000000000000000000000000..19f84cadb756ae2a2d77e31244832a34515382d3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.check.radioType.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Stringsetting.check.radioType

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    radio 的分组范围。[setting.check.enable = true 且 setting.check.chkStyle = "radio" 时生效]

                    +

                    默认值:"level"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    radioType = "level" 时,在每一级节点范围内当做一个分组。 +
                    radioType = "all" 时,在整棵树范围内当做一个分组。

                    +

                    请注意大小写,不要改变

                    +
                    +

                    setting 举例

                    +

                    1. 设置 radio 的判别规则为整棵树内

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkStyle: "radio",
                    +		radioType: "all"
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.keep.leaf.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.keep.leaf.html new file mode 100644 index 0000000000000000000000000000000000000000..af3a7211a4182659b80257af904130d02529ae62 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.keep.leaf.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.data.keep.leaf

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 的节点叶子节点属性锁,是否始终保持 isParent = false

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 锁定 / 不锁定 叶子节点属性

                    +

                    如果设置为 true,则所有 isParent = false 的节点,都无法添加子节点。

                    +
                    +

                    setting 举例

                    +

                    1. 需要锁定叶子节点状态

                    +
                    var setting = {
                    +	data: {
                    +		keep: {
                    +			leaf: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.keep.parent.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.keep.parent.html new file mode 100644 index 0000000000000000000000000000000000000000..c4975df20c23ce246312c8bada4a4cf57d1f67af --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.keep.parent.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.data.keep.parent

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 的节点父节点属性锁,是否始终保持 isParent = true

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 锁定 / 不锁定 父节点属性

                    +

                    如果设置为 true,则所有 isParent = true 的节点,即使该节点的子节点被全部删除或移走,依旧保持父节点状态。

                    +
                    +

                    setting 举例

                    +

                    1. 需要锁定父节点状态

                    +
                    var setting = {
                    +	data: {
                    +		keep: {
                    +			parent: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.checked.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.checked.html new file mode 100644 index 0000000000000000000000000000000000000000..ac9fdc1d9a197e4d4d0ed6da1c1c25174cfaeea6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.checked.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.checked

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    zTree 节点数据中保存 check 状态的属性名称。

                    +

                    默认值:"checked"

                    +

                    请勿与 zTree 节点数据的其他参数冲突,例如:checkedOld

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 显示节点时,将 treeNode 的 isChecked 属性当做节点名称

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			checked: "isChecked"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.children.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.children.html new file mode 100644 index 0000000000000000000000000000000000000000..66a49a7ef280b0b0fbc02227d39ba466d77baac8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.children.html @@ -0,0 +1,23 @@ +
                    +
                    +

                    Stringsetting.data.key.children

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 节点数据中保存子节点数据的属性名称。

                    +

                    默认值:"children"

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 显示节点时,将 treeNode 的 nodes 属性当做节点名称

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			children: "nodes"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.isHidden.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.isHidden.html new file mode 100644 index 0000000000000000000000000000000000000000..0ea26bc3b030c437f1c5d8a32b1d21899907ea10 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.isHidden.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.isHidden

                    +

                    概述[ 依赖 jquery.ztree.exhide js ]

                    +
                    +

                    +
                    +

                    zTree 节点数据保存节点是否隐藏的属性名称。

                    +

                    默认值:"isHidden"

                    +

                    v3.5.32+

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 显示节点时,将 treeNode 的 hidden 属性当做节点是否隐藏的属性名称

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			isHidden: "hidden"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.isParent.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.isParent.html new file mode 100644 index 0000000000000000000000000000000000000000..d9476c3ad6fd815e764bce58508f352933d9fd07 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.isParent.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.isParent

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 节点数据保存节点是否为父节点的属性名称。

                    +

                    默认值:"isParent"

                    +

                    v3.5.32+

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 显示节点时,将 treeNode 的 parent 属性当做节点是否为父节点的属性名称

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			isParent: "parent"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.name.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.name.html new file mode 100644 index 0000000000000000000000000000000000000000..c25d250af5b20d72734e59f4a9b4a0d11cd356dd --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.name.html @@ -0,0 +1,23 @@ +
                    +
                    +

                    Stringsetting.data.key.name

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 节点数据保存节点名称的属性名称。

                    +

                    默认值:"name"

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 显示节点时,将 treeNode 的 ename 属性当做节点名称

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			name: "ename"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.title.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.title.html new file mode 100644 index 0000000000000000000000000000000000000000..43e685542f756082edc4ee008e9772b484e26160 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.title.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.title

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 节点数据保存节点提示信息的属性名称。[setting.view.showTitle = true 时生效]

                    +

                    如果设置为 "" ,则自动与 setting.data.key.name 保持一致,避免用户反复设置

                    +

                    默认值:""

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 显示节点时,将 treeNode 的 fullName 属性当做节点名称

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			title: "fullName"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.url.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.url.html new file mode 100644 index 0000000000000000000000000000000000000000..e534d985395d5ff7b012c571fa71a81ac073fdcf --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.key.url.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.url

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 节点数据保存节点链接的目标 URL 的属性名称。

                    +

                    特殊用途:当后台数据只能生成 url 属性,又不想实现点击节点跳转的功能时,可以直接修改此属性为其他不存在的属性名称

                    +

                    默认值:"url"

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 显示节点时,将 treeNode 的 xUrl 属性当做节点链接的目标 URL

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			url: "xUrl"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..5d7bd42f0dff2c349d6928fc29678121d01c32da --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.enable.html @@ -0,0 +1,38 @@ +
                    +
                    +

                    Booleansetting.data.simpleData.enable

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    确定 zTree 初始化时的节点数据、异步加载时的节点数据、或 addNodes 方法中输入的 newNodes 数据是否采用简单数据模式 (Array)

                    +

                    不需要用户再把数据库中取出的 List 强行转换为复杂的 JSON 嵌套格式

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 使用 / 不使用 简单数据模式

                    +

                    如果设置为 true,请务必设置 setting.data.simpleData 内的其他参数: idKey / pIdKey / rootPId,并且让数据满足父子关系。

                    +
                    +

                    setting 举例

                    +

                    1. 使用简单 Array 格式的数据

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.idKey.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.idKey.html new file mode 100644 index 0000000000000000000000000000000000000000..5b3ffd46be24296778a4417da20d50c7ab448b42 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.idKey.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Stringsetting.data.simpleData.idKey

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    节点数据中保存唯一标识的属性名称。[setting.data.simpleData.enable = true 时生效]

                    +

                    默认值:"id"

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 使用简单 Array 格式的数据

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.pIdKey.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.pIdKey.html new file mode 100644 index 0000000000000000000000000000000000000000..d434bc31d86b86d836e196504a0fd0b37f985d7c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.pIdKey.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Stringsetting.data.simpleData.pIdKey

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    节点数据中保存其父节点唯一标识的属性名称。[setting.data.simpleData.enable = true 时生效]

                    +

                    默认值:"pId"

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 使用简单 Array 格式的数据

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.rootPId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.rootPId.html new file mode 100644 index 0000000000000000000000000000000000000000..8cff82d4c689be42cec9bf93674e55449fe88391 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.data.simpleData.rootPId.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    String / Numbersetting.data.simpleData.rootPId

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于修正根节点父节点数据,即 pIdKey 指定的属性值。[setting.data.simpleData.enable = true 时生效]

                    +

                    默认值:null

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 使用简单 Array 格式的数据

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.autoExpandTrigger.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.autoExpandTrigger.html new file mode 100644 index 0000000000000000000000000000000000000000..126b8a857c3a62e11a0fa9d0d86ec2c3369879b8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.autoExpandTrigger.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.edit.drag.autoExpandTrigger

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽时父节点自动展开是否触发 onExpand 事件回调函数。[setting.edit.enable = true 时生效]

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 触发 / 不触发 onExpand 事件回调函数。

                    +
                    +

                    setting 举例

                    +

                    1. 设置拖拽时父节点自动展开触发 onExpand 事件回调函数

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			autoExpandTrigger: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.autoOpenTime.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.autoOpenTime.html new file mode 100644 index 0000000000000000000000000000000000000000..df7833920a5194c4d810ba0a523e153ce6e49df3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.autoOpenTime.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.autoOpenTime

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽时父节点自动展开的延时间隔。 (单位:ms)[setting.edit.enable = true 时生效]

                    +

                    默认值:500

                    +

                    请根据自己的需求适当调整此值

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置拖拽到父节点上立刻自动展开

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			autoOpenTime: 0
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.borderMax.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.borderMax.html new file mode 100644 index 0000000000000000000000000000000000000000..1d4dd6813edff1a87420d45d564685f300b5e270 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.borderMax.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.borderMax

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽节点成为根节点时的 Tree 内边界范围 (单位:px)。[setting.edit.enable = true 时生效]

                    +

                    默认值:10

                    +

                    请根据自己的需求适当调整此值

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 更改拖拽操作节点成为根节点时的 Tree 内边界范围为20px

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			borderMax: 20
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.borderMin.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.borderMin.html new file mode 100644 index 0000000000000000000000000000000000000000..463eb2b75e8e6a835ae1d0c8ad815762ad7659e2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.borderMin.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.borderMin

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽节点成为根节点时的 Tree 外边界范围 (单位:px)。[setting.edit.enable = true 时生效]

                    +

                    默认值:-5

                    +

                    请根据自己的需求适当调整此值

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 更改拖拽操作节点成为根节点时的 Tree 外边界范围为10px

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			borderMin: -10
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.inner.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.inner.html new file mode 100644 index 0000000000000000000000000000000000000000..06679e1a93b452ee8988e66cd2d865c4ca87f80b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.inner.html @@ -0,0 +1,59 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNodes, targetNode)setting.edit.drag.inner

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽到目标节点时,设置是否允许成为目标节点的子节点。[setting.edit.enable = true 时生效]

                    +

                    拖拽目标是 根 的时候,不触发 prev 和 next,只会触发 inner

                    +

                    此功能主要作用是对拖拽进行适当限制(辅助箭头),需要结合 prev、next 一起使用,才能实现完整功能。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 允许 / 不允许 成为目标节点的子节点

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控(多棵树拖拽时,是目标节点所在树的 treeId)

                    +

                    treeNodesArray(JSON)

                    +

                    被拖拽的节点 JSON 数据集合

                    +

                    targetNodeJSON

                    +

                    拖拽时的目标节点 JSON 数据对象

                    +

                    如果拖拽的节点要成为根节点,则 targetNode = null

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止拖拽成为目标节点的子节点

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: true,
                    +			inner: false
                    +		}
                    +	}
                    +};
                    +......
                    +

                    2. 禁止拖拽成为根节点的子节点

                    +
                    function canInner(treeId, nodes, targetNode) {
                    +	return !(targetNode && targetNode.level === 0);
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: true,
                    +			inner: canInner
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.isCopy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.isCopy.html new file mode 100644 index 0000000000000000000000000000000000000000..cff17afd573ff8dac81f2648a5e73c2ba5588075 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.isCopy.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Booleansetting.edit.drag.isCopy

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽时, 设置是否允许复制节点。[setting.edit.enable = true 时生效]

                    +

                    默认值:true

                    +
                    +
                    +

                    规则说明

                    +
                    +

                    1、isCopy = true; isMove = true 时,拖拽节点按下 Ctrl 或 Cmd 键表示 copy; 否则为 move

                    +

                    2、isCopy = true; isMove = false 时,所有拖拽操作都是 copy

                    +

                    3、isCopy = false; isMove = true 时,所有拖拽操作都是 move

                    +

                    4、isCopy = false; isMove = false 时,禁止拖拽操作

                    +
                    +

                    setting 举例

                    +

                    1. 设置所有拖拽操作都是 copy

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			isCopy: true,
                    +			isMove: false
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.isMove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.isMove.html new file mode 100644 index 0000000000000000000000000000000000000000..7fdadd18293de38e395ce864d1b74c2b60e46dea --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.isMove.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Booleansetting.edit.drag.isMove

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽时, 设置是否允许移动节点。[setting.edit.enable = true 时生效]

                    +

                    默认值:true

                    +
                    +
                    +

                    规则说明

                    +
                    +

                    1、isCopy = true; isMove = true 时,拖拽节点按下 Ctrl 或 Cmd 键表示 copy; 否则为 move

                    +

                    2、isCopy = true; isMove = false 时,所有拖拽操作都是 copy

                    +

                    3、isCopy = false; isMove = true 时,所有拖拽操作都是 move

                    +

                    4、isCopy = false; isMove = false 时,禁止拖拽操作

                    +
                    +

                    setting 举例

                    +

                    1. 设置所有拖拽操作都是 move

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			isCopy: false,
                    +			isMove: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.maxShowNodeNum.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.maxShowNodeNum.html new file mode 100644 index 0000000000000000000000000000000000000000..3e7a3d2653e76b115670013ba9dbbddf44c77a4a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.maxShowNodeNum.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.maxShowNodeNum

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽多个兄弟节点时,浮动图层中显示的最大节点数。 多余的节点用...代替。[setting.edit.enable = true 时生效]

                    +

                    默认值:5

                    +

                    请根据自己的需求适当调整此值

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 设置拖拽时最多可显示10个节点

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			maxShowNodeNum: 10
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.minMoveSize.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.minMoveSize.html new file mode 100644 index 0000000000000000000000000000000000000000..904be414815956169b4fa02dd09eb835ab3e0999 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.minMoveSize.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.minMoveSize

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    判定是否拖拽操作的最小位移值 (单位:px)。[setting.edit.enable = true 时生效]

                    +

                    根据自己的需求可适当调整此值,如果太小容易导致点击鼠标时误操作进行拖拽

                    +

                    默认值:5

                    +
                    +
                    +

                    setting 举例

                    +

                    1. 更改拖拽操作启动位移值为10px

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			minMoveSize: 10
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.next.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.next.html new file mode 100644 index 0000000000000000000000000000000000000000..ffc874aa477feaaa248b71e281ec218946db0fa4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.next.html @@ -0,0 +1,58 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNodes, targetNode)setting.edit.drag.next

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽到目标节点时,设置是否允许移动到目标节点后面的操作。[setting.edit.enable = true 时生效]

                    +

                    拖拽目标是 根 的时候,不触发 prev 和 next,只会触发 inner

                    +

                    此功能主要作用是对拖拽进行适当限制(辅助箭头),需要结合 prev、inner 一起使用,才能实现完整功能。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 允许 / 不允许 移动到目标节点后面

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控(多棵树拖拽时,是目标节点所在树的 treeId)

                    +

                    treeNodesArray(JSON)

                    +

                    被拖拽的节点 JSON 数据集合

                    +

                    targetNodeJSON

                    +

                    拖拽时的目标节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止拖拽到节点后面的操作

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: false,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +

                    2. 禁止拖拽到父节点后面的操作

                    +
                    function canNext(treeId, nodes, targetNode) {
                    +	return !targetNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: canNext,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.prev.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.prev.html new file mode 100644 index 0000000000000000000000000000000000000000..bd05361838dfaaa32cb1968bb2936c09b20c1048 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.drag.prev.html @@ -0,0 +1,58 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNodes, targetNode)setting.edit.drag.prev

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    拖拽到目标节点时,设置是否允许移动到目标节点前面的操作。[setting.edit.enable = true 时生效]

                    +

                    拖拽目标是 根 的时候,不触发 prev 和 next,只会触发 inner

                    +

                    此功能主要作用是对拖拽进行适当限制(辅助箭头),需要结合 next、inner 一起使用,才能实现完整功能。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 允许 / 不允许 移动到目标节点前面

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控(多棵树拖拽时,是目标节点所在树的 treeId)

                    +

                    treeNodesArray(JSON)

                    +

                    被拖拽的节点 JSON 数据集合

                    +

                    targetNodeJSON

                    +

                    拖拽时的目标节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 禁止拖拽到节点前面的操作

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: false,
                    +			next: true,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +

                    2. 禁止拖拽到父节点前面的操作

                    +
                    function canPrev(treeId, nodes, targetNode) {
                    +	return !targetNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: canPrev,
                    +			next: true,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.editNameSelectAll.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.editNameSelectAll.html new file mode 100644 index 0000000000000000000000000000000000000000..30784f3c272e0f5f669292e2e11d71c7c9b0c099 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.editNameSelectAll.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Booleansetting.edit.editNameSelectAll

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    节点编辑名称 input 初次显示时,设置 txt 内容是否为全选状态。 [setting.edit.enable = true 时生效]

                    +

                    默认值: false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示 全选状态

                    +

                    false 表示 不是全选状态,光标默认在最后

                    +
                    +

                    setting 举例

                    +

                    1. 设置节点编辑名称 input 初次显示时,txt内容为全选状态

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		editNameSelectAll: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..de1afeaf003b1860c981424cd2d026110b8fae04 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.enable.html @@ -0,0 +1,38 @@ +
                    +
                    +

                    Booleansetting.edit.enable

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 是否处于编辑状态

                    +

                    请在初始化之前设置,初始化后需要改变编辑状态请使用 zTreeObj.setEditable() 方法

                    +

                    默认值: false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 可以 / 不可以 编辑

                    +
                    +

                    编辑状态规则说明

                    +
                    +

                    1、点击节点时,不会打开 node.url 指定的 URL。 +
                    2、全面支持 编辑 与 异步加载 状态共存。 +
                    3、可以对节点进行拖拽,且支持多棵树之间进行拖拽。 +
                    4、支持拖拽时 复制/移动 节点。(参考: setting.edit.drag.isCopy / setting.edit.drag.isMove) +
                    5、可以通过编辑按钮修改 name 属性。 +
                    6、可以通过删除按钮删除节点。 +
                    +

                    +

                    请注意大小写,不要改变

                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 进入编辑状态

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.removeTitle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.removeTitle.html new file mode 100644 index 0000000000000000000000000000000000000000..55257da72fff87cf805a919a253f07e6c3b048df --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.removeTitle.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    String / Function(treeId, treeNode)setting.edit.removeTitle

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    删除按钮的 Title 辅助信息。[setting.edit.enable = true & setting.edit.showRemoveBtn = true 时生效]

                    +

                    默认值:"remove"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    鼠标移动到 删除按钮 上时,浏览器自动弹出的辅助信息内容,可根据用户需要自行修改

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置删除按钮 Title 信息的节点 JSON 数据对象

                    +

                    返回值String

                    +

                    返回值同 String 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置删除按钮的 Title 辅助信息为: "删除节点"

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: true,
                    +		removeTitle: "删除节点"
                    +	}
                    +};
                    +......
                    +

                    2. 设置父节点删除按钮的 Title 辅助信息为: "删除父节点"

                    +
                    function setRemoveTitle(treeId, treeNode) {
                    +	return treeNode.isParent ? "删除父节点":"删除叶子节点";
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: true,
                    +		removeTitle: setRemoveTitle
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.renameTitle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.renameTitle.html new file mode 100644 index 0000000000000000000000000000000000000000..2dfbcca17120ef233fd9c8da233da6a3cd8088be --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.renameTitle.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    String / Function(treeId, treeNode)setting.edit.renameTitle

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    编辑名称按钮的 Title 辅助信息。[setting.edit.enable = true & setting.edit.showRenameBtn = true 时生效]

                    +

                    默认值:"rename"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    设置鼠标移动到 编辑名称按钮 上时,浏览器自动弹出的辅助信息内容,可根据用户需要自行修改

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置编辑名称按钮 Title 信息的节点 JSON 数据对象

                    +

                    返回值String

                    +

                    返回值同 String 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置编辑名称按钮的 Title 辅助信息为: "编辑节点名称"

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: true,
                    +		renameTitle: "编辑节点名称"
                    +	}
                    +};
                    +......
                    +

                    2. 设置父节点编辑名称按钮的 Title 辅助信息为: "编辑父节点名称"

                    +
                    function setRenameTitle(treeId, treeNode) {
                    +	return treeNode.isParent ? "编辑父节点名称":"编辑叶子节点名称";
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: true,
                    +		renameTitle: setRenameTitle
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.showRemoveBtn.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.showRemoveBtn.html new file mode 100644 index 0000000000000000000000000000000000000000..db62053c9ec33be39ee18ed6384ac4ddc631a56b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.showRemoveBtn.html @@ -0,0 +1,49 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.edit.showRemoveBtn

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    设置是否显示删除按钮。[setting.edit.enable = true 时生效]

                    +

                    当点击某节点的删除按钮时:

                    +

                    1、首先触发 setting.callback.beforeRemove 回调函数,用户可判定是否进行删除操作。

                    +

                    2、如果未设置 beforeRemove 或 beforeRemove 返回 true,则删除节点并触发 setting.callback.onRemove 回调函数。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 显示 / 隐藏 删除按钮

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置是否显示删除按钮的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 不显示删除按钮

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: false
                    +	}
                    +};
                    +......
                    +

                    2. 设置所有的父节点不显示删除按钮

                    +
                    function setRemoveBtn(treeId, treeNode) {
                    +	return !treeNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: setRemoveBtn
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.showRenameBtn.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.showRenameBtn.html new file mode 100644 index 0000000000000000000000000000000000000000..33dd37aa87f04b7b9ea9577b1e45c193bcfc487d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.edit.showRenameBtn.html @@ -0,0 +1,51 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.edit.showRenameBtn

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    设置是否显示编辑名称按钮。[setting.edit.enable = true 时生效]

                    +

                    当点击某节点的编辑名称按钮时:

                    +

                    1、进入节点编辑名称状态。

                    +

                    2、编辑名称完毕(Input 失去焦点 或 按下 Enter 键),会触发 setting.callback.beforeRename 回调函数,用户可根据自己的规则判定是否允许修改名称。

                    +

                    3、如果 beforeRename 返回 false,则继续保持编辑名称状态,直到名称符合规则位置 (按下 ESC 键可取消编辑名称状态,恢复原名称)。

                    +

                    4、如果未设置 beforeRename 或 beforeRename 返回 true,则结束节点编辑名称状态,更新节点名称,并触发 setting.callback.onRename 回调函数。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 显示 / 隐藏 编辑名称按钮

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置是否显示编辑名称按钮的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 不显示编辑名称按钮

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: false
                    +	}
                    +};
                    +......
                    +

                    2. 设置所有的父节点不显示编辑名称按钮

                    +
                    function setRenameBtn(treeId, treeNode) {
                    +	return !treeNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: setRenameBtn
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.treeId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.treeId.html new file mode 100644 index 0000000000000000000000000000000000000000..819743eb91fc6f30edf2ea0aaa03c7f8d52e49af --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.treeId.html @@ -0,0 +1,14 @@ +
                    +
                    +

                    Stringsetting.treeId

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 的唯一标识,初始化后,等于 用户定义的 zTree 容器的 id 属性值。

                    +

                    请勿进行初始化 或 修改,属于内部参数。

                    +
                    +
                    + +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.treeObj.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.treeObj.html new file mode 100644 index 0000000000000000000000000000000000000000..37684a1909550ba20d9baa378fc6abb71c356f3e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.treeObj.html @@ -0,0 +1,14 @@ +
                    +
                    +

                    Objectsetting.treeObj

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 容器的 jQuery 对象,主要功能:便于操作。

                    +

                    请勿进行初始化 或 修改,属于内部参数。

                    +
                    +
                    + +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.addDiyDom.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.addDiyDom.html new file mode 100644 index 0000000000000000000000000000000000000000..0a508accc98c89192b98a2beb713ac2a79a85cad --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.addDiyDom.html @@ -0,0 +1,40 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.view.addDiyDom

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于在节点上固定显示用户自定义控件

                    +

                    1. 大数据量的节点加载请注意:在 addDiyDom 中针对每个节点 查找 DOM 对象并且添加新 DOM 控件,肯定会影响初始化性能;如果不是必须使用,建议不使用此功能

                    +

                    2. 属于高级应用,使用时请确保对 zTree 比较了解。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要显示自定义控件的节点 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置节点后面显示一个按钮

                    +
                    var setting = {
                    +	view: {
                    +		addDiyDom: addDiyDom
                    +	}
                    +};
                    +function addDiyDom(treeId, treeNode) {
                    +	var aObj = $("#" + treeNode.tId + "_a");
                    +	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    +	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    +		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    +		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    +	aObj.append(editStr);
                    +	var btn = $("#diyBtn_"+treeNode.id);
                    +	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.addHoverDom.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.addHoverDom.html new file mode 100644 index 0000000000000000000000000000000000000000..f073e79c6b24d5a9b5be1bda026269bd6b639a65 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.addHoverDom.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.view.addHoverDom

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于当鼠标移动到节点上时,显示用户自定义控件,显示隐藏状态同 zTree 内部的编辑、删除按钮

                    +

                    请务必与 setting.view.removeHoverDom 同时使用;属于高级应用,使用时请确保对 zTree 比较了解。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要显示自定义控件的节点 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置鼠标移到节点上,在后面显示一个按钮

                    +
                    var setting = {
                    +	view: {
                    +		addHoverDom: addHoverDom,
                    +		removeHoverDom: removeHoverDom,
                    +		......
                    +	}
                    +};
                    +function addHoverDom(treeId, treeNode) {
                    +	var aObj = $("#" + treeNode.tId + "_a");
                    +	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    +	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    +		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    +		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    +	aObj.append(editStr);
                    +	var btn = $("#diyBtn_"+treeNode.id);
                    +	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    +};
                    +function removeHoverDom(treeId, treeNode) {
                    +	$("#diyBtn_"+treeNode.id).unbind().remove();
                    +	$("#diyBtn_space_" +treeNode.id).unbind().remove();
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.autoCancelSelected.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.autoCancelSelected.html new file mode 100644 index 0000000000000000000000000000000000000000..4890f78788390ecb8fc4322b2a5f8429c68dfb45 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.autoCancelSelected.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Booleansetting.view.autoCancelSelected

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    点击节点时,按下 Ctrl 或 Cmd 键是否允许取消选择操作。

                    +

                    如果不需要此功能,请设置为 false。

                    +

                    默认值: true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 支持 / 不支持 配合 Ctrl 或 Cmd 键进行取消节点选择的操作

                    +
                    +

                    setting 举例

                    +

                    1. 禁止配合 Ctrl 或 Cmd 键进行取消节点选择的操作

                    +
                    var setting = {
                    +	view: {
                    +		autoCancelSelected: false
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.dblClickExpand.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.dblClickExpand.html new file mode 100644 index 0000000000000000000000000000000000000000..5f3db964abd4b94a7e3d189fb18bd7fde74a156f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.dblClickExpand.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.view.dblClickExpand

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    双击节点时,是否自动展开父节点的标识

                    +

                    默认值: true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示双击节点 切换 / 不切换 展开状态

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置是否双击切换展开状态的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting 举例

                    +

                    1. 取消默认双击展开父节点的功能

                    +
                    var setting = {
                    +	view: {
                    +		dblClickExpand: false
                    +	}
                    +};
                    +......
                    +

                    2. 设置 zTree 仅仅 level=0 的父节点取消双击展开的功能

                    +
                    function dblClickExpand(treeId, treeNode) {
                    +	return treeNode.level > 0;
                    +};
                    +var setting = {
                    +	view: {
                    +		dblClickExpand: dblClickExpand
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.expandSpeed.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.expandSpeed.html new file mode 100644 index 0000000000000000000000000000000000000000..3b799c32477f729545bf992d81c67a8d64ee5877 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.expandSpeed.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    String / Numbersetting.view.expandSpeed

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 节点展开、折叠时的动画速度,设置方法同 JQuery 动画效果中 speed 参数。

                    +

                    IE6 下会自动关闭动画效果,以保证 zTree 的操作速度

                    +

                    默认值:"fast"

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    三种预定速度之一的字符串("slow", "normal", or "fast")

                    +

                    设置为 "" 时,不显示动画效果

                    +
                    +

                    Number 格式说明

                    +
                    +

                    表示动画时长的毫秒数值 (如:1000)

                    +
                    +

                    setting 举例

                    +

                    1. 设置为慢速显示动画效果

                    +
                    var setting = {
                    +	view: {
                    +		expandSpeed: "slow"
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.fontCss.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.fontCss.html new file mode 100644 index 0000000000000000000000000000000000000000..54efb1bbf77c0f41febb7b06d0341e3fbfa32b39 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.fontCss.html @@ -0,0 +1,42 @@ +
                    +
                    +

                    JSON / Function(treeId, treeNode)setting.view.fontCss

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    个性化文字样式,只针对 zTree 在节点上显示的<A>对象。

                    +

                    默认值:{}

                    +
                    +
                    +

                    JSON 格式说明

                    +
                    +

                    JSON 格式为 JQuery css方法中的 JSON 对象格式,例如:{color:"#ff0011", background:"blue"}

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置自定义样式的节点 JSON 数据对象

                    +

                    返回值JSON

                    +

                    返回值同 JSON 格式的数据,例如:{color:"#ff0011", background:"blue"}

                    +
                    +

                    setting & function 举例

                    +

                    1. 不修改CSS,设置全部节点 name 显示为红色

                    +
                    var setting = {
                    +	view: {
                    +		fontCss : {color:"red"}
                    +	}
                    +};
                    +

                    2. 设置 level=0 的节点 name 显示为红色

                    +
                    function setFontCss(treeId, treeNode) {
                    +	return treeNode.level == 0 ? {color:"red"} : {};
                    +};
                    +var setting = {
                    +	view: {
                    +		fontCss: setFontCss
                    +	}
                    +};
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.nameIsHTML.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.nameIsHTML.html new file mode 100644 index 0000000000000000000000000000000000000000..a1d916c5772f8f751f8b80c32425de4f3210c4bc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.nameIsHTML.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Booleansetting.view.nameIsHTML

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置 name 属性是否支持 HTML 脚本

                    +

                    如果允许 HTML 脚本,请根据自己的需求做校验,避免出现 js 注入等安全问题。

                    +

                    默认值: false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 支持 / 不支持 HTML 脚本

                    +
                    +

                    setting 举例

                    +

                    1. 设置 name 属性支持 HTML 脚本

                    +
                    var setting = {
                    +	view: {
                    +		nameIsHTML: true
                    +	}
                    +};
                    +var node = {"name":"<font color='red'>test</font>"};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.removeHoverDom.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.removeHoverDom.html new file mode 100644 index 0000000000000000000000000000000000000000..903c30ab5bdbf07249ad46ac3988e29982350c85 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.removeHoverDom.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.view.removeHoverDom

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于当鼠标移出节点时,隐藏用户自定义控件,显示隐藏状态同 zTree 内部的编辑、删除按钮

                    +

                    请务必与 addHoverDom 同时使用;属于高级应用,使用时请确保对 zTree 比较了解。

                    +

                    默认值:null

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要隐藏自定义控件的节点 JSON 数据对象

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置鼠标从节点移出时,删除由 addHoverDom 增加的按钮

                    +
                    var setting = {
                    +	view: {
                    +		addHoverDom: addHoverDom,
                    +		removeHoverDom: removeHoverDom,
                    +		......
                    +	}
                    +};
                    +function addHoverDom(treeId, treeNode) {
                    +	var aObj = $("#" + treeNode.tId + "_a");
                    +	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    +	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    +		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    +		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    +	aObj.append(editStr);
                    +	var btn = $("#diyBtn_"+treeNode.id);
                    +	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    +};
                    +function removeHoverDom(treeId, treeNode) {
                    +	$("#diyBtn_"+treeNode.id).unbind().remove();
                    +	$("#diyBtn_space_" +treeNode.id).unbind().remove();
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.selectedMulti.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.selectedMulti.html new file mode 100644 index 0000000000000000000000000000000000000000..2cc65a2eeb497c626c96b365d27788e3c7c23472 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.selectedMulti.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Booleansetting.view.selectedMulti

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置是否允许同时选中多个节点。

                    +

                    默认值: true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 支持 / 不支持 同时选中多个节点

                    +

                    1、设置为 true时,按下 Ctrl 或 Cmd 键可以选中多个节点

                    +

                    2、设置为 true / false 都不影响按下 Ctrl 或 Cmd 键可以让已选中的节点取消选中状态( 取消选中状态可以参考 setting.view.autoCancelSelected )

                    +
                    +

                    setting 举例

                    +

                    1. 禁止多点同时选中的功能

                    +
                    var setting = {
                    +	view: {
                    +		selectedMulti: false
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showIcon.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showIcon.html new file mode 100644 index 0000000000000000000000000000000000000000..ebe423ca9f2fb98459e547d5351a1b2ef12e341e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showIcon.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.view.showIcon

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 是否显示节点的图标。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 显示 / 隐藏 图标

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置是否显示图标的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置 zTree 不显示图标

                    +
                    var setting = {
                    +	view: {
                    +		showIcon: false
                    +	}
                    +};
                    +......
                    +

                    2. 设置 zTree 仅仅 level=2 的节点不显示图标

                    +
                    function showIconForTree(treeId, treeNode) {
                    +	return treeNode.level != 2;
                    +};
                    +var setting = {
                    +	view: {
                    +		showIcon: showIconForTree
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showLine.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showLine.html new file mode 100644 index 0000000000000000000000000000000000000000..02ab5ebbe88850f0391b67ade6dcff0ea8626bb9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showLine.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Booleansetting.view.showLine

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 是否显示节点之间的连线。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 显示 / 不显示 连线

                    +
                    +

                    setting 举例

                    +

                    1. 设置 zTree 不显示节点之间的连线

                    +
                    var setting = {
                    +	view: {
                    +		showLine: false
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showTitle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showTitle.html new file mode 100644 index 0000000000000000000000000000000000000000..5bcb8600390320451edfb65e45e00a5265322223 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.showTitle.html @@ -0,0 +1,46 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.view.showTitle

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 是否显示节点的 title 提示信息(即节点 DOM 的 title 属性)。

                    +

                    请务必与 setting.data.key.title 同时使用。

                    +

                    默认值:true

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 显示 / 隐藏 提示信息

                    +

                    如果 setting.view.showTitle = true & setting.data.key.title = '',zTree 会自动使用 setting.data.key.name 指定的节点名称当做 title

                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeIdString

                    +

                    对应 zTree 的 treeId,便于用户操控

                    +

                    treeNodeJSON

                    +

                    需要设置是否显示提示信息的节点 JSON 数据对象

                    +

                    返回值Boolean

                    +

                    返回值同 Boolean 格式的数据

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置 zTree 不显示提示信息

                    +
                    var setting = {
                    +	view: {
                    +		showTitle: false
                    +	}
                    +};
                    +......
                    +

                    2. 设置 zTree 仅仅 level=2 的节点不显示提示信息

                    +
                    function showTitleForTree(treeId, treeNode) {
                    +	return treeNode.level != 2;
                    +};
                    +var setting = {
                    +	view: {
                    +		showTitle: showTitleForTree
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.txtSelectedEnable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.txtSelectedEnable.html new file mode 100644 index 0000000000000000000000000000000000000000..c22a8c0087559aab34eb39d52cab41d733bef030 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/setting.view.txtSelectedEnable.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Booleansetting.view.txtSelectedEnable

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 是否允许可以选择 zTree DOM 内的文本。

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true / false 分别表示 允许 / 不允许 选择 zTree Dom 内的文本

                    +
                    +

                    setting & function 举例

                    +

                    1. 设置 zTree 允许选择文本

                    +
                    var setting = {
                    +	view: {
                    +		txtSelectedEnable: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.check_Child_State.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.check_Child_State.html new file mode 100644 index 0000000000000000000000000000000000000000..fa378994e81f8ae3aeec478a0e6ef031694352b3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.check_Child_State.html @@ -0,0 +1,43 @@ +
                    +
                    +

                    NumbertreeNode.check_Child_State

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    用于设置节点的子节点的 checkBox / radio 的半选状态。[setting.check.enable = true 时有效]

                    +

                    v3.x 针对节点数据对象提供 treeNode.getCheckStatus() 方法获取标准的半选状态

                    +

                    zTree 内部使用,请勿进行初始化 或 随意修改

                    +

                    默认值:true

                    +
                    +
                    +

                    Number 格式说明

                    +
                    +

                    规则如下:

                    + + + + + + + + + + + +
                    setting.check.checkType = "checkbox"
                    treeNode.check_Child_State勾选状态说明
                    -1不存在子节点 或 子节点全部设置为 nocheck = true
                    0无 子节点被勾选
                    1部分 子节点被勾选
                    2全部 子节点被勾选
                    +
                    + + + + + + + + + + +
                    setting.check.checkType = "radio"
                    treeNode.check_Child_State勾选状态说明
                    -1不存在子节点 或 子节点全部设置为 nocheck = true
                    0无 子节点被勾选
                    2有 子节点被勾选
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.check_Focus.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.check_Focus.html new file mode 100644 index 0000000000000000000000000000000000000000..785aec9f3c467b8182b0480a0d51ac4d5f52ca45 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.check_Focus.html @@ -0,0 +1,19 @@ +
                    +
                    +

                    BooleantreeNode.check_Focus

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    用于设置节点的 checkBox / radio 的 focus 状态。[setting.check.enable = true 时有效]

                    +

                    zTree 内部使用,请勿进行初始化 或 随意修改

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示当前鼠标移动到输入框内

                    +

                    false 表示当前鼠标移动到输入框外

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.checked.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.checked.html new file mode 100644 index 0000000000000000000000000000000000000000..049d6ba4bfaa2b1a72b7a905dfb1a3422ef0a199 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.checked.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    BooleantreeNode.checked

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    节点的 checkBox / radio 的 勾选状态。[setting.check.enable = true & treeNode.nocheck = false 时有效]

                    +

                    1、如果不使用 checked 属性设置勾选状态,请修改 setting.data.key.checked

                    +

                    2、建立 treeNode 数据时设置 treeNode.checked = true 可以让节点的输入框默认为勾选状态

                    +

                    3、修改节点勾选状态,可以使用 treeObj.checkNode / checkAllNodes / updateNode 方法,具体使用哪种请根据自己的需求而定

                    +

                    4、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示节点的输入框被勾选

                    +

                    false 表示节点的输入框未勾选

                    +
                    +

                    treeNode 举例

                    +

                    1. 初始化的数据设置 默认为勾选状态

                    +
                    var nodes = [
                    +{ "id":1, "name":"test1", checked:true },
                    +{ "id":2, "name":"test2", checked:true }
                    +]
                    +

                    2. 获取第一个根节点的勾选状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var checked = treeObj.getNodes()[0].checked;
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.checkedOld.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.checkedOld.html new file mode 100644 index 0000000000000000000000000000000000000000..cab717e75cd3cbdc33918bd10e6bf5de53092a57 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.checkedOld.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    BooleantreeNode.checkedOld

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    节点的 checkBox / radio 在初始化时的 勾选状态。[setting.check.enable = true & treeNode.nocheck = false 时有效]

                    +

                    1、zTree 初始化节点数据时会对此属性进行赋值,因此请勿对此属性初始化

                    +

                    2、如需配合 zTreeObj.getChangeCheckedNodes 方法实现特殊功能,可以根据需求在使用中自行修改 checkedOld 数据

                    +

                    默认值:checked的初始化值

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示节点初始化时 输入框被勾选

                    +

                    false 表示节点初始化时 输入框未勾选

                    +
                    +

                    treeNode 举例

                    +

                    1. 获取第一个根节点的初始勾选状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var checkedOld = treeObj.getNodes()[0].checkedOld;
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.children.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.children.html new file mode 100644 index 0000000000000000000000000000000000000000..4bab8351c23d20c24af8cee0025521583b5dcae9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.children.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Array(JSON)treeNode.children

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    节点的子节点数据集合。

                    +

                    1、如果不使用 children 属性保存子节点数据,请修改 setting.data.key.children

                    +

                    2、异步加载时,对于设置了 isParent = true 的节点,在展开时将进行异步加载

                    +

                    默认值:无

                    +
                    +
                    +

                    Array(JSON) 格式说明

                    +
                    +

                    标准的 JSON 数据对象

                    +
                    +

                    treeNode 举例

                    +

                    1. 初始化的标准嵌套格式的 JSON 数据对象

                    +
                    var nodes = [
                    +{ "id":1, "name":"test1",
                    +	children: [
                    +	{ "id":3, "name":"test3"},
                    +	{ "id":4, "name":"test4"},
                    +	{ "id":5, "name":"test5"}
                    +	]
                    +},
                    +{ "id":2, "name":"test2"  }
                    +]
                    +

                    2. 获取第一个根节点的子节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes()[0].children;
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.chkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.chkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..e6bb03221b8d1a795a00c93a106eaa2aacd90969 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.chkDisabled.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.chkDisabled

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    1、设置节点的 checkbox / radio 是否禁用 [setting.check.enable = true 时有效]

                    +

                    2、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

                    +

                    3、请勿对已加载的节点修改此属性,禁止 或 取消禁止 请使用 setChkDisabled() 方法

                    +

                    4、初始化时,如果需要子孙节点继承父节点的 chkDisabled 属性,请设置 setting.check.chkDisabledInherit 属性

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示此节点的 checkbox / radio 被禁用。

                    +

                    false 表示此节点的 checkbox / radio 可以使用。

                    +
                    +

                    treeNode 举例

                    +

                    1. 禁用节点 checkbox / radio

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1", "checked":true, "chkDisabled":true},
                    +	{ "id":2, "name":"test2", "chkDisabled":true},
                    +	{ "id":3, "name":"test3"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.click.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.click.html new file mode 100644 index 0000000000000000000000000000000000000000..833c678454811d187236abffe9ae2352efb993a2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.click.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    StringtreeNode.click

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    最简单的 click 事件操作。相当于 onclick="..." 的内容。 如果操作较复杂,请使用 onClick 事件回调函数。

                    +

                    由于 IE 对于 onclick 和 click事件共存时的处理与其他浏览器不同,所以请不要利用此参数控制是否允许跳转的操作(例如:treeNode.click = "return false;")。如有类似需求,请不要使用 url 属性设置网址,同时利用 onClick 回调函数控制跳转。

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    标准 javascript 语法, 例如:alert("test"); 等

                    +
                    +

                    treeNode 举例

                    +

                    1. 设置某节点点击时,弹出信息框

                    +
                    var nodes = [
                    +	{ "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
                    +	......
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.diy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.diy.html new file mode 100644 index 0000000000000000000000000000000000000000..b2fb0d9e49de71fa9527d114c1d7e7de1c5e26f4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.diy.html @@ -0,0 +1,15 @@ +
                    +
                    +

                    ?treeNode.* DIY *

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    用于保存节点的其他自定义数据信息,不要与 zTree 使用的属性相同即可,用户可随意设定。

                    +
                    +
                    +

                    treeNode 举例

                    +

                    1. 设置节点的备用英文名称

                    +
                    var node = { "id":1, "name":"test1", "ename":"test eName"};
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.editNameFlag.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.editNameFlag.html new file mode 100644 index 0000000000000000000000000000000000000000..51162b8ba049dfd36c90358220e520e5afa030a8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.editNameFlag.html @@ -0,0 +1,19 @@ +
                    +
                    +

                    BooleantreeNode.editNameFlag

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    用于记录节点是否处于编辑名称状态。[setting.edit.enable = true 时有效]

                    +

                    zTree 内部使用,请勿进行初始化 或 随意修改

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示节点处于编辑名称状态

                    +

                    false 表示节点未处于编辑名称状态

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getCheckStatus.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getCheckStatus.html new file mode 100644 index 0000000000000000000000000000000000000000..fc20eac49a3c88b233aae1af016cfaf6654fff7b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getCheckStatus.html @@ -0,0 +1,63 @@ +
                    +
                    +

                    Function()treeNode.getCheckStatus

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    获取节点 checkbox / radio 半勾选状态。[setting.check.enable = true 时有效]

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值JSON

                    +
                    {
                    +	checked: true, //等同于 treeNode.checked
                    +	half: true  //规则见下表
                    +}
                    + + + + + + + + + + + + + + + + + + +
                    setting.check.checkType = "checkbox"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsetrue
                    true1falsetrue
                    true2falsefalse
                     
                    false-1falsefalse
                    false0falsefalse
                    false1falsetrue
                    false2falsetrue
                    +
                    + + + + + + + + + + + + + + + + +
                    setting.check.checkType = "radio"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsefalse
                    true2falsetrue
                     
                    false-1falsefalse
                    false0falsefalse
                    false2falsetrue
                    +
                    +

                    treeNode 举例

                    +

                    1. 获取第一个根节点的半选状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var halfCheck = treeObj.getNodes()[0].getCheckStatus();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getIndex.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getIndex.html new file mode 100644 index 0000000000000000000000000000000000000000..babdc2e890131f77d1f4373b0b538bd06b0d4d32 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getIndex.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Function()treeNode.getIndex

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取 treeNode 节点在同级节点中的位置。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值Number

                    +

                    treeNode 节点在同级节点中的位置。(从 0 开始)

                    +
                    +

                    treeNode 举例

                    +

                    1. 获取当前被选中的节点在同级节点中的位置

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getIndex();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getNextNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getNextNode.html new file mode 100644 index 0000000000000000000000000000000000000000..7a0fa5c0bf2d74c4b5c1b7bf2076d60f870cd7f4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getNextNode.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function()treeNode.getNextNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取与 treeNode 节点相邻的后一个节点。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值JSON

                    +

                    与 treeNode 节点相邻的后一个节点。

                    +

                    如果 treeNode 是最后一个节点,返回 null 。

                    +
                    +

                    treeNode 举例

                    +

                    1. 获取当前被选中的节点的下一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getNextNode();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getParentNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getParentNode.html new file mode 100644 index 0000000000000000000000000000000000000000..31309a6202622ed3c67df209d46ba1c1d875dbe3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getParentNode.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function()treeNode.getParentNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取 treeNode 节点的父节点。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值JSON

                    +

                    treeNode 节点的父节点 JSON 数据对象。

                    +

                    如果 treeNode 是根节点,返回 null 。

                    +
                    +

                    treeNode 举例

                    +

                    1. 获取当前被选中的节点的父节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getParentNode();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getPath.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getPath.html new file mode 100644 index 0000000000000000000000000000000000000000..46318f05264e08845881b5e9404c685eac6418a5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getPath.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Function()treeNode.getPath

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取 treeNode 节点的所有父节点(包括自己)。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值Array (JSON)

                    +

                    treeNode 节点的所有父节点的数据集合(包括自己)

                    +
                    +

                    treeNode 举例

                    +

                    1. 获取当前被选中的节点的所有父节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getPath();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getPreNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getPreNode.html new file mode 100644 index 0000000000000000000000000000000000000000..9d84184129f34eca27d0c64d88f596fe659d2964 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.getPreNode.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function()treeNode.getPreNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取与 treeNode 节点相邻的前一个节点。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值JSON

                    +

                    与 treeNode 节点相邻的前一个节点。

                    +

                    如果 treeNode 是第一个节点,返回 null 。

                    +
                    +

                    treeNode 举例

                    +

                    1. 获取当前被选中的节点的前一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getPreNode();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.halfCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.halfCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..23ac744c433cde61f7d7539592edb92886b3656a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.halfCheck.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    BooleantreeNode.halfCheck

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    强制节点的 checkBox / radio 的 半勾选状态。[setting.check.enable = true & treeNode.nocheck = false 时有效]

                    +

                    1、强制为半勾选状态后,不再进行自动计算半勾选状态

                    +

                    2、设置 treeNode.halfCheck = false 或 null 才能恢复自动计算半勾选状态

                    +

                    3、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示节点的输入框 强行设置为半勾选

                    +

                    false 表示节点的输入框 根据 zTree 的规则自动计算半勾选状态

                    +
                    +

                    treeNode 举例

                    +

                    1. 初始化的数据设置 默认为半勾选状态

                    +
                    var nodes = [
                    +{ "id":1, "name":"test1", isParent:true, checked:true, halfCheck:true },
                    +{ "id":2, "name":"test2", isParent:true, checked:false, halfCheck:true },
                    +{ "id":3, "name":"test3", isParent:true, checked:true },
                    +{ "id":4, "name":"test4", isParent:true, checked:false }
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.icon.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.icon.html new file mode 100644 index 0000000000000000000000000000000000000000..69c5db16efbab48179cdfd4bcf7c51dc0861bfd5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.icon.html @@ -0,0 +1,33 @@ +
                    +
                    +

                    StringtreeNode.icon

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    节点自定义图标的 URL 路径。

                    +

                    1、父节点如果只设置 icon ,会导致展开、折叠时都使用同一个图标

                    +

                    2、父节点展开、折叠使用不同的个性化图标需要同时设置 treeNode.iconOpen / treeNode.iconClose 两个属性

                    +

                    3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    图标图片的 url 可以是相对路径也可以是绝对路径

                    +

                    设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

                    +
                    +

                    treeNode 举例

                    +

                    1. 设置节点的个性化图标

                    +
                    var nodes = [
                    +	//父节点展开 折叠时使用相同的图标
                    +	{ name:"父节点1", icon:"/img/parent.gif"},
                    +
                    +	//父节点展开 折叠时分别使用不同的图标
                    +	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
                    +
                    +	//叶子节点个性化图标
                    +	{ name:"叶子节点", icon:"/img/leaf.gif"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconClose.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconClose.html new file mode 100644 index 0000000000000000000000000000000000000000..f51da9c911e7604e4e5658343ee76270e0cdf95e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconClose.html @@ -0,0 +1,33 @@ +
                    +
                    +

                    StringtreeNode.iconClose

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    父节点自定义折叠时图标的 URL 路径。

                    +

                    1、此属性只针对父节点有效

                    +

                    2、此属性必须与 iconOpen 同时使用

                    +

                    3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    图标图片的 url 可以是相对路径也可以是绝对路径

                    +

                    设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

                    +
                    +

                    treeNode 举例

                    +

                    1. 设置节点的个性化图标

                    +
                    var nodes = [
                    +	//父节点展开 折叠时使用相同的图标
                    +	{ name:"父节点1", icon:"/img/parent.gif"},
                    +
                    +	//父节点展开 折叠时分别使用不同的图标
                    +	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
                    +
                    +	//叶子节点个性化图标
                    +	{ name:"叶子节点", icon:"/img/leaf.gif"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconOpen.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconOpen.html new file mode 100644 index 0000000000000000000000000000000000000000..29c9baaee41fc397611695e1c5e44a3ff8587c27 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconOpen.html @@ -0,0 +1,33 @@ +
                    +
                    +

                    StringtreeNode.iconOpen

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    父节点自定义展开时图标的 URL 路径。

                    +

                    1、此属性只针对父节点有效

                    +

                    2、此属性必须与 iconClose 同时使用

                    +

                    3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    图标图片的 url 可以是相对路径也可以是绝对路径

                    +

                    设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

                    +
                    +

                    treeNode 举例

                    +

                    1. 设置节点的个性化图标

                    +
                    var nodes = [
                    +	//父节点展开 折叠时使用相同的图标
                    +	{ name:"父节点1", icon:"/img/parent.gif"},
                    +
                    +	//父节点展开 折叠时分别使用不同的图标
                    +	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
                    +
                    +	//叶子节点个性化图标
                    +	{ name:"叶子节点", icon:"/img/leaf.gif"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconSkin.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconSkin.html new file mode 100644 index 0000000000000000000000000000000000000000..d5d97269e6db37d3cc93f6e92a46d76e4f400e40 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.iconSkin.html @@ -0,0 +1,43 @@ +
                    +
                    +

                    StringtreeNode.iconSkin

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    节点自定义图标的 className

                    +

                    1、需要修改 css,增加相应 className 的设置

                    +

                    2、css 方式简单、方便,并且同时支持父节点展开、折叠状态切换图片

                    +

                    3、css 建议采用图片分割渲染的方式以减少反复加载图片,并且避免图片闪动

                    +

                    4、zTree v3.x 的 iconSkin 同样支持 IE6

                    +

                    5、如果想直接使用 图片的Url路径 设置节点的个性化图标,需要设置 treeNode.icon / treeNode.iconOpen / treeNode.iconClose 属性

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    设置个性图标的 className

                    +
                    +

                    css & treeNode 举例

                    +

                    1. 设置节点的个性化图标

                    +
                    css 内容:
                    +.ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}
                    +
                    +.ztree li span.button.diy02_ico_open{...}
                    +.ztree li span.button.diy02_ico_close{...}
                    +
                    +.ztree li span.button.diy03_ico_docu{...}
                    +
                    +js中节点数据:
                    +var nodes = [
                    +	//父节点展开 折叠时使用相同的图标
                    +	{ name:"父节点1", iconSkin:"diy01"},
                    +
                    +	//父节点展开 折叠时分别使用不同的图标
                    +	{ name:"父节点2", iconSkin:"diy02"},
                    +
                    +	//叶子节点个性化图标
                    +	{ name:"叶子节点", iconSkin:"diy03"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isAjaxing.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isAjaxing.html new file mode 100644 index 0000000000000000000000000000000000000000..330c120286d5dc69854bf543e11e44829db05f6d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isAjaxing.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    BooleantreeNode.isAjaxing

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    记录 treeNode 节点是否正在进行异步加载。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示节点正在进行异步加载

                    +

                    false 表示节点没有进行异步加载

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点是否节点正在进行异步加载

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isAjaxing = sNodes[0].isAjaxing;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isFirstNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isFirstNode.html new file mode 100644 index 0000000000000000000000000000000000000000..83b80bd9b294134026b87d9318479f94153c8778 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isFirstNode.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.isFirstNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    记录 treeNode 节点是否为同级节点中的第一个节点。

                    +

                    使用 exhide 扩展后,只针对显示的节点设置此属性

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示是同级节点中的第一个节点

                    +

                    false 表示不是同级节点中的第一个节点

                    +

                    节点被隐藏后,isFirstNode = false

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点是否是同级节点中的第一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isFirstNode = sNodes[0].isFirstNode;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isHidden.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isHidden.html new file mode 100644 index 0000000000000000000000000000000000000000..5fb388e281bacad73b12b9e0f83460cd53f61ae2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isHidden.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    BooleantreeNode.isHidden

                    +

                    概述[ 依赖 jquery.ztree.exhide 扩展 js ]

                    +
                    +

                    +
                    +

                    判断 treeNode 节点是否被隐藏。

                    +

                    1、初始化 zTree 时,如果节点设置 isHidden = true,会被自动隐藏

                    +

                    2、请勿对已加载的节点修改此属性,隐藏 / 显示 请使用 hideNode() / hideNodes() / showNode() / showNodes() 方法

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示被隐藏

                    +

                    false 表示被显示

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看第一个根节点是否被隐藏

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getNodes();
                    +if (sNodes.length > 0) {
                    +	var isHidden = sNodes[0].isHidden;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isHover.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isHover.html new file mode 100644 index 0000000000000000000000000000000000000000..dcef6eba396ac7feb73d9f89e9130d0a694850a7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isHover.html @@ -0,0 +1,19 @@ +
                    +
                    +

                    BooleantreeNode.isHover

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    记录节点 的 hover 状态,主要用于 setting.view.addHoverDom / removeHoverDom 。

                    +

                    zTree 内部使用,请勿进行初始化 或 随意修改

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示节点处于 hover 状态

                    +

                    false 表示节点未处于 hover 状态

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isLastNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isLastNode.html new file mode 100644 index 0000000000000000000000000000000000000000..5d5ac82248df156a95a5ace9c39dd92a1f809993 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isLastNode.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.isLastNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    记录 treeNode 节点是否为同级节点中的最后一个节点。

                    +

                    使用 exhide 扩展后,只针对显示的节点设置此属性

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示是同级节点中的最后一个节点

                    +

                    false 表示不是同级节点中的最后一个节点

                    +

                    节点被隐藏后,isLastNode = false

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点是否是同级节点中的最后一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isLastNode = sNodes[0].isLastNode;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isParent.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isParent.html new file mode 100644 index 0000000000000000000000000000000000000000..bab887e0a2f5f917f0199ba4c810bb60f6c77a94 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.isParent.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.isParent

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    记录 treeNode 节点是否为父节点。

                    +

                    1、初始化节点数据时,根据 treeNode.children 属性判断,有子节点则设置为 true,否则为 false

                    +

                    2、初始化节点数据时,如果设定 treeNode.isParent = true,即使无子节点数据,也会设置为父节点

                    +

                    3、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示是父节点

                    +

                    false 表示不是父节点

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点是否是父节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isParent = sNodes[0].isParent;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.level.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.level.html new file mode 100644 index 0000000000000000000000000000000000000000..aff3254ccae8c4f38f5eb74464525bc4b1ca2aee --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.level.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    NumbertreeNode.level

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    记录节点的层级

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    Number 格式说明

                    +
                    +

                    根节点 level = 0,依次递增

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点的级数

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var level = sNodes[0].level;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.name.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.name.html new file mode 100644 index 0000000000000000000000000000000000000000..918f2b497b64ced4f4271e3404cce21edb650ece --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.name.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    StringtreeNode.name

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    节点名称。

                    +

                    1、如果不使用 name 属性保存节点名称,请修改 setting.data.key.name

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    节点显示的名称字符串,标准 String 即可,所有特殊字符都会被自动转义

                    +
                    +

                    treeNode 举例

                    +

                    1. 设置节点的名称为 test1、test2、test3

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1"},
                    +	{ "id":2, "name":"test2"},
                    +	{ "id":3, "name":"test3"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.nocheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.nocheck.html new file mode 100644 index 0000000000000000000000000000000000000000..afaa62fb8c236931fb8ae4d46bed0d172218ddf4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.nocheck.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    BooleantreeNode.nocheck

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    1、设置节点是否隐藏 checkbox / radio [setting.check.enable = true 时有效]

                    +

                    2、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示此节点不显示 checkbox / radio,不影响勾选的关联关系,不影响父节点的半选状态。

                    +

                    false 表示节点具有正常的勾选功能

                    +
                    +

                    treeNode 举例

                    +

                    1. 不显示某个节点的 checkbox / radio

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1", "nocheck":true},
                    +	{ "id":2, "name":"test2"},
                    +	{ "id":3, "name":"test3"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.open.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.open.html new file mode 100644 index 0000000000000000000000000000000000000000..1eb9aec4793d4b104d442a7b17e02b16cdaacd9b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.open.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    BooleantreeNode.open

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    记录 treeNode 节点的 展开 / 折叠 状态。

                    +

                    1、初始化节点数据时,如果设定 treeNode.open = true,则会直接展开此节点

                    +

                    2、叶子节点 treeNode.open = false

                    +

                    3、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

                    +

                    4、非异步加载模式下,无子节点的父节点设置 open=true 后,可显示为展开状态,但异步加载模式下不会生效。(v3.5.15+)

                    +

                    默认值:false

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示节点为 展开 状态

                    +

                    false 表示节点为 折叠 状态

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点的 展开 / 折叠 状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isOpen = sNodes[0].open;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.parentTId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.parentTId.html new file mode 100644 index 0000000000000000000000000000000000000000..d228a23abcf725b4b6003165ca75a83595f44f87 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.parentTId.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    StringtreeNode.parentTId

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    treeNode 节点的父节点唯一标识 tId。

                    +

                    1、v3.x 用 parentTId 替换了原先的 parentNode 属性,同时增加了 getParentNode 方法,以避免原先 parentNode 造成的 clone 死循环

                    +

                    2、初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    zTree 内部生成的节点唯一标识,请参考 treeNode.tId 的说明

                    +

                    如果 treeNode 是根节点,则 parentTId = null

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点的父节点 tId

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var parentTId = sNodes[0].parentTId;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.tId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.tId.html new file mode 100644 index 0000000000000000000000000000000000000000..c32285c5f4c443d96339a8d638c48e7109e08545 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.tId.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    StringtreeNode.tId

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    treeNode 节点的唯一标识 tId。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    生成规则:setting.treeId + "_" + 内部计数

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点的 tId

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var tId = sNodes[0].tId;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.target.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.target.html new file mode 100644 index 0000000000000000000000000000000000000000..f7c1b6bacc827428de6eb3da7c5f52a502aa9055 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.target.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    StringtreeNode.target

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    设置点击节点后在何处打开 url。[treeNode.url 存在时有效]

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    同超链接 target 属性: "_blank", "_self" 或 其他指定窗口名称

                    +

                    省略此属性,则默认为 "_blank"

                    +
                    +

                    treeNode 举例

                    +

                    1. 设置点击某节点时,弹出新页面

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
                    +	......
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.url.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.url.html new file mode 100644 index 0000000000000000000000000000000000000000..0b2e0076f7fc6cccb9984e3986a1cb0a52776655 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.url.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    StringtreeNode.url

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    节点链接的目标 URL

                    +

                    1、编辑模式 (setting.edit.enable = true) 下此属性功能失效,如果必须使用类似功能,请利用 onClick 事件回调函数自行控制。

                    +

                    2、如果需要在 onClick 事件回调函数中进行跳转控制,那么请将 URL 地址保存在其他自定义的属性内,请勿使用 url

                    +

                    默认值:无

                    +
                    +
                    +

                    String 格式说明

                    +
                    +

                    同超链接 href 属性

                    +
                    +

                    treeNode 举例

                    +

                    1. 设置某节点点击时,跳转到 g.cn

                    +
                    var nodes = [
                    +	{ "id":1, "name":"Google CN", "url":"http://g.cn"},
                    +	......
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.zAsync.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.zAsync.html new file mode 100644 index 0000000000000000000000000000000000000000..00e48f394702c363ce77a3e7c0a8af9f995bb740 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/treeNode.zAsync.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.zAsync

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    记录 treeNode 节点是否已经进行过异步加载,避免父节点反复异步加载数据。

                    +

                    初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

                    +

                    默认值:false (无子节点的父节点); true (有子节点的父节点 & 叶子节点)

                    +
                    +
                    +

                    Boolean 格式说明

                    +
                    +

                    true 表示父节点展开时不需要自动异步加载

                    +

                    false 表示父节点展开时需要自动异步加载

                    +

                    此参数不会对 reAsyncChildNodes 方法造成任何影响

                    +
                    +

                    treeNode 举例

                    +

                    1. 查看当前被选中的节点是否节点是否需要自动异步加载

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var zAsync = sNodes[0].zAsync;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.addNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.addNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..0fa52e369fc6cbed1f2ab97ea96ed7c346c80243 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.addNodes.html @@ -0,0 +1,47 @@ +
                    +
                    +

                    Function(parentNode, [index], newNodes, isSilent)zTreeObj.addNodes

                    +

                    概述[ 依赖 jquery.ztree.core 扩展 js ]

                    +
                    +

                    +
                    +

                    添加节点。

                    +

                    v3.x 为了避免原先反复初始化造成的数据重复问题,在 初始化 和 添加节点 时内部进行 clone 操作。如果需要获取数据在 zTree 内的对象,请获取此方法的返回值。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    parentNodeJSON

                    +

                    指定的父节点,如果增加根节点,请设置 parentNode 为 null 即可。

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    [index]Number

                    +

                    新节点插入的位置(从 0 开始)

                    +

                    index = -1 时,插入到最后

                    +

                    此参数可忽略

                    +

                    v3.5.19+

                    +

                    newNodesJSON / Array(JSON)

                    +

                    需要增加的节点数据 JSON 对象集合,数据只需要满足 zTree 的节点数据必需的属性即可,详细请参考“treeNode 节点数据详解”

                    +

                    1、v3.x 支持单独添加一个节点,即如果只新增一个节点,不用必须包在数组中

                    +

                    2、使用简单数据模式,请参考 setting.data.simpleData 内的属性说明

                    +

                    isSilentBoolean

                    +

                    设定增加节点后是否自动展开父节点。

                    +

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    +

                    返回值Array(JSON)

                    +

                    返回值是 zTree 最终添加的节点数据集合

                    +

                    如果 newNodes 是单个节点数据 JSON,返回值也是将其包在 Array 内

                    +

                    请务必记住:返回值中的数据对象 是 newNodes 被 clone 后的,所以绝对不相等!

                    +
                    +

                    function 举例

                    +

                    1. 对于 id = "tree" 的 zTree 增加 1 个根节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var newNode = {name:"newNode1"};
                    +newNode = treeObj.addNodes(null, newNode);
                    +
                    +

                    2. 对于 id = "tree" 的 zTree 增加 3 个根节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var newNodes = [{name:"newNode1"}, {name:"newNode2"}, {name:"newNode3"}];
                    +newNodes = treeObj.addNodes(null, newNodes);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.cancelEditName.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.cancelEditName.html new file mode 100644 index 0000000000000000000000000000000000000000..9df098f0e5c94b58f23f2a371dfee21a4e9320e7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.cancelEditName.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Function(newName)zTreeObj.cancelEditName

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    取消节点的编辑名称状态,可以恢复原名称,也可以强行赋给新的名称。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    newNameString

                    +

                    重新给定的新名称。

                    +

                    如果省略此参数,则恢复原名称。

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 取消 zTree 的编辑名称状态,恢复该节点原有名称

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.cancelEditName();
                    +
                    +

                    2. 取消 zTree 的编辑名称状态,并且重新设定该节点名称

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.cancelEditName("test_new_name");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.cancelSelectedNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.cancelSelectedNode.html new file mode 100644 index 0000000000000000000000000000000000000000..d84176850f018305c08740ac360ab509902ff427 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.cancelSelectedNode.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.cancelSelectedNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    取消节点的选中状态。

                    +

                    v3.x 支持多点同时选中,因此取消选中状态可以全部取消,也可以单独取消某个节点的选中状态。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    需要取消选中状态的节点。

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    如果省略此参数,则将取消全部被选中节点的选中状态。

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 取消当前所有被选中节点的选中状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.cancelSelectedNode();
                    +
                    +

                    2. 取消当前第一个被选中节点的选中状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) { 
                    +	treeObj.cancelSelectedNode(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.checkAllNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.checkAllNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..be5129994e00d79af301a30c9aa09f54edc874f1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.checkAllNodes.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(checked)zTreeObj.checkAllNodes

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    勾选 或 取消勾选 全部节点。[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时有效]

                    +

                    此方法不会触发 beforeCheck / onCheck 事件回调函数。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    checkedBoolean

                    +

                    checked = true 表示勾选全部节点

                    +

                    checked = false 表示全部节点取消勾选

                    +

                    不会影响 treeNode.nocheck = true 的节点。

                    +

                    不会影响未加载的节点。

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 勾选全部节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.checkAllNodes(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.checkNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.checkNode.html new file mode 100644 index 0000000000000000000000000000000000000000..7bc0dbf44c18e9f2c67cd34cf2a342e4085b825b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.checkNode.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Function(treeNode, checked, checkTypeFlag, callbackFlag)zTreeObj.checkNode

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    勾选 或 取消勾选 单个节点。[setting.check.enable = true 时有效]

                    +

                    v3.x 中 checkNode() 方法可以触发 beforeCheck / onCheck 事件回调函数。便于减少冗余代码

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    需要勾选 或 取消勾选 的节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    checkedBoolean

                    +

                    checked = true 表示勾选节点

                    +

                    checked = false 表示节点取消勾选

                    +

                    省略此参数,则根据对此节点的勾选状态进行 toggle 切换

                    +

                    不影响 treeNode.nocheck = true 的节点。

                    +

                    checkTypeFlagBoolean

                    +

                    checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父子节点的勾选联动操作

                    +

                    checkTypeFlag = false 表示只修改此节点勾选状态,无任何勾选联动操作

                    +

                    checkTypeFlag = false 且 treeNode.checked = checked 时,不会触发回调函数,直接返回

                    +

                    不影响父子节点中 treeNode.nocheck = true 的节点。

                    +

                    callbackFlagBoolean

                    +

                    callbackFlag = true 表示执行此方法时触发 beforeCheck & onCheck 事件回调函数

                    +

                    callbackFlag = false 表示执行此方法时不触发事件回调函数

                    +

                    省略此参数,等同于 false

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 勾选当前选中的节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +for (var i=0, l=nodes.length; i < l; i++) {
                    +	treeObj.checkNode(nodes[i], true, true);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.copyNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.copyNode.html new file mode 100644 index 0000000000000000000000000000000000000000..f1b624bfb2d9cee4b0c1df222f70611a2f06043b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.copyNode.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.copyNode

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    复制节点。

                    +

                    v3.x 复制节点时进行 clone 操作。如果需要获取数据在 zTree 内的对象,请获取此方法的返回值。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    targetNodeJSON

                    +

                    要复制到的目标节点 JSON 数据

                    +

                    如果复制成为根节点,请设置 targetNode 为 null 即可

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    treeNodeJSON

                    +

                    需要被复制的节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    moveTypeString

                    +

                    复制到目标节点的相对位置

                    +

                    "inner":成为子节点,"prev":成为同级前一个节点,"next":成为同级后一个节点

                    +

                    isSilentBoolean

                    +

                    设定复制节点后是否自动展开父节点。

                    +

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    +

                    返回值JSON

                    +

                    返回值是最终加入到 zTree 内的节点数据

                    +

                    请务必记住:返回值中的数据对象 是 treeNode 被 clone 后的,所以绝对不相等!

                    +
                    +

                    function 举例

                    +

                    1. 将根节点中第二个节点 复制成为 第一个节点的子节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.copyNode(nodes[0], nodes[1], "inner");
                    +
                    +

                    2. 将根节点中第二个节点 复制成为 第一个节点的前一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.copyNode(nodes[0], nodes[1], "before");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.destroy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.destroy.html new file mode 100644 index 0000000000000000000000000000000000000000..d9f6da0d6181032ae9000832c19113a6ee5dda58 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.destroy.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Function(treeId)zTreeObj.destroy

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    从 zTree v3.4 开始提供销毁 zTree 的方法。

                    +

                    1、用此方法可以销毁 zTreeObj 代表的 zTree。

                    +

                    2、销毁当前页面全部的 zTree,也可以使用 $.fn.zTree.destroy() 方法。

                    +

                    3、重新使用已经被销毁的树,必须要使用 init 方法进行初始化。

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 销毁 id 为 "treeDemo" 的 zTree

                    +
                    var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
                    +zTreeObj.destroy();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.editName.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.editName.html new file mode 100644 index 0000000000000000000000000000000000000000..2d4eaf7bbc3de79fb3af268c8b8c376738c56caa --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.editName.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.editName

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    设置某节点进入编辑名称状态。

                    +

                    1、如果需要用 js 取消编辑名称状态,请使用 cancelEditName(newName) 方法。

                    +

                    2、可利用此方法让当前正编辑的节点 input 输入框获取焦点。

                    +

                    3、请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    指定进入编辑名称状态的节点 JSON 数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 设置根节点第一个节点进入编辑名称状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.editName(nodes[0]);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.expandAll.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.expandAll.html new file mode 100644 index 0000000000000000000000000000000000000000..aaa3e464e9541214c20e0331fea2031ec9d9e33c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.expandAll.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Function(expandFlag)zTreeObj.expandAll

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    展开 / 折叠 全部节点

                    +

                    此方法不会触发 beforeExpand / onExpand 和 beforeCollapse / onCollapse 事件回调函数。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    expandFlagBoolean

                    +

                    expandFlag = true 表示 展开 全部节点

                    +

                    expandFlag = false 表示 折叠 全部节点

                    +

                    返回值Boolean

                    +

                    返回值表示最终实际操作情况

                    +

                    true 表示 展开 全部节点

                    +

                    false 表示 折叠 全部节点

                    +

                    null 表示 不存在任何父节点

                    +
                    +

                    function 举例

                    +

                    1. 展开全部节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.expandAll(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.expandNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.expandNode.html new file mode 100644 index 0000000000000000000000000000000000000000..5d96d3f506b83a1af3ae8913c476f84b3f9cd9ae --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.expandNode.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    Function(treeNode, expandFlag, sonSign, focus, callbackFlag)zTreeObj.expandNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    展开 / 折叠 指定的节点

                    +

                    v3.x 中执行此方法可以触发 beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数。便于减少冗余代码

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    需要 展开 / 折叠 的节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    expandFlagBoolean

                    +

                    expandFlag = true 表示 展开 节点

                    +

                    expandFlag = false 表示 折叠 节点

                    +

                    省略此参数,则根据对此节点的展开状态进行 toggle 切换

                    +

                    sonSignBoolean

                    +

                    sonSign = true 表示 全部子孙节点 进行与 expandFlag 相同的操作

                    +

                    sonSign = false 表示 只影响此节点,对于其 子孙节点无任何影响

                    +

                    sonSign = false 且 treeNode.open = expandFlag 时,不会触发回调函数,直接返回

                    +

                    省略此参数,等同于 false

                    +

                    focusBoolean

                    +

                    focus = true 表示 展开 / 折叠 操作后,通过设置焦点保证此焦点进入可视区域内

                    +

                    focus = false 表示 展开 / 折叠 操作后,不设置任何焦点

                    +

                    省略此参数,等同于 true

                    +

                    callbackFlagBoolean

                    +

                    callbackFlag = true 表示执行此方法时触发 beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数

                    +

                    callbackFlag = false 表示执行此方法时不触发事件回调函数

                    +

                    省略此参数,等同于 false

                    +

                    返回值Boolean

                    +

                    返回值表示最终实际操作情况

                    +

                    true 表示 展开 节点

                    +

                    false 表示 折叠 节点

                    +

                    null 表示 不是父节点

                    +
                    +

                    function 举例

                    +

                    1. 展开当前选择的第一个节点(包括其全部子节点)

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	treeObj.expandNode(nodes[0], true, true, true);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getChangeCheckedNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getChangeCheckedNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..ba865347f0bd145bff9966baec5528a6a8c43f34 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getChangeCheckedNodes.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Function()zTreeObj.getChangeCheckedNodes

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    获取输入框勾选状态被改变的节点集合(与原始数据 checkedOld 对比)。[setting.check.enable = true 时有效]

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值Array(JSON)

                    +

                    返回全部勾选状态被改变的节点集合 Array

                    +

                    如果需要获取每次操作后全部被改变勾选状态的节点数据,请在每次勾选操作后,遍历所有被改变勾选状态的节点数据,让其 checkedOld = checked 就可以了。

                    +
                    +

                    function 举例

                    +

                    1. 获取当前勾选状态被改变的节点集合

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getChangeCheckedNodes();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getCheckedNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getCheckedNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..41a7df39270a4a073f3dad3e249f1f9cfefc1dad --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getCheckedNodes.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Function(checked)zTreeObj.getCheckedNodes

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    获取输入框被勾选 或 未勾选的节点集合。[setting.check.enable = true 时有效]

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    checkedBoolean

                    +

                    checked = true 表示获取 被勾选 的节点集合

                    +

                    checked = false 表示获取 未勾选 的节点集合

                    +

                    省略此参数,等同于 true。

                    +

                    对于 treeNode.nocheck = true 的节点不进行获取。

                    +

                    返回值Array(JSON)

                    +

                    返回全部符合要求的节点集合 Array

                    +
                    +

                    function 举例

                    +

                    1. 获取当前被勾选的节点集合

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getCheckedNodes(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeByParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeByParam.html new file mode 100644 index 0000000000000000000000000000000000000000..89e72c78aff0586ac787ea31741d953c21896125 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeByParam.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Function(key, value, parentNode)zTreeObj.getNodeByParam

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    根据节点数据的属性搜索,获取条件完全匹配的节点数据 JSON 对象

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    keyString

                    +

                    需要精确匹配的属性名称

                    +

                    value?

                    +

                    需要精确匹配的属性值,可以是任何类型,只要保证与 key 指定的属性值保持一致即可

                    +

                    parentNodeJSON

                    +

                    搜索范围,指定在某个父节点下的子节点中进行搜索

                    +

                    忽略此参数,表示在全部节点中搜索

                    +

                    返回值JSON

                    +

                    匹配精确搜索的节点数据

                    +

                    1、如无结果,返回 null

                    +

                    2、如有多个节点满足查询条件,只返回第一个匹配到的节点

                    +
                    +

                    function 举例

                    +

                    1. 查找 id = 1 的节点数据

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodeByParam("id", 1, null);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeByTId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeByTId.html new file mode 100644 index 0000000000000000000000000000000000000000..76fcc48650fc57cec77727647bc8cc6b41de0519 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeByTId.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function(tId)zTreeObj.getNodeByTId

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    根据 zTree 的唯一标识 tId 快速获取节点 JSON 数据对象

                    +

                    通过内部的 cache 获取,不需要遍历节点。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    tIdString

                    +

                    节点在 zTree 内的唯一标识 tId

                    +

                    返回值JSON

                    +

                    tId 对应的节点 JSON 数据对象

                    +

                    如无结果,返回 null

                    +
                    +

                    function 举例

                    +

                    1. 获取 tId = "tree_10" 的节点数据

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodeByTId("tree_10");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeIndex.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeIndex.html new file mode 100644 index 0000000000000000000000000000000000000000..b2c757d2110f7cfc7b7341e657bd2f449d04dbb8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodeIndex.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.getNodeIndex

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取某节点在同级节点中的序号(从0开始)

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    需要查询顺序的节点 JSON 数据对象

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    返回值Number

                    +

                    返回值从 0 开始计数

                    +

                    如果不存在该节点数据,返回 -1

                    +
                    +

                    function 举例

                    +

                    1. 获取当前选中的第一个节点在同级节点中的序号

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	var index = treeObj.getNodeIndex(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..b368535e1e45c993e7521225f09b5ff9a06416d9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodes.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Function()zTreeObj.getNodes

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取 zTree 的全部节点数据

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值Array(JSON)

                    +

                    全部节点数据

                    +

                    1、Array 仅仅是根节点的集合(默认情况子节点都处于 children 属性下);

                    +

                    2、如需遍历全部节点需要利用递归,或利用 transformToArray 方法 将数据变成简单的 Array 集合

                    +

                    3、对于异步加载模式下,尚未加载的子节点是无法通过此方法获取的。

                    +
                    +

                    function 举例

                    +

                    1. 获取全部节点数据

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByFilter.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByFilter.html new file mode 100644 index 0000000000000000000000000000000000000000..69174251e4bc4294e559c43614ed4b991251ee2d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByFilter.html @@ -0,0 +1,43 @@ +
                    +
                    +

                    Function(filter, isSingle, parentNode, invokeParam)zTreeObj.getNodesByFilter

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    根据自定义规则搜索节点数据 JSON 对象集合 或 单个节点数据

                    +

                    可自定义复杂的搜索规则

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    filterFunction

                    +

                    自定义过滤器函数 function filter(node) {...}

                    +

                    filter 参数:node (节点数据 JSON)

                    +

                    filter 返回值:boolean (true 表示符合搜索条件;false 表示不符合搜索条件)

                    +

                    isSingleBoolean

                    +

                    isSingle = true 表示只查找单个节点

                    +

                    isSingle = false 表示查找节点集合

                    +

                    忽略此参数,表示查找节点集合

                    +

                    parentNodeJSON

                    +

                    可以指定在某个父节点下的子节点中搜索

                    +

                    忽略此参数,表示在全部节点中搜索

                    +

                    invokeParam任意类型

                    +

                    用户自定义的数据对象,用于 filter 中进行计算

                    +

                    返回值Array(JSON) / JSON

                    +

                    isSingle = true 返回 第一个找到的节点数据 JSON,无结果时返回 null

                    +

                    isSingle = false 返回 节点数据集合 Array(JSON),无结果时返回 [ ]

                    +
                    +

                    function 举例

                    +

                    1. 查找 level = 2 & name 中包含 "test" 的节点数据

                    +
                    function filter(node) {
                    +    return (node.level == 2 && node.name.indexOf("test")>-1);
                    +}
                    +......
                    +var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodesByFilter(filter, true); // 仅查找一个节点
                    +var nodes = treeObj.getNodesByFilter(filter); // 查找节点集合
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByParam.html new file mode 100644 index 0000000000000000000000000000000000000000..cf45939c1277da269331d9ec19f1a751105e03bd --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByParam.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    Function(key, value, parentNode)zTreeObj.getNodesByParam

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    根据节点数据的属性搜索,获取条件完全匹配的节点数据 JSON 对象集合

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    keyString

                    +

                    需要精确匹配的属性名称

                    +

                    value?

                    +

                    需要精确匹配的属性值,可以是任何类型,只要保证与 key 指定的属性值保持一致即可

                    +

                    parentNodeJSON

                    +

                    可以指定在某个父节点下的子节点中搜索

                    +

                    忽略此参数,表示在全部节点中搜索

                    +

                    返回值Array(JSON)

                    +

                    匹配精确搜索的节点数据集合

                    +

                    如无结果,返回 [ ]

                    +
                    +

                    function 举例

                    +

                    1. 查找 name = "test" 的节点数据

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodesByParam("name", "test", null);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByParamFuzzy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByParamFuzzy.html new file mode 100644 index 0000000000000000000000000000000000000000..04d183f913228f9d186c141a7e98e32349c917cc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getNodesByParamFuzzy.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Function(key, value, parentNode)zTreeObj.getNodesByParamFuzzy

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    根据节点数据的属性搜索,获取条件模糊匹配的节点数据 JSON 对象集合

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    keyString

                    +

                    需要模糊匹配的属性名称

                    +

                    valueString

                    +

                    需要模糊匹配的属性值

                    +

                    模糊匹配只能针对 String 类型的数据

                    +

                    parentNodeJSON

                    +

                    可以指定在某个父节点下的子节点中搜索

                    +

                    忽略此参数,表示在全部节点中搜索

                    +

                    返回值Array(JSON)

                    +

                    匹配模糊搜索的节点数据集合

                    +

                    如无结果,返回 [ ]

                    +
                    +

                    function 举例

                    +

                    1. 查找 name 包含 "test" 的节点数据

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodesByParamFuzzy("name", "test", null);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getSelectedNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getSelectedNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..ab36f8ee5d00de6bff20bf140e7d95f5f132e420 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.getSelectedNodes.html @@ -0,0 +1,23 @@ +
                    +
                    +

                    Function()zTreeObj.getSelectedNodes

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    获取 zTree 当前被选中的节点数据集合

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值Array(JSON)

                    +

                    当前被选中的节点数据集合

                    +
                    +

                    function 举例

                    +

                    1. 获取当前被选中的节点数据集合

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.hideNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.hideNode.html new file mode 100644 index 0000000000000000000000000000000000000000..a1996b885cafddefdfde4eddb826c65b751d4192 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.hideNode.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.hideNode

                    +

                    概述[ 依赖 jquery.ztree.exhide 扩展 js ]

                    +
                    +

                    +
                    +

                    隐藏某个节点。

                    +

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    +

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    +

                    3、请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    指定被隐藏的节点 JSON 数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 隐藏根节点第一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.hideNode(nodes[0]);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.hideNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.hideNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..cf752b509d8cfb7b3421bcb15a92ebd95ae0bb4f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.hideNodes.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNodes)zTreeObj.hideNodes

                    +

                    概述[ 依赖 jquery.ztree.exhide 扩展 js ]

                    +
                    +

                    +
                    +

                    隐藏一批节点。

                    +

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    +

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    +

                    3、请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodesArray(JSON)

                    +

                    指定被隐藏的节点 JSON 数据集合

                    +

                    请务必保证这些节点数据对象 是 zTree 内部的数据对象

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 隐藏根节点第一个节点的子节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.hideNodes(nodes[0].children);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.moveNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.moveNode.html new file mode 100644 index 0000000000000000000000000000000000000000..9c9180b916428974d8179d3d821d33b22e0eb258 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.moveNode.html @@ -0,0 +1,46 @@ +
                    +
                    +

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.moveNode

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    移动节点。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    targetNodeJSON

                    +

                    要移动到的目标节点 JSON 数据

                    +

                    如果移动成为根节点,请设置 targetNode 为 null 即可

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    treeNodeJSON

                    +

                    需要被移动的节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    moveTypeString

                    +

                    指定移动到目标节点的相对位置

                    +

                    "inner":成为子节点,"prev":成为同级前一个节点,"next":成为同级后一个节点

                    +

                    isSilentBoolean

                    +

                    设定移动节点后是否自动展开父节点。

                    +

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    +

                    返回值JSON

                    +

                    返回值是最终被移动的节点数据,正常情况下与 treeNode 参数完全相同

                    +

                    如果 返回值 为 null,说明 移动失败,主要原因有:
                    +  1、targetNode 是 treeNode 父节点,且 moveType = "inner"
                    +  2、targetNode 是 treeNode 子孙节点 +

                    +
                    +

                    function 举例

                    +

                    1. 将根节点中第二个节点 移动成为 第一个节点的子节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.moveNode(nodes[0], nodes[1], "inner");
                    +
                    +

                    2. 将根节点中第二个节点 移动成为 第一个节点的前一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.moveNode(nodes[0], nodes[1], "prev");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.reAsyncChildNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.reAsyncChildNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..3ca0492fcda731fb09e44cc7f1d21a232ab25641 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.reAsyncChildNodes.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Function(parentNode, reloadType, isSilent, callback)zTreeObj.reAsyncChildNodes +

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    强行异步加载父节点的子节点。[setting.async.enable = true 时有效]

                    +

                    已经加载过的父节点可反复使用此方法重新加载。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    parentNodeJSON

                    +

                    指定需要异步加载的父节点 JSON 数据

                    +

                    1、parentNode = null 时,相当于从根节点 Root 进行异步加载

                    +

                    2、parentNode.isParent = false 时,不进行异步加载

                    +

                    3、请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    reloadTypeString

                    +

                    reloadType = "refresh" 表示清空后重新加载。

                    +

                    reloadType != "refresh" 时,表示追加子节点处理。

                    +

                    isSilentBoolean

                    +

                    设定异步加载后是否自动展开父节点。

                    +

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    +

                    callbackfunction

                    +

                    刷新完成后的回调函数。

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 重新异步加载 zTree

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.reAsyncChildNodes(null, "refresh");
                    +
                    +

                    2. 重新异步加载当前选中的第一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	treeObj.reAsyncChildNodes(nodes[0], "refresh");
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.reAsyncChildNodesPromise.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.reAsyncChildNodesPromise.html new file mode 100644 index 0000000000000000000000000000000000000000..b95200a54e541fdc8768a6e67ad3db60b88bc42a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.reAsyncChildNodesPromise.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Function(parentNode, reloadType, isSilent)zTreeObj.reAsyncChildNodesPromise +

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    强行异步加载父节点的子节点(ES6 Promise 版)。[setting.async.enable = true 时有效]

                    +

                    已经加载过的父节点可反复使用此方法重新加载。

                    +

                    请通过 zTree 对象执行此方法。

                    +

                    v3.5.29+

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    parentNodeJSON

                    +

                    指定需要异步加载的父节点 JSON 数据

                    +

                    1、parentNode = null 时,相当于从根节点 Root 进行异步加载

                    +

                    2、parentNode.isParent = false 时,不进行异步加载

                    +

                    3、请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    reloadTypeString

                    +

                    reloadType = "refresh" 表示清空后重新加载。

                    +

                    reloadType != "refresh" 时,表示追加子节点处理。

                    +

                    isSilentBoolean

                    +

                    设定异步加载后是否自动展开父节点。

                    +

                    isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。

                    +

                    返回值ES6 Promise

                    +

                    ES6 的 Promise 对象,便于异步控制,使用时请注意浏览器兼容问题

                    +
                    +

                    function 举例

                    +

                    1. 重新异步加载 zTree

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.reAsyncChildNodes(null, "refresh");
                    +
                    +

                    2. 重新异步加载当前选中的第一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	treeObj.reAsyncChildNodes(nodes[0], "refresh");
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.refresh.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.refresh.html new file mode 100644 index 0000000000000000000000000000000000000000..09a74ca326792d553a8656bd61f070441d795d1e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.refresh.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Function()zTreeObj.refresh

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    刷新 zTree 。

                    +

                    没有特殊必要,尽量不要使用此方法。单个节点更新请使用 updateNode 方法,异步加载模式下请使用 reAsyncChildNodes 方法。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 刷新 zTree

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.refresh();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.removeChildNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.removeChildNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..588639fb4b326b498af70191b3f3134656965ecd --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.removeChildNodes.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Function(parentNode)zTreeObj.removeChildNodes

                    +

                    概述[ 依赖 jquery.ztree.core 扩展 js ]

                    +
                    +

                    +
                    +

                    清空某父节点的子节点。

                    +

                    1、清空子节点后,父节点会自动变为叶子节点,如需要父节点保持父节点状态,请设置 setting.data.keep.parent 属性。

                    +

                    2、请勿用此方法清空根节点,如果需要清空根节点,直接初始化 zTree,并且设置初始节点为 null 即可。

                    +

                    3、此方法不会触发任何事件回调函数。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    parentNodeJSON

                    +

                    需要清空子节点的父节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    返回值Array(JSON)

                    +

                    将该父节点的子节点数据返回,如果不存在则返回 null

                    +
                    +

                    function 举例

                    +

                    1. 清空选中的第一个节点的子节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes && nodes.length>0) {
                    +	treeObj.removeChildNodes(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.removeNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.removeNode.html new file mode 100644 index 0000000000000000000000000000000000000000..442f5c7e6baef231abe9aac07fc67aa73b0286d8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.removeNode.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeNode, callbackFlag)zTreeObj.removeNode

                    +

                    概述[ 依赖 jquery.ztree.core 扩展 js ]

                    +
                    +

                    +
                    +

                    删除节点。

                    +

                    v3.x 中删除节点可以触发 beforeRemove / onRemove 事件回调函数。便于减少冗余代码

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    需要被删除的节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    callbackFlagBoolean

                    +

                    callbackFlag = true 表示执行此方法时触发 beforeRemove & onRemove 事件回调函数

                    +

                    callbackFlag = false 表示执行此方法时不触发事件回调函数

                    +

                    省略此参数,等同于 false

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 删除所有选中的节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +for (var i=0, l=nodes.length; i < l; i++) {
                    +	treeObj.removeNode(nodes[i]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.selectNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.selectNode.html new file mode 100644 index 0000000000000000000000000000000000000000..8d074c449b97e6404ef71db4e16d9bd65a9d5c97 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.selectNode.html @@ -0,0 +1,38 @@ +
                    +
                    +

                    Function(treeNode, addFlag, isSilent)zTreeObj.selectNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    选中指定节点

                    +

                    v3.x 支持同时选中多个节点。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    需要被选中的节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    addFlagBoolean

                    +

                    addFlag = true 表示追加选中,会出现多点同时被选中的情况

                    +

                    addFlag = false (默认)表示单独选中,原先被选中的节点会被取消选中状态

                    +

                    setting.view.selectedMulti = false 时,此参数无效,始终进行单独选中

                    +

                    isSilentBoolean

                    +

                    isSilent = true 选中节点时,不会让节点自动滚到到可视区域内

                    +

                    isSilent = false (默认)表示选中节点时,会让节点自动滚到到可视区域内

                    +

                    (v3.5.23+)

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 单独选中根节点中第一个节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +if (nodes.length>0) {
                    +	treeObj.selectNode(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setChkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setChkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..9540080ba8bd71ac88dd039941914c874f6e6b1a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setChkDisabled.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Function(node, disabled, inheritParent, inheritChildren)zTreeObj.setChkDisabled

                    +

                    概述[ 依赖 jquery.ztree.excheck 扩展 js ]

                    +
                    +

                    +
                    +

                    禁用 或 解禁 某个节点的 checkbox / radio [setting.check.enable = true 时有效]

                    +

                    1、节点的 checkbox / radio 被禁用后,无法勾选或取消勾选,但能够影响父节点的半选状态

                    +

                    2、请不要直接修改已加载节点的 treeNode.chkDisabled 属性。

                    +

                    3、请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    需要禁用 或 解禁 checkbox / radio 的节点数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    disabledBoolean

                    +

                    disabled = true 表示禁用 checkbox / radio

                    +

                    disabled = false 表示解禁 checkbox / radio

                    +

                    省略此参数,等同于 disabled = false

                    +

                    不影响 treeNode.nocheck = true 的节点。

                    +

                    inheritParentBoolean

                    +

                    inheritParent = true 表示全部父节点进行同样的操作

                    +

                    inheritParent = false 表示不影响父节点

                    +

                    省略此参数,等同于 inheritParent = false

                    +

                    inheritChildrenBoolean

                    +

                    inheritChildren = true 表示全部子节点进行同样的操作

                    +

                    inheritChildren = false 表示不影响子节点

                    +

                    省略此参数,等同于 inheritChildren = false

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 禁用当前选中的节点的 checkbox / radio

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +for (var i=0, l=nodes.length; i < l; i++) {
                    +	treeObj.setChkDisabled(nodes[i], true);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setEditable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setEditable.html new file mode 100644 index 0000000000000000000000000000000000000000..c90c8de6c5761080138b412735c7542c243264a7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setEditable.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function(editable)zTreeObj.setEditable

                    +

                    概述[ 依赖 jquery.ztree.exedit 扩展 js ]

                    +
                    +

                    +
                    +

                    设置 zTree 进入 / 取消 编辑状态。

                    +

                    对于编辑状态的各种功能需要提前设置对应 setting 中的不同属性

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    editableBoolean

                    +

                    true 表示进入 编辑状态

                    +

                    false 表示取消 编辑状态

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 设置 zTree 进入编辑状态

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.setEditable(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setting.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setting.html new file mode 100644 index 0000000000000000000000000000000000000000..61abd53128fd07656b190196f85549c021a9f512 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.setting.html @@ -0,0 +1,13 @@ +
                    +
                    +

                    JSONzTreeObj.setting

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    zTree 对象使用的 setting 配置数据,详细请参考 “setting 配置详解”中的各个属性详细说明

                    +

                    v3.x 取消了原先操作 setting 的方法,让用户可以较自由的修改参数,但请注意,对于 zTree 初始化有影响的参数后期修改是不会起作用的,请对各个属性有较深入的了解以后再考虑进行修改。

                    +
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.showNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.showNode.html new file mode 100644 index 0000000000000000000000000000000000000000..ed22d510eafda368f1d54182d54ce86f742ee87e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.showNode.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.showNode

                    +

                    概述[ 依赖 jquery.ztree.exhide 扩展 js ]

                    +
                    +

                    +
                    +

                    显示某个被隐藏的节点。

                    +

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    +

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    +

                    3、请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    指定被显示的节点 JSON 数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 显示某个隐藏的节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodeByParam("isHidden", true);
                    +if (node) {
                    +  treeObj.showNode(node);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.showNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.showNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..b0906574fddca3ea9b05a3e232a91cb463d073ed --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.showNodes.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNodes)zTreeObj.showNodes

                    +

                    概述[ 依赖 jquery.ztree.exhide 扩展 js ]

                    +
                    +

                    +
                    +

                    显示一批已经被隐藏的节点。

                    +

                    1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

                    +

                    2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

                    +

                    3、请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodesArray(JSON)

                    +

                    指定被显示的节点 JSON 数据集合

                    +

                    请务必保证这些节点数据对象 是 zTree 内部的数据对象

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 显示全部隐藏的节点

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodesByParam("isHidden", true);
                    +treeObj.showNodes(nodes);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.transformToArray.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.transformToArray.html new file mode 100644 index 0000000000000000000000000000000000000000..a46dc61ea36aea52292343c0ead8524324b2f202 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.transformToArray.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Function(treeNodes)zTreeObj.transformToArray

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    将 zTree 使用的标准 JSON 嵌套格式的数据转换为简单 Array 格式。(免去用户自行编写递归遍历全部节点的麻烦)

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodesArray(JSON) / JSON

                    +

                    需要被转换的 zTree 节点数据对象集合 或 某个单独节点的数据对象

                    +

                    返回值Array(JSON)

                    +

                    转换后的简单 Array 数据格式

                    +
                    +

                    function 举例

                    +

                    1. 将 zTree 节点数据转换为简单 Array 格式

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.transformToArray(treeObj.getNodes());
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.transformTozTreeNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.transformTozTreeNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..4b02650922c4eb831c77f3a8c512fc0519910fb0 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.transformTozTreeNodes.html @@ -0,0 +1,43 @@ +
                    +
                    +

                    Function(simpleNodes)zTreeObj.transformTozTreeNodes

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    将简单 Array 格式数据转换为 zTree 使用的标准 JSON 嵌套数据格式。

                    +

                    使用此方法,请务必设置节点唯一标识属性名称 setting.data.simpleData.idKey 和 父节点唯一标识属性名称 setting.data.simpleData.pIdKey,并且让数据满足父子关系。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    simpleNodesArray(JSON) / JSON

                    +

                    需要被转换的简单 Array 格式数据 或 某个单独的数据对象

                    +

                    返回值Array(JSON)

                    +

                    zTree 使用的标准数据,子节点都存在于父节点数据的 children 属性中

                    +

                    如果 simpleNodes 是一个 JSON 对象,则被简单封装成长度为 1 的数组。

                    +
                    +

                    function 举例

                    +

                    1. 将简单 Array 格式转换为zTree使用的标准格式

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var simpleNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.transformTozTreeNodes(simpleNodes);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.updateNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.updateNode.html new file mode 100644 index 0000000000000000000000000000000000000000..e13419ce009e5ad8b35c69770aec005d3460b95b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/cn/zTreeObj.updateNode.html @@ -0,0 +1,37 @@ +
                    +
                    +

                    Function(treeNode, checkTypeFlag)zTreeObj.updateNode

                    +

                    概述[ 依赖 jquery.ztree.core 核心 js ]

                    +
                    +

                    +
                    +

                    更新某节点数据,主要用于该节点显示属性的更新。

                    +

                    1、可针对 name、target、 url、icon、 iconSkin、checked、nocheck 等这几个用于显示效果的参数进行更新,其他用于 zTreeNodes 的参数请不要随意更新,对于展开节点,还请调用 expandNode方法,因此请勿随意修改 open 属性。

                    +

                    2、用此方法修改 checked 勾选状态不会触发 beforeCheck / onCheck 事件回调函数。

                    +

                    请通过 zTree 对象执行此方法。

                    +
                    +
                    +

                    Function 参数说明

                    +
                    +

                    treeNodeJSON

                    +

                    指定需要更新的节点 JSON 数据

                    +

                    请务必保证此节点数据对象 是 zTree 内部的数据对象

                    +

                    checkTypeFlagBoolean

                    +

                    checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父子节点的勾选联动操作

                    +

                    checkTypeFlag = false 表示只修改此节点勾选状态,无任何勾选联动操作

                    +

                    当 setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时才有效

                    +

                    不影响父子节点中 treeNode.nocheck = true 的节点。

                    +

                    返回值

                    +

                    目前无任何返回值

                    +
                    +

                    function 举例

                    +

                    1. 更新根节点中第一个节点的名称

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +if (nodes.length>0) {
                    +	nodes[0].name = "test";
                    +	treeObj.updateNode(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree._z.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree._z.html new file mode 100644 index 0000000000000000000000000000000000000000..e2ae61d66fb93fc73298304882b84c8cee343642 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree._z.html @@ -0,0 +1,15 @@ +
                    +
                    +

                    JSON$.fn.zTree._z

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    All of the internal methods in zTree v3.x are available through '$. fn.zTree._z', + use this if you want to develop your own zTree plug-ins.

                    +

                    Unless you are writing a plugin, + you should not use this object.

                    +
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.destroy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.destroy.html new file mode 100644 index 0000000000000000000000000000000000000000..c53cb8009a0e2020aaa897018844f080b855fdad --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.destroy.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeId)$.fn.zTree.destroy

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    From zTree v3.4, zTree provides a method for destruction.

                    +

                    1. This method can destroy a zTree by treeId, or destroy all zTree instances.

                    +

                    2. If you want to destroy a zTree, you can use the 'zTreeObj.destroy()' method.

                    +

                    3. If you want to re-use the tree which has been destroyed, + you must first re-initialise it with the 'init()' method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier

                    +

                    If this parameter is omitted, all zTree instances will be destroyed.

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. Destroy the zTree with id === 'treeDemo'

                    +
                    $.fn.zTree.destroy("treeDemo");
                    +

                    2. Destroy all zTree instances

                    +
                    $.fn.zTree.destroy();
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.getZTreeObj.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.getZTreeObj.html new file mode 100644 index 0000000000000000000000000000000000000000..49dadaa95595dd6d0c20b74123b80b245b79b32a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.getZTreeObj.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function(treeId)$.fn.zTree.getZTreeObj

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    zTree v3.x provides this method to get zTree object from the tree's Id.

                    +

                    Please initialize zTree first, then you can use this method.

                    +

                    Users don't need to use a global variable to reference the zTree object, + as all of the callback methods will pass 'treeId' parameters, + and you can always call this method to get the zTree object.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier

                    +

                    Return JSON

                    +

                    zTree object

                    +

                    This is a reference to the zTree object.

                    +
                    +

                    Examples of function

                    +

                    1. Get the zTree object with id='tree'

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.init.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.init.html new file mode 100644 index 0000000000000000000000000000000000000000..413056ca64659bed8639d4344b9f1f8ffd6801ea --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/fn.zTree.init.html @@ -0,0 +1,81 @@ +
                    +
                    +

                    Function(obj, zSetting, zNodes)$.fn.zTree.init

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    This method is used to create a zTree.

                    +

                    1. The web page must use the W3C DTD. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                    +

                    2. Needs jquery-1.4.2.js or better.

                    +

                    3. Needs jquery-ztree.core-3.0.js or better. + If you are using edit mode or checkbox / radio mode, + make sure you load jquery-ztree.exedit-3.0.js and jquery-ztree.excheck-3.0.js.

                    +

                    4. Needs zTreeStyle.css and image files

                    +

                    5. If you plan to use custom icons, please refer to the Demo, + or see the help on iconSkin.

                    +

                    6. Note: You need to set zTree container's class name to "ztree". + If you need to change it, don't forget to modify the css file. + If you need other special styles, you can modify the css file.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    objectjQuery Object

                    +

                    DOM Container for zTree

                    +

                    zSettingJSON

                    +

                    zTree's configuration data, please refer to "setting details" in the API Document.

                    +

                    zNodesArray(JSON) / JSON

                    +

                    zTree's node data, please refer to "treeNode data details" in the API Document.

                    +

                    1. zTree v3.x support to add single node, that is, if only to add one node, + you can use JSON without using Array.

                    +

                    2. If you are planning on using asynchronous loading of root nodes, set it to null or [ ]

                    +

                    3. If you are using simple data mode, please refer to "setting.data.simpleData" in the API Document.

                    +

                    Return JSON

                    +

                    zTree object

                    +

                    This object can provide the methods of operate the zTree

                    +

                    You can use $.fn.zTree.getZTreeObj method at any time to obtain.

                    +
                    +

                    Examples of setting & function

                    +

                    1. create a simple tree

                    +
                    <!DOCTYPE html>
                    +<HTML>
                    + <HEAD>
                    +  <TITLE> ZTREE DEMO </TITLE>
                    +  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
                    +  <link rel="stylesheet" href="zTreeStyle/zTreeStyle.css" type="text/css">
                    +  <script type="text/javascript" src="jquery-1.4.2.js"></script>
                    +  <script type="text/javascript" src="jquery.ztree.core.js"></script>
                    +<!--
                    +  <script type="text/javascript" src="jquery.ztree.excheck.js"></script>
                    +  <script type="text/javascript" src="jquery.ztree.exedit.js"></script>
                    +-->
                    +  <SCRIPT type="text/javascript" >
                    +	var zTreeObj,
                    +	setting = {
                    +		view: {
                    +			selectedMulti: false
                    +		}
                    +	},
                    +	zTreeNodes = [
                    +		{"name":"Site Map", open:true, children: [
                    +			{ "name":"google", "url":"http://www.google.com", "target":"_blank"},
                    +			{ "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
                    +			{ "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
                    +			]
                    +		}
                    +	];
                    +
                    +	$(document).ready(function(){
                    +		zTreeObj = $.fn.zTree.init($("#tree"), setting, zTreeNodes);
                    +
                    +	});
                    +  </SCRIPT>
                    + </HEAD>
                    +
                    +<BODY>
                    +<ul id="tree" class="ztree" style="width:230px; overflow:auto;"></ul>
                    + </BODY>
                    +</HTML>
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.autoParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.autoParam.html new file mode 100644 index 0000000000000000000000000000000000000000..6c4cbe0623ed22c433674736e74a58e10bac0b36 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.autoParam.html @@ -0,0 +1,52 @@ +
                    +
                    +

                    Array(String) / Function(treeId, treeNode)setting.async.autoParam

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    During asynchronous loading, a request is sent to the server, which contains the identify of the parent node, + so it can retrieve the children. + This attribute is an array of strings, which is the identity parameter (or parameters). + It applies when [setting.async.enable = true]

                    +

                    Default:[ ]

                    +
                    +
                    +

                    Array(String) Format

                    +
                    +

                    1. Put the attribute name(s) of node to the array. For example: ["id", "name"]

                    +

                    2. You can rename the parameter name as sent to the server. For example: server only accepts "zId" -- ["id=zId"]

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    Parent node's JSON data object

                    +

                    When asynchronously loading the root, the treeNode = null

                    +

                    Return Array(String)

                    +

                    Return value is same as 'Array(String) Format'

                    +
                    +

                    Examples of setting

                    +

                    1. set auto commit 'id' attribute

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id"]
                    +	}
                    +};
                    +If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: id=1
                    +......
                    +

                    2. set auto commit 'id' attribute, but the parameter name expected by the server is 'zId'

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id=zId"]
                    +	}
                    +};
                    +If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: zId=1
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.contentType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.contentType.html new file mode 100644 index 0000000000000000000000000000000000000000..c9e150995b3e05d7e5e6c3c7024c8f2b55ac974b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.contentType.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Stringsetting.async.contentType

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    When Ajax sends data to the server, it uses this content-type. + It is used when [setting.async.enable = true]

                    +

                    Default:"application/x-www-form-urlencoded"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    contentType = "application/x-www-form-urlencoded", means: the sending data format is "form" format.

                    +

                    contentType = "application/json", means: the sending data format is "json" format. (for .Net)

                    +
                    +

                    Examples of setting

                    +

                    1. set the sending data format to "json" format.

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		contentType: "application/json",
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.dataFilter.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.dataFilter.html new file mode 100644 index 0000000000000000000000000000000000000000..4347a0822d73e7fe69d80ab20d7742018cfb72f5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.dataFilter.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Function(treeId, parentNode, responseData)setting.async.dataFilter

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Callback function to pre-process Ajax return data. It is valid when [setting.async.enable = true]

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId

                    +

                    parentNodeJSON

                    +

                    Parent node's JSON data object

                    +

                    When asynchronously loading the root, the parentNode = null

                    +

                    responseDataArray(JSON) / JSON / String

                    +

                    Array (JSON) / JSON / String data objects

                    +

                    From v3.4, support XML strings.

                    +

                    Return Array(JSON) / JSON

                    +

                    The return value should be the JSON data structure which is supported by the zTree.

                    +

                    v3.x supports to load single node JSON data object.

                    +
                    +

                    Examples of setting & function

                    +

                    1. Modify the node name attributes returned by an Ajax request.

                    +
                    function ajaxDataFilter(treeId, parentNode, responseData) {
                    +    if (responseData) {
                    +      for(var i =0; i < responseData.length; i++) {
                    +        responseData[i].name += "_filter";
                    +      }
                    +    }
                    +    return responseData;
                    +};
                    +var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		dataFilter: ajaxDataFilter
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.dataType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.dataType.html new file mode 100644 index 0000000000000000000000000000000000000000..41db300727c9513daf29747bf879f5b146d398f3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.dataType.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Stringsetting.async.dataType

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The data type of Ajax requests. It is valid when [setting.async.enable = true]

                    +

                    Default:"text"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    dataType = "text", There is probably no need to change this.

                    +

                    The 'dataType' in zTree and jQuery's ajax requests is same.

                    +
                    +

                    Examples of setting

                    +

                    1. Set the dataType which ajax retrieves to "text".

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		dataType: "text",
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..c28447649812412ce983dc45ec87e2d60958c75f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.enable.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Booleansetting.async.enable

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set zTree asynchronous loading mode on/off.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true - turn on asynchronous loading mode

                    +

                    false - turn off asynchronous loading mode

                    +

                    If set it is true, you must set other attributes in setting.async

                    +

                    If you don't pass the 'treeNodes' parameter when you initialize zTree, the root nodes will be retrieved using ajax.

                    +
                    +

                    Examples of setting

                    +

                    1. Turn on asynchronous loading mode

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.headers.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.headers.html new file mode 100644 index 0000000000000000000000000000000000000000..e71958313c9e957d46c416d72eadc13990ab8874 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.headers.html @@ -0,0 +1,18 @@ +
                    +
                    +

                    Objectsetting.async.headers

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    It is valid when [setting.async.enable = true]

                    +

                    Default:"{}"

                    +

                    v3.5.36+

                    +
                    +
                    +

                    String Format

                    +
                    +

                    The 'headers' in zTree and jQuery's ajax requests is same.

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.otherParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.otherParam.html new file mode 100644 index 0000000000000000000000000000000000000000..cf8faa31acba3716783e65d13489d9dcf15d8ff8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.otherParam.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    Array(String) / JSON / Function(treeId, treeNode)setting.async.otherParam

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The query parameters of the Ajax request. (key - value) It is valid when [setting.async.enable = true]

                    +

                    Default: [ ]

                    +
                    +
                    +

                    Array(String) Format

                    +
                    +

                    Can be an empty array. e.g. [ ]. The array should contain key value pairs, e.g. [key, value]. (Either or [key] or [key, value, key] is wrong!!)

                    +
                    +

                    JSON Format

                    +
                    +

                    Use JSON hash data to set the key-value pairs. e.g. { key1:value1, key2:value2 }

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    Parent node's JSON data object

                    +

                    When asynchronously loading the root, the treeNode = null

                    +

                    Return Array(String) || JSON

                    +

                    Return value is same as 'Array(String) || JSON Format'

                    +
                    +

                    Examples of setting

                    +

                    1. Using Array(String) Format

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		otherParam: ["id", "1", "name", "test"]
                    +	}
                    +};
                    +when zTree sends the ajax request, the query string will be like this: id=1&name=test
                    +

                    2. Using JSON data Format

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "http://host/getNode.php",
                    +		otherParam: { "id":"1", "name":"test"}
                    +	}
                    +};
                    +when zTree sends the ajax request, the query string will be like this: id=1&name=test
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.type.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.type.html new file mode 100644 index 0000000000000000000000000000000000000000..c67599a09e6ce705b599a0b5bb44eb11bfcff592 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.type.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Stringsetting.async.type

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Http request tyoe in ajax. It is valid when [setting.async.enable = true]

                    +

                    Default: "post"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    "post" - http request mode

                    +

                    "get" - http request mode

                    +

                    Both zTree and jQuery's this 'type' for ajax requests.

                    +
                    +

                    Examples of setting

                    +

                    1. Set http request mode is 'get'

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		type: "get",
                    +		url: "http://host/getNode.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.url.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.url.html new file mode 100644 index 0000000000000000000000000000000000000000..2384c08d6b4cea5155e236bd043708205a494105 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.url.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    String / Function(treeId, treeNode)setting.async.url

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The URL to which the ajax request is sent. It is valid when [setting.async.enable = true]

                    +

                    Default: ""

                    +
                    +
                    +

                    String Format

                    +
                    +

                    A url string(e.g. "http://www.domain.com/cgi-bin/my-script.cgi"). Note: please check that the url can be loaded with a browser

                    +

                    Url can also take parameters, please note that they need to be urlencoded.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    Parent node's JSON data object

                    +

                    When asynchronously loading the root, the treeNode = null

                    +

                    Return String

                    +

                    Return value is same as 'String Format'

                    +
                    +

                    Examples of setting & function

                    +

                    1. set ajax url is "nodes.php"

                    +
                    var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: "nodes.php",
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +

                    2. set ajax url is "function"

                    +
                    function getAsyncUrl(treeId, treeNode) {
                    +    return treeNode.isParent ? "nodes1.php" : "nodes2.php";
                    +};
                    +var setting = {
                    +	async: {
                    +		enable: true,
                    +		url: getAsyncUrl,
                    +		autoParam: ["id", "name"]
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.xhrFields.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.xhrFields.html new file mode 100644 index 0000000000000000000000000000000000000000..d1588cf2a34fa3d2b3297fcecf5d4afc85f671cc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.async.xhrFields.html @@ -0,0 +1,18 @@ +
                    +
                    +

                    Objectsetting.async.xhrFields

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    It is valid when [setting.async.enable = true]

                    +

                    Default:"{}"

                    +

                    v3.5.36+

                    +
                    +
                    +

                    String Format

                    +
                    +

                    The 'xhrFields' in zTree and jQuery's ajax requests is same.

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeAsync.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeAsync.html new file mode 100644 index 0000000000000000000000000000000000000000..55f52ee5440bd1cc95962fb0f15168c1db09b87c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeAsync.html @@ -0,0 +1,36 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeAsync

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    This callback is made before zTree makes an ajax request, giving you an opportunity to decide if it should proceed or not. + Return false to prevent zTree from sending the ajax request.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the parent node

                    +

                    When asynchronously loading the root, treeNode = null

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If the function returns false, zTree will not send the ajax request, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.

                    +
                    +

                    Examples of setting & function

                    +

                    1. If the parent node's attribute 'id' is 1, don't send the ajax request.

                    +
                    function myBeforeCallBack(treeId, treeNode) {
                    +    return (treeNode.id !== 1);
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeAsync: myBeforeCallBack
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..b2d71e569cf3304c91687e80f30dfad2c6a17f43 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeCheck.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeCheck

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Callback before checking or unchecking a node, A false return value from the callback will prevent any change in the checked state.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is checked or unchecked

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not change the checkbox state, and will not trigger the 'onCheck' callback.

                    +
                    +

                    Examples of setting & function

                    +

                    1. This example returns false, preventing all checkboxes in the tree from toggling.

                    +
                    function myBeforeCheckCallBack(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeCheck: myBeforeCheckCallBack
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeClick.html new file mode 100644 index 0000000000000000000000000000000000000000..250416b3c28eea023a523677b02b6c6777b270df --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeClick.html @@ -0,0 +1,49 @@ +
                    +
                    +

                    Function(treeId, treeNode, clickFlag)setting.callback.beforeClick

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Before click callback, return false to prevent the 'onClick' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is clicked

                    +

                    clickFlagNumber

                    +

                    Node is selected or deselected state, please see table below for details

                    + + + + + + + + + + + + +
                    clickFlagselectedMultiautoCancelSelected
                    &&
                    event.ctrlKey / metaKey
                    isSelectedoperate for selected
                    1truefalsefalsenode is selected (single)
                    1truefalsetruenode is selected (single)
                    2truetruefalsenode is selected (multi)
                    0truetruetruenode is deselected
                    1falsefalsefalsenode is selected (single)
                    1falsefalsetruenode is selected (single)
                    1falsetruefalsenode is selected (single)
                    0falsetruetruenode is deselected
                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not change selected state, and will not trigger the 'onClick' callback.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disabled to click the node

                    +
                    function myBeforeClick(treeId, treeNode, clickFlag) {
                    +    return (treeNode.id !== 1);
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeClick: myBeforeClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeCollapse.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeCollapse.html new file mode 100644 index 0000000000000000000000000000000000000000..950b728ae49b17ec1579aa3c1d02b9ee3b1da818 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeCollapse.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeCollapse

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Specify callback function to be called before collapse node, The return value controls the collapse node.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be collapsed

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disabled to collapse node which is expanded

                    +
                    function myBeforeCollapse(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeCollapse: myBeforeCollapse
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDblClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDblClick.html new file mode 100644 index 0000000000000000000000000000000000000000..3d4ead191171478e5bff30dc329a04123bb5a58e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDblClick.html @@ -0,0 +1,36 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeDblClick

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Specify callback function, executed before the 'onDblClick' callback, The return value controls the 'onDblClick' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is double clicked

                    +

                    If the DOM which dblclicked isn't a node, it will return null.

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, ztree will not trigger the 'onDblClick' callback, no effect on other operations.

                    +

                    This callback function does not affect the auto expand of the parent node , please refer to setting.view.dblClickExpand properties.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to trigger the 'onDblClick' callback

                    +
                    function myBeforeDblClick(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeDblClick: myBeforeDblClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDrag.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDrag.html new file mode 100644 index 0000000000000000000000000000000000000000..fca278d67f4ab5b1d44b3163a23b97338f293b9c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDrag.html @@ -0,0 +1,39 @@ +
                    +
                    +

                    Function(treeId, treeNodes)setting.callback.beforeDrag

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Specify callback function to be called before the drag node callback, The return value controls whether the drag node callback will execute.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId, the id of the containing tree.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes being dragged

                    +

                    v3.x allows the drag and drop of multiple sibling nodes, so this parameter's type is changed to Array(JSON).

                    +

                    If the selected nodes aren't sibling nodes, you can only drag one node.

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will abort the drag and drop, and will not trigger the 'onDrag / beforeDrop / onDrop' sequence of callbacks.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable drag completely (by returning false)

                    +
                    function myBeforeDrag(treeId, treeNodes) {
                    +    return false;
                    +};
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeDrag: myBeforeDrag
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDragOpen.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDragOpen.html new file mode 100644 index 0000000000000000000000000000000000000000..d28bafe24a34b5e4d1d7263c422cddf707ed773b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDragOpen.html @@ -0,0 +1,37 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeDragOpen

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Callback executed before drag node to collapsed parent node, The return value controls the auto expand behaviour of the parent node.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId, the tree is what the treeNode(parent node) is belong to.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the parent node which will be auto expanded

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not auto expand parent node.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to auto expand parent node.

                    +
                    function myBeforeDragOpen(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeDragOpen: myBeforeDragOpen
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDrop.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDrop.html new file mode 100644 index 0000000000000000000000000000000000000000..9b2447584967cc4a5985e3809af86a1d6837e9bb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeDrop.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    Function(treeId, treeNodes, targetNode, moveType, isCopy)setting.callback.beforeDrop

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Specify callback function to be called before drag-drop of a node, The return value controls the execution of drag-drop callback.

                    +

                    Default: null

                    +

                    When a node is dropped, if the drop is not in a valid location, this callback will not be triggered, and will revert to the original position.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId, the id of the containing tree.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes which has been dragged

                    +

                    The treeNodes which have been dragged, when copying nodes or moving nodes.

                    +

                    targetNodeJSON

                    +

                    JSON data object of the destination node on which treeNodes are being dropped.

                    +

                    If the treeNodes is the root node, the targetNode = null

                    +

                    moveTypeString

                    +

                    the relative position of move to the target node

                    +

                    "inner": will be child of targetNode

                    +

                    "prev": will be sibling node, and be in front of targetNode

                    +

                    "next": will be sibling node, and be behind targetNode

                    +

                    isCopyBoolean

                    +

                    the flag used to determine if the drop is to copy or move the node

                    +

                    true: copy node; false: move node

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to drag nodes to root

                    +
                    function myBeforeDrop(treeId, treeNodes, targetNode, moveType) {
                    +    return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
                    +};
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeDrop: myBeforeDrop
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeEditName.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeEditName.html new file mode 100644 index 0000000000000000000000000000000000000000..a82008075e9d4227b83ba3756004ac23fca9f2ce --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeEditName.html @@ -0,0 +1,38 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeEditName

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Specify callback function to be called before click edit button, The return value controls the editing of the name.

                    +

                    This callback is fired when the edit button is clicked, to control the custom editing operation.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be edited.

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, allow editing of the name.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable editing of any parent node's name

                    +
                    function myBeforeEditName(treeId, treeNode) {
                    +	return !treeNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeEditName: myBeforeEditName
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeExpand.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeExpand.html new file mode 100644 index 0000000000000000000000000000000000000000..8b0a6e73d51135bdc5f04c518ba566e6b2d036be --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeExpand.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeExpand

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Specify callback function to be called before expanding a node, The return value controls the expand node callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be expanded

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not expand node, and will not trigger the 'onExpand' callback.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disables expanding of all nodes

                    +
                    function myBeforeExpand(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeExpand: myBeforeExpand
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeMouseDown.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeMouseDown.html new file mode 100644 index 0000000000000000000000000000000000000000..d27f431df365c169ad7a7aa89c3aa4a529481a91 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeMouseDown.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeMouseDown

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Specify callback function, executed before the 'onMouseDown' callback, The return value controls the 'onMouseDown' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which mouse over

                    +

                    If the DOM which mouse over isn't a node, it will return null.

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not trigger the 'onMouseDown' callback, no effect on other operations.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to trigger the 'onMouseDown' callback

                    +
                    function myBeforeMouseDown(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeMouseDown: myBeforeMouseDown
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeMouseUp.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeMouseUp.html new file mode 100644 index 0000000000000000000000000000000000000000..e7d10de512e158ffbbf036c61357c61788c1cb77 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeMouseUp.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeMouseUp

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Specify callback function, executed before the 'onMouseUp' callback, The return value controls the 'onMouseUp' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which mouse over

                    +

                    If the DOM which mouse over isn't a node, it will return null.

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not trigger the 'onMouseUp' callback, no effect on other operations.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to trigger the 'onMouseUp' callback

                    +
                    function myBeforeMouseUp(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeMouseUp: myBeforeMouseUp
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRemove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRemove.html new file mode 100644 index 0000000000000000000000000000000000000000..0e155d499b6ebcafdd23e782f30956ed9f5a4fce --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRemove.html @@ -0,0 +1,37 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeRemove

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Specify callback function to be called before remove node, The return value controls the allow to remove node.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be removed.

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, zTree will not remove node, and will not trigger the 'onRemove' callback.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to remove node

                    +
                    function myBeforeRemove(treeId, treeNode) {
                    +	return false;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeRemove: myBeforeRemove
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRename.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRename.html new file mode 100644 index 0000000000000000000000000000000000000000..bfed1446a10c2a377eb36f20041797401c35d167 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRename.html @@ -0,0 +1,46 @@ +
                    +
                    +

                    Function(treeId, treeNode, newName, isCancel)setting.callback.beforeRename

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Specify callback function to be called before rename(when input DOM blur or press Enter Key), The return value controls the allow to rename node.

                    +

                    When node is editing name, press the ESC key to restore the original name and stop edit name.

                    +

                    From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be rename.

                    +

                    newNameString

                    +

                    the new name

                    +

                    isCancelBoolean

                    +

                    the status about cancel edit name (v3.5.13+)

                    +

                    isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)

                    +

                    isCancel = false means: user submit edit name.

                    +

                    Return Boolean

                    +

                    return true or false

                    +

                    If return false, the treeNode will keep the editing name, don't trigger the 'onRename' callback, and will ignore other enents, until the callback return true.

                    +

                    If returns false, zTree will not set the input box to get focus to avoid the warning message which led to repeated triggering ‘beforeRename’ callback. Please use editName() method to set the input box to get focus when user close the warning message.

                    +
                    +

                    Examples of setting & function

                    +

                    1. the length of the new name can't less than 5

                    +
                    function myBeforeRename(treeId, treeNode, newName, isCancel) {
                    +	return newName.length > 5;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true
                    +	},
                    +	callback: {
                    +		beforeRename: myBeforeRename
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRightClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRightClick.html new file mode 100644 index 0000000000000000000000000000000000000000..9d05a0b121d886f39b099f72240fe623772c89c1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.beforeRightClick.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.callback.beforeRightClick

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to capture the right click event before the 'onRightClick' callback, The return value controls the 'onRightClick' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is mouse right clicked

                    +

                    If the DOM which mouse right clicked isn't a node, it will return null.

                    +

                    ReturnBoolean

                    +

                    return true or false

                    +

                    If return false, ztree will not trigger the 'onRightClick' callback, no effect on other operations.

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to trigger the 'onRightClick' callback

                    +
                    function myBeforeRightClick(treeId, treeNode) {
                    +    return false;
                    +};
                    +var setting = {
                    +	callback: {
                    +		beforeRightClick: myBeforeRightClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onAsyncError.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onAsyncError.html new file mode 100644 index 0000000000000000000000000000000000000000..239f3ffc931f9f7a3399a93df65004c3f9685b5d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onAsyncError.html @@ -0,0 +1,42 @@ +
                    +
                    +

                    setting.callback.onAsyncError

                    +

                    Function(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) 

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to capture the error event when execute ajax.

                    +

                    If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the parent node

                    +

                    When load root nodes, treeNode = null

                    +

                    XMLHttpRequestString

                    +

                    XMLHttpRequest Object, please refer to JQuery API documentation.

                    +

                    textStatusString

                    +

                    a string categorizing the status of the request("success", "error"...), please refer to JQuery API documentation.

                    +

                    errorThrownString

                    +

                    eWhen an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, please refer to JQuery API documentation.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When execute ajax make error, alert message.

                    +
                    function myOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
                    +    alert(XMLHttpRequest);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onAsyncError: myOnAsyncError
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onAsyncSuccess.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onAsyncSuccess.html new file mode 100644 index 0000000000000000000000000000000000000000..b8deca548f32222ead8b33b21c07da5899ea03b5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onAsyncSuccess.html @@ -0,0 +1,38 @@ +
                    +
                    +

                    Function(event, treeId, treeNode, msg)setting.callback.onAsyncSuccess

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to capture the complete success event when execute ajax.

                    +

                    If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the parent node

                    +

                    When load root nodes, treeNode = null

                    +

                    msgString / Object

                    +

                    The actualnode data which got by ajax. User-friendly debugging.

                    +

                    The actual data's type of msg is affected by 'setting.async.dataType', please refer to JQuery API documentation.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When execute ajax complete success, alert message.

                    +
                    function myOnAsyncSuccess(event, treeId, treeNode, msg) {
                    +    alert(msg);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onAsyncSuccess: myOnAsyncSuccess
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..eadfadcb1903ec62d25912aec9d25d41f6366de2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onCheck.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onCheck

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Used to capture the check or uncheck event when check or uncheck the checkbox and radio.

                    +

                    If you set 'setting.callback.beforeCheck',and return false, zTree will not change check state, and will not trigger the 'onCheck' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is checked or unchecked

                    +
                    +

                    Examples of setting & function

                    +

                    1. When check or uncheck the checkbox and radio, alert info about 'tId' and 'name' and 'checked'.

                    +
                    function myOnCheck(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onCheck: myOnCheck
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onClick.html new file mode 100644 index 0000000000000000000000000000000000000000..537dbe09f90b2dae8cdb4975ccff75f2ab5d0e2d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onClick.html @@ -0,0 +1,49 @@ +
                    +
                    +

                    Function(event, treeId, treeNode, clickFlag)setting.callback.onClick

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to capture the click event when click node.

                    +

                    If you set 'setting.callback.beforeClick',and return false, zTree will not change selected state, and will not trigger the 'onClick' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is clicked

                    +

                    clickFlagNumber

                    +

                    Node is selected or deselected state, please see table below for details

                    + + + + + + + + + + + + +
                    clickFlagselectedMultiautoCancelSelected
                    &&
                    event.ctrlKey / metaKey
                    isSelectedoperate for selected
                    1truefalsefalsenode is selected (single)
                    1truefalsetruenode is selected (single)
                    2truetruefalsenode is selected (multi)
                    0truetruetruenode is deselected
                    1falsefalsefalsenode is selected (single)
                    1falsefalsetruenode is selected (single)
                    1falsetruefalsenode is selected (single)
                    0falsetruetruenode is deselected
                    +
                    +

                    Examples of setting & function

                    +

                    1. When click node, alert info about 'tId' and 'name'.

                    +
                    function myOnClick(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onClick: myOnClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onCollapse.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onCollapse.html new file mode 100644 index 0000000000000000000000000000000000000000..d62f3fe63f62935d5ef58474f587fcf4ec0c0a91 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onCollapse.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onCollapse

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Callback for collapse node.

                    +

                    If you set 'setting.callback.beforeCollapse',and return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be collapsed

                    +
                    +

                    Examples of setting & function

                    +

                    1. When collapse node, alert info about 'tId' and 'name'.

                    +
                    function myOnCollapse(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onCollapse: myOnCollapse
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDblClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDblClick.html new file mode 100644 index 0000000000000000000000000000000000000000..d59602cfd493a01abbbe7494c94670c37e15ed95 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDblClick.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onDblClick

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to capture the dblclick event when double click node.

                    +

                    If you set 'setting.callback.beforeDblClick',and return false, zTree will not trigger the 'onDblClick' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is double clicked

                    +

                    If the DOM which dblclicked isn't a node, it will return null.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When double click node, alert info about 'tId' and 'name'.

                    +
                    function myOnDblClick(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDblClick: myOnDblClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDrag.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDrag.html new file mode 100644 index 0000000000000000000000000000000000000000..7c975bc7fbabdd94fd29f7ebf62ed903bf02f695 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDrag.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNodes)setting.callback.onDrag

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Used to capture the drag event when drag node.

                    +

                    If you set 'setting.callback.beforeDrag',and return false, zTree will stop drag, and will not trigger the 'onDragMove' & 'onDrag' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId, the id of the containing tree.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes which will be dragged

                    +
                    +

                    Examples of setting & function

                    +

                    1. When drag nodes, alert the number of dragged nodes.

                    +
                    function myOnDrag(event, treeId, treeNodes) {
                    +    alert(treeNodes.length);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDrag: myOnDrag
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDragMove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDragMove.html new file mode 100644 index 0000000000000000000000000000000000000000..b8596b9278494ca4ebaf765a9e10229a6e124b2b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDragMove.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNodes)setting.callback.onDragMove

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Used to capture the drag-move event when drag & drop node.

                    +

                    Mainly used to capture the DOM which the nodes was drag in.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId, the id of the containing tree.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes which will be dragged

                    +
                    +

                    Examples of setting & function

                    +

                    1. When drag nodes, output the target dom.

                    +
                    function myOnDragMove(event, treeId, treeNodes) {
                    +	console.log(event.target);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDragMove: myOnDragMove
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDrop.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDrop.html new file mode 100644 index 0000000000000000000000000000000000000000..475526d725f07fbec530378202d861a5b78c07e2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onDrop.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    Function(event, treeId, treeNodes, targetNode, moveType, isCopy)setting.callback.onDrop

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Used to capture the drop event when drag-drop node.

                    +

                    If you set 'setting.callback.beforeDrop',and return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId, the id of the containing tree.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes which has been dragged

                    +

                    The treeNodes are the data of the nodes which be dragged, when move nodes.

                    +

                    The treeNodes are the clone data of the nodes which be dragged, when copy nodes.

                    +

                    targetNodeJSON

                    +

                    JSON data object of the target node which treeNodes are drag-dropped.

                    +

                    If the treeNodes will be root node, the targetNode = null

                    +

                    moveTypeString

                    +

                    the relative position of move to the target node

                    +

                    "inner": will be child of targetNode

                    +

                    "prev": will be sibling node, and be in front of targetNode

                    +

                    "next": will be sibling node, and be behind targetNode

                    +

                    If moveType is null, means drag & drop is cancel.

                    +

                    isCopyBoolean

                    +

                    the flag used to judge copy node or move node

                    +

                    true: copy node; false: move node

                    +
                    +

                    Examples of setting & function

                    +

                    1. When drag-drop nodes complete, alert the number of dragged nodes and info about targetNode.

                    +
                    function myOnDrop(event, treeId, treeNodes, targetNode, moveType) {
                    +    alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
                    +};
                    +var setting = {
                    +	callback: {
                    +		onDrop: myOnDrop
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onExpand.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onExpand.html new file mode 100644 index 0000000000000000000000000000000000000000..70024feec9938fe4e1d5147f666192d2f30f2ebf --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onExpand.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onExpand

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Callback for expand node.

                    +

                    If you set 'setting.callback.beforeExpand',and return false, zTree will not expand node, and will not trigger the 'onExpand' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be expanded

                    +
                    +

                    Examples of setting & function

                    +

                    1. When expand node, alert info about 'tId' and 'name'.

                    +
                    function myOnExpand(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onExpand: myOnExpand
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onMouseDown.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onMouseDown.html new file mode 100644 index 0000000000000000000000000000000000000000..255469fe5dd42bbf2a82e3c8a3e1e3748197f971 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onMouseDown.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onMouseDown

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Callback for mouse down.

                    +

                    If you set 'setting.callback.beforeMouseDown',and return false, zTree will not trigger the 'onMouseDown' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which mouse over

                    +

                    If the DOM which mouse over isn't a node, it will return null.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When mouse down, alert info about 'tId' and 'name'.

                    +
                    function myOnMouseDown(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onMouseDown: myOnMouseDown
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onMouseUp.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onMouseUp.html new file mode 100644 index 0000000000000000000000000000000000000000..84e06a9b5940ae8c0c0b018d4067ed0355f57574 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onMouseUp.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onMouseUp

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Callback for mouse up.

                    +

                    If you set 'setting.callback.beforeMouseUp',and return false, zTree will not trigger the 'onMouseUp' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which mouse over

                    +

                    If the DOM which mouse over isn't a node, it will return null.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When mouse up, alert info about 'tId' and 'name'.

                    +
                    function myOnMouseUp(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onMouseUp: myOnMouseUp
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onNodeCreated.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onNodeCreated.html new file mode 100644 index 0000000000000000000000000000000000000000..4e5c8ae7e68bd9e89b26cb73d3eb28eed35921b5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onNodeCreated.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onNodeCreated

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Callback for node's DOM is created.

                    +

                    Because v3.x uses lazy loading technology, so the nodes which doesn't create DOM when initialized will not trigger this callback, until its parent node is expanded.

                    +

                    Large amount of data to load, please note: do not set onNodeCreated, can improve performance as when initialized.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which DOM is created

                    +
                    +

                    Examples of setting & function

                    +

                    1. When node's DOM is created, alert info about 'tId' and 'name'.

                    +
                    function myOnNodeCreated(event, treeId, treeNode) {
                    +    alert(treeNode.tId + ", " + treeNode.name);
                    +};
                    +var setting = {
                    +	callback: {
                    +		onNodeCreated: myOnNodeCreated
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRemove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRemove.html new file mode 100644 index 0000000000000000000000000000000000000000..37ed1f7e2982482b04a7cfed79c46b29e22a51e7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRemove.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onRemove

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Callback for remove node.

                    +

                    If you set 'setting.callback.beforeRemove',and return false, zTree will not remove node, and will not trigger the 'onRemove' callback.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which was removed.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When remove node, alert info about 'tId' and 'name'.

                    +
                    function myOnRemove(event, treeId, treeNode) {
                    +	alert(treeNode.tId + ", " + treeNode.name);
                    +}
                    +var setting = {
                    +	callback: {
                    +		onRemove: myOnRemove
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRename.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRename.html new file mode 100644 index 0000000000000000000000000000000000000000..c83206f717fc958ed87fde5aae6786a8c74a3ce6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRename.html @@ -0,0 +1,40 @@ +
                    +
                    +

                    Function(event, treeId, treeNode, isCancel)setting.callback.onRename

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Callback for remove node.

                    +

                    1. If you set 'setting.callback.beforeRename',and return false, zTree will keep the editing name, and will not trigger the 'onRename' callback.

                    +

                    2. If you modify treeNode data, and use 'updateNode' function, zTree will not trigger the 'onRename' callback.

                    +

                    3. From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which was rename.

                    +

                    isCancelBoolean

                    +

                    the status about cancel edit name (v3.5.13+)

                    +

                    isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)

                    +

                    isCancel = false means: user submit edit name.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When rename node, alert info about 'tId' and 'name'.

                    +
                    function myOnRename(event, treeId, treeNode, isCancel) {
                    +	alert(treeNode.tId + ", " + treeNode.name);
                    +}
                    +var setting = {
                    +	callback: {
                    +		onRename: myOnRename
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRightClick.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRightClick.html new file mode 100644 index 0000000000000000000000000000000000000000..110c9526a36699683d376a637df7c0eb43daa80c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.callback.onRightClick.html @@ -0,0 +1,36 @@ +
                    +
                    +

                    Function(event, treeId, treeNode)setting.callback.onRightClick

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Callback for mouse right click node.

                    +

                    If you set 'setting.callback.beforeRightClick',and return false, zTree will not trigger the 'onRightClick' callback.

                    +

                    If you set 'setting.callback.onRightClick', zTree will shield the browser context menu when mouse right click on zTree.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    eventjs event Object

                    +

                    event Object

                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which is mouse right clicked

                    +

                    If the DOM which mouse right clicked isn't a node, it will return null.

                    +
                    +

                    Examples of setting & function

                    +

                    1. When mouse right click node, alert info about 'tId' and 'name'.

                    +
                    function myOnRightClick(event, treeId, treeNode) {
                    +    alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
                    +};
                    +var setting = {
                    +	callback: {
                    +		onRightClick: myOnRightClick
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.autoCheckTrigger.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.autoCheckTrigger.html new file mode 100644 index 0000000000000000000000000000000000000000..b8b04cca6081a40e63de77c36e68d12a591a0162 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.autoCheckTrigger.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Booleansetting.check.autoCheckTrigger

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    When node is automatically checked or unchecked, this parameter used to set to trigger 'beforeCheck / onCheck' callback. It is valid when [setting.check.enable = true & setting.check.chkStyle = "checkbox"]

                    +

                    1. If you set 'setting.check.chkboxType' to { "Y": "", "N": "" }, will not automatically checked or unchecked.

                    +

                    2. If you turn on the trigger and there are many more nodes, will affect the performance, because the check or uncheck node can cause many nodes to be automatically checked or unchecked, it will trigger a lot of callbacks, according to the need to decide whether to use this feature.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: trigger callback

                    +

                    false means: don't trigger callback

                    +
                    +

                    Examples of setting

                    +

                    1. When node is automatically checked or unchecked, zTree trigger 'beforeCheck / onCheck' callback.

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		autoCheckTrigger: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkDisabledInherit.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkDisabledInherit.html new file mode 100644 index 0000000000000000000000000000000000000000..98d824e45fc306dc610438c9dbd9973de88dfa33 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkDisabledInherit.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.check.chkDisabledInherit

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    When the parent node's 'chkDisabled' attribute is true, set the child nodes automatically inherit the 'chkDisabled' attribute. It is valid when [setting.check.enable = true]

                    +

                    1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: When add new child nodes, if parent node's 'chkDisabled' attribute is true, the child nodes automatically inherit the 'chkDisabled' attribute.

                    +

                    false means: When add new child nodes, the child nodes don't inherit the 'chkDisabled' attribute from parent node.

                    +
                    +

                    Examples of setting

                    +

                    1. When add new child nodes, the child nodes automatically inherit the 'chkDisabled' attribute from parent node.

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkDisabledInherit: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkStyle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkStyle.html new file mode 100644 index 0000000000000000000000000000000000000000..d42e757a648d9b33edb18dd5a596fa8157aa2545 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkStyle.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    Stringsetting.check.chkStyle

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Use the checkbox or radio. It is valid when [setting.check.enable = true]

                    +

                    Default: "checkbox"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    When chkStyle = "checkbox", zTree show checkbox, and 'setting.check.chkboxType' attribute is valid. +
                    When chkStyle = "radio", zTree show radio, and 'setting.check.radioType' attribute is valid.

                    +

                    Please note that letter case, do not change.

                    +
                    +

                    checkbox States Descriptions

                    +
                    +

                    +
                    +

                    not checked; If node is parent, so its child nodes have been not checked. when mouse over:

                    +

                    not checked; (only parent node) some of its child nodes have been checked. when mouse over:

                    +

                    be checked; If node is parent, so its all child nodes have been checked. when mouse over:

                    +

                    be checked; (only parent node) some of its child nodes or all have been not checked. when mouse over:

                    +
                    +
                    +

                    radio States Descriptions

                    +
                    +

                    +
                    +

                    not checked; If node is parent, so its child have been not checked. when mouse over:

                    +

                    not checked; (only parent node) some of its child have been checked. when mouse over:

                    +

                    be checked; If node is parent, so its child have been not checked. when mouse over:

                    +

                    be checked; (only parent node) some of its child have been checked. when mouse over:

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. use radio

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkStyle: "radio"
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkboxType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkboxType.html new file mode 100644 index 0000000000000000000000000000000000000000..5cecc9ee007f99660c3d92a1192c3dbc234a7a0d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.chkboxType.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    JSONsetting.check.chkboxType

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    When one node is checked or unchecked, control its parent node and its child node auto checked or unchecked. It is valid when [setting.check.enable = true & setting.check.chkStyle = "checkbox"]

                    +

                    Default: { "Y": "ps", "N": "ps" }

                    +
                    +
                    +

                    JSON Format

                    +
                    +

                    "Y" attribute use to set auto check after checkbox was checked. +
                    "N" attribute use to set auto uncheck after checkbox was unchecked. +
                    If value has "p", so parent nodes will be checked or unchecked. +
                    If value has "s", so child nodes will be checked or unchecked.

                    +

                    Please note that letter case, do not change.

                    +
                    +

                    Examples of setting

                    +

                    1. If check the node, so only auto check parent nodes; If uncheck the node, so only auto uncheck child nodes;

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkStyle: "checkbox",
                    +		chkboxType: { "Y": "p", "N": "s" }
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..0236b5f84a0bff437a275346d9c5add9050bc13f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.enable.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Booleansetting.check.enable

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Set to use checkbox or radio in zTree

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: use the checkbox or radio

                    +

                    false means: don't use the checkbox or radio

                    +
                    +

                    Examples of setting

                    +

                    1. use the checkbox

                    +
                    var setting = {
                    +	check: {
                    +		enable: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.nocheckInherit.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.nocheckInherit.html new file mode 100644 index 0000000000000000000000000000000000000000..758b437ecb2e59d98e493616de0f10eb44bb5745 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.nocheckInherit.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.check.nocheckInherit

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    When the parent node's 'nocheck' attribute is true, set the child nodes automatically inherit the 'nocheck' attribute. It is valid when [setting.check.enable = true]

                    +

                    1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: When add new child nodes, if parent node's 'nocheck' attribute is true, the child nodes automatically inherit the 'nocheck' attribute.

                    +

                    false means: When add new child nodes, the child nodes don't inherit the 'nocheck' attribute from parent node.

                    +
                    +

                    Examples of setting

                    +

                    1. When add new child nodes, the child nodes automatically inherit the 'nocheck' attribute from parent node.

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		nocheckInherit: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.radioType.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.radioType.html new file mode 100644 index 0000000000000000000000000000000000000000..be867d757866298d5d0293ee0780612b43bc8910 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.check.radioType.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Stringsetting.check.radioType

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    The group about radio. It is valid when [setting.check.enable = true & setting.check.chkStyle = "radio"]

                    +

                    Default: "level"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    When radioType = "level", will be grouped with same level nodes which have the same parent node. +
                    When radioType = "all", will be grouped with all nodes.

                    +

                    Please note that letter case, do not change.

                    +
                    +

                    Examples of setting

                    +

                    1. Set the group about radio is all nodes.

                    +
                    var setting = {
                    +	check: {
                    +		enable: true,
                    +		chkStyle: "radio",
                    +		radioType: "all"
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.keep.leaf.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.keep.leaf.html new file mode 100644 index 0000000000000000000000000000000000000000..71c573e4719a0565ac112df92c5d510cae50695b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.keep.leaf.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.data.keep.leaf

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The leaf node's lock, the leaf node will lock the 'isParent' attribute to false.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: lock the leaf node, and the node which 'isParent' attribute is false can't add child nodes.

                    +

                    false means: don't lock the leaf node, and the node which 'isParent' attribute is false can add child nodes.

                    +
                    +

                    Examples of setting

                    +

                    1. lock the leaf node

                    +
                    var setting = {
                    +	data: {
                    +		keep: {
                    +			leaf: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.keep.parent.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.keep.parent.html new file mode 100644 index 0000000000000000000000000000000000000000..5bab2f1e42705439db779da2183d47c97ff37be4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.keep.parent.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.data.keep.parent

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The parent node's lock, the parent node will lock 'isParent' attribute to true.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: lock the parent node, and if remove all of the parent node's child nodes, its 'isParent' attribute still keep to be true..

                    +

                    false means: don't lock the parent node, and if remove all of the parent node's child nodes, its 'isParent' attribute will change to be false..

                    +
                    +

                    Examples of setting

                    +

                    1. lock the parent node

                    +
                    var setting = {
                    +	data: {
                    +		keep: {
                    +			parent: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.checked.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.checked.html new file mode 100644 index 0000000000000000000000000000000000000000..2678cf25b6b4781874a656fb35df30141e9025cb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.checked.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.checked

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save the checked state.

                    +

                    Default: "checked"

                    +

                    Please don't set the other node attribute which zTree used. (e.g., checkedOld)

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. set the 'isChecked' attribute to save the checked state.

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			checked: "isChecked"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.children.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.children.html new file mode 100644 index 0000000000000000000000000000000000000000..321a1a7da6d496c5e309281cc15854de01d00cdc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.children.html @@ -0,0 +1,23 @@ +
                    +
                    +

                    Stringsetting.data.key.children

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save the child nodes.

                    +

                    Default: "children"

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the 'nodes' attribute to save the child nodes.

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			children: "nodes"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.isHidden.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.isHidden.html new file mode 100644 index 0000000000000000000000000000000000000000..a275d3044e01479094dc8d7e23f4cc2d57d38ae7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.isHidden.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.isHidden

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save whether the node is the parent node.

                    +

                    Default: "isHidden"

                    +

                    v3.5.32+

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the 'hidden' attribute to save whether the node is the parent node.

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			isHidden: "hidden"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.isParent.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.isParent.html new file mode 100644 index 0000000000000000000000000000000000000000..37940cac3694d882c60abc41a0239152593d1da6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.isParent.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.isParent

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save whether the node is the parent node.

                    +

                    Default: "isParent"

                    +

                    v3.5.32+

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the 'parent' attribute to save whether the node is the parent node.

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			isParent: "parent"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.name.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.name.html new file mode 100644 index 0000000000000000000000000000000000000000..0208c559679188a41a05d51951add622ec77019c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.name.html @@ -0,0 +1,23 @@ +
                    +
                    +

                    Stringsetting.data.key.name

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save the node name.

                    +

                    Default: "name"

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the 'ename' attribute to save the node name.

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			name: "ename"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.title.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.title.html new file mode 100644 index 0000000000000000000000000000000000000000..96540eb651ed488a5970f8587e87be89b2e9cc5f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.title.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.title

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save the 'title' attribute of node DOM. It is valid when [setting.view.showTitle = true]

                    +

                    If set it to "", the title of node DOM will be same as 'setting.data.key.name' attribute.

                    +

                    Default: ""

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the 'fullName' attribute to save the title of node DOM.

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			title: "fullName"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.url.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.url.html new file mode 100644 index 0000000000000000000000000000000000000000..e9a08cea3fa3fe83b031015718bb946721979d62 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.key.url.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Stringsetting.data.key.url

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save the node link's url.

                    +

                    Special: If the nodes's data can only use the 'url' attribute, and don't use the link to jump feature, you can modify this attribute to any nonexistent attribute.

                    +

                    Default: "url"

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the 'xUrl' attribute to save the node link's url.

                    +
                    var setting = {
                    +	data: {
                    +		key: {
                    +			url: "xUrl"
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..9bb56d17e8a4c3996e619506750024e81c2901c9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.enable.html @@ -0,0 +1,39 @@ +
                    +
                    +

                    Booleansetting.data.simpleData.enable

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set zTree's node to accept the simple data format, when zTree is initialized or when ajax get / or when use addNodes method.

                    +

                    Don't have to generate the complex nested data.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: zTree's node accept the simple data format.

                    +

                    false means: zTree's node only accept the nested data format.

                    +

                    If set it is true, you must set the other attributes in 'setting.data.simpleData'. (e.g., idKey, pIdKey, rootPId) And let the data satisfy the parent-child relationship.

                    +
                    +

                    Examples of setting

                    +

                    1. use the simple data format

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.idKey.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.idKey.html new file mode 100644 index 0000000000000000000000000000000000000000..1216e0c79f91fe5a45b843c3b18f7a4b866a6f38 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.idKey.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Stringsetting.data.simpleData.idKey

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save node data's unique identifier. It is valid when [setting.data.simpleData.enable = true]

                    +

                    Default: "id"

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. use the simple data format

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.pIdKey.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.pIdKey.html new file mode 100644 index 0000000000000000000000000000000000000000..8378c6e3d9e285366f0ffa71b4f42e7f96ea72de --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.pIdKey.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Stringsetting.data.simpleData.pIdKey

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node data's attribute to save its parent node data's unique identifier. It is valid when [setting.data.simpleData.enable = true]

                    +

                    Default: "pId"

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. use the simple data format

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.rootPId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.rootPId.html new file mode 100644 index 0000000000000000000000000000000000000000..61c9bbd0d061401a5cc79fa983cf549f23dcf3aa --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.data.simpleData.rootPId.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    String / Numbersetting.data.simpleData.rootPId

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set the default value of root's 'pIdKey' specified attribute values​​. It is valid when [setting.data.simpleData.enable = true]

                    +

                    Default: null

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. use the simple data format

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var treeNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.autoExpandTrigger.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.autoExpandTrigger.html new file mode 100644 index 0000000000000000000000000000000000000000..804ee66a1d33fb463789f8d8cd89db1f94092fdc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.autoExpandTrigger.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Booleansetting.edit.drag.autoExpandTrigger

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag node cause the parent node is automatically expanded, set whether to allow to trigger the 'onExpand' callback. It is valid when [setting.edit.enable = true]

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: trigger the 'onExpand' callback.

                    +

                    false means: don't trigger the 'onExpand' callback.

                    +
                    +

                    Examples of setting

                    +

                    1. Set to allow to trigger the 'onExpand' callback

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			autoExpandTrigger: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.autoOpenTime.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.autoOpenTime.html new file mode 100644 index 0000000000000000000000000000000000000000..74982afa142f3b4b36cd559742471489239b4bd3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.autoOpenTime.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.autoOpenTime

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Drag to the parent node, the parent node auto expand time interval. (Unit: ms) It is valid when [setting.edit.enable = true]

                    +

                    Default: 500

                    +

                    Please adjust the value according to needs.

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. When drag node to other parent node, expand it at once.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			autoOpenTime: 0
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.borderMax.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.borderMax.html new file mode 100644 index 0000000000000000000000000000000000000000..edbb752bc203d33044616e665a910a688dc78402 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.borderMax.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.borderMax

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag a node to root, the zTree's inner border width. (Unit: px) It is valid when [setting.edit.enable = true]

                    +

                    Default: 10

                    +

                    Please adjust the value according to needs.

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. adjust the inner border width is 20px

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			borderMax: 20
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.borderMin.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.borderMin.html new file mode 100644 index 0000000000000000000000000000000000000000..e84585301e83c7da711c477193aae22eb8171176 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.borderMin.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.borderMin

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag a node to root, the zTree's outer border width. (Unit: px) It is valid when [setting.edit.enable = true]

                    +

                    Default: -5

                    +

                    Please adjust the value according to needs.

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. adjust the outer border width is 10px

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			borderMin: -10
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.inner.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.inner.html new file mode 100644 index 0000000000000000000000000000000000000000..5258e2f6f41e0723be61bc95792782587f656689 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.inner.html @@ -0,0 +1,60 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNodes, targetNode)setting.edit.drag.inner

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag one node to the target node, set whether to allow the node to be the target node's child. It is valid when [setting.edit.enable = true]

                    +

                    If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.

                    +

                    This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, next' together, to achieve full functionality.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: allow the node to be the target node's child.

                    +

                    false means: don't allow the node to be the target node's child.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes which has been dragged

                    +

                    targetNodeJSON

                    +

                    JSON data object of the target node which treeNodes are draged over.

                    +

                    If the treeNodes will be root node, the targetNode = null

                    +

                    Return Boolean

                    +

                    return true or false

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to drag the node to the target node's inner.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: true,
                    +			inner: false
                    +		}
                    +	}
                    +};
                    +......
                    +

                    2. disable to drag the node to be root node's child.

                    +
                    function canInner(treeId, nodes, targetNode) {
                    +	return !(targetNode && targetNode.level === 0);
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: true,
                    +			inner: canInner
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.isCopy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.isCopy.html new file mode 100644 index 0000000000000000000000000000000000000000..1207d2aedf07daa69d709127c5a21ef191b6587a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.isCopy.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Booleansetting.edit.drag.isCopy

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag-drop node, set whether to allow to copy node. It is valid when [setting.edit.enable = true]

                    +

                    Default: true

                    +
                    +
                    +

                    Rules Description

                    +
                    +

                    1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.

                    +

                    2. If isCopy = true and isMove = false, when drag-drop node, will copy node.

                    +

                    3. If isCopy = false and isMove = true, when drag-drop node, will move node.

                    +

                    4. If isCopy = false and isMove = false, so disable to drag-drop node.

                    +
                    +

                    Examples of setting

                    +

                    1. all of the drag-drop operation will copy node.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			isCopy: true,
                    +			isMove: false
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.isMove.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.isMove.html new file mode 100644 index 0000000000000000000000000000000000000000..e4a7ca3ac1fb4fef63ce02caac71a1e6094e6744 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.isMove.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Booleansetting.edit.drag.isMove

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag-drop node, set whether to allow to move node. It is valid when [setting.edit.enable = true]

                    +

                    Default: true

                    +
                    +
                    +

                    Rules Description

                    +
                    +

                    1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.

                    +

                    2. If isCopy = true and isMove = false, when drag-drop node, will copy node.

                    +

                    3. If isCopy = false and isMove = true, when drag-drop node, will move node.

                    +

                    4. If isCopy = false and isMove = false, so disable to drag-drop node.

                    +
                    +

                    Examples of setting

                    +

                    1. all of the drag-drop operation will move node.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			isCopy: false,
                    +			isMove: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.maxShowNodeNum.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.maxShowNodeNum.html new file mode 100644 index 0000000000000000000000000000000000000000..dbc3ae47623259ad4279a32f51a3f304e9a816ec --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.maxShowNodeNum.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.maxShowNodeNum

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When dragging more than one sibling node, the floating layer shows the maximum number of nodes. zTree using '...' instead of redundant nodes. It is valid when [setting.edit.enable = true]

                    +

                    Default: 5

                    +

                    Please adjust the value according to needs.

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the maximum number is 10

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			maxShowNodeNum: 10
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.minMoveSize.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.minMoveSize.html new file mode 100644 index 0000000000000000000000000000000000000000..8270a9932898d61500bc421f47580aeefbf11397 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.minMoveSize.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Numbersetting.edit.drag.minMoveSize

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    The minimum offset which used to determine the drag operator start. (Unit: px) It is valid when [setting.edit.enable = true]

                    +

                    Please adjust the value according to needs. Note: If it is too small, will easily lead to misoperation when you click mouse.

                    +

                    Default: 5

                    +
                    +
                    +

                    Examples of setting

                    +

                    1. Set the minimum offset is 10px.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			minMoveSize: 10
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.next.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.next.html new file mode 100644 index 0000000000000000000000000000000000000000..11323f1e23d50ae23049035e4a5614f930e994dc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.next.html @@ -0,0 +1,59 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNodes, targetNode)setting.edit.drag.next

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag one node to the target node, set whether to allow the node to be the target node's next sibling. It is valid when [setting.edit.enable = true]

                    +

                    If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.

                    +

                    This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, inner' together, to achieve full functionality.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: allow the node to be the target node's next sibling.

                    +

                    false means: don't allow the node to be the target node's next sibling.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes which has been dragged

                    +

                    targetNodeJSON

                    +

                    JSON data object of the target node which treeNodes are draged over.

                    +

                    Return Boolean

                    +

                    return true or false

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to drag the node to the target node's next sibling.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: false,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +

                    2. disable to drag the node to be all of the parent nodes's next sibling.

                    +
                    function canNext(treeId, nodes, targetNode) {
                    +	return !targetNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: true,
                    +			next: canNext,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.prev.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.prev.html new file mode 100644 index 0000000000000000000000000000000000000000..84e3b1a5e9959ab0e99fe3b49c6c254d2f9b11e4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.drag.prev.html @@ -0,0 +1,59 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNodes, targetNode)setting.edit.drag.prev

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When drag one node to the target node, set whether to allow the node to be the target node's previous sibling. It is valid when [setting.edit.enable = true]

                    +

                    If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.

                    +

                    This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'next, inner' together, to achieve full functionality.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: allow the node to be the target node's previous sibling.

                    +

                    false means: don't allow the node to be the target node's previous sibling.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodesArray(JSON)

                    +

                    A collection of the nodes which has been dragged

                    +

                    targetNodeJSON

                    +

                    JSON data object of the target node which treeNodes are draged over.

                    +

                    Return Boolean

                    +

                    return true or false

                    +
                    +

                    Examples of setting & function

                    +

                    1. disable to drag the node to the target node's previous sibling.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: false,
                    +			next: true,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +

                    2. disable to drag the node to be all of the parent nodes's previous sibling.

                    +
                    function canPrev(treeId, nodes, targetNode) {
                    +	return !targetNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		drag: {
                    +			prev: canPrev,
                    +			next: true,
                    +			inner: true
                    +		}
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.editNameSelectAll.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.editNameSelectAll.html new file mode 100644 index 0000000000000000000000000000000000000000..a030359d6dac17cf569773d5d359dcb93fd19184 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.editNameSelectAll.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Booleansetting.edit.editNameSelectAll

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    When edit node's name, the text in input is selected or unselected. It is valid when [setting.edit.enable = true]

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: when show the input, the text in input is selected

                    +

                    false means: when show the input, the text in input is not selected

                    +
                    +

                    Examples of setting

                    +

                    1. When edit node's name, the text in input is selected.

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		editNameSelectAll: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.enable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.enable.html new file mode 100644 index 0000000000000000000000000000000000000000..ec9d2b3116f6f5a1fd41bd39a8ecaee7b97022c3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.enable.html @@ -0,0 +1,39 @@ +
                    +
                    +

                    Booleansetting.edit.enable

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Set zTree is in edit mode

                    +

                    Please set this attribute before zTree initialization. If you need to change the edit mode after the initialization, please use zTreeObj.setEditable() method.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: zTree is in edit mode.

                    +

                    false means: zTree is not in edit mode.

                    +
                    +

                    Editing Rules Description

                    +
                    +

                    1. When click the node, it will not open 'node.url' specified URL. +
                    2. Support for dynamic tree editing. +
                    3. You can drag-drop nodes, and support drag-drop nodes between multiple trees. +
                    4. Support use drag-drop to copy or move the node. (Reference: setting.edit.drag.isCopy / setting.edit.drag.isMove) +
                    5. You can use the Edit button to modify the name attribute. +
                    6. You can use the Remove button to remove the node. +
                    +

                    +

                    Please note that letter case, do not change.

                    +
                    +

                    Examples of setting

                    +

                    1. edit the tree

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.removeTitle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.removeTitle.html new file mode 100644 index 0000000000000000000000000000000000000000..d749c053481d739b03be233d67c1ea6ccf99322c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.removeTitle.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    String / Function(treeId, treeNode)setting.edit.removeTitle

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    the title of the remove button DOM. It is valid when [setting.edit.enable = true & setting.edit.showRemoveBtn = true]

                    +

                    Default: "remove"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    When the mouse over the remove button, the browser auto pop-up message content.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which show the remove button

                    +

                    Return String

                    +

                    Return value is same as 'String Format'

                    +
                    +

                    Examples of setting & function

                    +

                    1. Set title is 'remove the node' about all the remove button

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: true,
                    +		removeTitle: "remove the node"
                    +	}
                    +};
                    +......
                    +

                    2. Set title is 'remove the parent node' about the parent node, and is 'remove the leaf node' about the leaf node

                    +
                    function setRemoveTitle(treeId, treeNode) {
                    +	return treeNode.isParent ? "remove the parent node":"remove the leaf node";
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: true,
                    +		removeTitle: setRemoveTitle
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.renameTitle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.renameTitle.html new file mode 100644 index 0000000000000000000000000000000000000000..aa2d719b99bd7096f91b7c8f8c548cb2c84be327 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.renameTitle.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    String / Function(treeId, treeNode)setting.edit.renameTitle

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    the title of the rename button DOM. It is valid when [setting.edit.enable = true & setting.edit.showRenameBtn = true]

                    +

                    Default: "rename"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    When the mouse over the rename button, the browser auto pop-up message content.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which show the rename button

                    +

                    Return String

                    +

                    return value is same as 'String Format'

                    +
                    +

                    Examples of setting & function

                    +

                    1. Set title is 'rename the node' about all the rename button

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: true,
                    +		renameTitle: "rename the node"
                    +	}
                    +};
                    +......
                    +

                    2. Set title is 'rename the parent node' about the parent node, and is 'rename the leaf node' about the leaf node

                    +
                    function setRenameTitle(treeId, treeNode) {
                    +	return treeNode.isParent ? "rename the parent node":"rename the leaf node";
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: true,
                    +		renameTitle: setRenameTitle
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.showRemoveBtn.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.showRemoveBtn.html new file mode 100644 index 0000000000000000000000000000000000000000..2c64ac182ed532607dfa15eaf8ba4fb540abe0fb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.showRemoveBtn.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.edit.showRemoveBtn

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Set to show or hide the remove button. It is valid when [setting.edit.enable = true]

                    +

                    When you click the remove button:

                    +

                    1. zTree will trigger the setting.callback.beforeRemove callback, and you can decide whether to allow delete.

                    +

                    2. If you don't set the 'beforeRemove' or the 'beforeRemove' callback return true, so zTree will trigger the setting.callback.onRemove callback after remove the node.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: show the remove button

                    +

                    false means: hide the remove button

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which show the remove button

                    +

                    Return Boolean

                    +

                    Return value is same as 'Boolean Format'

                    +
                    +

                    Examples of setting & function

                    +

                    1. Hide the remove button

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: false
                    +	}
                    +};
                    +......
                    +

                    2. Hide the remove button of parent node

                    +
                    function setRemoveBtn(treeId, treeNode) {
                    +	return !treeNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRemoveBtn: setRemoveBtn
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.showRenameBtn.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.showRenameBtn.html new file mode 100644 index 0000000000000000000000000000000000000000..390f0a12d69a11474b2041f30fb64c9522e48bf8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.edit.showRenameBtn.html @@ -0,0 +1,52 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.edit.showRenameBtn

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Set to show or hide the rename button. It is valid when [setting.edit.enable = true]

                    +

                    When you click the rename button:

                    +

                    1. Click the rename button, you can rename the node.

                    +

                    2. After rename operation (the input DOM blur or press the Enter Key), zTree will trigger the setting.callback.beforeRename callback, and you can decide whether to allow rename.

                    +

                    3. If the 'beforeRename' callback return false, so zTree will keep the edit status. (Press the ESC key, can be restored to the original state.

                    +

                    4. If you don't set the 'beforeRename' or the 'beforeRename' callback return true, so zTree will trigger the setting.callback.onRename callback after rename the node.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: show the rename button

                    +

                    false means: hide the rename button

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which show the rename button

                    +

                    Return Boolean

                    +

                    Return value is same as 'Boolean Format'

                    +
                    +

                    Examples of setting & function

                    +

                    1. Hide the rename button

                    +
                    var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: false
                    +	}
                    +};
                    +......
                    +

                    2. Hide the rename button of parent node

                    +
                    function setRenameBtn(treeId, treeNode) {
                    +	return !treeNode.isParent;
                    +}
                    +var setting = {
                    +	edit: {
                    +		enable: true,
                    +		showRenameBtn: setRenameBtn
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.treeId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.treeId.html new file mode 100644 index 0000000000000000000000000000000000000000..e4b04b37420c4d2da9b3d538bb6ae79aeabac9e1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.treeId.html @@ -0,0 +1,14 @@ +
                    +
                    +

                    Stringsetting.treeId

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    zTree unique identifier. After the initialization, it equals to the id attribute value of the user-defined zTree container.

                    +

                    Do not initialize or modify it, it is an internal argument.

                    +
                    +
                    + +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.treeObj.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.treeObj.html new file mode 100644 index 0000000000000000000000000000000000000000..30eb66c4bc38991f50f391d42e0c94d019769eb7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.treeObj.html @@ -0,0 +1,14 @@ +
                    +
                    +

                    Objectsetting.treeObj

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    zTree DOM's jQuery object, the main function: easy to internal operations.

                    +

                    Do not initialize or modify it, it is an internal argument.

                    +
                    +
                    + +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.addDiyDom.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.addDiyDom.html new file mode 100644 index 0000000000000000000000000000000000000000..efcc8d4bf1d546db76a9aa2f673ed45a3df0f259 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.addDiyDom.html @@ -0,0 +1,40 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.view.addDiyDom

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    This function used to display the custom control on the node.

                    +

                    1. If you have huge node data, please note: this function will affect the initialization performance. If not required, it is recommended not to use this function.

                    +

                    2. This function is an advanced application, please make sure that a better understanding of zTree before you use it.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which display the custom control.

                    +
                    +

                    Examples of setting & function

                    +

                    1. Display button in all nodes.

                    +
                    var setting = {
                    +	view: {
                    +		addDiyDom: addDiyDom
                    +	}
                    +};
                    +function addDiyDom(treeId, treeNode) {
                    +	var aObj = $("#" + treeNode.tId + "_a");
                    +	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    +	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    +		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    +		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    +	aObj.append(editStr);
                    +	var btn = $("#diyBtn_"+treeNode.id);
                    +	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.addHoverDom.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.addHoverDom.html new file mode 100644 index 0000000000000000000000000000000000000000..9c6ccf6e0a0174cf83ac783f9b84bc1d0eb7d6cf --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.addHoverDom.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.view.addHoverDom

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Used to display custom control when mouse move over the node. (e.g. the rename and remove button)

                    +

                    If you use this function, so must set setting.view.removeHoverDom, please make sure that a better understanding of zTree before you use it.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to display the custom control.

                    +
                    +

                    Examples of setting & function

                    +

                    1. Display a button when mouse move over the node, and hide the button when mouse move out.

                    +
                    var setting = {
                    +	view: {
                    +		addHoverDom: addHoverDom,
                    +		removeHoverDom: removeHoverDom,
                    +		......
                    +	}
                    +};
                    +function addHoverDom(treeId, treeNode) {
                    +	var aObj = $("#" + treeNode.tId + "_a");
                    +	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    +	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    +		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    +		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    +	aObj.append(editStr);
                    +	var btn = $("#diyBtn_"+treeNode.id);
                    +	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    +};
                    +function removeHoverDom(treeId, treeNode) {
                    +	$("#diyBtn_"+treeNode.id).unbind().remove();
                    +	$("#diyBtn_space_" +treeNode.id).unbind().remove();
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.autoCancelSelected.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.autoCancelSelected.html new file mode 100644 index 0000000000000000000000000000000000000000..44ab90d061637ad70459a8725abbc9ef326f1854 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.autoCancelSelected.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Booleansetting.view.autoCancelSelected

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    When click the selected node while pressing the Ctrl-key or Cmd-key, allow to cancel selected the node.

                    +

                    If you don't need this function, please set to false.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: press the Ctrl-key or Cmd-key, can cancel selected node.

                    +

                    false means: press the Ctrl-key or Cmd-key, can't cancel selected node.

                    +
                    +

                    Examples of setting

                    +

                    1. Press the Ctrl-key or Cmd-key, can't cancel selected node.

                    +
                    var setting = {
                    +	view: {
                    +		autoCancelSelected: false
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.dblClickExpand.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.dblClickExpand.html new file mode 100644 index 0000000000000000000000000000000000000000..210dfecb5f518d9face30fbd2fff53e8547fb076 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.dblClickExpand.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.view.dblClickExpand

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    When double-click the parent node, 'dblClickExpand' is used to decide whether to expand the parent node.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: When double-click the parent node, zTree will expand the parent node.

                    +

                    false means: When double-click the parent node, zTree will not expand the parent node.

                    +
                    +

                    Function Pamameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which be double-clicked.

                    +

                    Return Boolean

                    +

                    Return value is same as 'Boolean Format'

                    +
                    +

                    Example of setting

                    +

                    1. When double-click the parent node, zTree will not expand the parent node.

                    +
                    var setting = {
                    +	view: {
                    +		dblClickExpand: false
                    +	}
                    +};
                    +......
                    +

                    2. When double-click the parent node, zTree will expand the parent node which level>0.

                    +
                    function dblClickExpand(treeId, treeNode) {
                    +	return treeNode.level > 0;
                    +};
                    +var setting = {
                    +	view: {
                    +		dblClickExpand: dblClickExpand
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.expandSpeed.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.expandSpeed.html new file mode 100644 index 0000000000000000000000000000000000000000..1911e74eb3a1e7880e3871d48cc1078af5ac2b52 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.expandSpeed.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    String / Numbersetting.view.expandSpeed

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The animation speed of expand or collapse node. As same as 'speed' parameter in jQuery

                    +

                    In order to ensure zTree operating speed, if use the IE6, zTree will not use animation.

                    +

                    Default: "fast"

                    +
                    +
                    +

                    String Format

                    +
                    +

                    e.g. "slow", "normal", or "fast"

                    +

                    If set to "", zTree will not use animation.

                    +
                    +

                    Number Format

                    +
                    +

                    How long the animation will run. [Unit: ms] (e.g. 1000)

                    +
                    +

                    Examples of setting

                    +

                    1. Set the animation speed to slow

                    +
                    var setting = {
                    +	view: {
                    +		expandSpeed: "slow"
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.fontCss.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.fontCss.html new file mode 100644 index 0000000000000000000000000000000000000000..02bddeacb8998c5eb3d2eb42c2355165fad9affb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.fontCss.html @@ -0,0 +1,42 @@ +
                    +
                    +

                    JSON / Function(treeId, treeNode)setting.view.fontCss

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Personalized text style, only applies to <A> object in the node DOM

                    +

                    Default: {}

                    +
                    +
                    +

                    JSON Format

                    +
                    +

                    As same as .css() method in jQuery. e.g. {color:"#ff0011", background:"blue"}

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which use the personalized text style

                    +

                    Return JSON

                    +

                    Return value is same as 'JSON Format'. e.g. {color:"#ff0011", background:"blue"}

                    +
                    +

                    Examples of setting & function

                    +

                    1. Don't modify css file, and set the node name's color to red

                    +
                    var setting = {
                    +	view: {
                    +		fontCss : {color:"red"}
                    +	}
                    +};
                    +

                    2. Don't modify css file, and set the root node name's color to red

                    +
                    function setFontCss(treeId, treeNode) {
                    +	return treeNode.level == 0 ? {color:"red"} : {};
                    +};
                    +var setting = {
                    +	view: {
                    +		fontCss: setFontCss
                    +	}
                    +};
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.nameIsHTML.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.nameIsHTML.html new file mode 100644 index 0000000000000000000000000000000000000000..4fe19adad622cd06da66664d76dc5bd3bcd5647f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.nameIsHTML.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.view.nameIsHTML

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set to use HTML in 'name' attribute.

                    +

                    If allow HTML, please do check to avoid security issues, e.g. JavaScript Injection...

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: 'name' attribute can be HTML.

                    +

                    false means: 'name' attribute is only TEXT.

                    +
                    +

                    Examples of setting

                    +

                    1. Set to allow HTML

                    +
                    var setting = {
                    +	view: {
                    +		nameIsHTML: true
                    +	}
                    +};
                    +var node = {"name":"<font color='red'>test</font>"};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.removeHoverDom.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.removeHoverDom.html new file mode 100644 index 0000000000000000000000000000000000000000..83f8047700fba2346e885efecf2a08519bbab0eb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.removeHoverDom.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Function(treeId, treeNode)setting.view.removeHoverDom

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Used to hide custom control when mouse move out the node. (e.g. the rename and remove button)

                    +

                    If you use this function, so must set setting.view.addHoverDom, please make sure that a better understanding of zTree before you use it.

                    +

                    Default: null

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to hide the custom control.

                    +
                    +

                    Examples of setting & function

                    +

                    1. Display a button when mouse move over the node, and hide the button when mouse move out.

                    +
                    var setting = {
                    +	view: {
                    +		addHoverDom: addHoverDom,
                    +		removeHoverDom: removeHoverDom,
                    +		......
                    +	}
                    +};
                    +function addHoverDom(treeId, treeNode) {
                    +	var aObj = $("#" + treeNode.tId + "_a");
                    +	if ($("#diyBtn_"+treeNode.id).length>0) return;
                    +	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
                    +		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
                    +		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
                    +	aObj.append(editStr);
                    +	var btn = $("#diyBtn_"+treeNode.id);
                    +	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
                    +};
                    +function removeHoverDom(treeId, treeNode) {
                    +	$("#diyBtn_"+treeNode.id).unbind().remove();
                    +	$("#diyBtn_space_" +treeNode.id).unbind().remove();
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.selectedMulti.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.selectedMulti.html new file mode 100644 index 0000000000000000000000000000000000000000..074fb685a43f259ce4b1f85d10abd42bebed4c5f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.selectedMulti.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Booleansetting.view.selectedMulti

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set whether to allow select multiple nodes.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true mean: you can select multiple nodes.

                    +

                    false mean: you can only select one node.

                    +

                    1. Press Ctrl-key or Cmd-key, you can select multiple nodes.

                    +

                    2、This attribute don't affect the feature of cancel select node. ( please see setting.view.autoCancelSelected )

                    +
                    +

                    Examples of setting

                    +

                    1. Only select one node.

                    +
                    var setting = {
                    +	view: {
                    +		selectedMulti: false
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showIcon.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showIcon.html new file mode 100644 index 0000000000000000000000000000000000000000..69f1b056320e3640e407d234f95c511ce1946419 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showIcon.html @@ -0,0 +1,45 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.view.showIcon

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set to show or hide node icon.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: show node icon.

                    +

                    false means: hide node icon.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to show icon.

                    +

                    Return Boolean

                    +

                    Return value is same as 'Boolean Format'

                    +
                    +

                    Examples of setting & function

                    +

                    1. Hide node icon

                    +
                    var setting = {
                    +	view: {
                    +		showIcon: false
                    +	}
                    +};
                    +......
                    +

                    2. Hide node icon which level=2

                    +
                    function showIconForTree(treeId, treeNode) {
                    +	return treeNode.level != 2;
                    +};
                    +var setting = {
                    +	view: {
                    +		showIcon: showIconForTree
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showLine.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showLine.html new file mode 100644 index 0000000000000000000000000000000000000000..a5540149ad5cc3c0a5883c21ded01c303c7fb496 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showLine.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Booleansetting.view.showLine

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set to show or hide line.

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: show line.

                    +

                    false means: hide line.

                    +
                    +

                    Examples of setting

                    +

                    1. Hide line

                    +
                    var setting = {
                    +	view: {
                    +		showLine: false
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showTitle.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showTitle.html new file mode 100644 index 0000000000000000000000000000000000000000..8af698445204e6fe89d80dc1a2c863d120f29260 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.showTitle.html @@ -0,0 +1,47 @@ +
                    +
                    +

                    Boolean / Function(treeId, treeNode)setting.view.showTitle

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set to show or hide the 'title' attribute of node DOM.

                    +

                    Please see the setting.data.key.title attribute

                    +

                    Default: true

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: show the 'title' attribute of node DOM.

                    +

                    false means: hide the 'title' attribute of node DOM.

                    +

                    When setting.view.showTitle = true & setting.data.key.title = '', zTree will set the 'setting.data.key.name' attribute to the 'setting.data.key.title'.

                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeIdString

                    +

                    zTree unique identifier: treeId.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to show title.

                    +

                    Return Boolean

                    +

                    Return value is same as 'Boolean Format'

                    +
                    +

                    Examples of setting & function

                    +

                    1. Hide the 'title' attribute of node DOM.

                    +
                    var setting = {
                    +	view: {
                    +		showTitle: false
                    +	}
                    +};
                    +......
                    +

                    2. Hide the 'title' attribute of node DOM which level=2.

                    +
                    function showTitleForTree(treeId, treeNode) {
                    +	return treeNode.level != 2;
                    +};
                    +var setting = {
                    +	view: {
                    +		showTitle: showTitleForTree
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.txtSelectedEnable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.txtSelectedEnable.html new file mode 100644 index 0000000000000000000000000000000000000000..a380930098b99f8a0569db0695d55b6d2a696867 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/setting.view.txtSelectedEnable.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Booleansetting.view.txtSelectedEnable

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Set to allow or don't allow to select the text which in zTree's DOM.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: Allow to select the txt which in zTree's DOM.

                    +

                    false means: Don't allow to select the txt which in zTree's DOM.

                    +
                    +

                    Examples of setting & function

                    +

                    1. Allow to select the txt which in zTree's DOM.

                    +
                    var setting = {
                    +	view: {
                    +		txtSelectedEnable: true
                    +	}
                    +};
                    +......
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.check_Child_State.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.check_Child_State.html new file mode 100644 index 0000000000000000000000000000000000000000..48efb79a16a7ee41050422f35fd0caf7dc58213a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.check_Child_State.html @@ -0,0 +1,43 @@ +
                    +
                    +

                    NumbertreeNode.check_Child_State

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Used to record the node's half-checked state about its all child nodes's checkbox or radio. It is valid when [setting.check.enable = true]

                    +

                    zTree v3.x provides treeNode.getCheckStatus () method to get an accurate the half-checked status.

                    +

                    Do not initialize or modify it, it is an internal argument.

                    +

                    Default: true

                    +
                    +
                    +

                    Number Format

                    +
                    +

                    Rules:

                    + + + + + + + + + + + +
                    setting.check.checkType = "checkbox"
                    treeNode.check_Child_StateChecked Status Description
                    -1Has no child nodes or all child nodes's 'nocheck' attribute is true.
                    0All of the child nodes has not been checked.
                    1Some of the child nodes has been checked.
                    2All of the child nodes has been checked.
                    +
                    + + + + + + + + + + +
                    setting.check.checkType = "radio"
                    treeNode.check_Child_StateChecked Status Description
                    -1Has no child nodes or all child nodes's 'nocheck' attribute is true.
                    0All of the child nodes has not been checked.
                    2Some of the child nodes has been checked.
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.check_Focus.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.check_Focus.html new file mode 100644 index 0000000000000000000000000000000000000000..77b735980b6fba5ce531d2525bd84f6a5bacc7ab --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.check_Focus.html @@ -0,0 +1,19 @@ +
                    +
                    +

                    BooleantreeNode.check_Focus

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Used to record the status which the checkbox or radio get focus. It is valid when [setting.check.enable = true]

                    +

                    Do not initialize or modify it, it is an internal argument.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: mouse move over the checkbox

                    +

                    false means: mouse move out the checkbox

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.checked.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.checked.html new file mode 100644 index 0000000000000000000000000000000000000000..8a55f3d6b25e222429f1fd1b46687c743aef59f0 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.checked.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    BooleantreeNode.checked

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    The checked status about node's checkbox or radio. It is valid when [setting.check.enable = true & treeNode.nocheck = false]

                    +

                    1. If change the 'checked' to other attribute, please set the 'setting.data.key.checked' attribute.

                    +

                    2. If you create node data, and set 'checked' attribute to true, zTree will check this node's checkbox or radio when zTree is initialized.

                    +

                    3. Use the treeObj.checkNode or checkAllNodes or updateNode method, you can check or uncheck the node. Please see the API about these methods.

                    +

                    4. zTree support identification string 'true' & 'false'.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: check the checkbox or radio when zTree is initialized.

                    +

                    false means: uncheck the checkbox or radio when zTree is initialized.

                    +
                    +

                    Examples of treeNode

                    +

                    1. check the checkbox when zTree is initialized

                    +
                    var nodes = [
                    +{ "id":1, "name":"test1", checked:true },
                    +{ "id":2, "name":"test2", checked:true }
                    +]
                    +

                    2. Get the checked status of the first root node

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var checked = treeObj.getNodes()[0].checked;
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.checkedOld.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.checkedOld.html new file mode 100644 index 0000000000000000000000000000000000000000..ee516260a27557131f2d561b4188cfddbd099e36 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.checkedOld.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    BooleantreeNode.checkedOld

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    The checked status about node's checkbox or radio when zTree was initialized. It is valid when [setting.check.enable = true & treeNode.nocheck = false]

                    +

                    1. Do not initialize it, it will be initialized when the node is initialized.

                    +

                    2. If you need to achieve special features, you can use the zTreeObj.getChangeCheckedNodes method and modify the value of 'checkedOld' attribute.

                    +

                    Default: the value of 'checked' attribute when zTree is initialized

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the checkbox or radio is checked when zTree is initialized.

                    +

                    false means: the checkbox or radio is not checked when zTree is initialized.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the original checked status of the first root node

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var checkedOld = treeObj.getNodes()[0].checkedOld;
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.children.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.children.html new file mode 100644 index 0000000000000000000000000000000000000000..d765bb965acfec67da59273b1b319959510fdd7e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.children.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Array(JSON)treeNode.children

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The data collections of node's child nodes.

                    +

                    1. If change the 'children' to other attribute, please set the 'setting.data.key.children' attribute.

                    +

                    2. If you set to use dynamic tree, when a node is expanded which 'isParent' attribute is true and which has no child nodes, zTree will use ajax to get its child nodes.

                    +

                    Default: undefined

                    +
                    +
                    +

                    Array(JSON) Format

                    +
                    +

                    Standard JSON Data object

                    +
                    +

                    Examples of treeNode

                    +

                    1. Use the standard JSON data object.

                    +
                    var nodes = [
                    +{ "id":1, "name":"test1",
                    +	children: [
                    +	{ "id":3, "name":"test3"},
                    +	{ "id":4, "name":"test4"},
                    +	{ "id":5, "name":"test5"}
                    +	]
                    +},
                    +{ "id":2, "name":"test2"  }
                    +]
                    +

                    2. Get the first root node's child nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes()[0].children;
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.chkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.chkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..7a5fcf38ac6652be8226332729005259417408d6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.chkDisabled.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.chkDisabled

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    1. Set node's checkbox / radio to disabled. It is valid when [setting.check.enable = true]

                    +

                    2. zTree support identification string 'true' & 'false'.

                    +

                    3. Please don't change this attribute of the nodes which have been created. If you want to disable or undisable the nodes, please use 'setChkDisabled()' methods.

                    +

                    4. When zTree initialize the nodes, if you need to the child nodes automatically inherit the 'chkDisabled' attribute, please see 'setting.check.chkDisabledInherit'.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: this node's checkbox / radio is disabled.

                    +

                    false means: this node's checkbox / radio is able.

                    +
                    +

                    Examples of treeNode

                    +

                    1. disable some node's checkbox / radio

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1", "checked":true, "chkDisabled":true},
                    +	{ "id":2, "name":"test2", "chkDisabled":true},
                    +	{ "id":3, "name":"test3"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.click.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.click.html new file mode 100644 index 0000000000000000000000000000000000000000..1f9db6269bed1bd2ebc405ff0d18adc3444c8b36 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.click.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    StringtreeNode.click

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Simple click event operations. As same as : (onclick ="...") the code. If the operation is more complex, please use the onClick callback.

                    +

                    Because IE is different to other browsers in operating the event of ‘onclick’ and ‘click’ coexistence, please do not use this parameter to control whether to allow the redirection operation (for example: treeNode.click = "return false;"). If there is similar requirements, please do not use the 'url' attribute to save the website address, but use the 'onClick' callback to control jumps.

                    +

                    Default: undefined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    Standard javascript syntax, for example: alert ("test"); etc.

                    +
                    +

                    Examples of treeNode

                    +

                    1. When click this node, will alert msg.

                    +
                    var nodes = [
                    +	{ "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
                    +	......
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.diy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.diy.html new file mode 100644 index 0000000000000000000000000000000000000000..68c39ba6a5c8944417aaebcc624c55920d0c3540 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.diy.html @@ -0,0 +1,15 @@ +
                    +
                    +

                    ?treeNode.* DIY *

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to save other custom data of node, do not use the same attribute name with ztree used, the user can freely set.

                    +
                    +
                    +

                    Examples of treeNode

                    +

                    1. Use 'ename' attribute to save more info

                    +
                    var node = { "id":1, "name":"test1", "ename":"test eName"};
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.editNameFlag.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.editNameFlag.html new file mode 100644 index 0000000000000000000000000000000000000000..f60ef2ab2d4ee3a3ff3d28d898c2b2fb55e6b4bc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.editNameFlag.html @@ -0,0 +1,19 @@ +
                    +
                    +

                    BooleantreeNode.editNameFlag

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Used to save the node editing name status. It is valid when [setting.edit.enable = true]

                    +

                    Do not initialize or modify it, it is an internal argument.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: node is being edited.

                    +

                    false means: node is not being edited.

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getCheckStatus.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getCheckStatus.html new file mode 100644 index 0000000000000000000000000000000000000000..3c9a2e6b0baaeeabc39e6c0ee3836dac9e844924 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getCheckStatus.html @@ -0,0 +1,63 @@ +
                    +
                    +

                    Function()treeNode.getCheckStatus

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Get the node's half-checked status of checkbox or radio. It is valid when [setting.check.enable = true]

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    ReturnJSON

                    +
                    {
                    +	checked: true, //As same as 'treeNode.checked'
                    +	half: true  //Rule the table below
                    +}
                    + + + + + + + + + + + + + + + + + + +
                    setting.check.checkType = "checkbox"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsetrue
                    true1falsetrue
                    true2falsefalse
                     
                    false-1falsefalse
                    false0falsefalse
                    false1falsetrue
                    false2falsetrue
                    +
                    + + + + + + + + + + + + + + + + +
                    setting.check.checkType = "radio"
                    treeNode.checkedtreeNode.check_Child_StatetreeNode.halfCheck half
                    --truetrue
                     
                    true-1falsefalse
                    true0falsefalse
                    true2falsetrue
                     
                    false-1falsefalse
                    false0falsefalse
                    false2falsetrue
                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first root node's half-checked status

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var halfCheck = treeObj.getNodes()[0].getCheckStatus();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getIndex.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getIndex.html new file mode 100644 index 0000000000000000000000000000000000000000..2c31cfee1350ea630dcbdc3453c8d573ca969b28 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getIndex.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Function()treeNode.getIndex

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get the treeNode's index in its parent node's children.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    ReturnNumber

                    +

                    the treeNode's index in its parent node's children. ( start at 0 )

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's index.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getIndex();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getNextNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getNextNode.html new file mode 100644 index 0000000000000000000000000000000000000000..755aa6eeafae53f919cdc3b994e4135b379bc2cb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getNextNode.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function()treeNode.getNextNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get the treeNode's next sibling node.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    ReturnJSON

                    +

                    JSON data object of the treeNode's next sibling node

                    +

                    If have not the next node, return null.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's next sibling node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getNextNode();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getParentNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getParentNode.html new file mode 100644 index 0000000000000000000000000000000000000000..16bab3061c595cc7dee56b89e4d1c51b5ee7bcf4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getParentNode.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function()treeNode.getParentNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get the treeNode's parent node.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    ReturnJSON

                    +

                    JSON data object of treeNode's parent node.

                    +

                    If treeNode is root, return null.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's parent node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getParentNode();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getPath.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getPath.html new file mode 100644 index 0000000000000000000000000000000000000000..5f81676153477fbccedc84d458fff948b01c7b33 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getPath.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Function()treeNode.getPath

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get the treeNode's all parent nodes. (Include itself)

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    ReturnArray (JSON)

                    +

                    Array of treeNode's all parent nodes. (Include itself)

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's all parent nodes.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getPath();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getPreNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getPreNode.html new file mode 100644 index 0000000000000000000000000000000000000000..f6745b14cb7bce78d02fe3a963a8086bdfadd139 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.getPreNode.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function()treeNode.getPreNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get the treeNode's previous sibling node.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    ReturnJSON

                    +

                    JSON data object of the treeNode's previous sibling node

                    +

                    If have not the previous node, return null.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's previous sibling node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var node = sNodes[0].getPreNode();
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.halfCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.halfCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..8375326b9fc11ed93329821cbbf6cff9858fb75a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.halfCheck.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    BooleantreeNode.halfCheck

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Force node checkBox / radio to the half-checked status. It is valid when [setting.check.enable = true & treeNode.nocheck = false]

                    +

                    1. If you force to the half-checked status, zTree will not automatically calculated the half-checked status about this node.

                    +

                    2. Until you set treeNode.halfCheck to false or null, zTree will automatically calculated the half-checked status about this node.

                    +

                    3. zTree support identification string 'true' & 'false'.

                    +

                    Defaul: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the checkbox or radio is half-checked when zTree is initialized.

                    +

                    false means: the half-checked status will be automatically calculated

                    +
                    +

                    Examples of treeNode

                    +

                    1. set the half-checked status when zTree is initialized

                    +
                    var nodes = [
                    +{ "id":1, "name":"test1", isParent:true, checked:true, halfCheck:true },
                    +{ "id":2, "name":"test2", isParent:true, checked:false, halfCheck:true },
                    +{ "id":3, "name":"test3", isParent:true, checked:true },
                    +{ "id":4, "name":"test4", isParent:true, checked:false }
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.icon.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.icon.html new file mode 100644 index 0000000000000000000000000000000000000000..4e1c99fa0f4cdf757072ca0958cda37761ed5e77 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.icon.html @@ -0,0 +1,33 @@ +
                    +
                    +

                    StringtreeNode.icon

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    URL path of node's custom icon.

                    +

                    1. If you only set the 'icon' attribute to parent node, the parent node will only show one icon when it is expanded or collapsed.

                    +

                    2. If you need to show two icons when it is expanded or collapsed, please set the 'treeNode.iconOpen' and 'treeNode.iconClose' attribute.

                    +

                    3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.

                    +

                    Default: undefined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    Icon image url can be a relative path or absolute path.

                    +

                    If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Set the custom icon

                    +
                    var nodes = [
                    +	//Only show one icon when it is expanded or collapsed.
                    +	{ name:"Parent Node 1", icon:"/img/parent.gif"},
                    +
                    +	//Show two icons when it is expanded or collapsed.
                    +	{ name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
                    +
                    +	//the custom icon for leaf node
                    +	{ name:"Leaf Node", icon:"/img/leaf.gif"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconClose.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconClose.html new file mode 100644 index 0000000000000000000000000000000000000000..2259e8f30580b40937fe7c9241d9652f73f81062 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconClose.html @@ -0,0 +1,33 @@ +
                    +
                    +

                    StringtreeNode.iconClose

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    URL path of parent node's custom icon when it is collapsed.

                    +

                    1. Only parent node support this attribute.

                    +

                    2. This attribute must be used simultaneously with 'iconOpen' attribute.

                    +

                    3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.

                    +

                    Default: undefined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    Icon image url can be a relative path or absolute path.

                    +

                    If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Set the custom icon

                    +
                    var nodes = [
                    +	//Only show one icon when it is expanded or collapsed.
                    +	{ name:"Parent Node 1", icon:"/img/parent.gif"},
                    +
                    +	//Show two icons when it is expanded or collapsed.
                    +	{ name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
                    +
                    +	//the custom icon for leaf node
                    +	{ name:"Leaf Node", icon:"/img/leaf.gif"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconOpen.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconOpen.html new file mode 100644 index 0000000000000000000000000000000000000000..3203615d1c5b1cb5b45c54baf6aa67bf4ba05316 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconOpen.html @@ -0,0 +1,33 @@ +
                    +
                    +

                    StringtreeNode.iconOpen

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    URL path of parent node's custom icon when it is expanded.

                    +

                    1. Only parent node support this attribute.

                    +

                    2. This attribute must be used simultaneously with 'iconClose' attribute.

                    +

                    3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.

                    +

                    Default: undefined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    Icon image url can be a relative path or absolute path.

                    +

                    If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Set the custom icon

                    +
                    var nodes = [
                    +	//Only show one icon when it is expanded or collapsed.
                    +	{ name:"Parent Node 1", icon:"/img/parent.gif"},
                    +
                    +	//Show two icons when it is expanded or collapsed.
                    +	{ name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
                    +
                    +	//the custom icon for leaf node
                    +	{ name:"Leaf Node", icon:"/img/leaf.gif"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconSkin.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconSkin.html new file mode 100644 index 0000000000000000000000000000000000000000..fca7fbf206b87126cad755d8d2feb95888cc28ab --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.iconSkin.html @@ -0,0 +1,43 @@ +
                    +
                    +

                    StringtreeNode.iconSkin

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The className of node's custom icon.

                    +

                    1. You need to modify the css, add the definition of className.

                    +

                    2. The css is simple, convenient, and support the parent node to switch icons when it is expanded or collapsed.

                    +

                    3. Recommend the use of CSS Sprites, can reduce repeating load the image, to avoid image flicker.

                    +

                    4. The 'iconSkin' support IE6 in zTree v3.x.

                    +

                    5. If you need to use image's URL to set the custom icon, please set the 'treeNode.icon' or 'treeNode.iconOpen' or 'treeNode.iconClose' attribute.

                    +

                    Default: undefined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    The string about custom icon's className.

                    +
                    +

                    Examples of css & treeNode

                    +

                    1. Set the custom icon

                    +
                    css example:
                    +.ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}
                    +
                    +.ztree li span.button.diy02_ico_open{...}
                    +.ztree li span.button.diy02_ico_close{...}
                    +
                    +.ztree li span.button.diy03_ico_docu{...}
                    +
                    +node's data example:
                    +var nodes = [
                    +	//Only show one icon when it is expanded or collapsed.
                    +	{ name:"Parent Node 1", iconSkin:"diy01"},
                    +
                    +	//Show two icons when it is expanded or collapsed.
                    +	{ name:"Parent Node 2", iconSkin:"diy02"},
                    +
                    +	//the custom icon for leaf node
                    +	{ name:"Leaf Node", iconSkin:"diy03"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isAjaxing.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isAjaxing.html new file mode 100644 index 0000000000000000000000000000000000000000..ddadf41b770b997d3d7bd752cbf11f04644847a3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isAjaxing.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    BooleantreeNode.isAjaxing

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Judge whether the node's child nodes being loaded asynchronously.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the node's child nodes is being loaded asynchronously

                    +

                    false means: the node's child nodes is not being loaded asynchronously

                    +
                    +

                    Examples of treeNode

                    +

                    1. Judge whether the first selected node's child nodes being loaded asynchronously

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isAjaxing = sNodes[0].isAjaxing;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isFirstNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isFirstNode.html new file mode 100644 index 0000000000000000000000000000000000000000..a8ee61ce0153b638502f83cb852c9295ade775ee --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isFirstNode.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.isFirstNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Judge whether the node is the sibling nodes's first node.

                    +

                    If you use the 'exhide' pack, so this attribute will only support the node which be shown.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the node is first node.

                    +

                    false means: the node is not first node.

                    +

                    If the node has been hidden, isFirstNode = false

                    +
                    +

                    Examples of treeNode

                    +

                    1. Judge whether the first selected node is the sibling nodes's first node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isFirstNode = sNodes[0].isFirstNode;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isHidden.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isHidden.html new file mode 100644 index 0000000000000000000000000000000000000000..3a07b94c821aaea520f0823bbd7094557c0f3f22 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isHidden.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.isHidden

                    +

                    Overview[ depends on jquery.ztree.exhide js ]

                    +
                    +

                    +
                    +

                    Judge whether the node has been hidden.

                    +

                    1. When initialize zTree, the nodes which be set 'isHidden = true' will be hidden.

                    +

                    +

                    2. Please don't change this attribute of the nodes which have been created. If you want to hide or show nodes, please use 'hideNode() / hideNodes() / showNode() / showNodes()' methods.

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: this node is hidden.

                    +

                    false means: this node is shown.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Judge whether the first root node has been hidden.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getNodes();
                    +if (sNodes.length > 0) {
                    +	var isHidden = sNodes[0].isHidden;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isHover.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isHover.html new file mode 100644 index 0000000000000000000000000000000000000000..e18ed0cf1bf95b7c2ea01444da0f028b92015fe5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isHover.html @@ -0,0 +1,19 @@ +
                    +
                    +

                    BooleantreeNode.isHover

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Used to record the hover status of node's DOM. For 'setting.view.addHoverDom / removeHoverDom'.

                    +

                    Do not initialize or modify it, it is an internal argument.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the node's DOM is in hover.

                    +

                    false means: the node's DOM is not in hover.

                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isLastNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isLastNode.html new file mode 100644 index 0000000000000000000000000000000000000000..cd2ca26bb6fc56e5e564f082d863d8cba0ae520b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isLastNode.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.isLastNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Judge whether the node is the sibling nodes's last node.

                    +

                    If you use the 'exhide' pack, so this attribute will only support the node which be shown.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the node is last node.

                    +

                    false means: the node is not last node.

                    +

                    If the node has been hidden, isLastNode = false

                    +
                    +

                    Examples of treeNode

                    +

                    1. Judge whether the first selected node is the sibling nodes's last node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isLastNode = sNodes[0].isLastNode;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isParent.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isParent.html new file mode 100644 index 0000000000000000000000000000000000000000..dad4b819edd681f2e69cf786b1d334dbd3d7afef --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.isParent.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.isParent

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Judge whether the node is the parent node.

                    +

                    1. When zTree initialize the node data, the node which has children is set to true, otherwise false.

                    +

                    2. When zTree initialize the node data, if set treeNode.isParent to true, the node will be set to be parent node.

                    +

                    3. In order to solve the problem of someone make json data, supporting "false", "true" format of the data string.

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the node is parent node.

                    +

                    false means: the node is not parent node.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Judge whether the first selected node is the parent node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isParent = sNodes[0].isParent;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.level.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.level.html new file mode 100644 index 0000000000000000000000000000000000000000..d15116240fedc9bcc1f9ae5ea1d660e8b449b1e8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.level.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    NumbertreeNode.level

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The level of node

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    Number Format

                    +
                    +

                    The root node's level = 0, and next level = 1, ...

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's level

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var level = sNodes[0].level;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.name.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.name.html new file mode 100644 index 0000000000000000000000000000000000000000..fa508ccb80b1f8e4c71eba924c29df72752adf1c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.name.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    StringtreeNode.name

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The node's name

                    +

                    1. If you want to change 'name' attribute, please modify the 'setting.data.key.name' attribute.

                    +

                    Default: undenfined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    String object. The HTML special characters are escaped

                    +
                    +

                    Examples of treeNode

                    +

                    1. Set node's name to 'test1', 'test2', 'test3'

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1"},
                    +	{ "id":2, "name":"test2"},
                    +	{ "id":3, "name":"test3"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.nocheck.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.nocheck.html new file mode 100644 index 0000000000000000000000000000000000000000..6c4880c849c245f5ba175e6570a232dc605f83a1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.nocheck.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    BooleantreeNode.nocheck

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    1. Set node to hide the checkbox or radio. It is valid when [setting.check.enable = true]

                    +

                    2. zTree support identification string 'true' & 'false'.

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the node hide the checkbox or radio, and don't affect the checked association, and don't affect its parent node's half-checked status.

                    +

                    false means: the node show the checkbox or radio.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Hide some node's checkbox / radio

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1", "nocheck":true},
                    +	{ "id":2, "name":"test2"},
                    +	{ "id":3, "name":"test3"}
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.open.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.open.html new file mode 100644 index 0000000000000000000000000000000000000000..bc910de3fd6ec18ccbcd08008e4a2d1d80ad4522 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.open.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    BooleantreeNode.open

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to record the parent node's expand status.

                    +

                    1. When zTree initialize the node data, if you set treeNode.open = true, zTree will default expand this parent node.

                    +

                    2. Leaf node's 'open' attribute is false.

                    +

                    3. In order to solve the problem of someone make json data, supporting "false", "true" format of the data string.

                    +

                    4. When setting.async.enable = false, the parent node will be expanded which have no child nodes and its attribute 'open' is true. (v3.5.15+)

                    +

                    Default: false

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the parent node is expanded.

                    +

                    false means: the parent node is collapsed.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's expand status.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var isOpen = sNodes[0].open;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.parentTId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.parentTId.html new file mode 100644 index 0000000000000000000000000000000000000000..0bc2a6d64e86c000bd78f5ce83565b76dc14a34e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.parentTId.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    StringtreeNode.parentTId

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The unique identifier of node's parent node.

                    +

                    1. zTree v3.x using 'parentTId' replaced the original 'parentNode' attribute, and increased getParentNode () method, in order to avoid the original 'parentNode' cause the clone () method infinite loop.

                    +

                    2. Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    String Format

                    +
                    +

                    String object of node's parent node's tId. please see API about 'treeNode.tId'

                    +

                    If treeNode is root node, parentTId is null.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's parent node's tId

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var parentTId = sNodes[0].parentTId;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.tId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.tId.html new file mode 100644 index 0000000000000000000000000000000000000000..18c2855a06a60b8180127b9f96059e5d0a44eb1d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.tId.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    StringtreeNode.tId

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The unique identifier of node.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +
                    +
                    +

                    String Format

                    +
                    +

                    tId rules: setting.treeId + "_" + zTree counter

                    +
                    +

                    Examples of treeNode

                    +

                    1. Get the first selected node's tId

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var tId = sNodes[0].tId;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.target.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.target.html new file mode 100644 index 0000000000000000000000000000000000000000..176a7a358a40590ccac2ab9e4626cd17ac59a461 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.target.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    StringtreeNode.target

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Used to set the target where the node is clicked to open url. It is valid when [treeNode.url exists]

                    +

                    Default: undefined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    As same as <a> tag's 'target' attribute. e.g. '_blank', '_self' or other window name.

                    +

                    if this attribute is omitted, zTree default set it to '_blank'

                    +
                    +

                    Exmaples of treeNode

                    +

                    1. Set target is '_blank'

                    +
                    var nodes = [
                    +	{ "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
                    +	......
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.url.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.url.html new file mode 100644 index 0000000000000000000000000000000000000000..55524455e5a3c5747b437253d344a68c0377cf36 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.url.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    StringtreeNode.url

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The URL of node link

                    +

                    1. In edit mode (setting.edit.enable = true) , this feature fails. If you must use a similar feature, please use the 'onClick' callback for their own control.

                    +

                    2. If you use the 'onClick' callback function to control opening URL , then set the URL in the other custom attribute, do not use the 'url' attribute.

                    +

                    Default: undefined

                    +
                    +
                    +

                    String Format

                    +
                    +

                    As same as <a> tag's 'href' attribute.

                    +
                    +

                    Examples of treeNode

                    +

                    1. Set the URL is 'g.cn'

                    +
                    var nodes = [
                    +	{ "id":1, "name":"Google CN", "url":"http://g.cn"},
                    +	......
                    +]
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.zAsync.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.zAsync.html new file mode 100644 index 0000000000000000000000000000000000000000..b3ff414551b593c95756d9602eae4bcdfa828cd3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/treeNode.zAsync.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    BooleantreeNode.zAsync

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Judge whether the parent node's child nodes will be loaded asynchronously when the parent node is expanded.

                    +

                    Do not initialize or modify it, it is created by the zTree.

                    +

                    Default:false (the parent node which have no child nodes); true (the parent node which have child nodes or the leaf node)

                    +
                    +
                    +

                    Boolean Format

                    +
                    +

                    true means: the node's child nodes will not be loaded asynchronously when the parent node is expanded.

                    +

                    false means: the node's child nodes will be loaded asynchronously when the parent node is expanded.

                    +

                    This attribute will not effect to 'reAsyncChildNodes()' method

                    +
                    +

                    Examples of treeNode

                    +

                    1. Judge whether the first selected node's child nodes has been loaded asynchronously

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var sNodes = treeObj.getSelectedNodes();
                    +if (sNodes.length > 0) {
                    +	var zAsync = sNodes[0].zAsync;
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.addNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.addNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..c40caaf5afbb95e8c6533e1bdd1c7bc7b5f64be0 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.addNodes.html @@ -0,0 +1,47 @@ +
                    +
                    +

                    Function(parentNode, [index], newNodes, isSilent)zTreeObj.addNodes

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Add nodes

                    +

                    In order to avoid duplication data resulting from repeated initialization, zTree v3.x will automatically clone node data when zTree initialized or add nodes. If you need to get the data objects within the zTree, please get the return value of this method.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    parentNodeJSON

                    +

                    The additional node's parent node. If additional node is root node, please the parentNode is null.

                    +

                    Please ensure this node data object is a data object within zTree.

                    +

                    [index]Number

                    +

                    The index of the parentNode's children where the newnodes will be added (the value start from 0)

                    +

                    When index = -1, the newnodes will be added to the last

                    +

                    This parameter can be ignore.

                    +

                    v3.5.19+

                    +

                    newNodesJSON / Array(JSON)

                    +

                    The node data's JSON object collection which need to increase, refer to 'treeNode treeNode data details'

                    +

                    1. zTree v3.x support to add single node, that is, if you only add a node, you can don't use the array.

                    +

                    2. If you use simple data model, please refer to the attributes within the 'setting.data.simpleData'.

                    +

                    isSilentBoolean

                    +

                    Set whether to automatically expand the parent node, after add nodes.

                    +

                    isSilent = true means: don't auto expand the parent node. Otherwise auto expand.

                    +

                    Return Array(JSON)

                    +

                    return the new nodes in zTree

                    +

                    If the newNodes is single data object, the return value is a array with length is 1.

                    +

                    Note: the node data JSON object in the return value is not equal to the JSON object in the 'newNodes'.

                    +
                    +

                    Examples of function

                    +

                    1. Add one root node to zTree which id is 'tree'

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var newNode = {name:"newNode1"};
                    +newNode = treeObj.addNodes(null, newNode);
                    +
                    +

                    2. Add three root nodes to zTree which id is 'tree'

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var newNodes = [{name:"newNode1"}, {name:"newNode2"}, {name:"newNode3"}];
                    +newNodes = treeObj.addNodes(null, newNodes);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.cancelEditName.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.cancelEditName.html new file mode 100644 index 0000000000000000000000000000000000000000..8afdae0b2a754db308eb9859de7fb44c4638d34b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.cancelEditName.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Function(newName)zTreeObj.cancelEditName

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Cancel the edit name status. Can restore the original name, and can also force assigned to a new name.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    newNameString

                    +

                    Re given a new name

                    +

                    If this parameter is omitted, then restore the original name.

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. Cancel edit name, and restore the original name.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.cancelEditName();
                    +
                    +

                    2. Cancel edit name , and set the new name.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.cancelEditName("test_new_name");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.cancelSelectedNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.cancelSelectedNode.html new file mode 100644 index 0000000000000000000000000000000000000000..84c6c80b9445a6e2f97c68bb3ea899bf28323fc7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.cancelSelectedNode.html @@ -0,0 +1,35 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.cancelSelectedNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    To cancel the selected node.

                    +

                    zTree v3.x support to select multiple nodes, so you can cancel a single selected node, and you can cancel all of the selected nodes too.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to cancel selected.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    If you omit this parameter, zTree will cancel all of the selected nodes.

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. Cancel all of the selected nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.cancelSelectedNode();
                    +
                    +

                    2. Cancel the first node of the selected nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) { 
                    +	treeObj.cancelSelectedNode(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.checkAllNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.checkAllNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..de00e112dd38a2ddaba0190816999545fdbe1fea --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.checkAllNodes.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(checked)zTreeObj.checkAllNodes

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Check or unCheck all nodes which have been initialized. It is valid when [setting.check.enable = true & setting.check.chkStyle = "checkbox"]

                    +

                    This method does not trigger 'beforeCheck' or 'onCheck' callback function.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    checkedBoolean

                    +

                    checked = true means: check all nodes.

                    +

                    checked = false means: uncheck all nodes.

                    +

                    Don't affect the node which 'nocheck' attribute is true.

                    +

                    Don't affect the node is not loaded.

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. check all nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.checkAllNodes(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.checkNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.checkNode.html new file mode 100644 index 0000000000000000000000000000000000000000..741eb3ba088c68a1c18e80f2b8149ebc55a5431e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.checkNode.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Function(treeNode, checked, checkTypeFlag, callbackFlag)zTreeObj.checkNode

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Check or unCheck a single node. It is valid when [setting.check.enable = true]

                    +

                    Use checkNode() method of zTree v3.x can trigger 'beforeCheck' or 'onCheck' callback function. for reduce redundant code.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to be checked or unchecked.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    checkedBoolean

                    +

                    checked = true means: check node.

                    +

                    checked = false means: uncheck node.

                    +

                    If this parameter is omitted, then toggle check or uncheck depend this node's expanded state.

                    +

                    Don't affect the node which 'nocheck' attribute is true.

                    +

                    checkTypeFlagBoolean

                    +

                    checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.

                    +

                    checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.

                    +

                    When checkTypeFlag = false and treeNode.checked = checked, will not trigger callback function.

                    +

                    Don't affect the parent and child nodes which 'nocheck' attribute is true.

                    +

                    callbackFlagBoolean

                    +

                    callbackFlag = true means: call this method, will trigger 'beforeCheck' & 'onCheck' callback.

                    +

                    callbackFlag = false means: call this method, will not trigger callback.

                    +

                    If this parameter is omitted, it is same as 'callbackFlag = false'

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. check the selected nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +for (var i=0, l=nodes.length; i < l; i++) {
                    +	treeObj.checkNode(nodes[i], true, true);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.copyNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.copyNode.html new file mode 100644 index 0000000000000000000000000000000000000000..ff7b5b59ade0af65cc6eaa760424269f2ada5880 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.copyNode.html @@ -0,0 +1,47 @@ +
                    +
                    +

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.copyNode

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Copy the node

                    +

                    When copy nodes, zTree v3.x will clone nodes. If you need to get the data object in zTree, please get the return value of this method.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    targetNodeJSON

                    +

                    JSON data object of the node to be target.

                    +

                    If copy the node to root node, please set the 'targetNode' to null.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be copied.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    moveTypeString

                    +

                    Copied to the target node's relative position.

                    +

                    "inner" means: to be taregetNode's child node.

                    +

                    "prev" means: to be taregetNode's previous sibling node.

                    +

                    "next" means: to be taregetNode's next sibling node.

                    +

                    isSilentBoolean

                    +

                    After copy the node, whether to automatically expand its parent node.

                    +

                    isSilent = true means: don't expand its parent node.

                    +

                    isSilent = false or omit this parameter means: expand its parent node.

                    +

                    Return JSON

                    +

                    return the new node in zTree

                    +

                    Note: the node data JSON object in the return value is not equal to the treeNode.

                    +
                    +

                    Examples of function

                    +

                    1. Copy the second root node to the first root node's child node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.copyNode(nodes[0], nodes[1], "inner");
                    +
                    +

                    2. Copy the second root node to the first root node's previous sibling node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.copyNode(nodes[0], nodes[1], "before");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.destroy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.destroy.html new file mode 100644 index 0000000000000000000000000000000000000000..80c528119c3ed72e713e64e1999459bc4e5d1829 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.destroy.html @@ -0,0 +1,25 @@ +
                    +
                    +

                    Function(treeId)zTreeObj.destroy

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    From zTree v3.4, zTree support the method for destruction.

                    +

                    1. This method can destroy the zTreeObj's zTree.

                    +

                    2. If you want to destory all of the zTrees, you can use the '$.fn.zTree.destroy()' method.

                    +

                    3. If you want to use the tree which has been destroyed, you must use the 'init()' method at first.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. destroy the zTree which its id is 'treeDemo'

                    +
                    var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
                    +zTreeObj.destroy();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.editName.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.editName.html new file mode 100644 index 0000000000000000000000000000000000000000..f8df2643a57eadb245ffa7362d2385b67b3d2543 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.editName.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.editName

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Start editing the node's name.

                    +

                    1. If need to cancel editing the node's name, please use cancelEditName(newName) method.

                    +

                    2. This method can be used to set the editing node‘s input box to get focus.

                    +

                    3. Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be editing name

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    Retrun none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. Start editing the first selected node's name.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.editName(nodes[0]);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.expandAll.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.expandAll.html new file mode 100644 index 0000000000000000000000000000000000000000..ef28a316757c9dbf58a1afac5a72f80e7d4aa116 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.expandAll.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Function(expandFlag)zTreeObj.expandAll

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Expand or collapse all nodes.

                    +

                    This method does not trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    expandFlagBoolean

                    +

                    expandFlag = true means: expand all nodes.

                    +

                    expandFlag = false means: collapse all nodes.

                    +

                    Return Boolean

                    +

                    return the result of expand or collapse.

                    +

                    true means: expand all nodes

                    +

                    false means: collapse all nodes

                    +

                    null means: have no parent node to expand or collapse.

                    +
                    +

                    Examples of function

                    +

                    1. Expand all nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.expandAll(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.expandNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.expandNode.html new file mode 100644 index 0000000000000000000000000000000000000000..01e7442ada6d5e1d56aa32a1ee6b53278190450f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.expandNode.html @@ -0,0 +1,50 @@ +
                    +
                    +

                    Function(treeNode, expandFlag, sonSign, focus, callbackFlag)zTreeObj.expandNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Expand or collapse single node.

                    +

                    Use expandNode() method of zTree v3.x can trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function. for reduce redundant code.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be expanded or collapsed

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    expandFlagBoolean

                    +

                    expandFlag = true means: expand the node.

                    +

                    expandFlag = false means: collapse the node.

                    +

                    If this parameter is omitted, then toggle expand or collapse depend this node's expanded state.

                    +

                    sonSignBoolean

                    +

                    sonSign = true means: expand or collapse all of the child nodes depend the 'expandFlag' parameter.

                    +

                    sonSign = false means: only expand or collapse this node.

                    +

                    When sonSign = false and treeNode.open = expandFlag, will not trigger the callback.

                    +

                    If this parameter is omitted, it is same as 'sonSign = false'.

                    +

                    focusBoolean

                    +

                    focus = true means: after expand or collapse, set the focus of this node for view.

                    +

                    focus = false means: after expand or coolapse, don't set the focus of this node.

                    +

                    If this parameter is omitted, it is same as 'focus = true'.

                    +

                    callbackFlagBoolean

                    +

                    callbackFlag = true means: call this method, will trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback.

                    +

                    callbackFlag = false means: call this method, will not trigger callback.

                    +

                    If this parameter is omitted, it is same as 'callbackFlag = false'

                    +

                    Return Boolean

                    +

                    return the result of expand or collapse.

                    +

                    true means: expand node

                    +

                    false means: collapse node

                    +

                    null means: the node is not parent node.

                    +
                    +

                    Examples of function

                    +

                    1. Expand the first selected node. (and expand this node's child nodes)

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	treeObj.expandNode(nodes[0], true, true, true);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getChangeCheckedNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getChangeCheckedNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..d0f9cf3b02ad2fc051ac6fdb44c51e1d83e374f9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getChangeCheckedNodes.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Function()zTreeObj.getChangeCheckedNodes

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Get the collection of nodes which be changed checked status. (Compared with the original data checkedOld) It is valid when [setting.check.enable = true]

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    Return Array(JSON)

                    +

                    return the collection of nodes which be changed checked status (Array)

                    +

                    If you need to get the collection of nodes which changed the checked status, when nodes be checked or unchecked, so please set treeNode.checkedOld = treeNode.checked ( for all of the be changed checked status nodes ).

                    +
                    +

                    Examples of function

                    +

                    1. Get the collection of nodes which be changed checked status

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getChangeCheckedNodes();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getCheckedNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getCheckedNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..9e59b21ca0d1e8927624b977257a3a8354c9cb58 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getCheckedNodes.html @@ -0,0 +1,28 @@ +
                    +
                    +

                    Function(checked)zTreeObj.getCheckedNodes

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Get the collection of nodes which be checked or unchecked. It is valid when [setting.check.enable = true]

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    checkedBoolean

                    +

                    checked = true means: get the collection of nodes which be checked

                    +

                    checked = false means: get the collection of nodes which be unchecked

                    +

                    If this parameter is omitted, it is same as 'checked = true'

                    +

                    Don't get the nodes which 'nocheck' attribute is true.

                    +

                    Return Array(JSON)

                    +

                    return the collection of nodes which be checked or unchecked. (Array)

                    +
                    +

                    Examples of function

                    +

                    1. Get the collection of nodes which be checked.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getCheckedNodes(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeByParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeByParam.html new file mode 100644 index 0000000000000000000000000000000000000000..05572e739169c60010326d6a6ed34122e39add93 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeByParam.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Function(key, value, parentNode)zTreeObj.getNodeByParam

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    According to the node data attribute, search the node which exactly matches, and get the JSON object of node.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    keyString

                    +

                    The name of attribute which need to exactly match

                    +

                    value?

                    +

                    The value which need to exactly match, can be any type, please ensure its type consistent with the attribute values.

                    +

                    parentNodeJSON

                    +

                    The search range, you can search node from a parent node's child nodes.

                    +

                    If this parameter is omitted, zTree will search node from all nodes.

                    +

                    Return JSON

                    +

                    JSON data object of the node which be searched.

                    +

                    1. If search none node, return null.

                    +

                    2. If there are many nodes can be searched, return the first node.

                    +
                    +

                    Examples of function

                    +

                    1. Search the node which its 'id' attribute is 1.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodeByParam("id", 1, null);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeByTId.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeByTId.html new file mode 100644 index 0000000000000000000000000000000000000000..8fd26ea05cfb818b06731e9afc0274c1ec873760 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeByTId.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function(tId)zTreeObj.getNodeByTId

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    According the unique identifier tId of zTree, quick get the node's JSON data object.

                    +

                    Get the node from the cache, don't need to search from all nodes.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    tIdString

                    +

                    The unique identifier of node.

                    +

                    Return JSON

                    +

                    JSON data object of the node which be searched.

                    +

                    If no result, return null.

                    +
                    +

                    Examples of function

                    +

                    1. 1. Search the node which its 'tId' attribute is 'tree_10'

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodeByTId("tree_10");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeIndex.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeIndex.html new file mode 100644 index 0000000000000000000000000000000000000000..ad828e7a2482661e2e9fedae053b1bdf723291f7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodeIndex.html @@ -0,0 +1,30 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.getNodeIndex

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get the node's index in the same level nodes. (start from 0)

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to get index.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    Return Number

                    +

                    return the index. (start from 0)

                    +

                    If there is no this node, return -1.

                    +
                    +

                    Examples of function

                    +

                    1. Get the first selected node's index in the same level nodes.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	var index = treeObj.getNodeIndex(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..5906a434eb33a966bf8092e535c915acd1d8f8d8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodes.html @@ -0,0 +1,26 @@ +
                    +
                    +

                    Function()zTreeObj.getNodes

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get all of the nodes in zTree

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    Return Array(JSON)

                    +

                    return all of the nodes

                    +

                    1. This array is a collection of the root nodes (the default child nodes are in the 'children' attributes);

                    +

                    2. Traverse all the nodes need to use recursion, or the use of transformToArray() method make the nodes to be a simple array.

                    +

                    3. For the asynchronous loading mode, can't get the nodes which are yet loaded.

                    +
                    +

                    Examples of function

                    +

                    1. Get all of the nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByFilter.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByFilter.html new file mode 100644 index 0000000000000000000000000000000000000000..2cd6baa8b91cb4401491fd6e504e91780234c087 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByFilter.html @@ -0,0 +1,43 @@ +
                    +
                    +

                    Function(filter, isSingle, parentNode, invokeParam)zTreeObj.getNodesByFilter

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Search the single node's data or collection of nodes's data by custom rules.

                    +

                    Can be customized complex search rules.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    filterFunction

                    +

                    Custom search function. e.g. function filter(node) {...}

                    +

                    filter's parameter: node (node's data -- JSON)

                    +

                    filter's return: boolean (true means: match the rules; false means: don't match the rules)

                    +

                    isSingleBoolean

                    +

                    isSingle = true means: search only one node

                    +

                    isSingle = false means: search the array of the nodes

                    +

                    If this parameter is omitted, as same as false

                    +

                    parentNodeJSON

                    +

                    The search range, you can search node from a parent node's child nodes.

                    +

                    If this parameter is omitted, zTree will search node from all nodes.

                    +

                    invokeParamanything

                    +

                    Custom data object by user, used to calculate in the filter function.

                    +

                    Return Array(JSON) / JSON

                    +

                    If isSingle = true, will return the first node's data (JSON) what be matched. If no match, return null.

                    +

                    If isSingle = false, will return the array of all nodes's data what be matched. if no match, return [ ].

                    +
                    +

                    Examples of function

                    +

                    1. Search the nodes which their 'name' contains 'test' and 'level' is 2.

                    +
                    function filter(node) {
                    +    return (node.level == 2 && node.name.indexOf("test")>-1);
                    +}
                    +......
                    +var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodesByFilter(filter, true); // search only one node
                    +var nodes = treeObj.getNodesByFilter(filter); // search the array of the nodes
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByParam.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByParam.html new file mode 100644 index 0000000000000000000000000000000000000000..3173af474c11e7209c46b67032623bc5bf002122 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByParam.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    Function(key, value, parentNode)zTreeObj.getNodesByParam

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    According to the node data attribute, search the nodes which exactly matches, and get the JSON objects collection of nodes.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    keyString

                    +

                    The name of attribute which need to exactly match

                    +

                    value?

                    +

                    The value which need to exactly match, can be any type, please ensure its type consistent with the attribute values.

                    +

                    parentNodeJSON

                    +

                    The search range, you can search node from a parent node's child nodes.

                    +

                    If this parameter is omitted, zTree will search node from all nodes.

                    +

                    Return Array(JSON)

                    +

                    The JSON data objects collection of the nodes which be searched.

                    +

                    If search none node, return [ ].

                    +
                    +

                    Examples of function

                    +

                    1. Search the nodes which their 'name' attribute is 'test'.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodesByParam("name", "test", null);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByParamFuzzy.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByParamFuzzy.html new file mode 100644 index 0000000000000000000000000000000000000000..14b6c2942ff822a5254e7a3e73b3c883980ff369 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getNodesByParamFuzzy.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Function(key, value, parentNode)zTreeObj.getNodesByParamFuzzy

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    According to the node data attribute, search the nodes which fuzzy matches, and get the JSON objects collection of nodes.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    keyString

                    +

                    The name of attribute which need to fuzzy match

                    +

                    valueString

                    +

                    The value which need to fuzzy match.

                    +

                    The type of value can only be String

                    +

                    parentNodeJSON

                    +

                    The search range, you can search node from a parent node's child nodes.

                    +

                    If this parameter is omitted, zTree will search node from all nodes.

                    +

                    Return Array(JSON)

                    +

                    The JSON data objects collection of the nodes which be searched.

                    +

                    If search none node, return [ ].

                    +
                    +

                    Examples of function

                    +

                    1. Search the nodes which their 'name' attribute contains the string 'test'.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodesByParamFuzzy("name", "test", null);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getSelectedNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getSelectedNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..4a0f060846089ca3942badf794aeba187922c055 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.getSelectedNodes.html @@ -0,0 +1,23 @@ +
                    +
                    +

                    Function()zTreeObj.getSelectedNodes

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Get the JSON data objects collection of the selected nodes in zTree.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    Return Array(JSON)

                    +

                    The JSON data objects collection of the selected nodes.

                    +
                    +

                    Examples of function

                    +

                    1. get the selected nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.hideNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.hideNode.html new file mode 100644 index 0000000000000000000000000000000000000000..8ddb6843057ad34bb263bedec8a5c820cf50c78b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.hideNode.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.hideNode

                    +

                    Overview[ depends on jquery.ztree.exhide js ]

                    +
                    +

                    +
                    +

                    To hide any node.

                    +

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    +

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    +

                    3. Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be hidden

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    Retrun none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. hide the first root node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.hideNode(nodes[0]);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.hideNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.hideNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..9bf8e6b5204b56ce2c3afff552368b8593e5eca8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.hideNodes.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNodes)zTreeObj.hideNodes

                    +

                    Overview[ depends on jquery.ztree.exhide js ]

                    +
                    +

                    +
                    +

                    To hide a group of nodes.

                    +

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    +

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    +

                    3. Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodesArray(JSON)

                    +

                    the array of the nodes which will be hidden

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    Retrun none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. hide the first root node's children.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.hideNodes(nodes[0].children);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.moveNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.moveNode.html new file mode 100644 index 0000000000000000000000000000000000000000..1f3b88c399d446a867c5b78ada3c6f8903b69e8c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.moveNode.html @@ -0,0 +1,49 @@ +
                    +
                    +

                    Function(targetNode, treeNode, moveType, isSilent)zTreeObj.moveNode

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Move the node

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    targetNodeJSON

                    +

                    JSON data object of the node to be target.

                    +

                    If move the node to root node, please set the 'targetNode' to null.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be moved.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    moveTypeString

                    +

                    Moved to the target node's relative position.

                    +

                    "inner" means: to be taregetNode's child node.

                    +

                    "prev" means: to be taregetNode's previous sibling node.

                    +

                    "next" means: to be taregetNode's next sibling node.

                    +

                    isSilentBoolean

                    +

                    After move the node, whether to automatically expand its parent node.

                    +

                    isSilent = true means: don't expand its parent node.

                    +

                    isSilent = false or omit this parameter means: expand its parent node.

                    +

                    Return JSON

                    +

                    return the node which be moved, it is same as the 'treeNode' parameter.

                    +

                    Return null means: move node has failed. The cause:
                    +  1. the targetNode is the treeNode's parent node, and moveType = "inner"
                    +  2. the targetNode is the treeNode's child node. +

                    +
                    +

                    Examples of function

                    +

                    1. Move the second root node to the first root node's child node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.moveNode(nodes[0], nodes[1], "inner");
                    +
                    +

                    2. Move the second root node to the first root node's previous sibling node.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +treeObj.moveNode(nodes[0], nodes[1], "prev");
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.reAsyncChildNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.reAsyncChildNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..9b9a9304ae42696d6fd43fc1161d4f2bb57a2961 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.reAsyncChildNodes.html @@ -0,0 +1,48 @@ +
                    +
                    +

                    Function(parentNode, reloadType, isSilent, callback)zTreeObj.reAsyncChildNodes +

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Forced asynchronous loading child nodes of parent node. It is valid when [setting.async.enable = true] +

                    +

                    You can use this method to reload child nodes.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    parentNodeJSON

                    +

                    The parent node which will asynchronous loading child nodes.

                    +

                    1. If parentNode = null, it is same as reload root nodes.

                    +

                    2. If parentNode.isParent = false, don't load nodes.

                    +

                    3. Please ensure that this data object is an internal node data object in + zTree.

                    +

                    reloadTypeString

                    +

                    reloadType = "refresh" means: reload child nodes.

                    +

                    reloadType != "refresh" means: append to load child nodes.

                    +

                    isSilentBoolean

                    +

                    Set whether to automatically expand the parent node, after load nodes.

                    +

                    isSilent = true means: don't auto expand the parent node. Otherwise auto expand.

                    +

                    callbackfunction

                    +

                    zTree will trigger this callback() function after reAsyncChildNodes()

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. reload root nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.reAsyncChildNodes(null, "refresh");
                    +
                    +

                    2. reload the first selected node's child nodes.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	treeObj.reAsyncChildNodes(nodes[0], "refresh");
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.reAsyncChildNodesPromise.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.reAsyncChildNodesPromise.html new file mode 100644 index 0000000000000000000000000000000000000000..599e2af087831182e8ef80140735b5b98ffaa002 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.reAsyncChildNodesPromise.html @@ -0,0 +1,47 @@ +
                    +
                    +

                    Function(parentNode, reloadType, isSilent)zTreeObj.reAsyncChildNodesPromise +

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Forced asynchronous loading child nodes of parent node ( for ES6 Promise ). It is valid when [setting.async.enable = true] +

                    +

                    You can use this method to reload child nodes.

                    +

                    Please use zTree object to executing the method.

                    +

                    v3.5.29+

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    parentNodeJSON

                    +

                    The parent node which will asynchronous loading child nodes.

                    +

                    1. If parentNode = null, it is same as reload root nodes.

                    +

                    2. If parentNode.isParent = false, don't load nodes.

                    +

                    3. Please ensure that this data object is an internal node data object in + zTree.

                    +

                    reloadTypeString

                    +

                    reloadType = "refresh" means: reload child nodes.

                    +

                    reloadType != "refresh" means: append to load child nodes.

                    +

                    isSilentBoolean

                    +

                    Set whether to automatically expand the parent node, after load nodes.

                    +

                    isSilent = true means: don't auto expand the parent node. Otherwise auto expand.

                    +

                    Return ES6 Promise

                    +

                    Promise Object of ES6

                    +
                    +

                    Examples of function

                    +

                    1. reload root nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.reAsyncChildNodes(null, "refresh");
                    +
                    +

                    2. reload the first selected node's child nodes.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes.length>0) {
                    +	treeObj.reAsyncChildNodes(nodes[0], "refresh");
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.refresh.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.refresh.html new file mode 100644 index 0000000000000000000000000000000000000000..8316192c4406892059f0861fa3507fd157a03db1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.refresh.html @@ -0,0 +1,24 @@ +
                    +
                    +

                    Function()zTreeObj.refresh

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Refresh zTree

                    +

                    If you have no special need, try not to use this method. If you refresh single node, please use updateNode() method. If you refresh child nodes in dynamic mode, please use the reAsyncChildNodes() method.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. refresh zTree

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.refresh();
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.removeChildNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.removeChildNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..c249e17504f9633622515ad8f7b4be08055c8b5b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.removeChildNodes.html @@ -0,0 +1,32 @@ +
                    +
                    +

                    Function(parentNode)zTreeObj.removeChildNodes

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Remove a parent node's child nodes

                    +

                    1. After remove child nodes, the parent node will become a leaf node. Such as the need to maintain the parent node is still a parent node, set 'setting.data.keep.parent' attribute.

                    +

                    2. Do not use this method to empty the root. If you need to empty the root, you can initialization zTree, and set the initial nodes is null.

                    +

                    3. This method does not trigger any callback function.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    parentNodeJSON

                    +

                    The parent node which need to clear its child nodes.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    Return Array(JSON)

                    +

                    Return the parent node's child nodes which have been removed. If has no child nodes, return null.

                    +
                    +

                    Examples of function

                    +

                    1. Remove the first selected node's child nodes

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +if (nodes && nodes.length>0) {
                    +	treeObj.removeChildNodes(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.removeNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.removeNode.html new file mode 100644 index 0000000000000000000000000000000000000000..67ad7e236e1febe6d8bc0ec33184f42b3cdc56b9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.removeNode.html @@ -0,0 +1,34 @@ +
                    +
                    +

                    Function(treeNode, callbackFlag)zTreeObj.removeNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Remove a node

                    +

                    Use removeNode() method of zTree v3.x can trigger 'beforeRemove / onRemove' callback function. for reduce redundant code.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be removed.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    callbackFlagBoolean

                    +

                    callbackFlag = true means: call this method, will trigger 'beforeRemove' & 'onRemove' callback.

                    +

                    callbackFlag = false means: call this method, will not trigger callback.

                    +

                    If this parameter is omitted, it is same as 'callbackFlag = false'

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. Remove all of the selected nodes.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +for (var i=0, l=nodes.length; i < l; i++) {
                    +	treeObj.removeNode(nodes[i]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.selectNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.selectNode.html new file mode 100644 index 0000000000000000000000000000000000000000..45c4c10aed95900a3bbfdc1ef810fdd2b5c2b400 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.selectNode.html @@ -0,0 +1,37 @@ +
                    +
                    +

                    Function(treeNode, addFlag, isSilent)zTreeObj.selectNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Select a node

                    +

                    zTree v3.x supports select multiple nodes.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node to be selected.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    addFlagBoolean

                    +

                    addFlag = true means: append to select node, don't affect the previously selected node, can select multiple nodes.

                    +

                    addFlag = false (default) means: select single node, prior the selected node is deselected.

                    +

                    If setting.view.selectedMulti = false, this para, this parameter is not valid, always select single node

                    +

                    isSilent = true means: when you select node, zTree will not scroll the node into view.

                    +

                    isSilent = false (default) means: when you select node, zTree will scroll the node into view.

                    +

                    (v3.5.23+)

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Exampleso of function

                    +

                    1. Select single node which be first selected.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +if (nodes.length>0) {
                    +	treeObj.selectNode(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setChkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setChkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..30b5342d9cab737474c80034d6372673d05c2ec2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setChkDisabled.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Function(node, disabled, inheritParent, inheritChildren)zTreeObj.setChkDisabled

                    +

                    Overview[ depends on jquery.ztree.excheck js ]

                    +
                    +

                    +
                    +

                    Set the node's checkbox or radio is disabled or remove disabled. It is valid when [setting.check.enable = true]

                    +

                    1. After the node's checkbox / radio is disabled, it can not be checked or unchecked, but it can affect the half-checked status of the parent node.

                    +

                    2. Please do not directly modify the 'chkDisabled' attribute of the loaded node.

                    +

                    3. Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to be checked or unchecked.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    disabledBoolean

                    +

                    disabled = true means: the node's checkbox / radio is disabled.

                    +

                    disabled = false means: the node's checkbox / radio is removed disabled.

                    +

                    If this parameter is omitted, it is same as disabled = false

                    +

                    Don't affect the node which 'nocheck' attribute is true.

                    +

                    inheritParentBoolean

                    +

                    inheritParent = true means: all parent nodes's disabled status will be same as this node.

                    +

                    inheritParent = false means: all parent nodes's disabled status will be not affected.

                    +

                    If this parameter is omitted, it is same as 'inheritParent = false'

                    +

                    inheritChildrenBoolean

                    +

                    inheritChildren = true means: all child nodes's disabled status will be same as this node.

                    +

                    inheritChildren = false means: all child nodes's disabled status will be not affected.

                    +

                    If this parameter is omitted, it is same as 'inheritChildren = false'

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. Set the selected nodes's checkbox / radio to disable.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getSelectedNodes();
                    +for (var i=0, l=nodes.length; i < l; i++) {
                    +	treeObj.setChkDisabled(nodes[i], true);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setEditable.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setEditable.html new file mode 100644 index 0000000000000000000000000000000000000000..a44b0ff6e06760f044971f42f1527817f41a9193 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setEditable.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function(editable)zTreeObj.setEditable

                    +

                    Overview[ depends on jquery.ztree.exedit js ]

                    +
                    +

                    +
                    +

                    Edit mode and normal mode switch.

                    +

                    To use edit mode, please set the attributes in 'setting.edit'

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    editableBoolean

                    +

                    true means: set zTree to edit mode.

                    +

                    false means: set zTree to normal mode.

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. set zTree to edit mode

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +treeObj.setEditable(true);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setting.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setting.html new file mode 100644 index 0000000000000000000000000000000000000000..d80c139ab2307008b9640ff6ba6b624060668901 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.setting.html @@ -0,0 +1,14 @@ +
                    +
                    +

                    JSONzTreeObj.setting

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    The configuration data of zTree, refer to "setting details"

                    +

                    zTree v3.x to cancel the original operation setting method, so users can modify.

                    +

                    Note: Modify the parameters which affect zTree initialization will not work, please first understand the different attributes.

                    +
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.showNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.showNode.html new file mode 100644 index 0000000000000000000000000000000000000000..08b2a068d06940e1f2d3e8c0ccaba11b29c1d3f5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.showNode.html @@ -0,0 +1,31 @@ +
                    +
                    +

                    Function(treeNode)zTreeObj.showNode

                    +

                    Overview[ depends on jquery.ztree.exhide js ]

                    +
                    +

                    +
                    +

                    To hide any node which be hidden.

                    +

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    +

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    +

                    3. Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodesArray(JSON)

                    +

                    JSON data object of the node to be shown

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    Retrun none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. show someone node which be hidden.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var node = treeObj.getNodeByParam("isHidden", true);
                    +if (node) {
                    +  treeObj.showNode(node);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.showNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.showNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..c0c926c3ef8156ca92e2cd48e1d4a5185c873989 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.showNodes.html @@ -0,0 +1,29 @@ +
                    +
                    +

                    Function(treeNodes)zTreeObj.showNodes

                    +

                    Overview[ depends on jquery.ztree.exhide js ]

                    +
                    +

                    +
                    +

                    To show a group of nodes which be hidden.

                    +

                    1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.

                    +

                    2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.

                    +

                    3. Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodesArray(JSON)

                    +

                    the array of the nodes which will be shown

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    Retrun none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. show all of the nodes which be hidden.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodesByParam("isHidden", true);
                    +treeObj.showNodes(nodes);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.transformToArray.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.transformToArray.html new file mode 100644 index 0000000000000000000000000000000000000000..4b2296d5bbcc9571a370a3c98d916757a38c546f --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.transformToArray.html @@ -0,0 +1,27 @@ +
                    +
                    +

                    Function(treeNodes)zTreeObj.transformToArray

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    +

                    Transform the zTree nodes data into simple array. (To avoid the user to write code to traverse all nodes)

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodesArray(JSON) / JSON

                    +

                    JSON data object of the node which need to be transformed.

                    +

                    or JSON data objects collection of the nodes which need to be transformed.

                    +

                    Return Array(JSON)

                    +

                    The JSON data objects array of the nodes which be transformed.

                    +
                    +

                    Examples of function

                    +

                    1. Transform the zTree nodes data into simple array.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.transformToArray(treeObj.getNodes());
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.transformTozTreeNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.transformTozTreeNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..70150165b8b399d1c95db6796f3cad8cc787038d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.transformTozTreeNodes.html @@ -0,0 +1,44 @@ +
                    +
                    +

                    Function(simpleNodes)zTreeObj.transformTozTreeNodes

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Transform the simple array into zTree nodes data.

                    +

                    If you use this method, you must set 'setting.data.simpleData.idKey' and 'setting.data.simpleData.pIdKey' attribute, and let the data are consistent with parent-child relationship.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    simpleNodesArray(JSON) / JSON

                    +

                    JSON data object of the node which need to be transformed.

                    +

                    or JSON data objects array of the nodes which need to be transformed.

                    +

                    Return Array(JSON)

                    +

                    Standard data which zTree use. The child nodes are stored in the parent node's 'children' attribute.

                    +

                    If simpleNodes is a single JSON, so the return array's length is 1.

                    +
                    +

                    Examples of function

                    +

                    1. Transform the simple array data into zTree nodes format.

                    +
                    var setting = {
                    +	data: {
                    +		simpleData: {
                    +			enable: true,
                    +			idKey: "id",
                    +			pIdKey: "pId",
                    +			rootPId: 0
                    +		}
                    +	}
                    +};
                    +var simpleNodes = [
                    +    {"id":1, "pId":0, "name":"test1"},
                    +    {"id":11, "pId":1, "name":"test11"},
                    +    {"id":12, "pId":1, "name":"test12"},
                    +    {"id":111, "pId":11, "name":"test111"}
                    +];
                    +var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.transformTozTreeNodes(simpleNodes);
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.updateNode.html b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.updateNode.html new file mode 100644 index 0000000000000000000000000000000000000000..a914b1201a1d45940aae143bd6ca87f54c7550fb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/api/en/zTreeObj.updateNode.html @@ -0,0 +1,37 @@ +
                    +
                    +

                    Function(treeNode, checkTypeFlag)zTreeObj.updateNode

                    +

                    Overview[ depends on jquery.ztree.core js ]

                    +
                    +

                    +
                    +

                    Update node data. Primarily used to update the node's DOM.

                    +

                    1. Can update the attributes for display (e.g. 'name', 'target', 'url', 'icon', 'iconSkin', 'checked', 'nocheck'), do not update the other attributes. For example: If you need to expand the node, please use expandNode() method, do not modify the 'open' attribute.

                    +

                    2. Use updateNode() method of zTree can't trigger 'beforeCheck' or 'onCheck' callback function.

                    +

                    Please use zTree object to executing the method.

                    +
                    +
                    +

                    Function Parameter Descriptions

                    +
                    +

                    treeNodeJSON

                    +

                    JSON data object of the node which need to update.

                    +

                    Please ensure that this data object is an internal node data object in zTree.

                    +

                    checkTypeFlagBoolean

                    +

                    checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.

                    +

                    checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.

                    +

                    This parameter is valid when 'setting.check.enable = true' and 'setting.check.chkStyle = "checkbox"'

                    +

                    Don't affect the parent and child nodes which 'nocheck' attribute is true.

                    +

                    Return none

                    +

                    no return value

                    +
                    +

                    Examples of function

                    +

                    1. Modify the first selected node's name, and update it.

                    +
                    var treeObj = $.fn.zTree.getZTreeObj("tree");
                    +var nodes = treeObj.getNodes();
                    +if (nodes.length>0) {
                    +	nodes[0].name = "test";
                    +	treeObj.updateNode(nodes[0]);
                    +}
                    +
                    +
                    +
                    \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/awesome.css b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/awesome.css new file mode 100644 index 0000000000000000000000000000000000000000..5fa82249aab25f2baae07af1311b885527f3a282 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/awesome.css @@ -0,0 +1,386 @@ +/*------------------------------------- +zTree Style using fontawesome instead of images + +version: 1.1 +author: Mike King +email: mikkelking @ hotmail . com +website: http://code.google.com/p/jquerytree/ + +-------------------------------------*/ +/* Definitions ----------------------*/ +/* End of Definitions ---------------*/ +/* Imports -------------------------*/ +/* End of Imports ------------------*/ +.ztree * { + padding: 0; + margin: 0; + font-size: 12px; + font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; + background-color: #af0000; +} +.ztree { + margin: 0; + padding: 5px; + color: #ffffff; + background-color: #af0000; +} +.ztree li { + padding: 0; + margin: 0; + list-style: none; + line-height: 17px; + text-align: left; + white-space: nowrap; + outline: 0; +} +.ztree li ul { + margin: 0px; + padding: 0 0 0 18px; +} +.ztree li a { + padding-right: 3px; + margin: 0; + cursor: pointer; + height: 17px; + color: #ffffff; + background-color: transparent; + text-decoration: none; + vertical-align: top; + display: inline-block; +} +.ztree li a input.rename { + height: 14px; + width: 80px; + padding: 0; + margin: 0; + color: #af0000; + background-color: #ffffff; + font-size: 12px; + border: 1px #585956 solid; + *border: 0px; +} +.ztree li a:hover { + text-decoration: underline; +} +.ztree li a.curSelectedNode { + padding-top: 0px; + background-color: #af4040; + color: #ffff00; + height: 17px; + opacity: 0.8; +} +.ztree li a.curSelectedNode_Edit { + padding-top: 0px; + background-color: transparent; + color: #ffff00; + height: 17px; + border: 1px #666 solid; + opacity: 0.8; +} +.ztree li a.tmpTargetNode_inner { + padding-top: 0px; + background-color: #aaa; + color: #ffff00; + height: 17px; + border: 1px #666 solid; + opacity: 0.8; + filter: alpha(opacity=80); +} +.ztree li span { + line-height: 17px; + margin-right: 2px; + background-color: transparent; +} +.ztree li span.button { + line-height: 0; + margin: 0; + padding: 0; + width: 15px; + height: 17px; + display: inline-block; + vertical-align: top; + border: 0px solid; + cursor: pointer; + outline: none; + background-color: transparent; + background-repeat: no-repeat; + background-attachment: scroll; +} +.ztree li span.button::before { + color: #ffffff; + font-family: FontAwesome; + padding-top: 10px; +} +.ztree li span.button.chk { + margin: 0px; + cursor: auto; + width: 12px; + display: inline-block; + padding-top: 10px; + padding-left: 2px; +} +.ztree li span.button.chk.checkbox_false_full::before { + content: "\f096"; +} +.ztree li span.button.chk.checkbox_false_full_focus::before { + content: "\f096"; + color: #ffff00; +} +.ztree li span.button.chk.checkbox_false_part::before { + content: "\f096"; + color: #aaaaaa; +} +.ztree li span.button.chk.checkbox_false_part_focus::before { + content: "\f096"; + color: #cad96c; +} +.ztree li span.button.chk.checkbox_false_disable::before { + content: "\f096"; + color: #808080; +} +.ztree li span.button.chk.checkbox_true_full::before { + content: "\f046"; +} +.ztree li span.button.chk.checkbox_true_full_focus::before { + content: "\f046"; +} +.ztree li span.button.chk.checkbox_true_part::before { + content: "\f14a"; +} +.ztree li span.button.chk.checkbox_true_part_focus::before { + content: "\f14a"; + color: #ffff00; +} +.ztree li span.button.chk.checkbox_true_full_focus::before { + content: "\f046"; + color: #ffff00; +} +.ztree li span.button.chk.checkbox_true_part::before { + content: "\f046"; + color: #aaaaaa; +} +.ztree li span.button.chk.checkbox_true_part_focus::before { + content: "\f046"; + color: #cad96c; +} +.ztree li span.button.chk.checkbox_true_disable::before { + content: "\f046"; + color: #808080; +} +.ztree li span.button.chk.radio_false_full::before { + content: "\f10c"; +} +.ztree li span.button.chk.radio_false_full_focus::before { + content: "\f10c"; + color: #ffff00; +} +.ztree li span.button.chk.radio_false_part::before { + content: "\f10c"; + color: #aaaaaa; +} +.ztree li span.button.chk.radio_false_part_focus::before { + content: "\f10c"; + color: #ffff00; +} +.ztree li span.button.chk.radio_false_disable::before { + content: "\f1db"; + color: #808080; +} +.ztree li span.button.chk.radio_true_full::before { + content: "\f192"; +} +.ztree li span.button.chk.radio_true_full_focus::before { + content: "\f192"; + color: #ffff00; +} +.ztree li span.button.chk.radio_true_part::before { + content: "\f192"; + color: #aaaaaa; +} +.ztree li span.button.chk.radio_true_part_focus::before { + content: "\f192"; + color: #aaaaaa; +} +.ztree li span.button.chk.radio_true_disable::before { + content: "\f1db"; + color: #808080; +} +.ztree li span.button.switch { + width: 15px; + height: 17px; +} +.ztree li span.button.root_open::before { + content: "\f078"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.root_close::before { + content: "\f054"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.roots_open::before { + content: "\f078"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.roots_close::before { + content: "\f054"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.center_open::before { + content: "\f078"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.center_close::before { + content: "\f054"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.bottom_open::before { + content: "\f078"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.bottom_close::before { + content: "\f054"; + padding-top: 10px; + padding-left: 2px; + display: inline-block; +} +.ztree li span.button.root_docu { + background: none; +} +.ztree li span.button.roots_docu::before { + content: "\f022"; + padding-left: 2px; + display: inline-block; + color: #ffffff; +} +.ztree li span.button.center_docu::before { + padding-top: 10px; + padding-left: 2px; + display: inline-block; + color: #ffffff; +} +.ztree li span.button.bottom_docu::before { + padding-top: 10px; + padding-left: 2px; + display: inline-block; + color: #ffffff; +} +.ztree li span.button.noline_docu { + background: none; +} +.ztree li span.button.ico_open::before { + content: "\f115"; + font-family: FontAwesome; + padding-top: 10px; + padding-left: 2px; + display: inline-block; + color: #ffffff; +} +.ztree li span.button.ico_close::before { + content: "\f114"; + font-family: FontAwesome; + padding-top: 10px; + padding-left: 2px; + display: inline-block; + color: #ffffff; +} +.ztree li span.button.ico_docu::before { + content: "\f022"; + font-family: FontAwesome; + padding-top: 10px; + padding-left: 2px; + display: inline-block; + color: #ffffff; +} +.ztree li span.button.edit { + margin-left: 4px; + margin-right: -1px; + vertical-align: top; + *vertical-align: middle; + padding-top: 10px; +} +.ztree li span.button.edit::before { + content: "\f044"; + font-family: FontAwesome; +} +.ztree li span.button.remove { + margin-left: 4px; + margin-right: -1px; + vertical-align: top; + *vertical-align: middle; + padding-top: 10px; +} +.ztree li span.button.remove::before { + content: "\f1f8"; + font-family: FontAwesome; +} +.ztree li span.button.add { + margin-left: 4px; + margin-right: -1px; + vertical-align: top; + *vertical-align: middle; + padding-top: 10px; +} +.ztree li span.button.add::before { + content: "\f067"; + font-family: FontAwesome; +} +.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: 17px; + display: inline-block; + padding: 0; + margin: 2px 0 0 1px; + border: 0 none; + position: absolute; + background-color: transparent; + background-attachment: scroll; +} +span.tmpzTreeMove_arrow::before { + content: "\f04b"; + font-family: FontAwesome; + color: #ffff00; +} +ul.ztree.zTreeDragUL { + margin: 0; + padding: 0; + position: absolute; + width: auto; + height: auto; + overflow: hidden; + background-color: #cfcfcf; + border: 1px #ffff00 dotted; + opacity: 0.8; + filter: alpha(opacity=80); +} +.ztreeMask { + z-index: 10000; + background-color: #cfcfcf; + opacity: 0.0; + filter: alpha(opacity=0); + position: absolute; +} diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/awesome.less b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/awesome.less new file mode 100644 index 0000000000000000000000000000000000000000..bf8508e4d7e80f2e2d2900e7e6accf9fc26648c2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/awesome.less @@ -0,0 +1,146 @@ +/*------------------------------------- +zTree Style using fontawesome instead of images + +version: 1.1 +author: Mike King +email: mikkelking @ hotmail . com +website: http://code.google.com/p/jquerytree/ + +-------------------------------------*/ + +/* Definitions ----------------------*/ +@font-size: 12px; +// Regular icon and text color is white, which suits any medium -> dark background +@color-normal: white; +// Background color +@color-bg: #af0000; +// Highlight color +@color-highlight: yellow; +// Partially selected (checkboxes, radio buttons) +@color-partial: #aaaaaa; +// Partially selected and focused (checkboxes, radio buttons) +@color-partfocus: #cad96c; +// Disabled altogether +@color-disabled: #808080; +// Editing color +@color-edit: yellow; +@w: 15px; +@h: 17px; +@pad-left: 2px; +@pad-top: 10px; +/* End of Definitions ---------------*/ + +/* Imports -------------------------*/ +@import "fa.less"; +/* End of Imports ------------------*/ + +.ztree * {padding:0; margin:0; font-size:@font-size; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; background-color: @color-bg;} +.ztree { + margin:0; padding:5px; color:@color-normal; background-color: @color-bg; + li { + padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0; + ul { + margin: 0px; padding:0 0 0 18px; + } + ul.line { } + a {padding-right:3px; margin:0; cursor:pointer; height:@h; color:@color-normal; background-color: transparent; + text-decoration:none; vertical-align:top; display: inline-block; + input.rename {height:14px; width:80px; padding:0; margin:0; + color: @color-bg; background-color: @color-normal; + font-size:@font-size; border:1px #585956 solid; *border:0px} + } + a:hover {text-decoration:underline} + a.curSelectedNode {padding-top:0px; background-color:#af4040; color:@color-highlight; height:@h; opacity:0.8;} + a.curSelectedNode_Edit {padding-top:0px; background-color:transparent; color:@color-highlight; height:@h; border:1px #666 solid; opacity:0.8;} + a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:@color-highlight; height:@h; border:1px #666 solid; + opacity:0.8; filter:alpha(opacity=80)} + a.tmpTargetNode_prev {} + a.tmpTargetNode_next {} + span {line-height:@h; margin-right:2px; background-color:transparent;} + span.button {line-height:0; margin:0; padding: 0; width:@w; height:@h; display: inline-block; vertical-align:top; + border:0px solid; cursor: pointer;outline:none; + background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; + + &::before{color: @color-normal; font-family: FontAwesome; padding-top:@pad-top;} + &.chk { margin:0px; cursor: auto; width: 12px; + display: inline-block;padding-top:@pad-top;padding-left:@pad-left; + + &.checkbox_false_full::before {content: @fa-square-o;} + &.checkbox_false_full_focus::before {content: @fa-square-o; color:@color-highlight;} + &.checkbox_false_part::before {content: @fa-square-o;color: @color-partial;} + &.checkbox_false_part_focus::before {content: @fa-square-o; color:@color-partfocus;} + &.checkbox_false_disable::before {content: @fa-square-o; color:@color-disabled;} + &.checkbox_true_full::before {content: @fa-check-square-o;} + &.checkbox_true_full_focus::before {content: @fa-check-square-o;} + &.checkbox_true_part::before {content: @fa-check-square;} + &.checkbox_true_part_focus::before {content: @fa-check-square; color: @color-highlight} + &.checkbox_true_full_focus::before {content: @fa-check-square-o; color: @color-highlight} + &.checkbox_true_part::before {content: @fa-check-square-o;color: @color-partial} + &.checkbox_true_part_focus::before {content: @fa-check-square-o;color: @color-partfocus;} + &.checkbox_true_disable::before {content: @fa-check-square-o;color: @color-disabled} + + &.radio_false_full::before {content: @fa-circle-o;} + &.radio_false_full_focus::before {content: @fa-circle-o;color: @color-highlight} + &.radio_false_part::before {content: @fa-circle-o;color: @color-partial} + &.radio_false_part_focus::before {content: @fa-circle-o;color: @color-highlight} + &.radio_false_disable::before {content: @fa-circle-thin;color: @color-disabled} + &.radio_true_full::before {content: @fa-dot-circle-o;} + &.radio_true_full_focus::before {content: @fa-dot-circle-o;color: @color-highlight} + &.radio_true_part::before {content: @fa-dot-circle-o;color: @color-partial} + &.radio_true_part_focus::before {content: @fa-dot-circle-o;color: @color-partial;} + &.radio_true_disable::before {content: @fa-circle-thin;color: @color-disabled} + + } + &.switch {width:@w; height:@h} + &.root_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.root_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.roots_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.roots_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.center_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.center_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.bottom_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.bottom_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} + &.noline_open{} + &.noline_close{} + &.root_docu{ background:none;} + &.roots_docu::before{content: @fa-list-alt;padding-left:@pad-left;display: inline-block;color:@color-normal;} + &.center_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} + &.bottom_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} + &.noline_docu{ background:none;} + + &.ico_open::before {content: @fa-folder-open-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} + &.ico_close::before {content: @fa-folder-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} + &.ico_docu::before{content: @fa-list-alt;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} + + &.edit {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} + &.edit::before{content: @fa-pencil-square-o;font-family: FontAwesome;} + + &.remove {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} + &.remove::before{content: @fa-trash;font-family: FontAwesome;} + + + &.add {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} + &.add::before{content: @fa-plus;font-family: FontAwesome;} + + &.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)} + +// this is the arrow that moves +span.tmpzTreeMove_arrow{width:16px; height:@h; display: inline-block; + padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; + background-color:transparent; background-attachment: scroll; + } +span.tmpzTreeMove_arrow::before{content: @fa-play;font-family: FontAwesome;color: @color-highlight; + } +// outline + +ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; + background-color:#cfcfcf; border:1px @color-highlight dotted; opacity:0.8; filter:alpha(opacity=80)} +.ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/fa.less b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/fa.less new file mode 100644 index 0000000000000000000000000000000000000000..3714884a77422eb760d3e9279f0c575143ae35c8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/fa.less @@ -0,0 +1,480 @@ +@fa-glass: "\f000"; +@fa-music: "\f001"; +@fa-search: "\f002"; +@fa-envelope-o: "\f003"; +@fa-heart: "\f004"; +@fa-star: "\f005"; +@fa-star-o: "\f006"; +@fa-user: "\f007"; +@fa-film: "\f008"; +@fa-th-large: "\f009"; +@fa-th: "\f00a"; +@fa-th-list: "\f00b"; +@fa-check: "\f00c"; +@fa-times: "\f00d"; +@fa-search-plus: "\f00e"; +@fa-search-minus: "\f010"; +@fa-power-off: "\f011"; +@fa-signal: "\f012"; +@fa-cog: "\f013"; +@fa-trash-o: "\f014"; +@fa-home: "\f015"; +@fa-file-o: "\f016"; +@fa-clock-o: "\f017"; +@fa-road: "\f018"; +@fa-download: "\f019"; +@fa-arrow-circle-o-down: "\f01a"; +@fa-arrow-circle-o-up: "\f01b"; +@fa-inbox: "\f01c"; +@fa-play-circle-o: "\f01d"; +@fa-repeat: "\f01e"; +@fa-refresh: "\f021"; +@fa-list-alt: "\f022"; +@fa-lock: "\f023"; +@fa-flag: "\f024"; +@fa-headphones: "\f025"; +@fa-volume-off: "\f026"; +@fa-volume-down: "\f027"; +@fa-volume-up: "\f028"; +@fa-qrcode: "\f029"; +@fa-barcode: "\f02a"; +@fa-tag: "\f02b"; +@fa-tags: "\f02c"; +@fa-book: "\f02d"; +@fa-bookmark: "\f02e"; +@fa-print: "\f02f"; +@fa-camera: "\f030"; +@fa-font: "\f031"; +@fa-bold: "\f032"; +@fa-italic: "\f033"; +@fa-text-height: "\f034"; +@fa-text-width: "\f035"; +@fa-align-left: "\f036"; +@fa-align-center: "\f037"; +@fa-align-right: "\f038"; +@fa-align-justify: "\f039"; +@fa-list: "\f03a"; +@fa-outdent: "\f03b"; +@fa-indent: "\f03c"; +@fa-video-camera: "\f03d"; +@fa-picture-o: "\f03e"; +@fa-pencil: "\f040"; +@fa-map-marker: "\f041"; +@fa-adjust: "\f042"; +@fa-tint: "\f043"; +@fa-pencil-square-o: "\f044"; +@fa-share-square-o: "\f045"; +@fa-check-square-o: "\f046"; +@fa-arrows: "\f047"; +@fa-step-backward: "\f048"; +@fa-fast-backward: "\f049"; +@fa-backward: "\f04a"; +@fa-play: "\f04b"; +@fa-pause: "\f04c"; +@fa-stop: "\f04d"; +@fa-forward: "\f04e"; +@fa-fast-forward: "\f050"; +@fa-step-forward: "\f051"; +@fa-eject: "\f052"; +@fa-chevron-left: "\f053"; +@fa-chevron-right: "\f054"; +@fa-plus-circle: "\f055"; +@fa-minus-circle: "\f056"; +@fa-times-circle: "\f057"; +@fa-check-circle: "\f058"; +@fa-question-circle: "\f059"; +@fa-info-circle: "\f05a"; +@fa-crosshairs: "\f05b"; +@fa-times-circle-o: "\f05c"; +@fa-check-circle-o: "\f05d"; +@fa-ban: "\f05e"; +@fa-arrow-left: "\f060"; +@fa-arrow-right: "\f061"; +@fa-arrow-up: "\f062"; +@fa-arrow-down: "\f063"; +@fa-share: "\f064"; +@fa-expand: "\f065"; +@fa-compress: "\f066"; +@fa-plus: "\f067"; +@fa-minus: "\f068"; +@fa-asterisk: "\f069"; +@fa-exclamation-circle: "\f06a"; +@fa-gift: "\f06b"; +@fa-leaf: "\f06c"; +@fa-fire: "\f06d"; +@fa-eye: "\f06e"; +@fa-eye-slash: "\f070"; +@fa-exclamation-triangle: "\f071"; +@fa-plane: "\f072"; +@fa-calendar: "\f073"; +@fa-random: "\f074"; +@fa-comment: "\f075"; +@fa-magnet: "\f076"; +@fa-chevron-up: "\f077"; +@fa-chevron-down: "\f078"; +@fa-retweet: "\f079"; +@fa-shopping-cart: "\f07a"; +@fa-folder: "\f07b"; +@fa-folder-open: "\f07c"; +@fa-arrows-v: "\f07d"; +@fa-arrows-h: "\f07e"; +@fa-bar-chart: "\f080"; +@fa-twitter-square: "\f081"; +@fa-facebook-square: "\f082"; +@fa-camera-retro: "\f083"; +@fa-key: "\f084"; +@fa-cogs: "\f085"; +@fa-comments: "\f086"; +@fa-thumbs-o-up: "\f087"; +@fa-thumbs-o-down: "\f088"; +@fa-star-half: "\f089"; +@fa-heart-o: "\f08a"; +@fa-sign-out: "\f08b"; +@fa-linkedin-square: "\f08c"; +@fa-thumb-tack: "\f08d"; +@fa-external-link: "\f08e"; +@fa-sign-in: "\f090"; +@fa-trophy: "\f091"; +@fa-github-square: "\f092"; +@fa-upload: "\f093"; +@fa-lemon-o: "\f094"; +@fa-phone: "\f095"; +@fa-square-o: "\f096"; +@fa-bookmark-o: "\f097"; +@fa-phone-square: "\f098"; +@fa-twitter: "\f099"; +@fa-facebook: "\f09a"; +@fa-github: "\f09b"; +@fa-unlock: "\f09c"; +@fa-credit-card: "\f09d"; +@fa-rss: "\f09e"; +@fa-hdd-o: "\f0a0"; +@fa-bullhorn: "\f0a1"; +@fa-bell: "\f0f3"; +@fa-certificate: "\f0a3"; +@fa-hand-o-right: "\f0a4"; +@fa-hand-o-left: "\f0a5"; +@fa-hand-o-up: "\f0a6"; +@fa-hand-o-down: "\f0a7"; +@fa-arrow-circle-left: "\f0a8"; +@fa-arrow-circle-right: "\f0a9"; +@fa-arrow-circle-up: "\f0aa"; +@fa-arrow-circle-down: "\f0ab"; +@fa-globe: "\f0ac"; +@fa-wrench: "\f0ad"; +@fa-tasks: "\f0ae"; +@fa-filter: "\f0b0"; +@fa-briefcase: "\f0b1"; +@fa-arrows-alt: "\f0b2"; +@fa-users: "\f0c0"; +@fa-link: "\f0c1"; +@fa-cloud: "\f0c2"; +@fa-flask: "\f0c3"; +@fa-scissors: "\f0c4"; +@fa-files-o: "\f0c5"; +@fa-paperclip: "\f0c6"; +@fa-floppy-o: "\f0c7"; +@fa-square: "\f0c8"; +@fa-bars: "\f0c9"; +@fa-list-ul: "\f0ca"; +@fa-list-ol: "\f0cb"; +@fa-strikethrough: "\f0cc"; +@fa-underline: "\f0cd"; +@fa-table: "\f0ce"; +@fa-magic: "\f0d0"; +@fa-truck: "\f0d1"; +@fa-pinterest: "\f0d2"; +@fa-pinterest-square: "\f0d3"; +@fa-google-plus-square: "\f0d4"; +@fa-google-plus: "\f0d5"; +@fa-money: "\f0d6"; +@fa-caret-down: "\f0d7"; +@fa-caret-up: "\f0d8"; +@fa-caret-left: "\f0d9"; +@fa-caret-right: "\f0da"; +@fa-columns: "\f0db"; +@fa-sort: "\f0dc"; +@fa-sort-desc: "\f0dd"; +@fa-sort-asc: "\f0de"; +@fa-envelope: "\f0e0"; +@fa-linkedin: "\f0e1"; +@fa-undo: "\f0e2"; +@fa-gavel: "\f0e3"; +@fa-tachometer: "\f0e4"; +@fa-comment-o: "\f0e5"; +@fa-comments-o: "\f0e6"; +@fa-bolt: "\f0e7"; +@fa-sitemap: "\f0e8"; +@fa-umbrella: "\f0e9"; +@fa-clipboard: "\f0ea"; +@fa-lightbulb-o: "\f0eb"; +@fa-exchange: "\f0ec"; +@fa-cloud-download: "\f0ed"; +@fa-cloud-upload: "\f0ee"; +@fa-user-md: "\f0f0"; +@fa-stethoscope: "\f0f1"; +@fa-suitcase: "\f0f2"; +@fa-bell-o: "\f0a2"; +@fa-coffee: "\f0f4"; +@fa-cutlery: "\f0f5"; +@fa-file-text-o: "\f0f6"; +@fa-building-o: "\f0f7"; +@fa-hospital-o: "\f0f8"; +@fa-ambulance: "\f0f9"; +@fa-medkit: "\f0fa"; +@fa-fighter-jet: "\f0fb"; +@fa-beer: "\f0fc"; +@fa-h-square: "\f0fd"; +@fa-plus-square: "\f0fe"; +@fa-angle-double-left: "\f100"; +@fa-angle-double-right: "\f101"; +@fa-angle-double-up: "\f102"; +@fa-angle-double-down: "\f103"; +@fa-angle-left: "\f104"; +@fa-angle-right: "\f105"; +@fa-angle-up: "\f106"; +@fa-angle-down: "\f107"; +@fa-desktop: "\f108"; +@fa-laptop: "\f109"; +@fa-tablet: "\f10a"; +@fa-mobile: "\f10b"; +@fa-circle-o: "\f10c"; +@fa-quote-left: "\f10d"; +@fa-quote-right: "\f10e"; +@fa-spinner: "\f110"; +@fa-circle: "\f111"; +@fa-reply: "\f112"; +@fa-github-alt: "\f113"; +@fa-folder-o: "\f114"; +@fa-folder-open-o: "\f115"; +@fa-smile-o: "\f118"; +@fa-frown-o: "\f119"; +@fa-meh-o: "\f11a"; +@fa-gamepad: "\f11b"; +@fa-keyboard-o: "\f11c"; +@fa-flag-o: "\f11d"; +@fa-flag-checkered: "\f11e"; +@fa-terminal: "\f120"; +@fa-code: "\f121"; +@fa-reply-all: "\f122"; +@fa-star-half-o: "\f123"; +@fa-location-arrow: "\f124"; +@fa-crop: "\f125"; +@fa-code-fork: "\f126"; +@fa-chain-broken: "\f127"; +@fa-question: "\f128"; +@fa-info: "\f129"; +@fa-exclamation: "\f12a"; +@fa-superscript: "\f12b"; +@fa-subscript: "\f12c"; +@fa-eraser: "\f12d"; +@fa-puzzle-piece: "\f12e"; +@fa-microphone: "\f130"; +@fa-microphone-slash: "\f131"; +@fa-shield: "\f132"; +@fa-calendar-o: "\f133"; +@fa-fire-extinguisher: "\f134"; +@fa-rocket: "\f135"; +@fa-maxcdn: "\f136"; +@fa-chevron-circle-left: "\f137"; +@fa-chevron-circle-right: "\f138"; +@fa-chevron-circle-up: "\f139"; +@fa-chevron-circle-down: "\f13a"; +@fa-html5: "\f13b"; +@fa-css3: "\f13c"; +@fa-anchor: "\f13d"; +@fa-unlock-alt: "\f13e"; +@fa-bullseye: "\f140"; +@fa-ellipsis-h: "\f141"; +@fa-ellipsis-v: "\f142"; +@fa-rss-square: "\f143"; +@fa-play-circle: "\f144"; +@fa-ticket: "\f145"; +@fa-minus-square: "\f146"; +@fa-minus-square-o: "\f147"; +@fa-level-up: "\f148"; +@fa-level-down: "\f149"; +@fa-check-square: "\f14a"; +@fa-pencil-square: "\f14b"; +@fa-external-link-square: "\f14c"; +@fa-share-square: "\f14d"; +@fa-compass: "\f14e"; +@fa-caret-square-o-down: "\f150"; +@fa-caret-square-o-up: "\f151"; +@fa-caret-square-o-right: "\f152"; +@fa-eur: "\f153"; +@fa-gbp: "\f154"; +@fa-usd: "\f155"; +@fa-inr: "\f156"; +@fa-jpy: "\f157"; +@fa-rub: "\f158"; +@fa-krw: "\f159"; +@fa-btc: "\f15a"; +@fa-file: "\f15b"; +@fa-file-text: "\f15c"; +@fa-sort-alpha-asc: "\f15d"; +@fa-sort-alpha-desc: "\f15e"; +@fa-sort-amount-asc: "\f160"; +@fa-sort-amount-desc: "\f161"; +@fa-sort-numeric-asc: "\f162"; +@fa-sort-numeric-desc: "\f163"; +@fa-thumbs-up: "\f164"; +@fa-thumbs-down: "\f165"; +@fa-youtube-square: "\f166"; +@fa-youtube: "\f167"; +@fa-xing: "\f168"; +@fa-xing-square: "\f169"; +@fa-youtube-play: "\f16a"; +@fa-dropbox: "\f16b"; +@fa-stack-overflow: "\f16c"; +@fa-instagram: "\f16d"; +@fa-flickr: "\f16e"; +@fa-adn: "\f170"; +@fa-bitbucket: "\f171"; +@fa-bitbucket-square: "\f172"; +@fa-tumblr: "\f173"; +@fa-tumblr-square: "\f174"; +@fa-long-arrow-down: "\f175"; +@fa-long-arrow-up: "\f176"; +@fa-long-arrow-left: "\f177"; +@fa-long-arrow-right: "\f178"; +@fa-apple: "\f179"; +@fa-windows: "\f17a"; +@fa-android: "\f17b"; +@fa-linux: "\f17c"; +@fa-dribbble: "\f17d"; +@fa-skype: "\f17e"; +@fa-foursquare: "\f180"; +@fa-trello: "\f181"; +@fa-female: "\f182"; +@fa-male: "\f183"; +@fa-gittip: "\f184"; +@fa-sun-o: "\f185"; +@fa-moon-o: "\f186"; +@fa-archive: "\f187"; +@fa-bug: "\f188"; +@fa-vk: "\f189"; +@fa-weibo: "\f18a"; +@fa-renren: "\f18b"; +@fa-pagelines: "\f18c"; +@fa-stack-exchange: "\f18d"; +@fa-arrow-circle-o-right: "\f18e"; +@fa-arrow-circle-o-left: "\f190"; +@fa-caret-square-o-left: "\f191"; +@fa-dot-circle-o: "\f192"; +@fa-wheelchair: "\f193"; +@fa-vimeo-square: "\f194"; +@fa-try: "\f195"; +@fa-plus-square-o: "\f196"; +@fa-space-shuttle: "\f197"; +@fa-slack: "\f198"; +@fa-envelope-square: "\f199"; +@fa-wordpress: "\f19a"; +@fa-openid: "\f19b"; +@fa-university: "\f19c"; +@fa-graduation-cap: "\f19d"; +@fa-yahoo: "\f19e"; +@fa-google: "\f1a0"; +@fa-reddit: "\f1a1"; +@fa-reddit-square: "\f1a2"; +@fa-stumbleupon-circle: "\f1a3"; +@fa-stumbleupon: "\f1a4"; +@fa-delicious: "\f1a5"; +@fa-digg: "\f1a6"; +@fa-pied-piper: "\f1a7"; +@fa-pied-piper-alt: "\f1a8"; +@fa-drupal: "\f1a9"; +@fa-joomla: "\f1aa"; +@fa-language: "\f1ab"; +@fa-fax: "\f1ac"; +@fa-building: "\f1ad"; +@fa-child: "\f1ae"; +@fa-paw: "\f1b0"; +@fa-spoon: "\f1b1"; +@fa-cube: "\f1b2"; +@fa-cubes: "\f1b3"; +@fa-behance: "\f1b4"; +@fa-behance-square: "\f1b5"; +@fa-steam: "\f1b6"; +@fa-steam-square: "\f1b7"; +@fa-recycle: "\f1b8"; +@fa-car: "\f1b9"; +@fa-taxi: "\f1ba"; +@fa-tree: "\f1bb"; +@fa-spotify: "\f1bc"; +@fa-deviantart: "\f1bd"; +@fa-soundcloud: "\f1be"; +@fa-database: "\f1c0"; +@fa-file-pdf-o: "\f1c1"; +@fa-file-word-o: "\f1c2"; +@fa-file-excel-o: "\f1c3"; +@fa-file-powerpoint-o: "\f1c4"; +@fa-file-image-o: "\f1c5"; +@fa-file-archive-o: "\f1c6"; +@fa-file-audio-o: "\f1c7"; +@fa-file-video-o: "\f1c8"; +@fa-file-code-o: "\f1c9"; +@fa-vine: "\f1ca"; +@fa-codepen: "\f1cb"; +@fa-jsfiddle: "\f1cc"; +@fa-life-ring: "\f1cd"; +@fa-circle-o-notch: "\f1ce"; +@fa-rebel: "\f1d0"; +@fa-empire: "\f1d1"; +@fa-git-square: "\f1d2"; +@fa-git: "\f1d3"; +@fa-hacker-news: "\f1d4"; +@fa-tencent-weibo: "\f1d5"; +@fa-qq: "\f1d6"; +@fa-weixin: "\f1d7"; +@fa-paper-plane: "\f1d8"; +@fa-paper-plane-o: "\f1d9"; +@fa-history: "\f1da"; +@fa-circle-thin: "\f1db"; +@fa-header: "\f1dc"; +@fa-paragraph: "\f1dd"; +@fa-sliders: "\f1de"; +@fa-share-alt: "\f1e0"; +@fa-share-alt-square: "\f1e1"; +@fa-bomb: "\f1e2"; +@fa-futbol-o: "\f1e3"; +@fa-tty: "\f1e4"; +@fa-binoculars: "\f1e5"; +@fa-plug: "\f1e6"; +@fa-slideshare: "\f1e7"; +@fa-twitch: "\f1e8"; +@fa-yelp: "\f1e9"; +@fa-newspaper-o: "\f1ea"; +@fa-wifi: "\f1eb"; +@fa-calculator: "\f1ec"; +@fa-paypal: "\f1ed"; +@fa-google-wallet: "\f1ee"; +@fa-cc-visa: "\f1f0"; +@fa-cc-mastercard: "\f1f1"; +@fa-cc-discover: "\f1f2"; +@fa-cc-amex: "\f1f3"; +@fa-cc-paypal: "\f1f4"; +@fa-cc-stripe: "\f1f5"; +@fa-bell-slash: "\f1f6"; +@fa-bell-slash-o: "\f1f7"; +@fa-trash: "\f1f8"; +@fa-copyright: "\f1f9"; +@fa-at: "\f1fa"; +@fa-eyedropper: "\f1fb"; +@fa-paint-brush: "\f1fc"; +@fa-birthday-cake: "\f1fd"; +@fa-area-chart: "\f1fe"; +@fa-pie-chart: "\f200"; +@fa-line-chart: "\f201"; +@fa-lastfm: "\f202"; +@fa-lastfm-square: "\f203"; +@fa-toggle-off: "\f204"; +@fa-toggle-on: "\f205"; +@fa-bicycle: "\f206"; +@fa-bus: "\f207"; +@fa-ioxhost: "\f208"; +@fa-angellist: "\f209"; +@fa-cc: "\f20a"; +@fa-ils: "\f20b"; +@fa-meanpath: "\f20c"; + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/img/loading.gif b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/img/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..e8c289293b11c889703d83dce6631fce90da4630 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/awesomeStyle/img/loading.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/demo.css b/pccenter/src/main/resources/static/src/zTree_v3/css/demo.css new file mode 100644 index 0000000000000000000000000000000000000000..f6dba0de88d3196e6a097c86f22ec8d88dd62d3c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/css/demo.css @@ -0,0 +1,33 @@ +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;} +body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;} +h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;} +h1 {font-size: 24px;line-height: 34px;text-align: center;} +h2 {font-size: 14px;line-height: 24px;padding-top: 5px;} +h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;} +a {color:#3C6E31;text-decoration: underline;} +a:hover {background-color:#3C6E31;color:white;} +input.radio {margin: 0 2px 0 8px;} +input.radio.first {margin-left:0;} +input.empty {color: lightgray;} +code {color: #2f332a;} +.highlight_red {color:#A60000;} +.highlight_green {color:#A7F43D;} +li {list-style: circle;font-size: 12px;} +li.title {list-style: none;} +ul.list {margin-left: 17px;} + +div.content_wrap {width: 600px;height:380px;} +div.content_wrap div.left{float: left;width: 250px;} +div.content_wrap div.right{float: right;width: 340px;} +div.zTreeDemoBackground {width:250px;height:362px;text-align:left;} + +ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;} +ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;} +ul.log.small {height:45px;} +ul.log li {color: #666666;list-style: none;padding-left: 10px;} +ul.log li.dark {background-color: #E3E3E3;} + +/* ruler */ +div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer} +div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer} \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/line_conn.png b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/line_conn.png new file mode 100644 index 0000000000000000000000000000000000000000..b211da2fa8fa64efa883f893334cf9316e027767 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/line_conn.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/loading.gif b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..e8c289293b11c889703d83dce6631fce90da4630 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/loading.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/metro.gif b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/metro.gif new file mode 100644 index 0000000000000000000000000000000000000000..664b969a2bf58b3fb3c95186d8a85184aafbe24b Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/metro.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/metro.png b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/metro.png new file mode 100644 index 0000000000000000000000000000000000000000..e9e58a3a73ab5eac62afb4a4062887896248ec2d Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/img/metro.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/metroStyle.css b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/metroStyle.css new file mode 100644 index 0000000000000000000000000000000000000000..af81f42392e589dad5665dfef87723d9c9aabaac --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/css/metroStyle/metroStyle.css @@ -0,0 +1,96 @@ +/*------------------------------------- +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:17px; 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; vertical-align:top; 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 #585956 solid; *border:0px} +.ztree li span {line-height:21px; margin-right:2px} +.ztree li span.button {line-height:0; margin:0; padding: 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 -63px} +.ztree li span.button.root_close{background-position:-126px -63px} +.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: -105px -84px;} +.ztree li span.button.noline_close{background-position: -126px -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} diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/1_close.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/1_close.png new file mode 100644 index 0000000000000000000000000000000000000000..68ccb3c3b90170df7cddab1fe6e8e455c3854573 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/1_close.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/1_open.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/1_open.png new file mode 100644 index 0000000000000000000000000000000000000000..d6ff36d3a99012028c6cf3d4009719108e31bc79 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/1_open.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/2.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/2.png new file mode 100644 index 0000000000000000000000000000000000000000..9eff506ba391fa1ddf0dc44d02ae84403700321b Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/2.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/3.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/3.png new file mode 100644 index 0000000000000000000000000000000000000000..d7ba6d0c675c35197e2dae8a379155e67c0ac6cb Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/3.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/4.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/4.png new file mode 100644 index 0000000000000000000000000000000000000000..753e2bfd5725b1f32cda4e41c36a448a4b12c280 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/4.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/5.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/5.png new file mode 100644 index 0000000000000000000000000000000000000000..0c5eccd562c303cf5197629ef5f2666b6180bd48 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/5.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/6.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/6.png new file mode 100644 index 0000000000000000000000000000000000000000..070b8352d7770e6be4b6f3cbc61f7ee21ae3e4da Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/6.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/7.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/7.png new file mode 100644 index 0000000000000000000000000000000000000000..532b037f2045cfa26c62d23cb928ff7405f6fc18 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/7.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/8.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/8.png new file mode 100644 index 0000000000000000000000000000000000000000..a8f3a86e7091de4acdd38745f74b30f0f3d40f9e Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/8.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/9.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/9.png new file mode 100644 index 0000000000000000000000000000000000000000..4db73cd41c95bc74496175625ce9ed3737e599f5 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/diy/9.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/line_conn.gif b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/line_conn.gif new file mode 100644 index 0000000000000000000000000000000000000000..d561d36a915776730eb3069cee4c949f027667ed Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/line_conn.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/loading.gif b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..e8c289293b11c889703d83dce6631fce90da4630 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/loading.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif new file mode 100644 index 0000000000000000000000000000000000000000..50c94fd41ef9f1f7c07442d669923fd7a3226f55 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/zTreeStandard.png b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/zTreeStandard.png new file mode 100644 index 0000000000000000000000000000000000000000..ffda01ef1cccc398ee4e2327f4093ba1130a4961 Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/img/zTreeStandard.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/zTreeStyle.css b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/zTreeStyle.css new file mode 100644 index 0000000000000000000000000000000000000000..4a1705b145cf7d58cbf1916a7c0cecf9c88578c5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/css/zTreeStyle/zTreeStyle.css @@ -0,0 +1,97 @@ +/*------------------------------------- +zTree Style + +version: 3.5.19 +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:14px; 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_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")} + +.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; +}*/ \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/asyncData/getNodes.php b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/asyncData/getNodes.php new file mode 100644 index 0000000000000000000000000000000000000000..6d22b5ebd6b46a1a0c5c479eb430cf9249df61ee --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/asyncData/getNodes.php @@ -0,0 +1,42 @@ + +[] diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/asyncData/getNodesForBigData.php b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/asyncData/getNodesForBigData.php new file mode 100644 index 0000000000000000000000000000000000000000..588c14c5c1c66abf2c6f8e278e1baa9536cc00f9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/asyncData/getNodesForBigData.php @@ -0,0 +1,26 @@ + +[] diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/common.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/common.html new file mode 100644 index 0000000000000000000000000000000000000000..1f602f1e77d91a873f3d8f42fa6995765da01b87 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/common.html @@ -0,0 +1,190 @@ + + + + ZTREE DEMO - big data common + + + + + + + + + + + +

                    一次性加载大数据量

                    +
                    [ 文件路径: bigdata/common.html ]
                    +
                    + +
                    +
                      +
                    • 1、大数据量加载说明

                      +
                        +
                      • 1)、zTree v3.x 针对大数据量一次性加载进行了更深入的优化,实现了延迟加载功能,即不展开的节点不创建子节点的 DOM。
                      • +
                      • 2)、对于每级节点最多一百左右,但总节点数几千甚至几万,且不是全部展开的数据,一次性加载的效果最明显,速度非常快。
                      • +
                      • 3)、对于某一级节点数就多达几千的情况 延迟加载无效,这种情况建议考虑分页异步加载。
                      • +
                      • 4)、对于全部节点都展开显示的情况,延迟加载无效,这种情况建议不要全部展开。
                      • +
                      • 5)、显示 checkbox / radio 会造成一定程度的性能下降。
                      • +
                      • 6)、利用 addDiyDom 功能增加自定义控件会影响速度,影响程度受节点数量而定。
                      • +
                      • 7)、利用 onNodeCreated 事件回调函数对节点 DOM 进行操作会影响速度,影响程度受节点数量而定。
                      • +
                      +
                    • +
                    • 2、setting 配置信息说明

                      +
                        +
                      • 不需要进行特殊的配置
                      • +
                      +
                    • +
                    • 3、treeNode 节点数据说明

                      +
                        +
                      • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                      • +
                      +
                    • +
                    +
                    +
                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/diy_async.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/diy_async.html new file mode 100644 index 0000000000000000000000000000000000000000..3a2ec02a6cf47b275098090f4b79eb5c249683c6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/diy_async.html @@ -0,0 +1,157 @@ + + + + ZTREE DEMO - big data async + + + + + + + + + + + +

                    分批异步加载大数据量

                    +
                    [ 文件路径: bigdata/diy_async.html ]
                    +
                    +
                    +
                      +
                    •     此 Demo 专门用于测试分批异步加载,每次展开节点都要重新进行异步加载。
                    • +
                    +
                      +
                      +
                      +
                        +
                      • 1、大数据量加载说明

                        +
                          +
                        • 1)、对于某一级节点数多达几千个的时候,zTree 默认的延迟加载是无效的,此 Demo 演示了一种原先 zTree v2.6 时的分批加载节点的方法。
                        • +
                        • 2)、此方法适用于1、2千个节点必须全部显示的需求。
                        • +
                        • 3)、此方法并不能解决加载慢的问题,相反只会让最终结果出现的更慢,只是可以有限度的避免浏览器假死,而且显示的节点越多就越慢。
                        • +
                        • 4)、对于某一级节点数至少几千个的情况,另一个解决方案是:分页异步加载。
                          + async load log:
                          +
                          • +
                          +
                        • +
                        • 2、setting 配置信息说明

                          +
                            +
                          • 需要设置 setting.async 异步加载部分的参数
                          • +
                          • 建议关闭动画效果 setting.view.expandSpeed = "";
                          • +
                          • 其他不需要进行特殊的配置,根据自己的需求自行设置
                          • +
                          +
                        • +
                        • 3、treeNode 节点数据说明

                          +
                            +
                          • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                          • +
                          +
                        • +
                        +
                        +
                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/page.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/page.html new file mode 100644 index 0000000000000000000000000000000000000000..f629823dff914afd9ed24569bf484ca1926b9d4a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/bigdata/page.html @@ -0,0 +1,150 @@ + + + + ZTREE DEMO - big data page + + + + + + + + + + + + +

                        分页加载大数据量

                        +
                        [ 文件路径: bigdata/page.html ]
                        +
                        +
                        +
                          +
                          +
                          +
                            +
                          • 1、大数据量加载说明

                            +
                              +
                            • 1)、分页方案可以有效解决某一级节点数据超大的情况。
                            • +
                            • 2)、分页按钮通过自定义控件的方法实现。
                            • +
                            • 3)、分页方案对于 checkbox 的关联关系无能为力,只能每次翻页后进行修正。由于时间关系,Demo 中不对 checkbox 的关联进行任何修正处理。
                            • +
                            • 4)、分页方案中,从 zTree 得到的节点数据只有当前页的节点数据,可以在每次翻页后自行保存每页的数据,作为缓存,具体情况要根据实际需求来决定。
                            • + +
                            • 2、setting 配置信息说明

                              +
                                +
                              • 需要设置 setting.async 异步加载部分的参数
                              • +
                              • 其他不需要进行特殊的配置,根据自己的需求自行设置
                              • +
                              +
                            • +
                            • 3、treeNode 节点数据说明

                              +
                                +
                              • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                              • +
                              +
                            • +
                            +
                          +
                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/async.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/async.html new file mode 100644 index 0000000000000000000000000000000000000000..7723b3ca65bd6f374c286d52c5cca81c2af090e0 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/async.html @@ -0,0 +1,70 @@ + + + + ZTREE DEMO - Async + + + + + + + + + + +

                          异步加载节点数据的树

                          +
                          [ 文件路径: core/async.html ]
                          +
                          +
                          +
                            +
                            +
                            +
                              +
                            • 1、setting 配置信息说明

                              +
                                +
                              • 使用异步加载,必须设置 setting.async 中的各个属性,详细请参见 API 文档中的相关内容
                              • +
                              +
                            • +
                            • 2、treeNode 节点数据说明

                              +
                                +
                              • 异步加载功能对于 treeNode 节点数据没有特别要求,如果采用简单 JSON 数据,请设置 setting.data.simple 中的属性
                              • +
                              • 如果异步加载每次都只返回单层的节点数据,那么可以不设置简单 JSON 数据模式
                              • +
                              +
                            • +
                            • 3、其他说明

                              +
                                +
                              • 观察 autoParam 和 otherParam 请使用 firebug 或 浏览器的开发人员工具
                              • +
                              • 此 Demo 只能加载到第 4 级节点(level=3)
                              • +
                              • 此 Demo 利用 dataFilter 对节点的 name 进行了修改
                              • +
                              +
                            • +
                            +
                            +
                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/async_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/async_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..081a8408466608623f15e884a5af1bce1eca0d37 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/async_fun.html @@ -0,0 +1,144 @@ + + + + ZTREE DEMO - reAsyncChildNodes + + + + + + + + + + + +

                            用 zTree 方法异步加载节点数据

                            +
                            [ 文件路径: core/async_fun.html ]
                            +
                            +
                            +
                              +
                              +
                              +
                                +
                              • 1、reAsyncChildNodes 方法操作说明

                                +
                                  +
                                • 使用 zTreeObj.reAsyncChildNodes 方法,详细请参见 API 文档中的相关内容
                                • +
                                • 此 Demo 只能同时选中一个父节点
                                  + 试试看:[ 重新加载 ]    [ 追加 ]

                                  +
                                • +
                                • “悄悄地”操作只能针对 折叠状态 的父节点
                                  + 试试看:[ 悄悄地 重新加载 ]    [ 悄悄地 追加 ]
                                  + async log:
                                  +

                                    +
                                  • +
                                  +
                                • +
                                • 2、setting 配置信息说明

                                  +
                                    +
                                  • 使用 zTree 提供的 reAsyncChildNodes 方法也必须设置 setting.async 中的各个属性,详细请参见 API 文档中的相关内容
                                  • +
                                  +
                                • +
                                • 3、treeNode 节点数据说明

                                  +
                                    +
                                  • 同 "异步加载 节点数据" 中的说明
                                  • +
                                  +
                                • +
                                • 4、其他说明

                                  +
                                    +
                                  • 同 "异步加载 节点数据" 中的说明
                                  • +
                                  +
                                • +
                                +
                                +
                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/click.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/click.html new file mode 100644 index 0000000000000000000000000000000000000000..4d97475c63a88dbb6d50a61a0fc3fb21aa56cc7c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/click.html @@ -0,0 +1,107 @@ + + + + ZTREE DEMO - beforeClick / onClick + + + + + + + + + + +

                                单击节点控制

                                +
                                [ 文件路径: core/click.html ]
                                +
                                +
                                +
                                  +
                                  +
                                  +
                                    +
                                  • 1、beforeClick / onClick 事件回调函数控制

                                    +
                                      +
                                    • 利用 click 事件回调函数 可以进行各种其他的附加操作,这里简单演示如何监控此事件
                                    • +
                                    • 请尝试按下 CtrlCmd 键进行 多节点选择 和 取消选择
                                      + click log:
                                      +

                                        +
                                      • +
                                      +
                                    • +
                                    • 2、setting 配置信息说明

                                      +
                                        +
                                      • 需要设置 setting.callback.beforeClick 和 setting.callback.onClick 属性, 详细请参见 API 文档中的相关内容
                                      • +
                                      +
                                    • +
                                    • 3、treeNode 节点数据说明

                                      +
                                        +
                                      • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                                      • +
                                      +
                                    • +
                                    +
                                    +
                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_font.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_font.html new file mode 100644 index 0000000000000000000000000000000000000000..b94abeca4c28e37251974e8f0c962a8c9c6fc250 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_font.html @@ -0,0 +1,67 @@ + + + + ZTREE DEMO - Custom Font + + + + + + + + + + +

                                    显示自定义字体的树

                                    +
                                    [ 文件路径: core/custom_font.html ]
                                    +
                                    +
                                    +
                                      +
                                      +
                                      +
                                        +
                                      • 1、setting 配置信息说明

                                        +
                                          +
                                        • 1、节点自定义字体请设置 setting.view.fontCss 属性,详细请参见 API 文档中的相关内容
                                        • +
                                        • 2、setting.view.nameIsHTML 属性可以允许节点名称支持 HTML 内容,详细请参见 API 文档中的相关内容
                                        • +
                                        +
                                      • +
                                      • 2、treeNode 节点数据说明

                                        +
                                          +
                                        • 设置字体不需要 treeNode 设置特殊数据,但如果用于为了区别不同类型的节点,设置不同的样式,可以对相应的数据设置自定义属性
                                        • +
                                        • 此 Demo 利用 treeNode 保存样式定义
                                        • +
                                        +
                                      • +
                                      +
                                      +
                                      + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_icon.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_icon.html new file mode 100644 index 0000000000000000000000000000000000000000..23ba10502854ff29d3675a4b65299a4f771f01a4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_icon.html @@ -0,0 +1,74 @@ + + + + ZTREE DEMO - Custom Icon + + + + + + + + + + +

                                      自定义图标 -- icon 属性

                                      +
                                      [ 文件路径: core/custom_icon.html ]
                                      +
                                      +
                                      +
                                        +
                                        +
                                        +
                                          +
                                        • 1、setting 配置信息说明

                                          +
                                            +
                                          • 自定义图标不需要对 setting 进行特殊配置
                                          • +
                                          +
                                        • +
                                        • 2、treeNode 节点数据说明

                                          +
                                            +
                                          • 利用 节点数据的 icon / iconOpen / iconClose 属性实现自定义图标
                                          • +
                                          • 详细请参见 API 文档中的相关内容
                                          • +
                                          +
                                        • +
                                        • 3、其他说明

                                          +
                                            +
                                          • 由于时间关系,例子直接采用 png 图片,如果需要解决 ie6 下 png 图片的透明问题,请针对 ie6 制作特殊的 gif 图片或者利用 css filter 解决
                                          • +
                                          +
                                        • +
                                        +
                                        +
                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_iconSkin.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_iconSkin.html new file mode 100644 index 0000000000000000000000000000000000000000..9b28e75050cf3214e1083073340c969405b24067 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/custom_iconSkin.html @@ -0,0 +1,84 @@ + + + + ZTREE DEMO - Custom Icon Skin + + + + + + + + + + + +

                                        自定义图标 -- iconSkin 属性

                                        +
                                        [ 文件路径: core/custom_iconSkin.html ]
                                        +
                                        +
                                        +
                                          +
                                          +
                                          +
                                            +
                                          • 1、setting 配置信息说明

                                            +
                                              +
                                            • 自定义图标不需要对 setting 进行特殊配置
                                            • +
                                            +
                                          • +
                                          • 2、treeNode 节点数据说明

                                            +
                                              +
                                            • 利用 节点数据的 iconSkin 属性 配合 css 实现自定义图标
                                            • +
                                            • 详细请参见 API 文档中的相关内容
                                            • +
                                            +
                                          • +
                                          • 3、其他说明

                                            +
                                              +
                                            • 由于时间关系,例子直接采用 png 图片,如果需要解决 ie6 下 png 图片的透明问题,请针对 ie6 制作特殊的 gif 图片或者利用 css filter 解决
                                            • +
                                            +
                                          • +
                                          +
                                          +
                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/expand.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/expand.html new file mode 100644 index 0000000000000000000000000000000000000000..41f8e4f3c785b764aa4fe17a94b2d6ac82885189 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/expand.html @@ -0,0 +1,185 @@ + + + + ZTREE DEMO - beforeExpand / onExpand && beforeCollapse / onCollapse + + + + + + + + + + +

                                          展开 / 折叠父节点控制

                                          +
                                          [ 文件路径: core/expand.html ]
                                          +
                                          +
                                          +
                                            +
                                            +
                                            +
                                              +
                                            • 1、beforeCollapse / onCollapse
                                                beforeExpand / onExpand 事件回调函数控制

                                              +
                                                +
                                              • 利用 collapse / expand 事件回调函数 可以控制父节点是否允许 展开 / 折叠,这里简单演示如何监控此事件
                                              • +
                                              • 试试看:
                                                +      expandNode 方法是否触发 callback
                                                +     单个节点--[ 展开 ] +     [ 折叠 ] +     [ 展开 / 折叠 切换 ]
                                                +     单个节点(包括子节点)--[ 展开 ] +     [ 折叠 ]
                                                +     全部节点--[ 展开 ] +     [ 折叠 ]

                                                +
                                              • 使用 zTreeObj.expandNode 方法,详细请参见 API 文档中的相关内容
                                                + collapse / expand log:
                                                +

                                                  +
                                                • +
                                                +
                                              • +
                                              • 2、setting 配置信息说明

                                                +
                                                  +
                                                • 事件回调函数的使用,详细请参见 API 文档中 setting.callback 的相关内容
                                                • +
                                                • 如果需要调整 展开 / 折叠 的动画效果, 详细请参见 API 文档中 setting.view.expandSpeed 的相关内容
                                                • +
                                                +
                                              • +
                                              • 3、treeNode 节点数据说明

                                                +
                                                  +
                                                • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                                                • +
                                                +
                                              • +
                                              +
                                              +
                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/noicon.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/noicon.html new file mode 100644 index 0000000000000000000000000000000000000000..e59c0b2ade09578dd744d4a65510d58e81c53ba3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/noicon.html @@ -0,0 +1,93 @@ + + + + ZTREE DEMO - noIcon + + + + + + + + + + + +

                                              不显示节点图标的树

                                              +
                                              [ 文件路径: core/noicon.html ]
                                              +
                                              +
                                              +
                                                +
                                                +
                                                +
                                                  +
                                                • 1、setting 配置信息说明

                                                  +
                                                    +
                                                  • 此 Demo 利用 Function 设置了使父节点不显示图标的规则
                                                  • +
                                                  • 是否显示节点图标请设置 setting.view.showIcon 属性,详细请参见 API 文档中的相关内容
                                                  • +
                                                  +
                                                • +
                                                • 2、treeNode 节点数据说明

                                                  +
                                                    +
                                                  • 是否显示图标,不需要 treeNode 节点数据提供特殊设置,但如果用户需要根据不同节点动态设置,可以对节点数据增加特殊属性,用于判别
                                                  • +
                                                  +
                                                • +
                                                +
                                                +
                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/noline.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/noline.html new file mode 100644 index 0000000000000000000000000000000000000000..8322c55ee758f23946edacc909cd4321d03f267c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/noline.html @@ -0,0 +1,88 @@ + + + + ZTREE DEMO - noLine + + + + + + + + + + + +

                                                不显示连接线的树

                                                +
                                                [ 文件路径: core/noline.html ]
                                                +
                                                +
                                                +
                                                  +
                                                  +
                                                  +
                                                    +
                                                  • 1、setting 配置信息说明

                                                    +
                                                      +
                                                    • 是否显示连接线请设置 setting.view.showLine 属性,详细请参见 API 文档中的相关内容
                                                    • +
                                                    +
                                                  • +
                                                  • 2、treeNode 节点数据说明

                                                    +
                                                      +
                                                    • 是否显示连线,不需要 treeNode 节点数据提供特殊设置
                                                    • +
                                                    +
                                                  • +
                                                  +
                                                  +
                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/otherMouse.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/otherMouse.html new file mode 100644 index 0000000000000000000000000000000000000000..3381eab2ae505ccc80a0370782cd6cca629aa0ca --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/otherMouse.html @@ -0,0 +1,132 @@ + + + + ZTREE DEMO - Other Mouse Event + + + + + + + + + + +

                                                  其他鼠标事件监听

                                                  +
                                                  [ 文件路径: core/otherMouse.html ]
                                                  +
                                                  +
                                                  +
                                                    +
                                                    +
                                                    +
                                                      +
                                                    • 1、mousedown / mouseup / rightClick 事件回调函数控制

                                                      +
                                                        +
                                                      • zTree 提供 这几种鼠标事件响应,主要是为了便于用户针对一些特殊需求进行扩展开发,不会对 zTree 造成任何影响,这里简单演示如何监控此事件
                                                      • +
                                                      • 请尝试鼠标在 zTree 上胡乱点击(左键、右键)吧,顺便看看 log
                                                        + mousedown event log:
                                                        +

                                                          + mouseup event log:
                                                          +
                                                            + rightClick event log:
                                                            +

                                                              +
                                                            • +
                                                            +
                                                          • +
                                                          • 2、setting 配置信息说明

                                                            +
                                                              +
                                                            • 事件回调函数的使用,详细请参见 API 文档中 setting.callback 的相关内容
                                                            • +
                                                            +
                                                          • +
                                                          • 3、treeNode 节点数据说明

                                                            +
                                                              +
                                                            • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                                                            • +
                                                            +
                                                          • +
                                                          +
                                                          +
                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/searchNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/searchNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..380d3e0ec33141f6d82ff4deb40f1f4b442fa0ed --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/searchNodes.html @@ -0,0 +1,173 @@ + + + + ZTREE DEMO - getNodeByParam / getNodesByParam / getNodesByParamFuzzy + + + + + + + + + + +

                                                          根据参数查找节点

                                                          +
                                                          [ 文件路径: core/searchNodes.html ]
                                                          +
                                                          +
                                                          +
                                                            +
                                                            +
                                                            +
                                                              +
                                                            • 1、getNodeByParam / getNodesByParam / getNodesByParamFuzzy 方法操作说明

                                                              +
                                                                +
                                                              • 使用 zTreeObj.getNodeByParam / getNodesByParam / getNodesByParamFuzzy / getNodeByTId 方法,详细请参见 API 文档中的相关内容
                                                              • +
                                                              • 搜索试试看:
                                                                + 属性值( value ):
                                                                + 属性( key ):name (string)
                                                                + level (number) ... 根节点 level = 0
                                                                + id (number)
                                                                + 方法:getNodeByParam
                                                                + getNodesByParam
                                                                + getNodesByParamFuzzy (only string)
                                                                + getNodesByFilter (参考本页源码中 function filter)
                                                                +

                                                                +
                                                              • +
                                                              +
                                                            • +
                                                            • 2、setting 配置信息说明

                                                              +
                                                                +
                                                              • 不需要对 setting 进行特殊设置
                                                              • +
                                                              +
                                                            • +
                                                            • 3、treeNode 节点数据说明

                                                              +
                                                                +
                                                              • 请注意各个方法使用时保证传入查找的参数类型与设定要查找的属性的类型一致
                                                              • +
                                                              +
                                                            • +
                                                            +
                                                            +
                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/simpleData.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/simpleData.html new file mode 100644 index 0000000000000000000000000000000000000000..d3b19fc57a161ea39f1c5b26f255dec78df6fda4 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/simpleData.html @@ -0,0 +1,100 @@ + + + + ZTREE DEMO - Simple Data + + + + + + + + + + +

                                                            最简单的树 -- 简单 JSON 数据

                                                            +
                                                            [ 文件路径: core/simpleData.html ]
                                                            +
                                                            +
                                                            +
                                                              +
                                                              +
                                                              +
                                                                +
                                                              • 1、setting 配置信息说明

                                                                +
                                                                  +
                                                                • 必须设置 setting.data.simple 内的属性,详细请参见 API 文档中的相关内容
                                                                • +
                                                                • 与显示相关的内容请参考 API 文档中 setting.view 内的配置信息
                                                                • +
                                                                • name、children、title 等属性定义更改请参考 API 文档中 setting.data.key 内的配置信息
                                                                • +
                                                                +
                                                              • +
                                                              • 2、treeNode 节点数据说明

                                                                +
                                                                  +
                                                                • 简单模式的 JSON 数据需要使用 id / pId 表示节点的父子包含关系,如使用其他属性设置父子关联关系请参考 setting.data.simple 内各项说明 +
                                                                  例如:
                                                                  +var nodes = [
                                                                  +	{id:1, pId:0, name: "父节点1"},
                                                                  +	{id:11, pId:1, name: "子节点1"},
                                                                  +	{id:12, pId:1, name: "子节点2"}
                                                                  +];
                                                                • +
                                                                • 默认展开的节点,请设置 treeNode.open 属性
                                                                • +
                                                                • 无子节点的父节点,请设置 treeNode.isParent 属性
                                                                • +
                                                                • 其他属性说明请参考 API 文档中 "treeNode 节点数据详解"
                                                                • +
                                                                +
                                                              • +
                                                              • 3、其他说明

                                                                +
                                                                  +
                                                                • Demo 中绝大部分都采用简单 JSON 数据模式,以便于大家学习
                                                                • +
                                                                +
                                                              • +
                                                              +
                                                              +
                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/standardData.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/standardData.html new file mode 100644 index 0000000000000000000000000000000000000000..3a85e7e5af289124e63089a85b305f2482a89de3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/standardData.html @@ -0,0 +1,106 @@ + + + + ZTREE DEMO - Standard Data + + + + + + + + + + +

                                                              最简单的树 -- 标准 JSON 数据

                                                              +
                                                              [ 文件路径: core/standardData.html ]
                                                              +
                                                              +
                                                              +
                                                                +
                                                                +
                                                                +
                                                                  +
                                                                • 1、setting 配置信息说明

                                                                  +
                                                                    +
                                                                  • 普通使用,无必须设置的参数
                                                                  • +
                                                                  • 与显示相关的内容请参考 API 文档中 setting.view 内的配置信息
                                                                  • +
                                                                  • name、children、title 等属性定义更改请参考 API 文档中 setting.data.key 内的配置信息
                                                                  • +
                                                                  +
                                                                • +
                                                                • 2、treeNode 节点数据说明

                                                                  +
                                                                    +
                                                                  • 标准的 JSON 数据需要嵌套表示节点的父子包含关系 +
                                                                    例如:
                                                                    +var nodes = [
                                                                    +	{name: "父节点1", children: [
                                                                    +		{name: "子节点1"},
                                                                    +		{name: "子节点2"}
                                                                    +	]}
                                                                    +];
                                                                    +
                                                                  • +
                                                                  • 默认展开的节点,请设置 treeNode.open 属性
                                                                  • +
                                                                  • 无子节点的父节点,请设置 treeNode.isParent 属性
                                                                  • +
                                                                  • 其他属性说明请参考 API 文档中 "treeNode 节点数据详解"
                                                                  • +
                                                                  +
                                                                • +
                                                                +
                                                                +
                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/update_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/update_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..a783e5ac11f79e988694db65906f94ca6b792f43 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/update_fun.html @@ -0,0 +1,143 @@ + + + + ZTREE DEMO - updateNode + + + + + + + + + + + +

                                                                用 zTree 方法 更新 节点数据

                                                                +
                                                                [ 文件路径: core/update_fun.html ]
                                                                +
                                                                +
                                                                +
                                                                  +
                                                                  +
                                                                  +
                                                                    +
                                                                  • 1、updateNode 方法操作说明

                                                                    +
                                                                      +
                                                                    • 使用 zTreeObj.updateNode 方法,详细请参见 API 文档中的相关内容
                                                                    • +
                                                                    • 此 Demo 只能同时选中一个节点
                                                                      + 试试看:[ 换名字 ] +     [ 换图标 ] +     [ 换颜色 ] +     [ 斜体 ]

                                                                      +
                                                                    • +
                                                                    +
                                                                  • +
                                                                  • 2、setting 配置信息说明

                                                                    +
                                                                      +
                                                                    • 不需要对 setting 进行特殊设置
                                                                    • +
                                                                    • 配合 setting.view.fontCss 可以修改节点文字样式
                                                                    • +
                                                                    +
                                                                  • +
                                                                  • 3、treeNode 节点数据说明

                                                                    +
                                                                      +
                                                                    • zTreeObj.updateNode 方法的 API 文档中有详细说明
                                                                    • +
                                                                    +
                                                                  • +
                                                                  • 4、其他说明

                                                                    +
                                                                      +
                                                                    • 此 Demo 是针对 核心 js 包 core 制作的,因此不包括 checkbox 的更新操作
                                                                    • +
                                                                    +
                                                                  • +
                                                                  +
                                                                  +
                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/url.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/url.html new file mode 100644 index 0000000000000000000000000000000000000000..e3f20b82de47e4046c170c96459b16ced6326aef --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/core/url.html @@ -0,0 +1,63 @@ + + + + ZTREE DEMO - url + + + + + + + + + + +

                                                                  超链接演示

                                                                  +
                                                                  [ 文件路径: core/url.html ]
                                                                  +
                                                                  +
                                                                  +
                                                                    +
                                                                    +
                                                                    +
                                                                      +
                                                                    • 1、setting 配置信息说明

                                                                      +
                                                                        +
                                                                      • 普通使用,无必须设置的参数
                                                                      • +
                                                                      • 如果需要灵活控制超链接跳转,请利用 onClick 事件回调函数进行控制,详细请参见 API 文档中的相关内容
                                                                      • +
                                                                      +
                                                                    • +
                                                                    • 2、treeNode 节点数据说明

                                                                      +
                                                                        +
                                                                      • 1、url 属性用于设置 页面跳转的路径
                                                                      • +
                                                                      • 2、target 属性用于设置 页面跳转的窗口目标
                                                                      • +
                                                                      • 3、click 属性用于设置简单的 onClick 事件
                                                                      • +
                                                                      • 其他属性说明请参考 API 文档中 "treeNode 节点数据详解"
                                                                      • +
                                                                      +
                                                                    • +
                                                                    +
                                                                    +
                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox.html new file mode 100644 index 0000000000000000000000000000000000000000..6fb6f0144e626e83e8a24cd66033d675d3c6d969 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox.html @@ -0,0 +1,107 @@ + + + + ZTREE DEMO - checkbox + + + + + + + + + + + +

                                                                    Checkbox 勾选操作

                                                                    +
                                                                    [ 文件路径: excheck/checkbox.html ]
                                                                    +
                                                                    +
                                                                    +
                                                                      +
                                                                      +
                                                                      +
                                                                        +
                                                                      • 1、setting 配置信息说明

                                                                        +
                                                                          +
                                                                        • 使用 checkbox,必须设置 setting.check 中的各个属性,详细请参见 API 文档中的相关内容
                                                                        • +
                                                                        • 父子关联关系:
                                                                          + 被勾选时:关联父 + 关联子
                                                                          + 取消勾选时:关联父 + 关联子
                                                                          +

                                                                            +
                                                                          • +
                                                                          +
                                                                        • +
                                                                        • 2、treeNode 节点数据说明

                                                                          +
                                                                            +
                                                                          • 1)、如果需要初始化默认节点被勾选,请设置 treeNode.checked 属性,详细请参见 API 文档中的相关内容
                                                                          • +
                                                                          • 2)、如果某节点禁用 checkbox,请设置 treeNode.chkDisabled 属性,详细请参见 API 文档中的相关内容 和 'chkDisabled 演示'
                                                                          • +
                                                                          • 3)、如果某节点不显示 checkbox,请设置 treeNode.nocheck 属性,详细请参见 API 文档中的相关内容 和 'nocheck 演示'
                                                                          • +
                                                                          • 4)、如果更换 checked 属性,请参考 API 文档中 setting.data.key.checked 的详细说明
                                                                          • +
                                                                          • 5)、其他请参考 API 文档中 treeNode.checkedOld / getCheckStatus / check_Child_State / check_Focus 的详细说明
                                                                          • +
                                                                          +
                                                                        • +
                                                                        +
                                                                        +
                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_chkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_chkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..3be246716c9584ca6ee71f4fb1fbcb4840f7f3cc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_chkDisabled.html @@ -0,0 +1,112 @@ + + + + ZTREE DEMO - Checkbox chkDisabled + + + + + + + + + + + +

                                                                        Checkbox chkDisabled 演示

                                                                        +
                                                                        [ 文件路径: excheck/checkbox_chkDisabled.html ]
                                                                        +
                                                                        +
                                                                        +
                                                                          +
                                                                          +
                                                                          +
                                                                            +
                                                                          • 1、setChkDisabled 方法操作说明

                                                                            +
                                                                              +
                                                                            • setChkDisabled 方法可以设置节点 checkbox / radio 禁用 或 取消禁用,详细请参见 API 文档中的相关内容
                                                                            • +
                                                                            • 试试看:
                                                                              + 禁用时:关联父 + 关联子
                                                                              + 取消禁用时:关联父 + 关联子
                                                                              +     [ 禁用 ] +     [ 取消禁用 ] +

                                                                            • +
                                                                            +
                                                                          • +
                                                                          • 2、setting 配置信息说明

                                                                            +
                                                                              +
                                                                            • 这个 Demo 只简单演示 chkDisabled 的使用方法,详细配置信息请参考 ‘Checkbox 勾选操作’
                                                                            • +
                                                                            +
                                                                          • +
                                                                          • 3、treeNode 节点数据说明

                                                                            +
                                                                              +
                                                                            • 1)、如果某节点禁用 checkbox,请设置 treeNode.chkDisabled 属性,详细请参见 API 文档中的相关内容
                                                                            • +
                                                                            • 2)、其他请参考 ‘Checkbox 勾选操作’
                                                                            • +
                                                                            +
                                                                          • +
                                                                          +
                                                                          +
                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_count.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_count.html new file mode 100644 index 0000000000000000000000000000000000000000..a7216710f9efc7f70f6682cc2096a968eb2e6b58 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_count.html @@ -0,0 +1,126 @@ + + + + ZTREE DEMO - getChangeCheckedNodes / getCheckedNodes + + + + + + + + + + + +

                                                                          checkbox 勾选统计

                                                                          +
                                                                          [ 文件路径: excheck/checkbox_count.html ]
                                                                          +
                                                                          +
                                                                          +
                                                                            +
                                                                            +
                                                                            +
                                                                              +
                                                                            • 1、getChangeCheckedNodes / getCheckedNodes 方法操作说明

                                                                              +
                                                                                +
                                                                              • 使用 zTreeObj.getChangeCheckedNodes / getCheckedNodes 方法,详细请参见 API 文档中的相关内容
                                                                              • +
                                                                              • 去勾选 checkbox 比较下面的数字变化:
                                                                                +

                                                                                  +
                                                                                • 当前被勾选的节点共
                                                                                • +
                                                                                • 当前未被勾选的节点共
                                                                                • +
                                                                                • 勾选状态对比规则:与 zTree 初始化时对比
                                                                                  + 与上一次勾选后对比
                                                                                • +
                                                                                • 当前被修改勾选状态的节点共
                                                                                • +

                                                                                +
                                                                              • +
                                                                              +
                                                                            • +
                                                                            • 2、setting 配置信息说明

                                                                              +
                                                                                +
                                                                              • 同 "checkbox 勾选操作" 中的说明
                                                                              • +
                                                                              +
                                                                            • +
                                                                            • 3、treeNode 节点数据说明

                                                                              +
                                                                                +
                                                                              • 同 "checkbox 勾选操作" 中的说明
                                                                              • +
                                                                              +
                                                                            • +
                                                                            +
                                                                            +
                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..2fb7960b81c354929c8addc248d8dfb28edd2228 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_fun.html @@ -0,0 +1,172 @@ + + + + ZTREE DEMO - beforeCheck / onCheck + + + + + + + + + + + +

                                                                            用 zTree 方法 勾选 checkbox

                                                                            +
                                                                            [ 文件路径: excheck/checkbox_fun.html ]
                                                                            +
                                                                            +
                                                                            +
                                                                              +
                                                                              +
                                                                              +
                                                                                +
                                                                              • 1、beforeCheck / onCheck 事件回调函数控制

                                                                                +
                                                                                  +
                                                                                • 利用 beforeCheck / onCheck 事件回调函数 可以控制是否允许 更改 节点勾选状态,这里简单演示如何监控此事件
                                                                                • +
                                                                                • 这里还演示了 checkNode / checkAllNodes 方法触发 beforeCheck / onCheck 事件回调函数的情况,试试看:
                                                                                  +      setting.check.autoCheckTrigger: false
                                                                                  +      执行勾选方法是否触发 callback
                                                                                  +     单节点--[ 勾选 ] +     [ 取消勾选 ] +     [ 勾选 切换 ]
                                                                                  +     单节点 ( 影响父子 )--[ 勾选 ] +     [ 取消勾选 ] +     [ 勾选 切换 ]
                                                                                  +     全部节点--[ 勾选 ] +     [ 取消勾选 ]

                                                                                  +
                                                                                • +
                                                                                • 使用 zTreeObj.checkNode / checkAllNodes 方法,详细请参见 API 文档中的相关内容
                                                                                  + beforeCheck / onCheck log:
                                                                                  +

                                                                                    +
                                                                                  • +
                                                                                  +
                                                                                • +
                                                                                • 2、setting 配置信息说明

                                                                                  +
                                                                                    +
                                                                                  • 同 "checkbox 勾选操作" 中的说明
                                                                                  • +
                                                                                  +
                                                                                • +
                                                                                • 3、treeNode 节点数据说明

                                                                                  +
                                                                                    +
                                                                                  • 同 "checkbox 勾选操作" 中的说明
                                                                                  • +
                                                                                  +
                                                                                • +
                                                                                +
                                                                                +
                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_halfCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_halfCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..34929d5a0843f95498bad15275b8631a0bd86f86 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_halfCheck.html @@ -0,0 +1,108 @@ + + + + ZTREE DEMO - Checkbox halfCheck + + + + + + + + + + + +

                                                                                Checkbox halfCheck 演示

                                                                                +
                                                                                [ 文件路径: excheck/checkbox_halfCheck.html ]
                                                                                +
                                                                                +
                                                                                +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                    +
                                                                                  • 1、演示说明

                                                                                    +
                                                                                      +
                                                                                    • 这个演示式实现了 异步加载模式 下简单的勾选操作
                                                                                    • +
                                                                                    • 1)、加载子节点后,父节点的 halfCheck 立刻失效
                                                                                    • +
                                                                                    • 2)、勾选父节点,可以影响之后加载的子节点的勾选状态
                                                                                    • +
                                                                                    • 3)、勾选父节点,可以让其子节点的 halfCheck 属性失效
                                                                                    • +
                                                                                    +
                                                                                  • +
                                                                                  • 2、setting 配置信息说明

                                                                                    +
                                                                                      +
                                                                                    • 实现半勾选功能,不需要配置任何参数。但半勾选功能属于辅助功能,无法单独使用,因此也需要根据自己的需求配置特定参数。
                                                                                    • +
                                                                                    +
                                                                                  • +
                                                                                  • 3、treeNode 节点数据说明

                                                                                    +
                                                                                      +
                                                                                    • 1)、请在节点初始化之前,设置 treeNode.halfCheck 属性,详细请参见 API 文档中的相关内容
                                                                                    • +
                                                                                    • 2)、其他请参考 ‘Checkbox 勾选操作’
                                                                                    • +
                                                                                    +
                                                                                  • +
                                                                                  +
                                                                                  +
                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_nocheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_nocheck.html new file mode 100644 index 0000000000000000000000000000000000000000..42547a35a03f6279e6296dbb2512ae10ecf5947b --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/checkbox_nocheck.html @@ -0,0 +1,96 @@ + + + + ZTREE DEMO - no checkbox + + + + + + + + + + + +

                                                                                  Checkbox nocheck 演示

                                                                                  +
                                                                                  [ 文件路径: excheck/checkbox_nocheck.html ]
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                      +
                                                                                    • 1、setting 配置信息说明

                                                                                      +
                                                                                        +
                                                                                      • 这个 Demo 只简单演示 nocheck 的使用方法,详细配置信息请参考 ‘Checkbox 勾选操作’
                                                                                      • +
                                                                                      • setting.check.nocheckInherit 可以设置子节点自动继承父节点的 nocheck 属性,详细请参见 API 文档中的相关内容
                                                                                      • +
                                                                                      • 试试看:
                                                                                        +     [ 隐藏 ] +     [ 显示 ] +

                                                                                      • +
                                                                                      +
                                                                                    • +
                                                                                    • 2、treeNode 节点数据说明

                                                                                      +
                                                                                        +
                                                                                      • 1)、如果某节点不显示 checkbox,请设置 treeNode.nocheck 属性,详细请参见 API 文档中的相关内容
                                                                                      • +
                                                                                      • 2)、其他请参考 ‘Checkbox 勾选操作’
                                                                                      • +
                                                                                      +
                                                                                    • +
                                                                                    +
                                                                                    +
                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio.html new file mode 100644 index 0000000000000000000000000000000000000000..c89f5d803f0177ed2e077a13c6d69ef41827c80a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio.html @@ -0,0 +1,97 @@ + + + + ZTREE DEMO - radio + + + + + + + + + + + +

                                                                                    Radio 勾选操作

                                                                                    +
                                                                                    [ 文件路径: excheck/radio.html ]
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                        +
                                                                                      • 1、setting 配置信息说明

                                                                                        +
                                                                                          +
                                                                                        • 使用 radio,必须设置 setting.check 中的各个属性,详细请参见 API 文档中的相关内容
                                                                                        • +
                                                                                        • radio 分组范围:同一级内 + 整棵树内
                                                                                          +

                                                                                            +
                                                                                          • +
                                                                                          +
                                                                                        • +
                                                                                        • 2、treeNode 节点数据说明

                                                                                          +
                                                                                            +
                                                                                          • 1)、如果需要初始化默认节点被勾选,请设置 treeNode.checked 属性,详细请参见 API 文档中的相关内容
                                                                                          • +
                                                                                          • 2)、如果某节点不显示 radio,请设置 treeNode.nocheck 属性,详细请参见 API 文档中的相关内容
                                                                                          • +
                                                                                          • 3)、如果更换 checked 属性,请参考 API 文档中 setting.data.key.checked 的详细说明
                                                                                          • +
                                                                                          • 4)、其他请参考 API 文档中 treeNode.checkedOld / getCheckStatus / check_Child_State / check_Focus 的详细说明
                                                                                          • +
                                                                                          +
                                                                                        • +
                                                                                        +
                                                                                        +
                                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_chkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_chkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..103b32b5ffb282dca3bfdc0aa85b2b03f8ff8305 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_chkDisabled.html @@ -0,0 +1,101 @@ + + + + ZTREE DEMO - Radio chkDisabled + + + + + + + + + + + +

                                                                                        Radio chkDisabled 演示

                                                                                        +
                                                                                        [ 文件路径: excheck/radio_chkDisabled.html ]
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                            +
                                                                                          • 1、setChkDisabled 方法操作说明

                                                                                            +
                                                                                              +
                                                                                            • setChkDisabled 方法可以设置节点 checkbox / radio 禁用 或 取消禁用,详细请参见 API 文档中的相关内容
                                                                                            • +
                                                                                            • 试试看:
                                                                                              +     [ 禁用 ] +     [ 取消禁用 ]

                                                                                              +
                                                                                            • +
                                                                                            +
                                                                                          • +
                                                                                          • 2、setting 配置信息说明

                                                                                            +
                                                                                              +
                                                                                            • 这个 Demo 只简单演示 chkDisabled 的使用方法,详细配置信息请参考 ‘Radio 勾选操作’
                                                                                            • +
                                                                                            +
                                                                                          • +
                                                                                          • 3、treeNode 节点数据说明

                                                                                            +
                                                                                              +
                                                                                            • 1)、如果某节点不显示 radio,请设置 treeNode.chkDisabled 属性,详细请参见 API 文档中的相关内容
                                                                                            • +
                                                                                            • 2)、其他请参考 ‘Radio 勾选操作’
                                                                                            • +
                                                                                            +
                                                                                          • +
                                                                                          +
                                                                                          +
                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..c6c63037a89bf93bf7913354abb3fb9eefbce998 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_fun.html @@ -0,0 +1,151 @@ + + + + ZTREE DEMO - beforeCheck / onCheck + + + + + + + + + + + +

                                                                                          用 zTree 方法 勾选 radio

                                                                                          +
                                                                                          [ 文件路径: excheck/radio_fun.html ]
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                              +
                                                                                            • 1、beforeCheck / onCheck 事件回调函数控制

                                                                                              +
                                                                                                +
                                                                                              • 利用 beforeCheck / onCheck 事件回调函数 可以控制是否允许 更改 节点勾选状态,这里简单演示如何监控此事件
                                                                                              • +
                                                                                              • 试试看:
                                                                                                +      checkNode 方法是否触发 callback
                                                                                                +     [ 勾选 ] +     [ 取消勾选 ]

                                                                                                +
                                                                                              • 使用 zTreeObj.checkNode 方法,详细请参见 API 文档中的相关内容
                                                                                                + beforeCheck / onCheck log:
                                                                                                +

                                                                                                  +
                                                                                                • +
                                                                                                +
                                                                                              • +
                                                                                              • 2、setting 配置信息说明

                                                                                                +
                                                                                                  +
                                                                                                • 同 "radio 勾选操作" 中的说明
                                                                                                • +
                                                                                                +
                                                                                              • +
                                                                                              • 3、treeNode 节点数据说明

                                                                                                +
                                                                                                  +
                                                                                                • 同 "radio 勾选操作" 中的说明
                                                                                                • +
                                                                                                +
                                                                                              • +
                                                                                              +
                                                                                              +
                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_halfCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_halfCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..1bbdff02d18a9a491da0c28216126655ebc70a16 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_halfCheck.html @@ -0,0 +1,93 @@ + + + + ZTREE DEMO - Radio halfCheck + + + + + + + + + + + +

                                                                                              Radio halfCheck 演示

                                                                                              +
                                                                                              [ 文件路径: excheck/radio_halfCheck.html ]
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                  +
                                                                                                • 1、演示说明

                                                                                                  +
                                                                                                    +
                                                                                                  • 这个演示式实现了 异步加载模式 下简单的勾选操作
                                                                                                  • +
                                                                                                  • 1)、加载子节点后,父节点的 halfCheck 立刻失效
                                                                                                  • +
                                                                                                  • 2)、勾选父节点,不会影响子节点的勾选状态
                                                                                                  • +
                                                                                                  • 3)、勾选父节点,不会让其子节点的 halfCheck 属性失效
                                                                                                  • +
                                                                                                  +
                                                                                                • +
                                                                                                • 2、setting 配置信息说明

                                                                                                  +
                                                                                                    +
                                                                                                  • 实现半勾选功能,不需要配置任何参数。但半勾选功能属于辅助功能,无法单独使用,因此也需要根据自己的需求配置特定参数。
                                                                                                  • +
                                                                                                  +
                                                                                                • +
                                                                                                • 3、treeNode 节点数据说明

                                                                                                  +
                                                                                                    +
                                                                                                  • 1)、请在节点初始化之前,设置 treeNode.halfCheck 属性,详细请参见 API 文档中的相关内容
                                                                                                  • +
                                                                                                  • 2)、其他请参考 ‘Radio 勾选操作’
                                                                                                  • +
                                                                                                  +
                                                                                                • +
                                                                                                +
                                                                                                +
                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_nocheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_nocheck.html new file mode 100644 index 0000000000000000000000000000000000000000..fc3ba8c5365ee8434104679e1c9f5ccbf8e44105 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/excheck/radio_nocheck.html @@ -0,0 +1,77 @@ + + + + ZTREE DEMO - no radio + + + + + + + + + + + +

                                                                                                Radio nocheck 演示

                                                                                                +
                                                                                                [ 文件路径: excheck/radio_nocheck.html ]
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                    +
                                                                                                  • 1、setting 配置信息说明

                                                                                                    +
                                                                                                      +
                                                                                                    • 这个 Demo 只简单演示 nocheck 的使用方法,详细配置信息请参考 ‘Radio 勾选操作’
                                                                                                    • +
                                                                                                    • setting.check.nocheckInherit 可以设置子节点自动继承父节点的 nocheck 属性,详细请参见 API 文档中的相关内容
                                                                                                    • +
                                                                                                    +
                                                                                                  • +
                                                                                                  • 2、treeNode 节点数据说明

                                                                                                    +
                                                                                                      +
                                                                                                    • 1)、如果某节点不显示 radio,请设置 treeNode.nocheck 属性,详细请参见 API 文档中的相关内容
                                                                                                    • +
                                                                                                    • 2)、其他请参考 ‘Radio 勾选操作’
                                                                                                    • +
                                                                                                    +
                                                                                                  • +
                                                                                                  +
                                                                                                  +
                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/async_edit.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/async_edit.html new file mode 100644 index 0000000000000000000000000000000000000000..e519fdfdc90c234542446de1a5d8afeb04e8d892 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/async_edit.html @@ -0,0 +1,124 @@ + + + + ZTREE DEMO - async & edit + + + + + + + + + + + + +

                                                                                                  异步加载 & 编辑功能 共存

                                                                                                  +
                                                                                                  [ 文件路径: exedit/async_edit.html ]
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                      +
                                                                                                    • 1、异步加载 & 编辑功能 共存说明

                                                                                                      +
                                                                                                        +
                                                                                                      • 1)、此 Demo 是基于 "高级 增 / 删 / 改 节点" 修改的,并且开放了拖拽功能,可与其进行对比
                                                                                                      • +
                                                                                                      • 2)、只需要同时开启编辑模式和异步加载模式即可实现共存
                                                                                                      • +
                                                                                                      • 3)、zTree 完善了异步加载模式下的编辑功能,对于未加载子节点的父节点,增加子节点时,会首先进行异步加载。
                                                                                                      • +
                                                                                                      +
                                                                                                    • +
                                                                                                    • 2、setting 配置信息说明

                                                                                                      +
                                                                                                        +
                                                                                                      • 1)、使用 编辑功能,请参考 "拖拽节点基本控制" 和 "基本 增 / 删 / 改 节点" Demo 中关于 setting 的配置要求
                                                                                                      • +
                                                                                                      • 2)、使用 异步加载功能,请参考 "异步加载 节点数据" Demo 中关于 setting 的配置要求
                                                                                                      • +
                                                                                                      +
                                                                                                    • +
                                                                                                    • 3、treeNode 节点数据说明

                                                                                                      +
                                                                                                        +
                                                                                                      • 两种模式共存,对数据无特殊要求,请分别参考 "异步加载 节点数据" & "拖拽 节点 基本控制" & "基本 增 / 删 / 改 节点" 中的相关说明
                                                                                                      • +
                                                                                                      +
                                                                                                    • +
                                                                                                    +
                                                                                                    +
                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag.html new file mode 100644 index 0000000000000000000000000000000000000000..ccc474fefda7da581024ba79245c3dfe584f5404 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag.html @@ -0,0 +1,136 @@ + + + + ZTREE DEMO - drag & drop + + + + + + + + + + + +

                                                                                                    拖拽节点基本控制

                                                                                                    +
                                                                                                    [ 文件路径: exedit/drag.html ]
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                        +
                                                                                                      • 1、setting 配置信息说明

                                                                                                        +
                                                                                                          +
                                                                                                        • 此 Demo 仅从功能上演示实现拖拽的基本方法和配置参数
                                                                                                        • +
                                                                                                        • 1)、使用 拖拽功能,必须设置 setting.edit 中的各个属性,详细请参见 API 文档中的相关内容
                                                                                                        • +
                                                                                                        • 2)、使用 拖拽功能的事件回调函数,必须设置 setting.callback.beforeDrag / onDrag / beforeDrop / onDrop 等属性,详细请参见 API 文档中的相关内容
                                                                                                        • +
                                                                                                        • 基本拖拽设置:
                                                                                                          + 允许复制 + 允许移动
                                                                                                          +

                                                                                                            +
                                                                                                          • +
                                                                                                          • 拖拽相对位置设置:
                                                                                                            + prev + inner + next
                                                                                                            +

                                                                                                              +
                                                                                                            • +
                                                                                                            +
                                                                                                          • +
                                                                                                          • 2、treeNode 节点数据说明

                                                                                                            +
                                                                                                              +
                                                                                                            • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                                                                                                            • +
                                                                                                            +
                                                                                                          • +
                                                                                                          +
                                                                                                          +
                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..9462863977ed85722b3ce73869ab0fcdb48e4a0d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag_fun.html @@ -0,0 +1,180 @@ + + + + ZTREE DEMO - copyNode / moveNode + + + + + + + + + + + + +

                                                                                                          用 zTree 方法 移动 / 复制节点

                                                                                                          +
                                                                                                          [ 文件路径: exedit/drag_fun.html ]
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                              +
                                                                                                            • 1、copyNode / moveNode 方法操作说明

                                                                                                              +
                                                                                                                +
                                                                                                              • 利用 copyNode / moveNode 方法也可以实现 复制 / 移动 节点的目的,这里简单演示使用方法
                                                                                                              • +
                                                                                                              • 对节点进行 复制 / 剪切,试试看:
                                                                                                                +     [ 复制 ] +     [ 剪切 ] +     [ 粘贴 ]

                                                                                                                +
                                                                                                              • 使用 zTreeObj.copyNode / moveNode 方法,详细请参见 API 文档中的相关内容
                                                                                                              • +
                                                                                                              +
                                                                                                            • +
                                                                                                            • 2、setting 配置信息说明

                                                                                                              +
                                                                                                                +
                                                                                                              • 同 "拖拽 节点 基本控制"
                                                                                                              • +
                                                                                                              +
                                                                                                            • +
                                                                                                            • 3、treeNode 节点数据说明

                                                                                                              +
                                                                                                                +
                                                                                                              • 同 "拖拽 节点 基本控制"
                                                                                                              • +
                                                                                                              +
                                                                                                            • +
                                                                                                            +
                                                                                                            +
                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag_super.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag_super.html new file mode 100644 index 0000000000000000000000000000000000000000..9cf713b6660eb44470341598f0fd91c829c68d8d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/drag_super.html @@ -0,0 +1,210 @@ + + + + ZTREE DEMO - beforeDrag / onDrag / beforeDrop / onDrop + + + + + + + + + + + +

                                                                                                            拖拽节点高级控制

                                                                                                            +
                                                                                                            [ 文件路径: exedit/drag_super.html ]
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                                +
                                                                                                              • 1、beforeDrag / onDrag
                                                                                                                  beforeDrop / onDrop 事件回调函数控制

                                                                                                                +
                                                                                                                  +
                                                                                                                • 此 Demo 演示合理利用配置参数实现更加灵活、更加合理的拖拽规则,操作时可以对比"基本控制"的例子
                                                                                                                • +
                                                                                                                • 此 Demo 默认 允许复制 / 移动
                                                                                                                • +
                                                                                                                • 此 Demo 中拖拽相对位置设置为 function,可以根据节点动态设定,从而可以放弃使用 beforeDrop 回调函数,拖拽时的效果会更好
                                                                                                                • +
                                                                                                                • 在对这些灵活的配置熟悉以后,相信你能够做出更加合理的拖拽规则!
                                                                                                                  +      拖拽节点时自动展开父节点是否触发 callback
                                                                                                                  + drag / drop log:
                                                                                                                  +

                                                                                                                  • +
                                                                                                                  +
                                                                                                                • +
                                                                                                                • 2、setting 配置信息说明

                                                                                                                  +
                                                                                                                    +
                                                                                                                  • 同 "拖拽 节点 基本控制"
                                                                                                                  • +
                                                                                                                  +
                                                                                                                • +
                                                                                                                • 3、treeNode 节点数据说明

                                                                                                                  +
                                                                                                                    +
                                                                                                                  • 同 "拖拽 节点 基本控制"
                                                                                                                  • +
                                                                                                                  +
                                                                                                                • +
                                                                                                                +
                                                                                                                +
                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit.html new file mode 100644 index 0000000000000000000000000000000000000000..930b360bc28507a9f3f1d1f138bbb553bd1fbdb6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit.html @@ -0,0 +1,115 @@ + + + + ZTREE DEMO - edit + + + + + + + + + + + +

                                                                                                                基本 增 / 删 / 改 节点

                                                                                                                +
                                                                                                                [ 文件路径: exedit/edit.html ]
                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                    +
                                                                                                                  • 1、setting 配置信息说明

                                                                                                                    +
                                                                                                                      +
                                                                                                                    • 此 Demo 仅从功能上演示编辑节点的基本方法和配置参数
                                                                                                                    • +
                                                                                                                    • 1)、使用 编辑功能,必须设置 setting.edit 中的各个属性,详细请参见 API 文档中的相关内容
                                                                                                                    • +
                                                                                                                    • 2)、使用 编辑功能的事件回调函数,必须设置 setting.callback.beforeRemove / onRemove / beforeRename / onRename 等属性,详细请参见 API 文档中的相关内容
                                                                                                                    • +
                                                                                                                    • 3)、zTree 不提供默认的增加按钮,如需实现请利用自定义控件的方法 addHoverDom / removeHoverDom ,详细请参见 API 文档中的相关内容;另外也可以参考 "高级 增 / 删 / 改 节点" 的 Demo
                                                                                                                    • +
                                                                                                                    • 基本编辑按钮设置:
                                                                                                                      + 显示删除按钮 + 显示编辑按钮
                                                                                                                      + remove 按钮的 title:
                                                                                                                      + rename 按钮的 title: +

                                                                                                                        +
                                                                                                                      • +
                                                                                                                      +
                                                                                                                    • +
                                                                                                                    • 2、treeNode 节点数据说明

                                                                                                                      +
                                                                                                                        +
                                                                                                                      • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                                                                                                                      • +
                                                                                                                      +
                                                                                                                    • +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..c322b0ce138c43adfcbbec0c7dc50bc207927a18 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit_fun.html @@ -0,0 +1,194 @@ + + + + ZTREE DEMO - addNodes / editName / removeNode / removeChildNodes + + + + + + + + + + + +

                                                                                                                    用 zTree 方法 增 / 删 / 改 节点

                                                                                                                    +
                                                                                                                    [ 文件路径: exedit/edit_fun.html ]
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                        +
                                                                                                                      • 1、addNodes / editName / removeNode / removeChildNodes 方法操作说明

                                                                                                                        +
                                                                                                                          +
                                                                                                                        • 利用 addNodes / editName / removeNode / removeChildNodes 方法也可以实现 增 / 删 / 改 节点的目的,这里简单演示使用方法
                                                                                                                        • +
                                                                                                                        • cancelEditName 方法仅仅是在节点进入名称编辑状态时有效,请在必要时使用,Demo 不进行此方法的演示
                                                                                                                        • +
                                                                                                                        • 利用 setting.data.keep.parent / leaf 属性 实现了父节点、叶子节点的状态锁定
                                                                                                                        • +
                                                                                                                        • 对节点进行 增 / 删 / 改,试试看:
                                                                                                                          +      removeNode 方法是否触发 callback
                                                                                                                          +     [ 增加父节点 ] +     [ 增加叶子节点 ] +     [ 编辑名称 ]
                                                                                                                          +     [ 删除节点 ] +     [ 清空子节点 ]
                                                                                                                          + remove log:
                                                                                                                          +

                                                                                                                            +
                                                                                                                          • +
                                                                                                                          • 使用 zTreeObj.addNodes / cancelEditName / editName / removeNode / removeChildNodes 方法,详细请参见 API 文档中的相关内容
                                                                                                                          • +
                                                                                                                          +
                                                                                                                        • +
                                                                                                                        • 2、setting 配置信息说明

                                                                                                                          +
                                                                                                                            +
                                                                                                                          • 同 "基本 增 / 删 / 改 节点"
                                                                                                                          • +
                                                                                                                          • 保持 父 / 叶子 节点状态,需要设置 setting.data.keep.parent / leaf 属性,详细请参见 API 文档中的相关内容
                                                                                                                          • +
                                                                                                                          +
                                                                                                                        • +
                                                                                                                        • 3、treeNode 节点数据说明

                                                                                                                          +
                                                                                                                            +
                                                                                                                          • 同 "基本 增 / 删 / 改 节点"
                                                                                                                          • +
                                                                                                                          +
                                                                                                                        • +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit_super.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit_super.html new file mode 100644 index 0000000000000000000000000000000000000000..cc70ecf0a17566240c90bdab7de090072207f484 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/edit_super.html @@ -0,0 +1,192 @@ + + + + ZTREE DEMO - beforeEditName / beforeRemove / onRemove / beforeRename / onRename + + + + + + + + + + + + +

                                                                                                                        高级 增 / 删 / 改 节点

                                                                                                                        +
                                                                                                                        [ 文件路径: exedit/edit_super.html ]
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                            +
                                                                                                                          • 1、beforeEditName
                                                                                                                              beforeRemove / onRemove
                                                                                                                              beforeRename / onRename 事件回调函数控制

                                                                                                                            +
                                                                                                                              +
                                                                                                                            • 此 Demo 演示合理利用自定义控件、事件回调函数配合以增强用户体验,操作时可以对比"基本 增 / 删 / 改 节点"的 Demo
                                                                                                                            • +
                                                                                                                            • 此 Demo 实现增加节点按钮
                                                                                                                            • +
                                                                                                                            • 此 Demo 实现删除节点时进行确认
                                                                                                                            • +
                                                                                                                            • 此 Demo 利用 showRenameBtn 对 isLastNode = true 的节点不显示编辑按钮
                                                                                                                            • +
                                                                                                                            • 此 Demo 利用 showRemoveBtn 对 isFirstNode = true 的节点不显示删除按钮
                                                                                                                            • +
                                                                                                                            • 可以利用 beforeEditName 触发自定义的编辑操作
                                                                                                                            • +
                                                                                                                            • 在对这些灵活的配置熟悉以后,相信你能够做出更加合理的编辑界面!
                                                                                                                              +      编辑名称时是否全选 text
                                                                                                                              + remove / rename log:  红色 表示取消编辑操作 (v3.5.13+)
                                                                                                                              +

                                                                                                                                +
                                                                                                                              • +
                                                                                                                              +
                                                                                                                            • +
                                                                                                                            • 2、setting 配置信息说明

                                                                                                                              +
                                                                                                                                +
                                                                                                                              • 同 "基本 增 / 删 / 改 节点"
                                                                                                                              • +
                                                                                                                              +
                                                                                                                            • +
                                                                                                                            • 3、treeNode 节点数据说明

                                                                                                                              +
                                                                                                                                +
                                                                                                                              • 同 "基本 增 / 删 / 改 节点"
                                                                                                                              • +
                                                                                                                              +
                                                                                                                            • +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/multiTree.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/multiTree.html new file mode 100644 index 0000000000000000000000000000000000000000..970392a02916e5ecaf3ae94605e935dbcc16f224 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exedit/multiTree.html @@ -0,0 +1,94 @@ + + + + ZTREE DEMO - multiTree + + + + + + + + + + + +

                                                                                                                            多棵树之间 的 数据交互

                                                                                                                            +
                                                                                                                            [ 文件路径: exedit/multiTree.html ]
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                              +
                                                                                                                            • 1、setting 配置信息说明

                                                                                                                              +
                                                                                                                                +
                                                                                                                              • zTree 对于多棵树之间拖拽的操作非常简单,只需要创建两棵可拖拽的树即可,同时可根据 各种事件回调函数 以及 zTree 的方法配合实现较复杂的操作规则,这里只是基本演示。
                                                                                                                              • +
                                                                                                                              • 关于配置信息请参考拖拽、编辑等 Demo 的详细说明
                                                                                                                              • +
                                                                                                                              +
                                                                                                                            • +
                                                                                                                            • 2、treeNode 节点数据说明

                                                                                                                              +
                                                                                                                                +
                                                                                                                              • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                                                                                                                              • +
                                                                                                                              +
                                                                                                                            • +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/checkbox.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/checkbox.html new file mode 100644 index 0000000000000000000000000000000000000000..47ba899259bb6d884d40a12e18ae3c9475e191ff --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/checkbox.html @@ -0,0 +1,161 @@ + + + + ZTREE DEMO - Hide With Checkbox Mode + + + + + + + + + + + + +

                                                                                                                                配合 checkbox 的隐藏

                                                                                                                                +
                                                                                                                                [ 文件路径: exhide/checkbox.html ]
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                    +
                                                                                                                                  • 1、setting 配置信息说明

                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                    • 使用隐藏功能,无需设置任何参数
                                                                                                                                    • +
                                                                                                                                    +
                                                                                                                                  • +
                                                                                                                                  • 2、treeNode 节点数据说明

                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                    • 初始化时,设置 treeNode.isHidden = true; 可以让节点隐藏
                                                                                                                                    • +
                                                                                                                                    • 隐藏、显示节点,看看树的变化:

                                                                                                                                      + 试试看:[ 隐藏选中的节点 ] +     [ 显示全部被隐藏的节点 ]

                                                                                                                                      +

                                                                                                                                        +
                                                                                                                                      • isHidden = true 的节点共
                                                                                                                                      • +
                                                                                                                                      • 被隐藏的节点共
                                                                                                                                      • +
                                                                                                                                      • 当前被勾选的节点共
                                                                                                                                      • +
                                                                                                                                      • 当前未被勾选的节点共
                                                                                                                                      • +
                                                                                                                                      • 隐藏节点后,可以看看仍显示节点的 isFirstNode 和 isLastNode 属性
                                                                                                                                      • +

                                                                                                                                      +
                                                                                                                                    • +
                                                                                                                                    +
                                                                                                                                  • +
                                                                                                                                  • 3、其他说明

                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                    • 隐藏节点操作,会影响 isFirstNode 和 isLastNode 属性,但是对于 getPreNode() 和 getNextNode() 方法无影响
                                                                                                                                    • +
                                                                                                                                    +
                                                                                                                                  • +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/common.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/common.html new file mode 100644 index 0000000000000000000000000000000000000000..65ea64e8f524f4afc3f477176bd26a7503ef560a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/common.html @@ -0,0 +1,126 @@ + + + + ZTREE DEMO - Hide Ordinary Node + + + + + + + + + + + +

                                                                                                                                  隐藏普通节点

                                                                                                                                  +
                                                                                                                                  [ 文件路径: exhide/common.html ]
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                    • 1、setting 配置信息说明

                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                      • 使用此功能,无需设置任何参数
                                                                                                                                      • +
                                                                                                                                      +
                                                                                                                                    • +
                                                                                                                                    • 2、treeNode 节点数据说明

                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                      • 初始化时,设置 treeNode.isHidden = true; 可以让节点隐藏
                                                                                                                                      • +
                                                                                                                                      • 隐藏、显示节点,看看树的变化:

                                                                                                                                        + 试试看:[ 隐藏选中的节点 ] +     [ 显示全部被隐藏的节点 ]

                                                                                                                                        +

                                                                                                                                          +
                                                                                                                                        • isHidden = true 的节点共
                                                                                                                                        • +
                                                                                                                                        • 隐藏节点后,可以看看仍显示节点的 isFirstNode 和 isLastNode 属性
                                                                                                                                        • +

                                                                                                                                        +
                                                                                                                                      • +
                                                                                                                                      +
                                                                                                                                    • +
                                                                                                                                    • 3、其他说明

                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                      • 隐藏节点操作,会影响 isFirstNode 和 isLastNode 属性,但是对于 getPreNode() 和 getNextNode() 方法无影响
                                                                                                                                      • +
                                                                                                                                      +
                                                                                                                                    • +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/radio.html new file mode 100644 index 0000000000000000000000000000000000000000..481d029fc1a4228e5cf57c88a7489bfca233d648 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/exhide/radio.html @@ -0,0 +1,162 @@ + + + + ZTREE DEMO - Hide With Radio Mode + + + + + + + + + + + + +

                                                                                                                                    配合 radio 的隐藏

                                                                                                                                    +
                                                                                                                                    [ 文件路径: exhide/radio.html ]
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                      • 1、setting 配置信息说明

                                                                                                                                        +
                                                                                                                                          +
                                                                                                                                        • 使用隐藏功能,无需设置任何参数
                                                                                                                                        • +
                                                                                                                                        +
                                                                                                                                      • +
                                                                                                                                      • 2、treeNode 节点数据说明

                                                                                                                                        +
                                                                                                                                          +
                                                                                                                                        • 初始化时,设置 treeNode.isHidden = true; 可以让节点隐藏
                                                                                                                                        • +
                                                                                                                                        • 隐藏、显示节点,看看树的变化:

                                                                                                                                          + 试试看:[ 隐藏选中的节点 ] +     [ 显示全部被隐藏的节点 ]

                                                                                                                                          +

                                                                                                                                            +
                                                                                                                                          • isHidden = true 的节点共
                                                                                                                                          • +
                                                                                                                                          • 被隐藏的节点共
                                                                                                                                          • +
                                                                                                                                          • 当前被勾选的节点共
                                                                                                                                          • +
                                                                                                                                          • 当前未被勾选的节点共
                                                                                                                                          • +
                                                                                                                                          • 隐藏节点后,可以看看仍显示节点的 isFirstNode 和 isLastNode 属性
                                                                                                                                          • +

                                                                                                                                          +
                                                                                                                                        • +
                                                                                                                                        +
                                                                                                                                      • +
                                                                                                                                      • 3、其他说明

                                                                                                                                        +
                                                                                                                                          +
                                                                                                                                        • 隐藏节点操作,会影响 isFirstNode 和 isLastNode 属性,但是对于 getPreNode() 和 getNextNode() 方法无影响
                                                                                                                                        • +
                                                                                                                                        +
                                                                                                                                      • +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/index.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/index.html new file mode 100644 index 0000000000000000000000000000000000000000..98f39ece4bc3dab2c027b3a81c14cb33318d1d22 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/index.html @@ -0,0 +1,170 @@ + + + + ZTREE DEMO + + + + + + + + + + + + + + +
                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        + + + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/asyncForAll.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/asyncForAll.html new file mode 100644 index 0000000000000000000000000000000000000000..d5aa2d198fc125342250d3da65cb9acbb151b1e8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/asyncForAll.html @@ -0,0 +1,191 @@ + + + + ZTREE DEMO - async for All + + + + + + + + + + +

                                                                                                                                        异步加载模式下全部展开

                                                                                                                                        +
                                                                                                                                        [ 文件路径: super/asyncForAll.html ]
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                            +
                                                                                                                                          • 实现方法说明

                                                                                                                                            +
                                                                                                                                              +
                                                                                                                                            • 利用 onAsyncSuccess / onAsyncError 回调函数 和 reAsyncChildNodes 或 expandNode 方法可以实现全部功能。
                                                                                                                                            • +
                                                                                                                                            • 如果父节点数量很大,请注意利用延时进行控制,避免异步进程过多。
                                                                                                                                            • +
                                                                                                                                            • 建议:演示时请利用调试工具查看 network 的 ajax 加载过程。
                                                                                                                                            • +
                                                                                                                                            • 演示操作 +

                                                                                                                                              + [ 全部展开 ]        + [ 后台自动全部加载 ]

                                                                                                                                              + [ Reset zTree ]

                                                                                                                                              +

                                                                                                                                              +
                                                                                                                                            • +
                                                                                                                                            +
                                                                                                                                          • +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/awesome.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/awesome.html new file mode 100644 index 0000000000000000000000000000000000000000..190f12ef5a91266e84cf1d654a6f73ae91e6313d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/awesome.html @@ -0,0 +1,135 @@ + + + + ZTREE DEMO - awesome 风格 + + + + + + + + + + + + + + +

                                                                                                                                          Awesome 风格

                                                                                                                                          +
                                                                                                                                          [ 文件路径: super/awesome.html ]
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                              +
                                                                                                                                            • 实现方法说明

                                                                                                                                              +
                                                                                                                                                +
                                                                                                                                              • 你需要在页面中引入 fontawesome 样式 (http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css)
                                                                                                                                              • +
                                                                                                                                              • <= 小汽车图标 (如果 fontawesome 样式被正常加载,你可以正常看到)
                                                                                                                                              • +
                                                                                                                                              • 引入 适配 zTree 的 样式文件: 'css/awesomeStyle'
                                                                                                                                              • +
                                                                                                                                              • 感谢 mikkelking 提供这个 Demo. (仅供参考)
                                                                                                                                              • + +
                                                                                                                                              • Mode:
                                                                                                                                                + + + +
                                                                                                                                                +

                                                                                                                                              • +
                                                                                                                                              + +
                                                                                                                                            + + +
                                                                                                                                            +
                                                                                                                                            + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/checkbox_radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/checkbox_radio.html new file mode 100644 index 0000000000000000000000000000000000000000..6c13cff833902eaf9596251367a7e2a1aae3c89c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/checkbox_radio.html @@ -0,0 +1,116 @@ + + + + ZTREE DEMO - checkbox & radio + + + + + + + + + + + +

                                                                                                                                            checkbox / radio 共存

                                                                                                                                            +
                                                                                                                                            [ 文件路径: super/checkbox_radio.html ]
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                                +
                                                                                                                                              • 实现方法说明

                                                                                                                                                +
                                                                                                                                                  +
                                                                                                                                                • zTree 默认的 checkbox 和 radio 是无法共存的,但可以利用 自定义控件 的功能实现此需求,具体需求可以参考 "添加 自定义控件" 的详细说明
                                                                                                                                                • +
                                                                                                                                                • 对于 checkbox / radio 的联动规则,请根据需求制定自己的规则
                                                                                                                                                • +
                                                                                                                                                +
                                                                                                                                              • +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/diydom.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/diydom.html new file mode 100644 index 0000000000000000000000000000000000000000..fa21a9bba6d349a61bd29969f3aa31299e7243c3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/diydom.html @@ -0,0 +1,177 @@ + + + + ZTREE DEMO - addHoverDom / removeHoverDom / addDiyDom + + + + + + + + + + + + +

                                                                                                                                              添加自定义控件

                                                                                                                                              +
                                                                                                                                              [ 文件路径: super/diydom.html ]
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                  +
                                                                                                                                                • 1、实现方法说明

                                                                                                                                                  +
                                                                                                                                                    +
                                                                                                                                                  • 利用 setting.view.addHoverDom / removeHoverDom / addDiyDom 这几个参数的配置可以很容易的实现自定义控件的功能
                                                                                                                                                  • +
                                                                                                                                                  • 添加自定义控件,请务必掌握 zTree 节点对象的命名规则,以保证正常添加 DOM 控件
                                                                                                                                                  • +
                                                                                                                                                  • 如果添加标准的 select / checkbox / radio 等,请注意适当调整 zTree 的布局 css,保证 zTree 能正常显示
                                                                                                                                                  • +
                                                                                                                                                  +
                                                                                                                                                • +
                                                                                                                                                • 2、setting 配置信息说明

                                                                                                                                                  +
                                                                                                                                                    +
                                                                                                                                                  • 使用 setting.view.addHoverDom / removeHoverDom / addDiyDom 属性,详细请参见 API 文档中的相关内容
                                                                                                                                                  • +
                                                                                                                                                  +
                                                                                                                                                • +
                                                                                                                                                • 3、treeNode 节点数据说明

                                                                                                                                                  +
                                                                                                                                                    +
                                                                                                                                                  • 对 节点数据 没有特殊要求,用户可以根据自己的需求添加自定义属性
                                                                                                                                                  • +
                                                                                                                                                  +
                                                                                                                                                • +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/dragWithOther.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/dragWithOther.html new file mode 100644 index 0000000000000000000000000000000000000000..fb3e5a8763afed2e71a0d25d18f0343d62ab9903 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/dragWithOther.html @@ -0,0 +1,253 @@ + + + + ZTREE DEMO - drag with other DOM + + + + + + + + + + + + +

                                                                                                                                                与其他 DOM 拖拽互动

                                                                                                                                                +
                                                                                                                                                [ 文件路径: super/dragWithOther.html ]
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                    +
                                                                                                                                                  • 实现方法说明

                                                                                                                                                    +
                                                                                                                                                      +
                                                                                                                                                    • zTree v3.2 版本修正了 onDrag/onDrop 中的 event 对象; v3.5.16 版本增加了 onDragMove; 因此可以较容易的控制将节点拖拽到其他 DOM
                                                                                                                                                    • +
                                                                                                                                                    • 将其他 DOM 拖拽到 zTree 需要自己制作相关的拖拽代码
                                                                                                                                                    • +
                                                                                                                                                    • 这仅仅是一个最简单的演示,如果需要更炫的效果,需要制作更复杂的代码
                                                                                                                                                    • +
                                                                                                                                                    +
                                                                                                                                                  • +
                                                                                                                                                  • 请拖拽下面内容到 树节点上

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    大树小草花朵
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    老虎狗熊狮子
                                                                                                                                                    +
                                                                                                                                                    + 也可以把二级节点拖拽到以上图层 +
                                                                                                                                                  • +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/fuzzySearch.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/fuzzySearch.html new file mode 100644 index 0000000000000000000000000000000000000000..aac48cb9d7681d510c22828fe505ebc4bcf61077 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/fuzzySearch.html @@ -0,0 +1,95 @@ + + + + ZTREE DEMO - fuzzySearch + + + + + + + + + + + + +

                                                                                                                                                  根据关键字模糊查找节点

                                                                                                                                                  +
                                                                                                                                                  [ 文件路径: fuzzySearch/fuzzySearch.html ]
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                      +
                                                                                                                                                    • +

                                                                                                                                                      1、fuzzySearch()方法使用说明

                                                                                                                                                      +
                                                                                                                                                        +
                                                                                                                                                      • + @param zTreeId ztree对象的id,不需要# +
                                                                                                                                                      • +
                                                                                                                                                      • + @param searchField 输入框选择器 +
                                                                                                                                                      • +
                                                                                                                                                      • + @param isHighLight 是否高亮,默认高亮,传入false禁用 +
                                                                                                                                                      • +
                                                                                                                                                      • + @param isExpand 是否展开,默认合拢,传入true展开 +
                                                                                                                                                      • +
                                                                                                                                                      • + fuzzySearch ( zTreeId, searchField, isHighLight, isExpand ) +
                                                                                                                                                      • +
                                                                                                                                                      • 搜索试试看:
                                                                                                                                                        + 关键字:
                                                                                                                                                        +

                                                                                                                                                        +
                                                                                                                                                      • +
                                                                                                                                                      +
                                                                                                                                                    • +
                                                                                                                                                    • 2、依赖的js

                                                                                                                                                      +
                                                                                                                                                        +
                                                                                                                                                      • ztree v3.5.19.1及以上,使用到getPath()方法
                                                                                                                                                      • +
                                                                                                                                                      • ztree.exhide扩展,使用到hideNode()方法
                                                                                                                                                      • +
                                                                                                                                                      +
                                                                                                                                                    • +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menu.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menu.html new file mode 100644 index 0000000000000000000000000000000000000000..759c8634c8f523a8786d33e71c2ac7971fff39d8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menu.html @@ -0,0 +1,152 @@ + + + + ZTREE DEMO - left_menu + + + + + + + + + + + +

                                                                                                                                                    左侧菜单

                                                                                                                                                    +
                                                                                                                                                    [ 文件路径: super/left_menu.html ]
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                        +
                                                                                                                                                      • 实现方法说明

                                                                                                                                                        +
                                                                                                                                                          +
                                                                                                                                                        • 在 “Demo 演示”中的左侧菜单就是用 zTree 实现的,主要是靠 css 样式负责排版,利用 setting 中的配置进行功能制作,本 Demo 对实现 左侧菜单进行简单的介绍,你也可以通过查看 “Demo 演示”页面的源码深入了解。
                                                                                                                                                        • +
                                                                                                                                                        • 1、关于 css 完全可以根据自己的需要进行个性化调整,例如:此 Demo 的菜单样式 就 与 “Demo 演示”页面的不一样,仅供对比参考
                                                                                                                                                        • +
                                                                                                                                                        • 2、主要用到的配置有:
                                                                                                                                                          +     setting.view.showIcon / showLine / selectedMulti / dblClickExpand
                                                                                                                                                          +     setting.callback.onNodeCreated / beforeClick / onClick +
                                                                                                                                                        • +
                                                                                                                                                        • 3、是否需要限制单一路径展开,完全由你的需求而定,实现代码可参考 "保持展开单一路径"
                                                                                                                                                        • +
                                                                                                                                                        • 4、其他辅助规则,请根据实际情况自行编写
                                                                                                                                                        • +
                                                                                                                                                        +
                                                                                                                                                      • +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.gif b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.gif new file mode 100644 index 0000000000000000000000000000000000000000..c252f0f831be3f4672142caf7cb148e14eeb466b Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.html new file mode 100644 index 0000000000000000000000000000000000000000..d42412ffb003056ff4876d0a67b57c8180755ff0 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.html @@ -0,0 +1,136 @@ + + + + ZTREE DEMO - left_menu for Outlook + + + + + + + + + + +

                                                                                                                                                      OutLook 样式的左侧菜单

                                                                                                                                                      +
                                                                                                                                                      [ 文件路径: super/left_menuForOutLook.html ]
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                          +
                                                                                                                                                        • 实现方法说明

                                                                                                                                                          +
                                                                                                                                                            +
                                                                                                                                                          • 帮朋友用 zTree 实现了一个貌似 Outlook.com 的菜单,特拿出来分享给大家
                                                                                                                                                          • +
                                                                                                                                                          • 1、请注意本页面源码中的 css 部分
                                                                                                                                                          • +
                                                                                                                                                          • 2、请查看源码中 js 的使用,特别是利用 addDiyDom 回调将 展开按钮 转移到 <a> 标签内
                                                                                                                                                          • +
                                                                                                                                                          • 3、利用添加 zTree 的 class 实现展开按钮的隐藏、显示
                                                                                                                                                          • +
                                                                                                                                                          • 4、其他辅助规则,请根据实际情况自行编写
                                                                                                                                                          • +
                                                                                                                                                          • 5、当前规则说明:
                                                                                                                                                            +   单击根节点可以展开、折叠;
                                                                                                                                                            +   非根节点只有点击 箭头 图标才可以展开、折叠;
                                                                                                                                                            +
                                                                                                                                                          • +
                                                                                                                                                          +
                                                                                                                                                        • +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.png b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.png new file mode 100644 index 0000000000000000000000000000000000000000..36e8acfa3b6cb44f8aa25a339c2fdeb799c108df Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/left_menuForOutLook.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/metro.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/metro.html new file mode 100644 index 0000000000000000000000000000000000000000..f82004a64946035172ba004b2dbb0d958e8501dd --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/metro.html @@ -0,0 +1,109 @@ + + + + ZTREE DEMO - Simple Data + + + + + + + + + + + +

                                                                                                                                                        Metro 风格

                                                                                                                                                        +
                                                                                                                                                        [ 文件路径: super/metro.html ]
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                            +
                                                                                                                                                          • 1、样式文件说明

                                                                                                                                                            +
                                                                                                                                                              +
                                                                                                                                                            • 请使用 css/metroStyle 目录内的样式文件 和 图片
                                                                                                                                                            • +
                                                                                                                                                            • 感谢网友 rqx110 提供, 仅供参考
                                                                                                                                                            • +
                                                                                                                                                            +
                                                                                                                                                          • +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/oneclick.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/oneclick.html new file mode 100644 index 0000000000000000000000000000000000000000..6b098d7cc31ff9d419ed32535b44f9c0629a6bbc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/oneclick.html @@ -0,0 +1,87 @@ + + + + ZTREE DEMO - one click + + + + + + + + + + + +

                                                                                                                                                          单击展开/折叠节点

                                                                                                                                                          +
                                                                                                                                                          [ 文件路径: super/oneclick.html ]
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                              +
                                                                                                                                                            • 实现方法说明

                                                                                                                                                              +
                                                                                                                                                                +
                                                                                                                                                              • zTree 默认不提供单击展开节点的功能,但可以利用 onClick 事件回调函数轻松实现此功能
                                                                                                                                                              • +
                                                                                                                                                              • 为了避免与双击功能冲突,建议关闭双击展开节点的功能,请设置 setting.view.dblClickExpand = false
                                                                                                                                                              • +
                                                                                                                                                              • 可以将所有的 +/- 开关隐藏,请查看本页面源码,查看 css 设置
                                                                                                                                                              • +
                                                                                                                                                              • 由于 +/- 开关与 节点连接线是配套的,所以如果不显示 +/- 开关的话,那么请设置 setting.view.showLine = false 隐藏连接线
                                                                                                                                                              • +
                                                                                                                                                              +
                                                                                                                                                            • +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/oneroot.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/oneroot.html new file mode 100644 index 0000000000000000000000000000000000000000..14ec9904c9ddb71a875d2c58fed254bda9c7ef3e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/oneroot.html @@ -0,0 +1,79 @@ + + + + ZTREE DEMO - one root + + + + + + + + + + + +

                                                                                                                                                            冻结根节点

                                                                                                                                                            +
                                                                                                                                                            [ 文件路径: super/oneroot.html ]
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                                +
                                                                                                                                                              • 实现方法说明

                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                • 对于这种只有一个根节点,且不显示 +/- 开关的需求,需要利用 css、setting 配合使用
                                                                                                                                                                • +
                                                                                                                                                                • zTree v3.x 可以针对指定的 level,进行样式设定,请查看本页面源码,查看 css 设置
                                                                                                                                                                • +
                                                                                                                                                                • 设置 setting.view.dblClickExpand 指向 Function,可以只针对根节点关闭双击展开的操作
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                              • +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/rightClickMenu.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/rightClickMenu.html new file mode 100644 index 0000000000000000000000000000000000000000..dd15c6ebb9e7330c91570fe91e26f7d64419130c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/rightClickMenu.html @@ -0,0 +1,171 @@ + + + + ZTREE DEMO - select menu + + + + + + + + + + + + +

                                                                                                                                                              右键菜单的实现

                                                                                                                                                              +
                                                                                                                                                              [ 文件路径: super/rightClickMenu.html ]
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                • 实现方法说明

                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                  • 利用 beforeRightClick / onRightClick 事件回调函数简单实现的右键菜单
                                                                                                                                                                  • +
                                                                                                                                                                  • Demo 中的菜单比较简陋,你完全可以配合其他自定义样式的菜单图层混合使用
                                                                                                                                                                  • +
                                                                                                                                                                  +
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                • 增加节点
                                                                                                                                                                • +
                                                                                                                                                                • 删除节点
                                                                                                                                                                • +
                                                                                                                                                                • Check节点
                                                                                                                                                                • +
                                                                                                                                                                • unCheck节点
                                                                                                                                                                • +
                                                                                                                                                                • 恢复zTree
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu.html new file mode 100644 index 0000000000000000000000000000000000000000..5038fa6600d489d7defaa7c7035a90012abe4063 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu.html @@ -0,0 +1,124 @@ + + + + ZTREE DEMO - select menu + + + + + + + + + + + +

                                                                                                                                                                下拉菜单

                                                                                                                                                                +
                                                                                                                                                                [ 文件路径: super/select_menu.html ]
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                •   选择城市时,按下 Ctrl 或 Cmd 键可以进行多选
                                                                                                                                                                • +
                                                                                                                                                                •   城市: +  选择
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                • 实现方法说明

                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                  • 用 zTree 实现这种下拉菜单,应该说是比较容易的,你只需要控制 zTree 所在容器的隐藏/显示,以及位置即可。
                                                                                                                                                                  • +
                                                                                                                                                                  • zTree v3.x 实现了多点选中功能,因此对于需要多选的下拉菜单也易如反掌。
                                                                                                                                                                  • +
                                                                                                                                                                  • 利用 setting 的各项配置参数,完全可以满足大部分的功能需求。
                                                                                                                                                                  • +
                                                                                                                                                                  +
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu_checkbox.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu_checkbox.html new file mode 100644 index 0000000000000000000000000000000000000000..387bcbde64a85054a125c01f31f679c9f79beb88 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu_checkbox.html @@ -0,0 +1,126 @@ + + + + ZTREE DEMO - checkbox select menu + + + + + + + + + + + + +

                                                                                                                                                                带 checkbox 的多选下拉菜单 -- zTree

                                                                                                                                                                +
                                                                                                                                                                [ 文件路径: super/select_menu_checkbox.html ]
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                •   勾选 checkbox 或者 点击节点 进行选择
                                                                                                                                                                • +
                                                                                                                                                                •   Test: +  select
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                • 实现方法说明

                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                  • 用 checkbox 也可以轻松实现多选的下拉菜单
                                                                                                                                                                  • +
                                                                                                                                                                  • 此 Demo 主要用于 和 其他下拉菜单进行对比
                                                                                                                                                                  • +
                                                                                                                                                                  +
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu_radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu_radio.html new file mode 100644 index 0000000000000000000000000000000000000000..5a2b9ddc2eea058384e5bdf0c4c0b42c21521d21 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/select_menu_radio.html @@ -0,0 +1,127 @@ + + + + ZTREE DEMO - radio select menu + + + + + + + + + + + + +

                                                                                                                                                                带 radio 的单选下拉菜单 -- zTree

                                                                                                                                                                +
                                                                                                                                                                [ 文件路径: super/select_menu_radio.html ]
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                •   勾选 radio 或者 点击节点 进行选择
                                                                                                                                                                • +
                                                                                                                                                                •   Test: +  select
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                • 实现方法说明

                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                  • 用 radio 也可以轻松实现单选的下拉菜单
                                                                                                                                                                  • +
                                                                                                                                                                  • 单选其实没有必要使用 radio, 此 Demo 主要用于 和 其他下拉菜单进行对比
                                                                                                                                                                  • +
                                                                                                                                                                  +
                                                                                                                                                                • +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/singlepath.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/singlepath.html new file mode 100644 index 0000000000000000000000000000000000000000..667d530bc19b488556fe2d3d3974917daf5a10a1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/cn/super/singlepath.html @@ -0,0 +1,166 @@ + + + + ZTREE DEMO - single path + + + + + + + + + + + +

                                                                                                                                                                保持展开单一路径

                                                                                                                                                                +
                                                                                                                                                                [ 文件路径: super/singlepath.html ]
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                  • 实现方法说明

                                                                                                                                                                    +
                                                                                                                                                                      +
                                                                                                                                                                    • 此 Demo 是在 "单击展开/折叠节点" 基础上改造而来,树节点保持始终只展开一条路径。
                                                                                                                                                                    • +
                                                                                                                                                                    • 利用 setting.callback.beforeExpand / onExpand 事件回调函数实现展开规则
                                                                                                                                                                    • +
                                                                                                                                                                    +
                                                                                                                                                                  • +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/asyncData/getNodes.php b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/asyncData/getNodes.php new file mode 100644 index 0000000000000000000000000000000000000000..6d22b5ebd6b46a1a0c5c479eb430cf9249df61ee --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/asyncData/getNodes.php @@ -0,0 +1,42 @@ + +[] diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/asyncData/getNodesForBigData.php b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/asyncData/getNodesForBigData.php new file mode 100644 index 0000000000000000000000000000000000000000..588c14c5c1c66abf2c6f8e278e1baa9536cc00f9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/asyncData/getNodesForBigData.php @@ -0,0 +1,26 @@ + +[] diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/common.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/common.html new file mode 100644 index 0000000000000000000000000000000000000000..4d39b0fb6493845b711ce38b6e328cc7d0a036a6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/common.html @@ -0,0 +1,190 @@ + + + + ZTREE DEMO - big data common + + + + + + + + + + + +

                                                                                                                                                                  One-time Large Data Loading

                                                                                                                                                                  +
                                                                                                                                                                  [ File Path: bigdata/common.html ]
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                  • Adjust the total number of nodes to the test load speed: +
                                                                                                                                                                    +
                                                                                                                                                                    5000
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + checkbox     + [ Initialize zTree ] +
                                                                                                                                                                    +
                                                                                                                                                                  • +
                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                      +
                                                                                                                                                                    • 1, Explanation of large data load

                                                                                                                                                                      +
                                                                                                                                                                        +
                                                                                                                                                                      • 1) zTree v3.x optimized for one-time large data loading capacity, using a lazy loading technique, which does not expand the node does not create child nodes of the DOM.
                                                                                                                                                                      • +
                                                                                                                                                                      • 2) If a maximum of 100 nodes each, but a total number of several thousand or even tens of thousands of nodes, and the parent node is collapsed by default to optimize the most obvious effect, very fast.
                                                                                                                                                                      • +
                                                                                                                                                                      • 3) For the next level there are thousands of sub-node case, the optimization of lazy loading is invalid, proposal to consider asynchronous page loading.
                                                                                                                                                                      • +
                                                                                                                                                                      • 4) if you set the data to all the parent nodes are expanded, the optimization of lazy loading is invalid, proposal to not expand all parent node when you initialize zTree.
                                                                                                                                                                      • +
                                                                                                                                                                      • 5) set the display checkbox / radio will affect some of the performance.
                                                                                                                                                                      • +
                                                                                                                                                                      • 6) DOM generated using addDiyDom function will affect the speed, the number of nodes determines the number of impact situations.
                                                                                                                                                                      • +
                                                                                                                                                                      • 7) Using 'onNodeCreated' callback function to manipulate nodes object will affect the speed, the degree of influence determined by the number of nodes.
                                                                                                                                                                      • +
                                                                                                                                                                      +
                                                                                                                                                                    • +
                                                                                                                                                                    • 2, Explanation of setting

                                                                                                                                                                      +
                                                                                                                                                                        +
                                                                                                                                                                      • No special configuration.
                                                                                                                                                                      • +
                                                                                                                                                                      +
                                                                                                                                                                    • +
                                                                                                                                                                    • 3, Explanation of treeNode

                                                                                                                                                                      +
                                                                                                                                                                        +
                                                                                                                                                                      • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                      • +
                                                                                                                                                                      +
                                                                                                                                                                    • +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/diy_async.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/diy_async.html new file mode 100644 index 0000000000000000000000000000000000000000..104971447026f48d785d1d1d51010a7ad0bf5503 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/diy_async.html @@ -0,0 +1,157 @@ + + + + ZTREE DEMO - big data async + + + + + + + + + + + +

                                                                                                                                                                    Loading Data in Batches

                                                                                                                                                                    +
                                                                                                                                                                    [ File Path: bigdata/diy_async.html ]
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                      +
                                                                                                                                                                    •     Demo for testing load data in batches, each node needs to re-start to load.
                                                                                                                                                                    • +
                                                                                                                                                                    +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                        +
                                                                                                                                                                      • 1, Explanation of large data load

                                                                                                                                                                        +
                                                                                                                                                                          +
                                                                                                                                                                        • 1) If has nodes for as many as thousands in one level, lazy loading is invalid, this demo shows how to load data in batches.
                                                                                                                                                                        • +
                                                                                                                                                                        • 2) This method applies to thousands of nodes must all display needs.
                                                                                                                                                                        • +
                                                                                                                                                                        • 3) This method doesn't solve the problem of slow loading, it will only make the final result appear more slowly, but can be limited to avoid browser suspended animation, and more nodes displayed slower.
                                                                                                                                                                        • +
                                                                                                                                                                        • 4) For at least several thousand nodes in one level case, another solution is to: pagination loading.
                                                                                                                                                                          + async load log:
                                                                                                                                                                          +
                                                                                                                                                                          • +
                                                                                                                                                                          +
                                                                                                                                                                        • +
                                                                                                                                                                        • 2, Explanation of setting

                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                          • Need to set the parameters in setting.async
                                                                                                                                                                          • +
                                                                                                                                                                          • Advised to turn off animation effects: setting.view.expandSpeed = "";
                                                                                                                                                                          • +
                                                                                                                                                                          • No other special configuration, the user can set their own requirements.
                                                                                                                                                                          • +
                                                                                                                                                                          +
                                                                                                                                                                        • +
                                                                                                                                                                        • 3, Explanation of treeNode

                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                          • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                          • +
                                                                                                                                                                          +
                                                                                                                                                                        • +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/page.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/page.html new file mode 100644 index 0000000000000000000000000000000000000000..3b18f9e04476b0f88c7fee009420bf522c6aa441 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/bigdata/page.html @@ -0,0 +1,150 @@ + + + + ZTREE DEMO - big data page + + + + + + + + + + + + +

                                                                                                                                                                        Loading Data By Pagination

                                                                                                                                                                        +
                                                                                                                                                                        [ File Path: bigdata/page.html ]
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                          • 1, Explanation of large data load

                                                                                                                                                                            +
                                                                                                                                                                              +
                                                                                                                                                                            • 1) Pagination can be an effective solution to the large number of child nodes of the situation.
                                                                                                                                                                            • +
                                                                                                                                                                            • 2) Using custom method to display the pagination button.
                                                                                                                                                                            • +
                                                                                                                                                                            • 3) Pagination lead to the association of checkbox can not be achieved, only correction after show each page . Because of the time limitation, Demo does not deal with association of checkbox.
                                                                                                                                                                            • +
                                                                                                                                                                            • 4) The use of pagination, you can only get the current page node data from zTree. You can save the data after each page loading as the cache, according to the demand to determine the specific methods.
                                                                                                                                                                            • + +
                                                                                                                                                                            • 2, Explanation of setting

                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                              • Need to set the parameters in setting.async
                                                                                                                                                                              • +
                                                                                                                                                                              • No other special configuration, the user can set their own requirements.
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                            • +
                                                                                                                                                                            • 3, Explanation of treeNode

                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                              • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                            • +
                                                                                                                                                                            +
                                                                                                                                                                          +
                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/async.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/async.html new file mode 100644 index 0000000000000000000000000000000000000000..e287c3f1f79541cc38ce21e549563d9edf6d26cc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/async.html @@ -0,0 +1,70 @@ + + + + ZTREE DEMO - Async + + + + + + + + + + +

                                                                                                                                                                          Dynamic Tree with Ajax

                                                                                                                                                                          +
                                                                                                                                                                          [ File Path: core/async.html ]
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                              +
                                                                                                                                                                            • 1, Explanation of setting

                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                              • For create dynamic tree with ajax, you need to set attributes in setting.async, see the API documentation for more related contents.
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                            • +
                                                                                                                                                                            • 2, Explanation of treeNode

                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                              • Dynamic tree with ajax doesn't need to make special treeNode node data, if use simple JSON data model, please set the attributes in setting.data.simple.
                                                                                                                                                                              • +
                                                                                                                                                                              • If ajax only to return node data in single level, you don't need to use simple JSON data model.
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                            • +
                                                                                                                                                                            • 3、Other explanation

                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                              • Monitoring autoParam and otherParam use firebug or the developer tools in browser.
                                                                                                                                                                              • +
                                                                                                                                                                              • This Demo only loading 4 level nodes (level = 3).
                                                                                                                                                                              • +
                                                                                                                                                                              • This Demo use 'dataFilter' to modify the name of the node.
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                            • +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/async_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/async_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..25bcc9798443b725e404f136b50e16219e5a6d88 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/async_fun.html @@ -0,0 +1,144 @@ + + + + ZTREE DEMO - reAsyncChildNodes + + + + + + + + + + + +

                                                                                                                                                                            Dynamic Tree - zTree methods

                                                                                                                                                                            +
                                                                                                                                                                            [ File Path: core/async_fun.html ]
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                              • 1, Explanation of reAsyncChildNodes

                                                                                                                                                                                +
                                                                                                                                                                                  +
                                                                                                                                                                                • How to use zTreeObj.reAsyncChildNodes method, please see the API documentation.
                                                                                                                                                                                • +
                                                                                                                                                                                • This Demo can only select one parent node
                                                                                                                                                                                  + Try: [ reload ]    [ append ]

                                                                                                                                                                                  +
                                                                                                                                                                                • +
                                                                                                                                                                                • 'isSilent' parameter is only for the collapsed state of the parent node.
                                                                                                                                                                                  + Try: [ Quietly reloaded ]    [ Quietly append ]
                                                                                                                                                                                  + async log:
                                                                                                                                                                                  +

                                                                                                                                                                                    +
                                                                                                                                                                                  • +
                                                                                                                                                                                  +
                                                                                                                                                                                • +
                                                                                                                                                                                • 2, Explanation of setting

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • For useing reAsyncChildNodes method, you need to set attributes in setting.async, see the API documentation for more related contents.
                                                                                                                                                                                  • +
                                                                                                                                                                                  +
                                                                                                                                                                                • +
                                                                                                                                                                                • 3, Explanation of treeNode

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • Same as 'Dynamic Tree with Ajax'
                                                                                                                                                                                  • +
                                                                                                                                                                                  +
                                                                                                                                                                                • +
                                                                                                                                                                                • 4、Other explanation

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • Same as 'Dynamic Tree with Ajax'
                                                                                                                                                                                  • +
                                                                                                                                                                                  +
                                                                                                                                                                                • +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/click.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/click.html new file mode 100644 index 0000000000000000000000000000000000000000..5630fc9c601da3458196f14808c9afa8038cddfb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/click.html @@ -0,0 +1,107 @@ + + + + ZTREE DEMO - beforeClick / onClick + + + + + + + + + + +

                                                                                                                                                                                Control of Click Node

                                                                                                                                                                                +
                                                                                                                                                                                [ File Path: core/click.html ]
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                  • 1, 'beforeClick / onClick' callback function

                                                                                                                                                                                    +
                                                                                                                                                                                      +
                                                                                                                                                                                    • Use 'beforeClick / onClick' callback function can be achieved with the click on the various functions. This simple demo shows how to monitor the click event.
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Try pressing the Ctrl or Cmd key for multi-node selection and deselection.
                                                                                                                                                                                      + click log:
                                                                                                                                                                                      +

                                                                                                                                                                                        +
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                    • +
                                                                                                                                                                                    • 2, Explanation of setting

                                                                                                                                                                                      +
                                                                                                                                                                                        +
                                                                                                                                                                                      • You need to set attributes about setting.callback.beforeClick and setting.callback.onClick, see the API documentation for more related contents.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                    • +
                                                                                                                                                                                    • 3, Explanation of treeNode

                                                                                                                                                                                      +
                                                                                                                                                                                        +
                                                                                                                                                                                      • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                    • +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_font.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_font.html new file mode 100644 index 0000000000000000000000000000000000000000..da3795a7c433743b5bc040d3a734d85294158580 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_font.html @@ -0,0 +1,67 @@ + + + + ZTREE DEMO - Custom Font + + + + + + + + + + +

                                                                                                                                                                                    Custom Fonts

                                                                                                                                                                                    +
                                                                                                                                                                                    [ File Path: core/custom_font.html ]
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                        +
                                                                                                                                                                                      • 1, Explanation of setting

                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • 1. For display custom fonts, you need to set setting.view.fontCss attribute, see the API documentation for more related contents.
                                                                                                                                                                                        • +
                                                                                                                                                                                        • 2. If you need the node name support the HTML, please set the 'setting.view.nameIsHTML' attribute, see the API documentation for more related contents.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                      • +
                                                                                                                                                                                      • 2, Explanation of treeNode

                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Set the font does not require to special node data , but if used to differentiate between different types of nodes, the corresponding data can set custom attributes.
                                                                                                                                                                                        • +
                                                                                                                                                                                        • The css style of data stored in the nodes within this demo
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_icon.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_icon.html new file mode 100644 index 0000000000000000000000000000000000000000..a2b0965f045485f9f66e8107ea563a038fd90052 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_icon.html @@ -0,0 +1,74 @@ + + + + ZTREE DEMO - Custom Icon + + + + + + + + + + +

                                                                                                                                                                                      Custom Icon - icon

                                                                                                                                                                                      +
                                                                                                                                                                                      [ File Path: core/custom_icon.html ]
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • 1, Explanation of setting

                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                          • Custom icon does not require special configuration setting.
                                                                                                                                                                                          • +
                                                                                                                                                                                          +
                                                                                                                                                                                        • +
                                                                                                                                                                                        • 2, Explanation of treeNode

                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                          • Use node data’s icon / iconOpen / iconClose attribute show custom icon.
                                                                                                                                                                                          • +
                                                                                                                                                                                          • See the API documentation for more related contents.
                                                                                                                                                                                          • +
                                                                                                                                                                                          +
                                                                                                                                                                                        • +
                                                                                                                                                                                        • 3、Other explanation

                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                          • Because of the time limitation, demo uses png images, if you need transparent images in IE6 browser, make a gif image, or use a special 'css filter' on ie6 browser.
                                                                                                                                                                                          • +
                                                                                                                                                                                          +
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_iconSkin.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_iconSkin.html new file mode 100644 index 0000000000000000000000000000000000000000..d853a581b4f8ab7c1066281bdf7708e14644f8e7 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/custom_iconSkin.html @@ -0,0 +1,85 @@ + + + + ZTREE DEMO - Custom Icon Skin + + + + + + + + + + + +

                                                                                                                                                                                        Custom Icon - iconSkin

                                                                                                                                                                                        +
                                                                                                                                                                                        [ File Path: core/custom_iconSkin.html ]
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                          • 1, Explanation of setting

                                                                                                                                                                                            +
                                                                                                                                                                                              +
                                                                                                                                                                                            • Custom icon does not require special configuration setting.
                                                                                                                                                                                            • +
                                                                                                                                                                                            +
                                                                                                                                                                                          • +
                                                                                                                                                                                          • 2, Explanation of treeNode

                                                                                                                                                                                            +
                                                                                                                                                                                              +
                                                                                                                                                                                            • Use the node data iconSkin attributes and css show custom icon.
                                                                                                                                                                                            • +
                                                                                                                                                                                            • See the API documentation for more related contents.
                                                                                                                                                                                            • +
                                                                                                                                                                                            +
                                                                                                                                                                                          • +
                                                                                                                                                                                          • 3、Other explanation

                                                                                                                                                                                            +
                                                                                                                                                                                              +
                                                                                                                                                                                            • Because of the time limitation, demo uses png images, if you need transparent images in IE6 browser, make a gif image, or use a special 'css filter' on ie6 browser.
                                                                                                                                                                                            • +
                                                                                                                                                                                            +
                                                                                                                                                                                          • +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/expand.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/expand.html new file mode 100644 index 0000000000000000000000000000000000000000..489638acb0608df4413805b9704f0895434f4ba8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/expand.html @@ -0,0 +1,186 @@ + + + + ZTREE DEMO - beforeExpand / onExpand && beforeCollapse / onCollapse + + + + + + + + + + +

                                                                                                                                                                                          Control of Expand Node

                                                                                                                                                                                          +
                                                                                                                                                                                          [ File Path: core/expand.html ]
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                              +
                                                                                                                                                                                            • 1, 'beforeCollapse / onCollapse'
                                                                                                                                                                                                'beforeExpand / onExpand' callback function

                                                                                                                                                                                              +
                                                                                                                                                                                                +
                                                                                                                                                                                              • Use 'beforeCollapse / onCollapse' and 'beforeExpand / onExpand' callback function can control whether to allow expand or collapse the parent node + . This simple demo shows how to monitor the collapse and expand event.
                                                                                                                                                                                              • +
                                                                                                                                                                                              • Try:
                                                                                                                                                                                                +      Whether trigger the callback when execution expandNode() method.
                                                                                                                                                                                                +     Single Node --[ expand ] +     [ collapse ] +     [ toggle ]
                                                                                                                                                                                                +     Single Node (including child) --[ expand ] +     [ collapse ]
                                                                                                                                                                                                +     All Nodes --[ expand All ] +     [ collapse All ]

                                                                                                                                                                                                +
                                                                                                                                                                                              • How to use zTreeObj.updateNode method, please see the API documentation.
                                                                                                                                                                                                + collapse / expand log:
                                                                                                                                                                                                +

                                                                                                                                                                                                  +
                                                                                                                                                                                                • +
                                                                                                                                                                                                +
                                                                                                                                                                                              • +
                                                                                                                                                                                              • 2, Explanation of setting

                                                                                                                                                                                                +
                                                                                                                                                                                                  +
                                                                                                                                                                                                • Set attributes about 'setting.callback.beforeCollapse / onCollapse / beforeExpand / onExpand', please see the API documentation for more related contents.
                                                                                                                                                                                                • +
                                                                                                                                                                                                • If you need to adjust the expand / collapse animation effects, please see the API documentation about setting.view.expandSpeed.
                                                                                                                                                                                                • +
                                                                                                                                                                                                +
                                                                                                                                                                                              • +
                                                                                                                                                                                              • 3, Explanation of treeNode

                                                                                                                                                                                                +
                                                                                                                                                                                                  +
                                                                                                                                                                                                • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                                                • +
                                                                                                                                                                                                +
                                                                                                                                                                                              • +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/noicon.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/noicon.html new file mode 100644 index 0000000000000000000000000000000000000000..7a14b8036bb4280d7333ce729b5d1c74afeaa2a9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/noicon.html @@ -0,0 +1,93 @@ + + + + ZTREE DEMO - noIcon + + + + + + + + + + + +

                                                                                                                                                                                              Don't Show Icon

                                                                                                                                                                                              +
                                                                                                                                                                                              [ File Path: core/noicon.html ]
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                  +
                                                                                                                                                                                                • 1, Explanation of setting

                                                                                                                                                                                                  +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • This Demo using Function set to the parent node does not display the icon.
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • Whether to display the icon, you need to set setting.view.showIcon attribute, see the API documentation for more related contents.
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  +
                                                                                                                                                                                                • +
                                                                                                                                                                                                • 2, Explanation of treeNode

                                                                                                                                                                                                  +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • TreeNode data does not require special settings. If you need some node display icon, and some nodes are not displayed, you can add special attributes to the node data for identification.
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  +
                                                                                                                                                                                                • +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/noline.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/noline.html new file mode 100644 index 0000000000000000000000000000000000000000..4fd653ab86515a53297a69ceafe2437d0f478a48 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/noline.html @@ -0,0 +1,88 @@ + + + + ZTREE DEMO - noLine + + + + + + + + + + + +

                                                                                                                                                                                                Don't Show Line

                                                                                                                                                                                                +
                                                                                                                                                                                                [ File Path: core/noline.html ]
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • 1, Explanation of setting

                                                                                                                                                                                                    +
                                                                                                                                                                                                      +
                                                                                                                                                                                                    • Whether to display the line, you need to set setting.view.showLine attribute, see the API documentation for more related contents.
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • 2, Explanation of treeNode

                                                                                                                                                                                                    +
                                                                                                                                                                                                      +
                                                                                                                                                                                                    • TreeNode data does not require special settings
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/otherMouse.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/otherMouse.html new file mode 100644 index 0000000000000000000000000000000000000000..c36564d309601eb4e42573ae28aeb49324f52146 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/otherMouse.html @@ -0,0 +1,132 @@ + + + + ZTREE DEMO - Other Mouse Event + + + + + + + + + + +

                                                                                                                                                                                                  Other Mouse Events for zTree

                                                                                                                                                                                                  +
                                                                                                                                                                                                  [ File Path: core/otherMouse.html ]
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      +
                                                                                                                                                                                                    • 1, 'beforeMousedown / onMousedown / beforeMouseup / onMouseup / beforeRightClick / onRightClick' callback function

                                                                                                                                                                                                      +
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • zTree provide these types of mouse event callbacks, in order to facilitate the user to extend the functionality. And doesn't affect zTree normal function, This simple demo shows how to monitor the mousedown/mouseup/rightClick event.
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • Try clicking with the mouse on the zTree (left or right), by the way to see log.
                                                                                                                                                                                                        + mousedown event log:
                                                                                                                                                                                                        +

                                                                                                                                                                                                          + mouseup event log:
                                                                                                                                                                                                          +
                                                                                                                                                                                                            + rightClick event log:
                                                                                                                                                                                                            +

                                                                                                                                                                                                              +
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 2, Explanation of setting

                                                                                                                                                                                                            +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • Set attributes about 'setting.callback.beforeMousedown / onMousedown / beforeMouseup / onMouseup / beforeRightClick / onRightClick', please see the API documentation for more related contents.
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 3, Explanation of treeNode

                                                                                                                                                                                                            +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/searchNodes.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/searchNodes.html new file mode 100644 index 0000000000000000000000000000000000000000..812c3f184b3f3a427de7f95950d8428b83f13ea3 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/searchNodes.html @@ -0,0 +1,173 @@ + + + + ZTREE DEMO - getNodeByParam / getNodesByParam / getNodesByParamFuzzy + + + + + + + + + + +

                                                                                                                                                                                                          Search Nodes

                                                                                                                                                                                                          +
                                                                                                                                                                                                          [ File Path: core/searchNodes.html ]
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • 1, Explanation of getNodeByParam / getNodesByParam / getNodesByParamFuzzy

                                                                                                                                                                                                              +
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • How to use ’zTreeObj.getNodeByParam / getNodesByParam / getNodesByParamFuzzy / getNodeByTId‘ method, please see the API documentation.
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • Try to search:
                                                                                                                                                                                                                + attribute( value ):
                                                                                                                                                                                                                + attribute( key ): name (string)
                                                                                                                                                                                                                + level (number) ... root node's level is 0
                                                                                                                                                                                                                + id (number)
                                                                                                                                                                                                                + method: getNodeByParam
                                                                                                                                                                                                                + getNodesByParam
                                                                                                                                                                                                                + getNodesByParamFuzzy (only string)
                                                                                                                                                                                                                + getNodesByFilter (see source: function filter)
                                                                                                                                                                                                                +

                                                                                                                                                                                                                +
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • 2, Explanation of setting

                                                                                                                                                                                                              +
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • Do not need to set the setting.
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • 3, Explanation of treeNode

                                                                                                                                                                                                              +
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • Note: Please ensure that the incoming value type is the same as type of attribute.
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              +
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/simpleData.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/simpleData.html new file mode 100644 index 0000000000000000000000000000000000000000..038355d6a394f6e000dcd22382c833c0097b9fae --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/simpleData.html @@ -0,0 +1,100 @@ + + + + ZTREE DEMO - Simple Data + + + + + + + + + + +

                                                                                                                                                                                                            Simple JSON Data

                                                                                                                                                                                                            +
                                                                                                                                                                                                            [ File Path: core/simpleData.html ]
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • 1, Explanation of setting

                                                                                                                                                                                                                +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • Must set setting.data.simple attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • The setting.view in API documentation is associated with the display of the zTree.
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • To change the 'name', 'children', 'title' attribute, please refer to the API documentation about 'setting.data.key'.
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • 2, Explanation of treeNode

                                                                                                                                                                                                                +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • Id / pId that include parent-child relationship between nodes is needed if you use Simple model of the JSON data, and other attributes please refer to the instructions within setting.data.simple. +
                                                                                                                                                                                                                  For example:
                                                                                                                                                                                                                  +var nodes = [
                                                                                                                                                                                                                  +	{id:1, pId:0, name: "pNode 01"},
                                                                                                                                                                                                                  +	{id:11, pId:1, name: "child 01"},
                                                                                                                                                                                                                  +	{id:12, pId:1, name: "child 02"}
                                                                                                                                                                                                                  +];
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • To set nodes expanded by default, set treeNode.open attribute.
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • To get parent node which has no child node, set treeNode.isParent attribute.
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • Please refer to the API documentation "treeNode data details" to view other attributes description.
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • 3、Other explanation

                                                                                                                                                                                                                +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • The simple JSON data model has been used almost everywhere, which can be learned easily.
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                +
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/standardData.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/standardData.html new file mode 100644 index 0000000000000000000000000000000000000000..14d3cff2e2e8d11d5d9823d0ead63e147a7d1572 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/standardData.html @@ -0,0 +1,106 @@ + + + + ZTREE DEMO - Standard Data + + + + + + + + + + +

                                                                                                                                                                                                              Standard JSON Data

                                                                                                                                                                                                              +
                                                                                                                                                                                                              [ File Path: core/standardData.html ]
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • 1, Explanation of setting

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • No extrally setting needed for basic functions.
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • The setting.view in API documentation is associated with the display of the zTree.
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • To change the 'name', 'children', 'title' attribute, please refer to the API documentation about 'setting.data.key'.
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • 2, Explanation of treeNode

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • Need to use nested JSON data that include parent-child relationship between nodes +
                                                                                                                                                                                                                    For example:
                                                                                                                                                                                                                    +var nodes = [
                                                                                                                                                                                                                    +	{name: "pNode 01", children: [
                                                                                                                                                                                                                    +		{name: "child 01"},
                                                                                                                                                                                                                    +		{name: "child 02"}
                                                                                                                                                                                                                    +	]}
                                                                                                                                                                                                                    +];
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • To set nodes expanded by default, set treeNode.open attribute.
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • No child nodes of parent node, set treeNode.isParent attribute.
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • Please refer to the API documentation "treeNode data details" to view other attributes description.
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/update_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/update_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..5d5ed3395836d931b8003b04cb21db3f3a149ea5 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/update_fun.html @@ -0,0 +1,143 @@ + + + + ZTREE DEMO - updateNode + + + + + + + + + + + +

                                                                                                                                                                                                                Update Node - zTree methods

                                                                                                                                                                                                                +
                                                                                                                                                                                                                [ File Path: core/update_fun.html ]
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • 1, Explanation of updateNode

                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • 2, Explanation of setting

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                    • Do not need to set the setting.
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • You can modify the node style with setting.view.fontCss.
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • 3, Explanation of treeNode

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                    • In the API documentation has detail description about the 'zTreeObj.updateNode method'.
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • 4、Other explanation

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                    • This demo only made ​by the core js, so does not include the checkbox update.
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/url.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/url.html new file mode 100644 index 0000000000000000000000000000000000000000..722e1c5e8856c1870c23bf45d9379f46cf1c8bb9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/core/url.html @@ -0,0 +1,63 @@ + + + + ZTREE DEMO - url + + + + + + + + + + +

                                                                                                                                                                                                                  Hyperlinks Demo

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  [ File Path: core/url.html ]
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                    • 1, Explanation of setting

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • No extrally setting needed for basic functions.
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • If you need flexible control of hyperlinks to jump, please use the 'onClick' callback. See the API documentation for more related contents.
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • 2, Explanation of treeNode

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • 1. the 'url' attribute is used to save the hyperlink's path.
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • 2. the 'target' attribute is used to save the hyperlink's target.
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • 3. the 'click' attribute is used to save the hyperlink's 'onclick' attribute.
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Please refer to the API documentation "treeNode data details" to view other attributes description.
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox.html new file mode 100644 index 0000000000000000000000000000000000000000..a107a417e5e09dc400db3877ba3d813aa48840dd --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox.html @@ -0,0 +1,107 @@ + + + + ZTREE DEMO - checkbox + + + + + + + + + + + +

                                                                                                                                                                                                                    Checkbox Operation

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    [ File Path: excheck/checkbox.html ]
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                      • 1, Explanation of setting

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                        • Must set setting.check attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        • Linkage relationship between parent and child nodes:
                                                                                                                                                                                                                          + check: affect the parent + affect the child
                                                                                                                                                                                                                          + uncheck: affect the parent + affect the child
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        • 2, Explanation of treeNode

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                          • 1), If you need to initialize the node is checked, please set treeNode.checked attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • 2), If you need to initialize the node's checkbox is disabled, please set treeNode.chkDisabled attribute. See the API documentation for more related contents and 'chkDisabled Demo'.
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • 3), If you need to initialize the node don't show checkbox, please set treeNode.nocheck attribute. See the API documentation for more related contents and 'nocheck Demo'.
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • 4), If you need to change 'checked' to other attribute, please set setting.data.key.checked attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • 5), By the way, please see the API documentation for 'treeNode.checkedOld / getCheckStatus / check_Child_State / check_Focus'.
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_chkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_chkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..6f1fbc490cd1736fb5d99b54f0c001a717be34ce --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_chkDisabled.html @@ -0,0 +1,111 @@ + + + + ZTREE DEMO - Checkbox chkDisabled + + + + + + + + + + + +

                                                                                                                                                                                                                        Checkbox chkDisabled Demo

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        [ File Path: excheck/checkbox_chkDisabled.html ]
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                          • 1, Explanation of 'setChkDisabled' method

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • 'setChkDisabled' method can set the node's checkbox / radio to be disabled or abled. See the API documentation for more related contents.
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • Try:
                                                                                                                                                                                                                              + disabled: affect the parent + affect the child
                                                                                                                                                                                                                              + unDisabled: affect the parent + affect the child
                                                                                                                                                                                                                              +     [ be disabled ] +     [ be abled ]

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • 2, Explanation of setting

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • This Demo only shows how use the ‘chkDisabled’ attribute, detailed configuration information, please refer to 'Checkbox Operation'
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • 3, Explanation of treeNode

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • 1), If you need to initialize the node's checkbox is disabled, please set treeNode.chkDisabled attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • 2), By the way, please see the 'Checkbox Operation' Demo.
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_count.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_count.html new file mode 100644 index 0000000000000000000000000000000000000000..f8b07a29c3b1154cd886f0de95b6f6cd0214a389 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_count.html @@ -0,0 +1,127 @@ + + + + ZTREE DEMO - getChangeCheckedNodes / getCheckedNodes + + + + + + + + + + + +

                                                                                                                                                                                                                          Statistics Checkbox is Checked

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          [ File Path: excheck/checkbox_count.html ]
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • 1, Explanation of getChangeCheckedNodes / getCheckedNodes

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                              • How to use zTreeObj.getChangeCheckedNodes / getCheckedNodes method, please see the API documentation.
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • Check the checkbox, observe the number of changes:
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • Total check node:
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • Total uncheck node:
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • Modify the state of checkbox:
                                                                                                                                                                                                                                  + Compared with zTree initialization
                                                                                                                                                                                                                                  + Compared with the last check
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • Total change the checkbox state of node:
                                                                                                                                                                                                                                • +

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • 2, Explanation of setting

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                              • Same as 'Checkbox Operation'
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • 3, Explanation of treeNode

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                              • Same as 'Checkbox Operation'
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..d5ce22c1914cbbd261f2def61ab7b33427368370 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_fun.html @@ -0,0 +1,172 @@ + + + + ZTREE DEMO - beforeCheck / onCheck + + + + + + + + + + + +

                                                                                                                                                                                                                            Checkbox - zTree methods

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            [ File Path: excheck/checkbox_fun.html ]
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                              • 1, 'beforeCheck / onCheck' callback function

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • Use 'beforeCheck / onCheck' callback function can control whether to allow changes to the node check state. This simple demo shows how to monitor the check event.
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • By the way also demonstrates how to use the 'checkNode / checkAllNodes' method triggers 'beforeCheck / onCheck' callback, Try:
                                                                                                                                                                                                                                  +      setting.check.autoCheckTrigger: false
                                                                                                                                                                                                                                  +      Whether trigger the callback when execution checkNode() method.
                                                                                                                                                                                                                                  +     Node --[ check ] +     [ uncheck ] +     [ toggle ]
                                                                                                                                                                                                                                  +     Node (relationships) --[ check ] +     [ uncheck ] +     [ toggle ]
                                                                                                                                                                                                                                  +     All Nodes --[ check ] +     [ uncheck ]

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • How to use 'zTreeObj.checkNode / checkAllNodes' method, please see the API documentation.
                                                                                                                                                                                                                                  + beforeCheck / onCheck log:
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • 2, Explanation of setting

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                  • Same as 'Checkbox Operation'
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • 3, Explanation of treeNode

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                  • Same as 'Checkbox Operation'
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_halfCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_halfCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..80e66d9974dd3017817ff1c2cffc4d2f00c4d36d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_halfCheck.html @@ -0,0 +1,108 @@ + + + + ZTREE DEMO - Checkbox halfCheck + + + + + + + + + + + +

                                                                                                                                                                                                                                Checkbox halfCheck Demo

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                [ File Path: excheck/checkbox_halfCheck.html ]
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                  • 1, Explanation of Demo

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • This demo implements the check operation of the dynamic tree
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • 1). After loaded child nodes, the parent node's 'halfCheck' attribute will be invalid immediately.
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • 2). If you check the parent node, so will effect the child nodes's check status.
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • 3). If you check the parent node, it's child node's 'halfCheck' attribute will be invalid.
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • 2, Explanation of setting

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • Half-checked functional don't need to configure any parameter. But it is accessibility, can not used alone. So please configure the parameters which you need.
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • 3, Explanation of treeNode

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • 1), Please set treeNode.halfCheck attribute, before zTree initialize. See the API documentation for more related contents.
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • 2), By the way, please see the 'Checkbox Operation' Demo.
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_nocheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_nocheck.html new file mode 100644 index 0000000000000000000000000000000000000000..31183d15df42650ea5b3783a5237f1bd5e35718e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/checkbox_nocheck.html @@ -0,0 +1,95 @@ + + + + ZTREE DEMO - no checkbox + + + + + + + + + + + +

                                                                                                                                                                                                                                  Checkbox nocheck Demo

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  [ File Path: excheck/checkbox_nocheck.html ]
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • 1, Explanation of setting

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                      • This Demo only shows how use the ‘nocheck’ attribute, detailed configuration information, please refer to 'Checkbox Operation'
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • setting.check.nocheckInherit can set the child nodes to automatically inherit the parent node's 'nocheck' attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • Try:
                                                                                                                                                                                                                                        +     [ hide checkbox ] +     [ show checkbox ] +

                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • 2, Explanation of treeNode

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                      • 1), If you need to initialize the node don't show checkbox, please set treeNode.nocheck attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • 2), By the way, please see the 'Checkbox Operation' Demo.
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio.html new file mode 100644 index 0000000000000000000000000000000000000000..559211201b2aea83d6b2574d4f83c7edd15add3e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio.html @@ -0,0 +1,97 @@ + + + + ZTREE DEMO - radio + + + + + + + + + + + +

                                                                                                                                                                                                                                    Radio Operation

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    [ File Path: excheck/radio.html ]
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                      • 1, Explanation of setting

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • Must set setting.check attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • group range of radio:
                                                                                                                                                                                                                                          within the same level + within the whole tree
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • 2, Explanation of treeNode

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • 1), If you need to initialize the node is checked, please set treeNode.checked attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 2), If you need to initialize the node don't show radio, please set treeNode.nocheck attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 3), If you need to change 'checked' to other attribute, please set setting.data.key.checked attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 4), By the way, please see the API documentation for 'treeNode.checkedOld / getCheckStatus / check_Child_State / check_Focus'.
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_chkDisabled.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_chkDisabled.html new file mode 100644 index 0000000000000000000000000000000000000000..bb34875ebd8b4114162fdcb7360832364a4fbfbc --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_chkDisabled.html @@ -0,0 +1,101 @@ + + + + ZTREE DEMO - Radio chkDisabled + + + + + + + + + + + +

                                                                                                                                                                                                                                        Radio chkDisabled Demo

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        [ File Path: excheck/radio_chkDisabled.html ]
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • 1, Explanation of 'setChkDisabled' method

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            • 'setChkDisabled' method can set the node's checkbox / radio to be disabled or abled. See the API documentation for more related contents.
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • Try:
                                                                                                                                                                                                                                              +     [ be disabled ] +     [ be abled ]

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 2, Explanation of setting

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            • This Demo only shows how use the ‘nocheck’ attribute, detailed configuration information, please refer to 'Radio Operation'
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 3, Explanation of treeNode

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            • 1), If you need to initialize the node don't show radio, please set treeNode.chkDisabled attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • 2), By the way, please see the 'Radio Operation' Demo.
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..9201b73375272c52294cd7b07c46730593bd7570 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_fun.html @@ -0,0 +1,151 @@ + + + + ZTREE DEMO - beforeCheck / onCheck + + + + + + + + + + + +

                                                                                                                                                                                                                                          Radio - zTree methods

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          [ File Path: excheck/radio_fun.html ]
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            • 1, 'beforeCheck / onCheck' callback function

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • Use 'beforeCheck / onCheck' callback function can control whether to allow changes to the node check state. This simple demo shows how to monitor the check event.
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • By the way also demonstrates how to use the 'checkNode' method triggers 'beforeCheck / onCheck' callback, Try:
                                                                                                                                                                                                                                                +      Whether trigger the callback when execution checkNode() method.
                                                                                                                                                                                                                                                +     [ check ] +     [ uncheck ]

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • How to use 'zTreeObj.checkNode' method, please see the API documentation.
                                                                                                                                                                                                                                                + beforeCheck / onCheck log:
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • 2, Explanation of setting

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • Same as 'Radio Operation'
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • 3, Explanation of treeNode

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • Same as 'Radio Operation'
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_halfCheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_halfCheck.html new file mode 100644 index 0000000000000000000000000000000000000000..3285137727c0c21bd90c3baead827019fe629725 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_halfCheck.html @@ -0,0 +1,93 @@ + + + + ZTREE DEMO - Radio halfCheck + + + + + + + + + + + +

                                                                                                                                                                                                                                              Radio halfCheck Demo

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              [ File Path: excheck/radio_halfCheck.html ]
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • 1, Explanation of Demo

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                  • This demo implements the check operation of the dynamic tree
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • 1). After loaded child nodes, the parent node's 'halfCheck' attribute will be invalid immediately.
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • 2). If you check the parent node, will not effect the child nodes's check status.
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • 3). If you check the parent node, it's child node's 'halfCheck' attribute will still be valid.
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • 2, Explanation of setting

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                  • Half-checked functional don't need to configure any parameter. But it is accessibility, can not used alone. So please configure the parameters which you need.
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • 3, Explanation of treeNode

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                  • 1), Please set treeNode.halfCheck attribute, before zTree initialize. See the API documentation for more related contents.
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • 2), By the way, please see the 'Radio Operation' Demo.
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_nocheck.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_nocheck.html new file mode 100644 index 0000000000000000000000000000000000000000..e1f26b282feca434a1f8b7ab512607f986e58861 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/excheck/radio_nocheck.html @@ -0,0 +1,77 @@ + + + + ZTREE DEMO - no radio + + + + + + + + + + + +

                                                                                                                                                                                                                                                Radio nocheck Demo

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                [ File Path: excheck/radio_nocheck.html ]
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                  • 1, Explanation of setting

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • This Demo only shows how use the ‘nocheck’ attribute, detailed configuration information, please refer to 'Radio Operation'
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • setting.check.nocheckInherit can set the child nodes to automatically inherit the parent node's 'nocheck' attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • 2, Explanation of treeNode

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • 1), If you need to initialize the node don't show radio, please set treeNode.nocheck attribute. See the API documentation for more related contents.
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • 2), By the way, please see the 'Radio Operation' Demo.
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/async_edit.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/async_edit.html new file mode 100644 index 0000000000000000000000000000000000000000..bde0bca8c9b474f485b3c07447c04aaf6adbc473 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/async_edit.html @@ -0,0 +1,124 @@ + + + + ZTREE DEMO - async & edit + + + + + + + + + + + + +

                                                                                                                                                                                                                                                  Editing Dynamic Tree

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  [ File Path: exedit/async_edit.html ]
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • 1, Explanation of editing dynamic tree

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • 1) This Demo is based on the "Advanced Edit Nodes" to modify, and open to drag and drop functionality, can be compared with that demo.
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • 2) At the same time set the editing mode and dynamic mode can be achieved editing dynamic tree.
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • 3) zTree improved editing capabilities in dynamic mode, if the parent node hasn‘t loaded the child nodes, it will first load the child nodes before it add child node.
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • 2, Explanation of setting

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • 1) Use editing features, please refer to "Normal Drag Node Operation" & "Basic Edit Nodes" demo of the instructions.
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • 2) Use dynamic loading, please refer to "Dynamic Tree with Ajax" demo of the instructions.
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • 3, Explanation of treeNode

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • No special requirements on the node data, please refer to "Dynamic Tree with Ajax" & "Normal Drag Node Operation" & "Basic Edit Nodes" demo of the instructions
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag.html new file mode 100644 index 0000000000000000000000000000000000000000..0335aec0fb15dc6b40aa7a8a290628c5a578e485 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag.html @@ -0,0 +1,136 @@ + + + + ZTREE DEMO - drag & drop + + + + + + + + + + + +

                                                                                                                                                                                                                                                    Normal Drag Node Operation

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    [ File Path: exedit/drag.html ]
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • 1, Explanation of setting

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                        • This Demo only shows how to drag & drop nodes using the basic method and configure parameters.
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • 1) Must set 'setting.edit' attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • 2) If you want to use drag & drop callback, muse to set 'setting.callback.beforeDrag / onDrag / beforeDrop / onDrop' attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Basic settings:
                                                                                                                                                                                                                                                          + can Copy + can Move
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • Position settings:
                                                                                                                                                                                                                                                            + prev + inner + next
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • 2, Explanation of treeNode

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                            • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..02bf9ae347f35416e00ec2fa33698db0eddf6ef2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag_fun.html @@ -0,0 +1,180 @@ + + + + ZTREE DEMO - copyNode / moveNode + + + + + + + + + + + + +

                                                                                                                                                                                                                                                          Move / Copy - zTree methods

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          [ File Path: exedit/drag_fun.html ]
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                            • 1, Explanation of 'copyNode / moveNode' method

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • Use 'copyNode / moveNode' method can also be achieved copy / move nodes.
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • Try to copy or cut node:
                                                                                                                                                                                                                                                                +     [ copy ] +     [ cut ] +     [ paste ]

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • How to use 'zTreeObj.copyNode / moveNode' method, please see the API documentation.
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            • 2, Explanation of setting

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • Same as 'Normal Drag Node Operation'
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            • 3, Explanation of treeNode

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • Same as 'Normal Drag Node Operation'
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag_super.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag_super.html new file mode 100644 index 0000000000000000000000000000000000000000..2c2dd6d53ae09e594509f9affd6ed065c5d16889 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/drag_super.html @@ -0,0 +1,210 @@ + + + + ZTREE DEMO - beforeDrag / onDrag / beforeDrop / onDrop + + + + + + + + + + + +

                                                                                                                                                                                                                                                            Advanced Drag Node Operation

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            [ File Path: exedit/drag_super.html ]
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                              • 1, 'beforeDrag / onDrag'
                                                                                                                                                                                                                                                                  'beforeDrop / onDrop' callback function

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                • This Demo shows the configuration parameters to achieve a more flexible use of drag and drop rules, the operation can be compared with "Normal Drag Node Operation" example.
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • This Demo default allows copy & move.
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • This Demo set 'setting.edit.drag.prev / inner / next' as 'function', you can dynamically set according to the node, which can not use beforeDrop callback function, the effect of drag and drop will be better.
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • After be familiar with these configurations, I think you can design a more flexible and rational rules!
                                                                                                                                                                                                                                                                  +      拖拽节点时自动展开父节点是否触发 callback
                                                                                                                                                                                                                                                                  + drag / drop log:
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • 2, Explanation of setting

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • Same as 'Normal Drag Node Operation'
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • 3, Explanation of treeNode

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • Same as 'Normal Drag Node Operation'
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit.html new file mode 100644 index 0000000000000000000000000000000000000000..625711770622dfa246289de57caa04c5ce0a38ce --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit.html @@ -0,0 +1,115 @@ + + + + ZTREE DEMO - edit + + + + + + + + + + + +

                                                                                                                                                                                                                                                                Basic Edit Nodes

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                [ File Path: exedit/edit.html ]
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                  • 1, Explanation of setting

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • This Demo only shows how to edit nodes using the basic method and configure parameters.
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • 1) Must set 'setting.edit' attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • 2) If you want to use remove / rename callback, muse to set 'setting.callback.beforeRemove / onRemove / beforeRename / onRename' attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • 3) zTree do not provide buttons for add nodes, please use the custom control methods 'addHoverDom / removeHoverDom' to achieve added functionality, see the API documentation for more related contents. Another way, you can see the demo named 'Advanced Edit Nodes'.
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • Edit button setting:
                                                                                                                                                                                                                                                                      + show remove button + show edit button
                                                                                                                                                                                                                                                                      + title for remove:
                                                                                                                                                                                                                                                                      + title for rename: +

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • 2, Explanation of treeNode

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit_fun.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit_fun.html new file mode 100644 index 0000000000000000000000000000000000000000..4b8eabedbd227f3311e982fb106bdea79ede422d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit_fun.html @@ -0,0 +1,194 @@ + + + + ZTREE DEMO - addNodes / editName / removeNode / removeChildNodes + + + + + + + + + + + +

                                                                                                                                                                                                                                                                    Edit Nodes - zTree methods

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    [ File Path: exedit/edit_fun.html ]
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                      • 1, Explanation of 'addNodes / editName / removeNode / removeChildNodes' method

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • Use 'addNodes / editName / removeNode / removeChildNodes' method can also be achieved copy / move nodes.
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • Method 'cancelEditName' is effective, only when edit the node name. Please use it when necessary, this demo doesn't show how to use the method.
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • Use setting.data.keep.parent / leaf attribute, you can lock the parent node and leaf node.
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • Try to edit node:
                                                                                                                                                                                                                                                                          +      Whether trigger the callback when execution removeNode() method.
                                                                                                                                                                                                                                                                          +     [ add parent node ] +     [ add leaf node ] +     [ edit name ]
                                                                                                                                                                                                                                                                          +     [ remove node ] +     [ make child nodes to empty ]
                                                                                                                                                                                                                                                                          + remove log:
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • How to use 'zTreeObj.addNodes / cancelEditName / editName / removeNode / removeChildNodes' method, please see the API documentation.
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • 2, Explanation of setting

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • Same as 'Basic Edit Nodes'
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • Lock the parent / leaf node status, need to set setting.data.keep.parent / leaf attribute, see the API documentation for more related contents
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • 3, Explanation of treeNode

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • Same as 'Basic Edit Nodes'
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit_super.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit_super.html new file mode 100644 index 0000000000000000000000000000000000000000..61331090a20e4f782110f6502ab22ff1a3252b70 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/edit_super.html @@ -0,0 +1,192 @@ + + + + ZTREE DEMO - beforeEditName / beforeRemove / onRemove / beforeRename / onRename + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                        Advanced Edit Nodes

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        [ File Path: exedit/edit_super.html ]
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • 1, 'beforeDrag / onDrag'
                                                                                                                                                                                                                                                                              'beforeEditName'
                                                                                                                                                                                                                                                                              'beforeRemove / onRemove'
                                                                                                                                                                                                                                                                              'beforeRename / onRename' callback function

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • This demo shows the use of custom controls, the callback function to enhance the user experience, the operation can be compared with "Basic Edit Nodes" example.
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • This demo achieve the Add nodes button.
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • This demo achieve the confirmation when deleting node.
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • This demo use the 'showRenameBtn' to hide the rename button, when the treeNode's isLastNode = true
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • This demo use the 'showRemoveBtn' to hide the delete button, when the treeNode's isFirstNode = true
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • Can use 'beforeEditName' callback trigger custom editing.
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • After be familiar with these configurations, I think you can design a more flexible and rational rules!
                                                                                                                                                                                                                                                                              +      Whether select all text, when edit node's name.
                                                                                                                                                                                                                                                                              + remove / rename log:  RED is cancel edit (v3.5.13+)
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • 2, Explanation of setting

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • Same as 'Basic Edit Nodes'
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • 3, Explanation of treeNode

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • Same as 'Basic Edit Nodes'
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/multiTree.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/multiTree.html new file mode 100644 index 0000000000000000000000000000000000000000..52b4f43a55b590f0e474f1d0bdbc065eefe4acac --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exedit/multiTree.html @@ -0,0 +1,94 @@ + + + + ZTREE DEMO - multiTree + + + + + + + + + + + +

                                                                                                                                                                                                                                                                            Multiple Trees

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            [ File Path: exedit/multiTree.html ]
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • 1, Explanation of setting

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • zTree enables drag and drop nodes between multiple trees, only need to create two draggable tree can be. And you can use the callback function and zTree method achieve a more complex operating rules, here is only the basic demo.
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • On the 'setting' configuration information please refer to drag and drop, edit, etc. demo's instructions
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • 2, Explanation of treeNode

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                              • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/checkbox.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/checkbox.html new file mode 100644 index 0000000000000000000000000000000000000000..9b6fddffdee37e3aa7e135854000b18d8f32eb3c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/checkbox.html @@ -0,0 +1,161 @@ + + + + ZTREE DEMO - Hide With Checkbox Mode + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                Hide With Checkbox Mode

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                [ File Path: exhide/checkbox.html ]
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • 1, Explanation of setting

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • Use the freature which to hide nodes, you don't need to set any attributes.
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • 2, Explanation of treeNode

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • Before you init zTree, set treeNode.isHidden = true, and you can hide the node.
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • Hide or show the nodes:
                                                                                                                                                                                                                                                                                      + Try: [ Hide the nodes which be selected ]
                                                                                                                                                                                                                                                                                      +     [ Show all of the nodes which be hidden ]
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • Total nodes which 'isHidden' attribute is true:
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • Total hidden nodes:
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • Total check nodes: +   Total uncheck nodes:
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • After hide nodes, you can see the 'isFirstNode' and 'isLastNode' attributes on the nodes which still be shown.
                                                                                                                                                                                                                                                                                      • +

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • 3、Other explanation

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • Hide nodes will effect the 'isFirstNode' and 'isLastNode' attributes, but will not effect the 'getPreNode()' and 'getNextNode()' method.
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/common.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/common.html new file mode 100644 index 0000000000000000000000000000000000000000..557f2904e575e4968503dc14ec7471f0316994a6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/common.html @@ -0,0 +1,126 @@ + + + + ZTREE DEMO - Hide Ordinary Node + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                  Hide Ordinary Node

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  [ File Path: exhide/common.html ]
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • 1, Explanation of setting

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • Use this freature, you don't need to set any attributes.
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • 2, Explanation of treeNode

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • Before you init zTree, set treeNode.isHidden = true, and you can hide the node.
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • Hide or show the nodes:

                                                                                                                                                                                                                                                                                        + Try: [ Hide the nodes which be selected ]
                                                                                                                                                                                                                                                                                        +     [ Show all of the nodes which be hidden ]

                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • Total hidden nodes ('isHidden' is true):
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • After hide nodes, you can see the 'isFirstNode' and 'isLastNode' attributes on the nodes which still be shown.
                                                                                                                                                                                                                                                                                        • +

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • 3、Other explanation

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • Hide nodes will effect the 'isFirstNode' and 'isLastNode' attributes, but will not effect the 'getPreNode()' and 'getNextNode()' method.
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/radio.html new file mode 100644 index 0000000000000000000000000000000000000000..a0c72e3d5fd18f04591db9d09381635dc189e95c --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/exhide/radio.html @@ -0,0 +1,162 @@ + + + + ZTREE DEMO - Hide With Radio Mode + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                    Hide With Radio Mode

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    [ File Path: exhide/radio.html ]
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • 1, Explanation of setting

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • Use the freature which to hide nodes, you don't need to set any attributes.
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • 2, Explanation of treeNode

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • Before you init zTree, set treeNode.isHidden = true, and you can hide the node.
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • Hide or show the nodes:
                                                                                                                                                                                                                                                                                          + Try: [ Hide the nodes which be selected ]
                                                                                                                                                                                                                                                                                          +     [ Show all of the nodes which be hidden ]
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • Total nodes which 'isHidden' attribute is true:
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • Total hidden nodes:
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • Total check nodes: +   Total uncheck nodes:
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • After hide nodes, you can see the 'isFirstNode' and 'isLastNode' attributes on the nodes which still be shown.
                                                                                                                                                                                                                                                                                          • +

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • 3、Other explanation

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                        • Hide nodes will effect the 'isFirstNode' and 'isLastNode' attributes, but will not effect the 'getPreNode()' and 'getNextNode()' method.
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/index.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/index.html new file mode 100644 index 0000000000000000000000000000000000000000..b25a9ea101bedb7771108f9be2f481e31e652b03 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/index.html @@ -0,0 +1,170 @@ + + + + ZTREE DEMO + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        + + + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/asyncForAll.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/asyncForAll.html new file mode 100644 index 0000000000000000000000000000000000000000..1c2a9e2ed7cfff4ca37a7f368498f1227fbe365d --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/asyncForAll.html @@ -0,0 +1,192 @@ + + + + ZTREE DEMO - async for All + + + + + + + + + + +

                                                                                                                                                                                                                                                                                        Expand All Nodes with Async

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        [ File Path: super/asyncForAll.html ]
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • Explanation of implementation method

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • Using 'onAsyncSuccess' / 'onAsyncError' callback and 'reAsyncChildNodes' or 'expandNode' method, you will achieve all functionalities.
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Note: If there are large amount parent nodes, please use delay to avoid excessive asynchronous process.
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Recommendation: please use the debugging tools to view the ajax loading process with network.
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • Demonstrate operation +

                                                                                                                                                                                                                                                                                              + [ Expand All Nodes ]        + [ Load all nodes (don't expand) ]

                                                                                                                                                                                                                                                                                              + [ Reset zTree ]

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/awesome.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/awesome.html new file mode 100644 index 0000000000000000000000000000000000000000..453ca723378af1a73c60048897646f45cb3dd765 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/awesome.html @@ -0,0 +1,135 @@ + + + + ZTREE DEMO - Simple Data + + + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                          Awesome Style

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          [ File Path: super/awesome.html ]
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                            • 1, Explanation of fontawesome Style

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • You need to include the fontawesome stylesheet in your page (http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css)
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • <= This should show a car icon (if fontawesome is loaded properly)
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Include the css stylesheet: 'css/awesomeStyle'
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • Thanks to mikkelking for this Demo. For reference only.
                                                                                                                                                                                                                                                                                              • + +
                                                                                                                                                                                                                                                                                              • Mode:
                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/checkbox_radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/checkbox_radio.html new file mode 100644 index 0000000000000000000000000000000000000000..4bed0af388e06738cc623b7895419a5e663a6066 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/checkbox_radio.html @@ -0,0 +1,116 @@ + + + + ZTREE DEMO - checkbox & radio + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                            Checkbox / Radio Coexistence

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            [ File Path: super/checkbox_radio.html ]
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • Explanation of implementation method

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • zTree default checkbox and radio can not coexist, but can be used the custom DOM features to achieve this requirement, refer to the "Adding Custom DOM".
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • For checkbox / radio association rules of the parent nodes and child nodes, according to the needs to develop its own rules.
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/diydom.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/diydom.html new file mode 100644 index 0000000000000000000000000000000000000000..1841782c9a3c456a08ebb8622e4e2c8575536cf0 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/diydom.html @@ -0,0 +1,177 @@ + + + + ZTREE DEMO - addHoverDom / removeHoverDom / addDiyDom + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                              Adding Custom DOM

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              [ File Path: super/diydom.html ]
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • 1, Explanation of implementation method

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • Use 'setting.view.addHoverDom / removeHoverDom / addDiyDom' attributes can easily display custom DOM.
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • Adding custom DOM, is important to understand zTree node object naming rules to ensure the normal controls add DOM.
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • If you add the browser's default ’select / checkbox / radio‘ DOM, please adjust the css, to ensure correctly display zTree.
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • 2, Explanation of setting

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • Set 'setting.view.addHoverDom / removeHoverDom / addDiyDom' attributes, see the API documentation for more related contents.
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • 3, Explanation of treeNode

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • No special requirements on the node data, the user can add custom attributes.
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/dragWithOther.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/dragWithOther.html new file mode 100644 index 0000000000000000000000000000000000000000..762e6c897a7da4e639db15ef05d5bf18456aade2 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/dragWithOther.html @@ -0,0 +1,253 @@ + + + + ZTREE DEMO - drag with other DOM + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                Drag With Other DOMs

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                [ File Path: super/dragWithOther.html ]
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • Explanation of implementation method

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • zTree v3.2 modified the event object in onDrag/onDrop; v3.5.16 add the onDragMove callback, thus the nodes can be draged to other DOMs easily.
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • To drag other DOMS to zTree, you need to build the drag codes by yourself.
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • This is just a simple Demo. If you need more features, please build more complicated codes.
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • Please drag and drop the following content to the tree node

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    TreeGrassFlower
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    TigerBearLion
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + You can drag the nodes of level 2 to the above layer. +
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/fuzzySearch.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/fuzzySearch.html new file mode 100644 index 0000000000000000000000000000000000000000..14b3a623b59d37d08d549f64ba6c3509e51cc169 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/fuzzySearch.html @@ -0,0 +1,95 @@ + + + + ZTREE DEMO - fuzzySearch + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                  Fuzzy Search

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  [ File Path: fuzzySearch/fuzzySearch.html ]
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • +

                                                                                                                                                                                                                                                                                                      1. Explaination of fuzzySearch()

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • + @param the ztree id used to get the ztree object +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + @param searchField selector of your input for fuzzy search +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + @param isHighLight whether highlight the match words, default true +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + @param isExpand whether to expand the node, default false +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • + fuzzySearch ( zTreeId, searchField, isHighLight, isExpand ) +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • Try to search:
                                                                                                                                                                                                                                                                                                        + Keywords:
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • 2. js dependencies

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • ztree v3.5.19.1 +, getPath() in use
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • ztree.exhide extension, hideNode() in use
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menu.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menu.html new file mode 100644 index 0000000000000000000000000000000000000000..86d12cf7e544521544fc70bfac598c21c06dd2f9 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menu.html @@ -0,0 +1,152 @@ + + + + ZTREE DEMO - left_menu + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                    Left Menu

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    [ File Path: super/left_menu.html ]
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • Explanation of implementation method

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • The menu in the Demo's Web page is to use zTree to achieve, is to use css set interface, use the configuration 'setting' to achieve features, this demo achieve a simple example of the left menu, you can view the source code of Demo's Web Page for in-depth study.
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • 1. According to your needs to modify the css, for example: the menu style on this Demo and Demo's Web page not the same.
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • 2. Main configuration:
                                                                                                                                                                                                                                                                                                          +     setting.view.showIcon / showLine / selectedMulti / dblClickExpand
                                                                                                                                                                                                                                                                                                          +     setting.callback.onNodeCreated / beforeClick / onClick +
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • 3. If need to keep single path, please refer to the source code of "Keep Single Path" Demo.
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • 4. Other auxiliary rules, please write code based on your needs.
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.gif b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.gif new file mode 100644 index 0000000000000000000000000000000000000000..c252f0f831be3f4672142caf7cb148e14eeb466b Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.gif differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.html new file mode 100644 index 0000000000000000000000000000000000000000..0af50aff9dcbd8f73a23c01a9d210aedba1cbbd6 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.html @@ -0,0 +1,136 @@ + + + + ZTREE DEMO - left_menu for Outlook + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                      Left Menu Like OutLook Style

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      [ File Path: super/left_menuForOutLook.html ]
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • Explanation of implementation method

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                          • I make one left menu which resembles outlook.com, so share to everyone.
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • 1. Please note that the css code of the source of this page.
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • 2. Please note that the javascript code of the source of this page, especially the switch button is moved into the <a> tag when 'addDiyDom' callback be called
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • 3. Use the method of add zTree class name to implement the switch button be hidden or showing.
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • 4. Other auxiliary rules, please write code based on your needs.
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • 5. The current rule description:
                                                                                                                                                                                                                                                                                                            +   Click the root node can control the parent node be expanded or collapsed;
                                                                                                                                                                                                                                                                                                            +   The parent nodes without root only are only clicked the arrow icon can control be expanded or collapsed;br/> +
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + + diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.png b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.png new file mode 100644 index 0000000000000000000000000000000000000000..36e8acfa3b6cb44f8aa25a339c2fdeb799c108df Binary files /dev/null and b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/left_menuForOutLook.png differ diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/metro.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/metro.html new file mode 100644 index 0000000000000000000000000000000000000000..b89d8bf574a01337b07b5e7281bcbe7b1d054490 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/metro.html @@ -0,0 +1,109 @@ + + + + ZTREE DEMO - Simple Data + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                        Metro Style

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        [ File Path: super/metro.html ]
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                          • 1, Explanation of Style Files

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                            • Please use style and image files of 'css/metroStyle'
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • Thanked rqx110 for this Demo. For reference only.
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/oneclick.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/oneclick.html new file mode 100644 index 0000000000000000000000000000000000000000..983bcb720012cc3907ea26123b1fb43d5aeb8d37 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/oneclick.html @@ -0,0 +1,87 @@ + + + + ZTREE DEMO - one click + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                          Click to Expand Node

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          [ File Path: super/oneclick.html ]
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                            • Explanation of implementation method

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                              • zTree not provide a default click to expand node feature, but can use the onClick callback functions to easily implement this feature.
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • In order to avoid conflict with the double-clicking, I recommended to turn off double-clicking expand node function, please set setting.view.dblClickExpand = false
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • You can hide all the +/- switch, please see the page source, see the css.
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • If you do not show + / - switch, then please set 'setting.view.showLine = false' to hide line.
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/oneroot.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/oneroot.html new file mode 100644 index 0000000000000000000000000000000000000000..e73c141cbdc536844cee72861f555a99e2e9f4eb --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/oneroot.html @@ -0,0 +1,79 @@ + + + + ZTREE DEMO - one root + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                            Freeze the Root Node

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            [ File Path: demo/super/oneroot.html ]
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                              • Explanation of implementation method

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • For only one root, and do not show +/- switch needs need to modify the css, and set the setting.
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • zTree v3.x can be for a given level, set the style, check out the page source, see the css.
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Set setting.view.dblClickExpand to Function, you can turn off double-clicking for expand the root node.
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/rightClickMenu.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/rightClickMenu.html new file mode 100644 index 0000000000000000000000000000000000000000..95a1d88ced0a100117b807b5713941c8d9407eb1 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/rightClickMenu.html @@ -0,0 +1,171 @@ + + + + ZTREE DEMO - select menu + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                              Right-click Menu

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              [ File Path: super/rightClickMenu.html ]
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Explanation of implementation method

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                  • Use 'beforeRightClick / onRightClick' callback function achieve right-click menu.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • Demo's menu is ugly, you can use a custom menu fine style.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Add Node
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Delete Node
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Check Node
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Uncheck Node
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • Resume zTree
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu.html new file mode 100644 index 0000000000000000000000000000000000000000..04d9c5b48914ad80cbf7226934a3331ce11b58aa --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu.html @@ -0,0 +1,124 @@ + + + + ZTREE DEMO - select menu + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                                Drop-down Menu

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                [ File Path: super/select_menu.html ]
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                •   Press Ctrl-key or Cmd-key to select multiple cities
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                •   city: +  select
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Explanation of implementation method

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                  • Achieve this drop-down menu, it is relatively easy, you only need to control zTree Hide / Show, and location.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • Use zTree v3.x, you can select multiple nodes, so the multi-selection is also easy.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • Use the configuration parameters setting, fully meet the needs of most of the functionality.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu_checkbox.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu_checkbox.html new file mode 100644 index 0000000000000000000000000000000000000000..7e008d9bc02e6e80bbdfec82a5c549956cca8c4a --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu_checkbox.html @@ -0,0 +1,126 @@ + + + + ZTREE DEMO - checkbox select menu + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                                Drop-down Menu with checkbox

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                [ File Path: super/select_menu_checkbox.html ]
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                •   Check the checkbox to select or click the node
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                •   Test: +  select
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Explanation of implementation method

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                  • You can achieve multi-selected drop-down menu with checkbox.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • This Demo is mainly used for compare with other drop-down menu.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu_radio.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu_radio.html new file mode 100644 index 0000000000000000000000000000000000000000..429850e535cf1c85253cb52cb6d890817006f6aa --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/select_menu_radio.html @@ -0,0 +1,127 @@ + + + + ZTREE DEMO - radio select menu + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                                Drop-down Menu with radio

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                [ File Path: super/select_menu_radio.html ]
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                •   Check the radio to select or click the node
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                •   Test: +  select
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • Explanation of implementation method

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                  • You can achieve single-selected drop-down menu with radio.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • This Demo is mainly used for compare with other drop-down menu.
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/singlepath.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/singlepath.html new file mode 100644 index 0000000000000000000000000000000000000000..cf84e0b9549f77b4189fa926635c645714784d46 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/singlepath.html @@ -0,0 +1,166 @@ + + + + ZTREE DEMO - single path + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                                Keep Single Path

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                [ File Path: super/singlepath.html ]
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                  • Explanation of implementation method

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                    • This Demo is the transformation from "Click to Expand Node" demo​​, tree only expand single path.
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • Use 'setting.callback.beforeExpand / onExpand' callback function to achieve rules about expand
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/ztree.html b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/ztree.html new file mode 100644 index 0000000000000000000000000000000000000000..79172a4ba60a9d94c4820d9eed97c36c557d7cf8 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/en/super/ztree.html @@ -0,0 +1,127 @@ + + + + ZTREE DEMO - Simple Data + + + + + + + + + + + + + +

                                                                                                                                                                                                                                                                                                                  zTree Style

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  [ File Path: super/ztree.html ]
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                    • 1, Explanation of zTree Style

                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • Mode:
                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/demo/js/fuzzysearch.js b/pccenter/src/main/resources/static/src/zTree_v3/demo/js/fuzzysearch.js new file mode 100644 index 0000000000000000000000000000000000000000..bc2a6031092ae5b22127199bc5cddf321b359781 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/demo/js/fuzzysearch.js @@ -0,0 +1,129 @@ +/* + * email: bigablecat@hotmail.com + * Date: 2018-04-14 + */ + +/** + * @param zTreeId the ztree id used to get the ztree object + * @param searchField selector of your input for fuzzy search + * @param isHighLight whether highlight the match words, default true + * @param isExpand whether to expand the node, default false + * + * @returns + */ + function fuzzySearch(zTreeId, searchField, isHighLight, isExpand){ + var zTreeObj = $.fn.zTree.getZTreeObj(zTreeId);//get the ztree object by ztree id + if(!zTreeObj){ + alert("fail to get ztree object"); + } + var nameKey = zTreeObj.setting.data.key.name; //get the key of the node name + isHighLight = isHighLight===false?false:true;//default true, only use false to disable highlight + isExpand = isExpand?true:false; // not to expand in default + zTreeObj.setting.view.nameIsHTML = isHighLight; //allow use html in node name for highlight use + + var metaChar = '[\\[\\]\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)]'; //js meta characters + var rexMeta = new RegExp(metaChar, 'gi');//regular expression to match meta characters + + // keywords filter function + function ztreeFilter(zTreeObj,_keywords,callBackFunc) { + if(!_keywords){ + _keywords =''; //default blank for _keywords + } + + // function to find the matching node + function filterFunc(node) { + if(node && node.oldname && node.oldname.length>0){ + node[nameKey] = node.oldname; //recover oldname of the node if exist + } + zTreeObj.updateNode(node); //update node to for modifications take effect + if (_keywords.length == 0) { + //return true to show all nodes if the keyword is blank + zTreeObj.showNode(node); + zTreeObj.expandNode(node,isExpand); + return true; + } + //transform node name and keywords to lowercase + if (node[nameKey] && node[nameKey].toLowerCase().indexOf(_keywords.toLowerCase())!=-1) { + if(isHighLight){ //highlight process + //a new variable 'newKeywords' created to store the keywords information + //keep the parameter '_keywords' as initial and it will be used in next node + //process the meta characters in _keywords thus the RegExp can be correctly used in str.replace + var newKeywords = _keywords.replace(rexMeta,function(matchStr){ + //add escape character before meta characters + return '\\' + matchStr; + }); + node.oldname = node[nameKey]; //store the old name + var rexGlobal = new RegExp(newKeywords, 'gi');//'g' for global,'i' for ignore case + //use replace(RegExp,replacement) since replace(/substr/g,replacement) cannot be used here + node[nameKey] = node.oldname.replace(rexGlobal, function(originalText){ + //highlight the matching words in node name + var highLightText = + '' + + originalText + +''; + return highLightText; + }); + zTreeObj.updateNode(node); //update node for modifications take effect + } + zTreeObj.showNode(node);//show node with matching keywords + return true; //return true and show this node + } + + zTreeObj.hideNode(node); // hide node that not matched + return false; //return false for node not matched + } + + var nodesShow = zTreeObj.getNodesByFilter(filterFunc); //get all nodes that would be shown + processShowNodes(nodesShow, _keywords);//nodes should be reprocessed to show correctly + } + + /** + * reprocess of nodes before showing + */ + function processShowNodes(nodesShow,_keywords){ + if(nodesShow && nodesShow.length>0){ + //process the ancient nodes if _keywords is not blank + if(_keywords.length>0){ + $.each(nodesShow, function(n,obj){ + var pathOfOne = obj.getPath();//get all the ancient nodes including current node + if(pathOfOne && pathOfOne.length>0){ + //i < pathOfOne.length-1 process every node in path except self + for(var i=0;i IJSON[] | IJSON; + dataType?: dataType; + enable?: boolean; + otherParam?: string[] | IJSON; + type?: AjaxType; + headers?: object; + xhrFields?: object; + url: string; +} + + +type CallBackBeforeFn = (treeId: string, treeNode: object) => boolean; +type CallBackOnFn = (event: Event, treeId: string, treeNode: IJSON) => void; + +interface ICallback { + beforeAsync?: CallBackBeforeFn; + beforeCheck?: CallBackBeforeFn; + beforeClick?: (treeId: string, treeNode: object, clickFlag: number) => boolean; + beforeCollapse?: CallBackBeforeFn; + beforeDblClick?: CallBackBeforeFn; + beforeDrag?: (treeId: string, treeNode: IJSON[]) => boolean; + beforeDragOpen?: CallBackBeforeFn; + beforeDrop?: (treeId: string, treeNode: IJSON[], targetNode: object, moveType: string, isCopy: boolean) => boolean; + beforeEditName?: CallBackBeforeFn; + beforeExpand?: CallBackBeforeFn; + beforeMouseDown?: CallBackBeforeFn; + beforeMouseUp?: CallBackBeforeFn; + beforeRemove?: CallBackBeforeFn; + beforeRename?: (treeId: string, treeNode: object, newName: string, isCancel: boolean) => boolean; + beforeRightClick?: CallBackBeforeFn; + + onAsyncError?: (event: Event, treeId: string, treeNode: object, XMLHttpRequest: any, textStatus: string, errorThrown: string) => void; + onAsyncSuccess?: (event: Event, treeId: string, treeNode: object, msg: string | object) => void; + onCheck?: (event: Event, treeId: string, treeNode: object) => void; + onClick?: (event: Event, treeId: string, treeNode: object, clickFlag: number) => void; + onCollapse?: (event: Event, treeId: string, treeNode: object) => void; + onDblClick?: (event: Event, treeId: string, treeNode: object) => void; + onDrag?: (event: Event, treeId: string, treeNodes: IJSON[]) => void; + onDragMove?: (event: Event, treeId: string, treeNodes: IJSON[]) => void; + onDrop?: (event: Event, treeId: string, treeNodes: IJSON[], targetNode: object, moveType: string, isCopy: boolean) => void; + onExpand?: CallBackOnFn; + onMouseDown?: CallBackOnFn; + onMouseUp?: CallBackOnFn; + onNodeCreated?: CallBackOnFn; + onRemove?: CallBackOnFn; + onRename?: (event: Event, treeId: string, treeNode: IJSON, isCancel: boolean) => void; + onRightClick?: CallBackOnFn; +} + +interface ICheck { + autoCheckTrigger?: boolean; + chkboxType?: IJSON; + chkStyle?: string; + enable?: boolean; + nocheckInherit?: boolean; + chkDisabledInherit?: boolean; + radioType?: string; +} + +interface IData { + keep?: { + leaf?: boolean; + parent?: boolean; + }, + key?: { + checked?: string; + children?: string; + isParent?: string; + isHidden?: string; + name?: string; + title?: string; + url?: string; + }, + simpleData?: { + enable?: boolean; + idKey?: string; + pIdKey?: string; + rootPId?: any; + } +} + + +type removeFnType = (treeId: string, treeNode: object) => T; + +interface IEdit { + drag?: { + autoExpandTrigger?: boolean; + isCopy?: boolean; + isMove?: boolean; + prev?: boolean; + next?: boolean; + inner?: boolean; + borderMax?: number; + borderMin?: number; + minMoveSize?: number; + maxShowNodeNum?: number; + autoOpenTime?: number; + }, + editNameSelectAll?: boolean; + enable?: boolean; + removeTitle?: string | removeFnType; + renameTitle?: string | removeFnType; + showRemoveBtn?: boolean | removeFnType; + showRenameBtn?: boolean | removeFnType; +} + + +type dblClickExpandFn = (treeId: string, treeNode: object) => T; + +interface IView { + addDiyDom?: dblClickExpandFn; + addHoverDom?: dblClickExpandFn; + autoCancelSelected?: boolean; + dblClickExpand?: boolean | dblClickExpandFn; + expandSpeed?: string | number; + fontCss?: IJSON | dblClickExpandFn; + nameIsHTML?: boolean; + removeHoverDom?: dblClickExpandFn; + selectedMulti?: boolean; + showIcon?: boolean | dblClickExpandFn; + showLine?: boolean; + showTitle?: boolean | dblClickExpandFn; + txtSelectedEnable?: boolean; +} + +interface ISetting { + async?: IAsync; + callback?: ICallback; + check?: ICheck; + data?: IData; + edit?: IEdit; + view?: IView; +} + + +type filterFnType = (node: IJSON) => boolean; + +interface IzTreeObj { + setting: ISetting; + addNodes: (parentNode: object, index?: number, newNodes?: IJSON[] | IJSON, isSilentBoolean?: boolean) => IJSON[]; + cancelEditName: (newName?: string) => void; + cancelSelectedNode: (treeNode?: object) => void; + checkAllNodes: (checked: boolean) => void; + checkNode: (treeNode: IJSON, checked?: boolean, checkTypeFlag?: boolean, callbackFlag?: boolean) => void; + copyNode: (targetNode: object, treeNode: IJSON, moveType: string, isSilent: boolean) => IJSON; + destroy: () => void; + editName: (treeNode: IJSON) => void; + expandAll: (expandFlag: boolean) => boolean | null; + expandNode: (treeNode: IJSON, expandFlag?: boolean, sonSign?: boolean, focus?: boolean, callbackFlag?: boolean) => boolean | null; + getChangeCheckedNodes: () => IJSON[]; + getCheckedNodes: (checked?: boolean) => IJSON[]; + getNodeByParam: (key: string, value: any, parentNode?: object) => object; + getNodeByTId: (tId: string) => object; + getNodeIndex: (treeNode: IJSON) => number; + getNodes: () => IJSON[]; + getNodesByFilter: (filter: filterFnType, isSingle?: boolean, parentNode?: IJSON, invokeParam?: any) => object; + getNodesByParam: (key: string, value: any, parentNode?: object) => object; + getNodesByParamFuzzy: (key: string, value: string, parentNode?: object) => object; + getSelectedNodes: () => any; + hideNode: (treeNode: IJSON) => void; + hideNodes: (treeNodes: IJSON[]) => void; + moveNode: (targetNode: object, treeNode: IJSON, moveType: string, isSilent?: boolean) => IJSON; + reAsyncChildNodes: (parentNode: IJSON, reloadType: string, isSilent?: boolean, callback?: any) => void; + reAsyncChildNodesPromise: (parentNode: IJSON, reloadType: string, isSilent?: boolean) => any; // ps: return Promise object + refresh: () => void; + removeChildNodes: (parentNode: IJSON) => IJSON[]; + removeNode: (treeNode: IJSON, callbackFlag?: boolean) => void; + selectNode: (treeNode: IJSON, addFlag?: boolean, isSilent?: boolean) => void; + setChkDisabled: (treeNode: IJSON, disabled?: boolean, inheritParent?: boolean, inheritChildren?: boolean) => void; + setEditable: (editable: boolean) => void; + showNode: (treeNode: IJSON) => void; + showNodes: (treeNodes: IJSON[]) => void; + transformToArray: (treeNodes: IJSON[] | IJSON) => IJSON[]; + transformTozTreeNodes: (simpleNodes: IJSON[] | IJSON) => IJSON[]; + updateNode: (treeNode: IJSON, checkTypeFlag?: boolean) => void; +} + +interface IzTree { + init?: (dom: any, setting: ISetting, zNodes: IJSON[] | object) => IzTreeObj; + getZTreeObj?: (treeId: string) => IzTreeObj; + destroy?: (treeId: string) => void; + _z?: any; +} diff --git a/pccenter/src/main/resources/static/src/zTree_v3/js/jquery-1.4.4.min.js b/pccenter/src/main/resources/static/src/zTree_v3/js/jquery-1.4.4.min.js new file mode 100644 index 0000000000000000000000000000000000000000..8f3ca2e2daf435edb66e57a0b8681aeda957c865 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/js/jquery-1.4.4.min.js @@ -0,0 +1,167 @@ +/*! + * jQuery JavaScript Library v1.4.4 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Nov 11 19:04:53 2010 -0500 + */ +(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= +h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La, +"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this, +e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a, +"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ +a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, +C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, +s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, +j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, +toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== +-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; +if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", +b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& +!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& +l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H
                                                                                                                                                                                                                                                                                                                    a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"), +k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false, +scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent= +false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom= +1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="
                                                                                                                                                                                                                                                                                                                    ";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="
                                                                                                                                                                                                                                                                                                                    t
                                                                                                                                                                                                                                                                                                                    ";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display= +"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h= +c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando); +else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; +if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, +attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& +b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0}; +c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, +arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= +d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ +c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== +8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k=== +"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+ +d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= +B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== +0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); +(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3]; +break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr, +q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= +l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, +m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== +true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== +g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]- +0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== +i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]]; +if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m, +g);else if(typeof g.length==="number")for(var p=g.length;n";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g); +n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& +function(){var g=k,i=t.createElement("div");i.innerHTML="

                                                                                                                                                                                                                                                                                                                    ";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F|| +p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g= +t.createElement("div");g.innerHTML="
                                                                                                                                                                                                                                                                                                                    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition? +function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= +h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context): +c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, +2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a, +b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&& +e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1, +""],legend:[1,"
                                                                                                                                                                                                                                                                                                                    ","
                                                                                                                                                                                                                                                                                                                    "],thead:[1,"","
                                                                                                                                                                                                                                                                                                                    "],tr:[2,"","
                                                                                                                                                                                                                                                                                                                    "],td:[3,"","
                                                                                                                                                                                                                                                                                                                    "],col:[2,"","
                                                                                                                                                                                                                                                                                                                    "],area:[1,"",""],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div
                                                                                                                                                                                                                                                                                                                    ","
                                                                                                                                                                                                                                                                                                                    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null; +else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append", +prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| +b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length- +1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); +d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i, +jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true, +zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b), +h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b); +if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f= +d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left; +e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/)<[^<]*)*<\/script>/gi, +ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b=== +"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("
                                                                                                                                                                                                                                                                                                                    ").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& +!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, +getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", +script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| +!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= +false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; +A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", +b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& +c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| +c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]= +encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess", +[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"), +e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}}); +if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show", +3),a,b,d);else{d=0;for(var e=this.length;d=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, +d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* +Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)} +var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; +this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| +this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= +c.timers,b=0;b-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, +e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&& +c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); +c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+ +b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window); diff --git a/pccenter/src/main/resources/static/src/zTree_v3/js/jquery.ztree.all.js b/pccenter/src/main/resources/static/src/zTree_v3/js/jquery.ztree.all.js new file mode 100644 index 0000000000000000000000000000000000000000..8c278839348ce0e53496f35bdd9816134aba647e --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/js/jquery.ztree.all.js @@ -0,0 +1,3843 @@ +/* + * JQuery zTree core + * v3.5.42 + * http://treejs.cn/ + * + * Copyright (c) 2010 Hunter.z + * + * Licensed same as jquery - MIT License + * http://www.opensource.org/licenses/mit-license.php + * + * Date: 2020-01-19 + */ + +(function ($) { + var settings = {}, roots = {}, caches = {}, + //default consts of core + _consts = { + className: { + BUTTON: "button", + LEVEL: "level", + ICO_LOADING: "ico_loading", + SWITCH: "switch", + NAME: 'node_name' + }, + event: { + NODECREATED: "ztree_nodeCreated", + CLICK: "ztree_click", + EXPAND: "ztree_expand", + COLLAPSE: "ztree_collapse", + ASYNC_SUCCESS: "ztree_async_success", + ASYNC_ERROR: "ztree_async_error", + REMOVE: "ztree_remove", + SELECTED: "ztree_selected", + UNSELECTED: "ztree_unselected" + }, + id: { + A: "_a", + ICON: "_ico", + SPAN: "_span", + SWITCH: "_switch", + UL: "_ul" + }, + line: { + ROOT: "root", + ROOTS: "roots", + CENTER: "center", + BOTTOM: "bottom", + NOLINE: "noline", + LINE: "line" + }, + folder: { + OPEN: "open", + CLOSE: "close", + DOCU: "docu" + }, + node: { + CURSELECTED: "curSelectedNode" + } + }, + //default setting of core + _setting = { + treeId: "", + treeObj: null, + view: { + addDiyDom: null, + autoCancelSelected: true, + dblClickExpand: true, + expandSpeed: "fast", + fontCss: {}, + nameIsHTML: false, + selectedMulti: true, + showIcon: true, + showLine: true, + showTitle: true, + txtSelectedEnable: false + }, + data: { + key: { + isParent: "isParent", + children: "children", + name: "name", + title: "", + url: "url", + icon: "icon" + }, + simpleData: { + enable: false, + idKey: "id", + pIdKey: "pId", + rootPId: null + }, + keep: { + parent: false, + leaf: false + } + }, + async: { + enable: false, + contentType: "application/x-www-form-urlencoded", + type: "post", + dataType: "text", + headers: {}, + xhrFields: {}, + url: "", + autoParam: [], + otherParam: [], + dataFilter: null + }, + callback: { + beforeAsync: null, + beforeClick: null, + beforeDblClick: null, + beforeRightClick: null, + beforeMouseDown: null, + beforeMouseUp: null, + beforeExpand: null, + beforeCollapse: null, + beforeRemove: null, + + onAsyncError: null, + onAsyncSuccess: null, + onNodeCreated: null, + onClick: null, + onDblClick: null, + onRightClick: null, + onMouseDown: null, + onMouseUp: null, + onExpand: null, + onCollapse: null, + onRemove: null + } + }, + //default root of core + //zTree use root to save full data + _initRoot = function (setting) { + var r = data.getRoot(setting); + if (!r) { + r = {}; + data.setRoot(setting, r); + } + data.nodeChildren(setting, r, []); + r.expandTriggerFlag = false; + r.curSelectedList = []; + r.noSelection = true; + r.createdNodes = []; + r.zId = 0; + r._ver = (new Date()).getTime(); + }, + //default cache of core + _initCache = function (setting) { + var c = data.getCache(setting); + if (!c) { + c = {}; + data.setCache(setting, c); + } + c.nodes = []; + c.doms = []; + }, + //default bindEvent of core + _bindEvent = function (setting) { + var o = setting.treeObj, + c = consts.event; + o.bind(c.NODECREATED, function (event, treeId, node) { + tools.apply(setting.callback.onNodeCreated, [event, treeId, node]); + }); + + o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) { + tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]); + }); + + o.bind(c.EXPAND, function (event, treeId, node) { + tools.apply(setting.callback.onExpand, [event, treeId, node]); + }); + + o.bind(c.COLLAPSE, function (event, treeId, node) { + tools.apply(setting.callback.onCollapse, [event, treeId, node]); + }); + + o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) { + tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]); + }); + + o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) { + tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]); + }); + + o.bind(c.REMOVE, function (event, treeId, treeNode) { + tools.apply(setting.callback.onRemove, [event, treeId, treeNode]); + }); + + o.bind(c.SELECTED, function (event, treeId, node) { + tools.apply(setting.callback.onSelected, [treeId, node]); + }); + o.bind(c.UNSELECTED, function (event, treeId, node) { + tools.apply(setting.callback.onUnSelected, [treeId, node]); + }); + }, + _unbindEvent = function (setting) { + var o = setting.treeObj, + c = consts.event; + o.unbind(c.NODECREATED) + .unbind(c.CLICK) + .unbind(c.EXPAND) + .unbind(c.COLLAPSE) + .unbind(c.ASYNC_SUCCESS) + .unbind(c.ASYNC_ERROR) + .unbind(c.REMOVE) + .unbind(c.SELECTED) + .unbind(c.UNSELECTED); + }, + //default event proxy of core + _eventProxy = function (event) { + var target = event.target, + setting = data.getSetting(event.data.treeId), + tId = "", node = null, + nodeEventType = "", treeEventType = "", + nodeEventCallback = null, treeEventCallback = null, + tmp = null; + + if (tools.eqs(event.type, "mousedown")) { + treeEventType = "mousedown"; + } else if (tools.eqs(event.type, "mouseup")) { + treeEventType = "mouseup"; + } else if (tools.eqs(event.type, "contextmenu")) { + treeEventType = "contextmenu"; + } else if (tools.eqs(event.type, "click")) { + if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.SWITCH) !== null) { + tId = tools.getNodeMainDom(target).id; + nodeEventType = "switchNode"; + } else { + tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "clickNode"; + } + } + } else if (tools.eqs(event.type, "dblclick")) { + treeEventType = "dblclick"; + tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "switchNode"; + } + } + if (treeEventType.length > 0 && tId.length == 0) { + tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + } + } + // event to node + if (tId.length > 0) { + node = data.getNodeCache(setting, tId); + switch (nodeEventType) { + case "switchNode" : + var isParent = data.nodeIsParent(setting, node); + if (!isParent) { + nodeEventType = ""; + } else if (tools.eqs(event.type, "click") + || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { + nodeEventCallback = handler.onSwitchNode; + } else { + nodeEventType = ""; + } + break; + case "clickNode" : + nodeEventCallback = handler.onClickNode; + break; + } + } + // event to zTree + switch (treeEventType) { + case "mousedown" : + treeEventCallback = handler.onZTreeMousedown; + break; + case "mouseup" : + treeEventCallback = handler.onZTreeMouseup; + break; + case "dblclick" : + treeEventCallback = handler.onZTreeDblclick; + break; + case "contextmenu" : + treeEventCallback = handler.onZTreeContextmenu; + break; + } + var proxyResult = { + stop: false, + node: node, + nodeEventType: nodeEventType, + nodeEventCallback: nodeEventCallback, + treeEventType: treeEventType, + treeEventCallback: treeEventCallback + }; + return proxyResult + }, + //default init node of core + _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { + if (!n) return; + var r = data.getRoot(setting), + children = data.nodeChildren(setting, n); + n.level = level; + n.tId = setting.treeId + "_" + (++r.zId); + n.parentTId = parentNode ? parentNode.tId : null; + n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; + var isParent = data.nodeIsParent(setting, n); + if (tools.isArray(children)) { + data.nodeIsParent(setting, n, true); + n.zAsync = true; + } else { + isParent = data.nodeIsParent(setting, n, isParent); + n.open = (isParent && !setting.async.enable) ? n.open : false; + n.zAsync = !isParent; + } + n.isFirstNode = isFirstNode; + n.isLastNode = isLastNode; + n.getParentNode = function () { + return data.getNodeCache(setting, n.parentTId); + }; + n.getPreNode = function () { + return data.getPreNode(setting, n); + }; + n.getNextNode = function () { + return data.getNextNode(setting, n); + }; + n.getIndex = function () { + return data.getNodeIndex(setting, n); + }; + n.getPath = function () { + return data.getNodePath(setting, n); + }; + n.isAjaxing = false; + data.fixPIdKeyValue(setting, n); + }, + _init = { + bind: [_bindEvent], + unbind: [_unbindEvent], + caches: [_initCache], + nodes: [_initNode], + proxys: [_eventProxy], + roots: [_initRoot], + beforeA: [], + afterA: [], + innerBeforeA: [], + innerAfterA: [], + zTreeTools: [] + }, + //method of operate data + data = { + addNodeCache: function (setting, node) { + data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; + }, + getNodeCacheId: function (tId) { + return tId.substring(tId.lastIndexOf("_") + 1); + }, + addAfterA: function (afterA) { + _init.afterA.push(afterA); + }, + addBeforeA: function (beforeA) { + _init.beforeA.push(beforeA); + }, + addInnerAfterA: function (innerAfterA) { + _init.innerAfterA.push(innerAfterA); + }, + addInnerBeforeA: function (innerBeforeA) { + _init.innerBeforeA.push(innerBeforeA); + }, + addInitBind: function (bindEvent) { + _init.bind.push(bindEvent); + }, + addInitUnBind: function (unbindEvent) { + _init.unbind.push(unbindEvent); + }, + addInitCache: function (initCache) { + _init.caches.push(initCache); + }, + addInitNode: function (initNode) { + _init.nodes.push(initNode); + }, + addInitProxy: function (initProxy, isFirst) { + if (!!isFirst) { + _init.proxys.splice(0, 0, initProxy); + } else { + _init.proxys.push(initProxy); + } + }, + addInitRoot: function (initRoot) { + _init.roots.push(initRoot); + }, + addNodesData: function (setting, parentNode, index, nodes) { + var children = data.nodeChildren(setting, parentNode), params; + if (!children) { + children = data.nodeChildren(setting, parentNode, []); + index = -1; + } else if (index >= children.length) { + index = -1; + } + + if (children.length > 0 && index === 0) { + children[0].isFirstNode = false; + view.setNodeLineIcos(setting, children[0]); + } else if (children.length > 0 && index < 0) { + children[children.length - 1].isLastNode = false; + view.setNodeLineIcos(setting, children[children.length - 1]); + } + data.nodeIsParent(setting, parentNode, true); + + if (index < 0) { + data.nodeChildren(setting, parentNode, children.concat(nodes)); + } else { + params = [index, 0].concat(nodes); + children.splice.apply(children, params); + } + }, + addSelectedNode: function (setting, node) { + var root = data.getRoot(setting); + if (!data.isSelectedNode(setting, node)) { + root.curSelectedList.push(node); + } + }, + addCreatedNode: function (setting, node) { + if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { + var root = data.getRoot(setting); + root.createdNodes.push(node); + } + }, + addZTreeTools: function (zTreeTools) { + _init.zTreeTools.push(zTreeTools); + }, + exSetting: function (s) { + $.extend(true, _setting, s); + }, + fixPIdKeyValue: function (setting, node) { + if (setting.data.simpleData.enable) { + node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; + } + }, + getAfterA: function (setting, node, array) { + for (var i = 0, j = _init.afterA.length; i < j; i++) { + _init.afterA[i].apply(this, arguments); + } + }, + getBeforeA: function (setting, node, array) { + for (var i = 0, j = _init.beforeA.length; i < j; i++) { + _init.beforeA[i].apply(this, arguments); + } + }, + getInnerAfterA: function (setting, node, array) { + for (var i = 0, j = _init.innerAfterA.length; i < j; i++) { + _init.innerAfterA[i].apply(this, arguments); + } + }, + getInnerBeforeA: function (setting, node, array) { + for (var i = 0, j = _init.innerBeforeA.length; i < j; i++) { + _init.innerBeforeA[i].apply(this, arguments); + } + }, + getCache: function (setting) { + return caches[setting.treeId]; + }, + getNodeIndex: function (setting, node) { + if (!node) return null; + var p = node.parentTId ? node.getParentNode() : data.getRoot(setting), + children = data.nodeChildren(setting, p); + for (var i = 0, l = children.length - 1; i <= l; i++) { + if (children[i] === node) { + return i; + } + } + return -1; + }, + getNextNode: function (setting, node) { + if (!node) return null; + var p = node.parentTId ? node.getParentNode() : data.getRoot(setting), + children = data.nodeChildren(setting, p); + for (var i = 0, l = children.length - 1; i <= l; i++) { + if (children[i] === node) { + return (i == l ? null : children[i + 1]); + } + } + return null; + }, + getNodeByParam: function (setting, nodes, key, value) { + if (!nodes || !key) return null; + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + if (node[key] == value) { + return nodes[i]; + } + var children = data.nodeChildren(setting, node); + var tmp = data.getNodeByParam(setting, children, key, value); + if (tmp) return tmp; + } + return null; + }, + getNodeCache: function (setting, tId) { + if (!tId) return null; + var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)]; + return n ? n : null; + }, + getNodePath: function (setting, node) { + if (!node) return null; + + var path; + if (node.parentTId) { + path = node.getParentNode().getPath(); + } else { + path = []; + } + + if (path) { + path.push(node); + } + + return path; + }, + getNodes: function (setting) { + return data.nodeChildren(setting, data.getRoot(setting)); + }, + getNodesByParam: function (setting, nodes, key, value) { + if (!nodes || !key) return []; + var result = []; + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + if (node[key] == value) { + result.push(node); + } + var children = data.nodeChildren(setting, node); + result = result.concat(data.getNodesByParam(setting, children, key, value)); + } + return result; + }, + getNodesByParamFuzzy: function (setting, nodes, key, value) { + if (!nodes || !key) return []; + var result = []; + value = value.toLowerCase(); + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + if (typeof node[key] == "string" && nodes[i][key].toLowerCase().indexOf(value) > -1) { + result.push(node); + } + var children = data.nodeChildren(setting, node); + result = result.concat(data.getNodesByParamFuzzy(setting, children, key, value)); + } + return result; + }, + getNodesByFilter: function (setting, nodes, filter, isSingle, invokeParam) { + if (!nodes) return (isSingle ? null : []); + var result = isSingle ? null : []; + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + if (tools.apply(filter, [node, invokeParam], false)) { + if (isSingle) { + return node; + } + result.push(node); + } + var children = data.nodeChildren(setting, node); + var tmpResult = data.getNodesByFilter(setting, children, filter, isSingle, invokeParam); + if (isSingle && !!tmpResult) { + return tmpResult; + } + result = isSingle ? tmpResult : result.concat(tmpResult); + } + return result; + }, + getPreNode: function (setting, node) { + if (!node) return null; + var p = node.parentTId ? node.getParentNode() : data.getRoot(setting), + children = data.nodeChildren(setting, p); + for (var i = 0, l = children.length; i < l; i++) { + if (children[i] === node) { + return (i == 0 ? null : children[i - 1]); + } + } + return null; + }, + getRoot: function (setting) { + return setting ? roots[setting.treeId] : null; + }, + getRoots: function () { + return roots; + }, + getSetting: function (treeId) { + return settings[treeId]; + }, + getSettings: function () { + return settings; + }, + getZTreeTools: function (treeId) { + var r = this.getRoot(this.getSetting(treeId)); + return r ? r.treeTools : null; + }, + initCache: function (setting) { + for (var i = 0, j = _init.caches.length; i < j; i++) { + _init.caches[i].apply(this, arguments); + } + }, + initNode: function (setting, level, node, parentNode, preNode, nextNode) { + for (var i = 0, j = _init.nodes.length; i < j; i++) { + _init.nodes[i].apply(this, arguments); + } + }, + initRoot: function (setting) { + for (var i = 0, j = _init.roots.length; i < j; i++) { + _init.roots[i].apply(this, arguments); + } + }, + isSelectedNode: function (setting, node) { + var root = data.getRoot(setting); + for (var i = 0, j = root.curSelectedList.length; i < j; i++) { + if (node === root.curSelectedList[i]) return true; + } + return false; + }, + nodeChildren: function (setting, node, newChildren) { + if (!node) { + return null; + } + var key = setting.data.key.children; + if (typeof newChildren !== 'undefined') { + node[key] = newChildren; + } + return node[key]; + }, + nodeIsParent: function (setting, node, newIsParent) { + if (!node) { + return false; + } + var key = setting.data.key.isParent; + if (typeof newIsParent !== 'undefined') { + if (typeof newIsParent === "string") { + newIsParent = tools.eqs(newIsParent, "true"); + } + newIsParent = !!newIsParent; + node[key] = newIsParent; + } else if (typeof node[key] == "string"){ + node[key] = tools.eqs(node[key], "true"); + } else { + node[key] = !!node[key]; + } + return node[key]; + }, + nodeName: function (setting, node, newName) { + var key = setting.data.key.name; + if (typeof newName !== 'undefined') { + node[key] = newName; + } + return "" + node[key]; + }, + nodeTitle: function (setting, node) { + var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title; + return "" + node[t]; + }, + removeNodeCache: function (setting, node) { + var children = data.nodeChildren(setting, node); + if (children) { + for (var i = 0, l = children.length; i < l; i++) { + data.removeNodeCache(setting, children[i]); + } + } + data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null; + }, + removeSelectedNode: function (setting, node) { + var root = data.getRoot(setting); + for (var i = 0, j = root.curSelectedList.length; i < j; i++) { + if (node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) { + root.curSelectedList.splice(i, 1); + setting.treeObj.trigger(consts.event.UNSELECTED, [setting.treeId, node]); + i--; + j--; + } + } + }, + setCache: function (setting, cache) { + caches[setting.treeId] = cache; + }, + setRoot: function (setting, root) { + roots[setting.treeId] = root; + }, + setZTreeTools: function (setting, zTreeTools) { + for (var i = 0, j = _init.zTreeTools.length; i < j; i++) { + _init.zTreeTools[i].apply(this, arguments); + } + }, + transformToArrayFormat: function (setting, nodes) { + if (!nodes) return []; + var r = []; + if (tools.isArray(nodes)) { + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + _do(node); + } + } else { + _do(nodes); + } + return r; + + function _do(_node) { + r.push(_node); + var children = data.nodeChildren(setting, _node); + if (children) { + r = r.concat(data.transformToArrayFormat(setting, children)); + } + } + }, + transformTozTreeFormat: function (setting, sNodes) { + var i, l, + key = setting.data.simpleData.idKey, + parentKey = setting.data.simpleData.pIdKey; + if (!key || key == "" || !sNodes) return []; + + if (tools.isArray(sNodes)) { + var r = []; + var tmpMap = {}; + for (i = 0, l = sNodes.length; i < l; i++) { + tmpMap[sNodes[i][key]] = sNodes[i]; + } + for (i = 0, l = sNodes.length; i < l; i++) { + var p = tmpMap[sNodes[i][parentKey]]; + if (p && sNodes[i][key] != sNodes[i][parentKey]) { + var children = data.nodeChildren(setting, p); + if (!children) { + children = data.nodeChildren(setting, p, []); + } + children.push(sNodes[i]); + } else { + r.push(sNodes[i]); + } + } + return r; + } else { + return [sNodes]; + } + } + }, + //method of event proxy + event = { + bindEvent: function (setting) { + for (var i = 0, j = _init.bind.length; i < j; i++) { + _init.bind[i].apply(this, arguments); + } + }, + unbindEvent: function (setting) { + for (var i = 0, j = _init.unbind.length; i < j; i++) { + _init.unbind[i].apply(this, arguments); + } + }, + bindTree: function (setting) { + var eventParam = { + treeId: setting.treeId + }, + o = setting.treeObj; + if (!setting.view.txtSelectedEnable) { + // for can't select text + o.bind('selectstart', handler.onSelectStart).css({ + "-moz-user-select": "-moz-none" + }); + } + o.bind('click', eventParam, event.proxy); + o.bind('dblclick', eventParam, event.proxy); + o.bind('mouseover', eventParam, event.proxy); + o.bind('mouseout', eventParam, event.proxy); + o.bind('mousedown', eventParam, event.proxy); + o.bind('mouseup', eventParam, event.proxy); + o.bind('contextmenu', eventParam, event.proxy); + }, + unbindTree: function (setting) { + var o = setting.treeObj; + o.unbind('selectstart', handler.onSelectStart) + .unbind('click', event.proxy) + .unbind('dblclick', event.proxy) + .unbind('mouseover', event.proxy) + .unbind('mouseout', event.proxy) + .unbind('mousedown', event.proxy) + .unbind('mouseup', event.proxy) + .unbind('contextmenu', event.proxy); + }, + doProxy: function (e) { + var results = []; + for (var i = 0, j = _init.proxys.length; i < j; i++) { + var proxyResult = _init.proxys[i].apply(this, arguments); + results.push(proxyResult); + if (proxyResult.stop) { + break; + } + } + return results; + }, + proxy: function (e) { + var setting = data.getSetting(e.data.treeId); + if (!tools.uCanDo(setting, e)) return true; + var results = event.doProxy(e), + r = true, x = false; + for (var i = 0, l = results.length; i < l; i++) { + var proxyResult = results[i]; + if (proxyResult.nodeEventCallback) { + x = true; + r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; + } + if (proxyResult.treeEventCallback) { + x = true; + r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; + } + } + return r; + } + }, + //method of event handler + handler = { + onSwitchNode: function (event, node) { + var setting = data.getSetting(event.data.treeId); + if (node.open) { + if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true; + data.getRoot(setting).expandTriggerFlag = true; + view.switchNode(setting, node); + } else { + if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true; + data.getRoot(setting).expandTriggerFlag = true; + view.switchNode(setting, node); + } + return true; + }, + onClickNode: function (event, node) { + var setting = data.getSetting(event.data.treeId), + clickFlag = ((setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1; + if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true; + if (clickFlag === 0) { + view.cancelPreSelectedNode(setting, node); + } else { + view.selectNode(setting, node, clickFlag === 2); + } + setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]); + return true; + }, + onZTreeMousedown: function (event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) { + tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]); + } + return true; + }, + onZTreeMouseup: function (event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) { + tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]); + } + return true; + }, + onZTreeDblclick: function (event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) { + tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]); + } + return true; + }, + onZTreeContextmenu: function (event, node) { + var setting = data.getSetting(event.data.treeId); + if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) { + tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]); + } + return (typeof setting.callback.onRightClick) != "function"; + }, + onSelectStart: function (e) { + var n = e.originalEvent.srcElement.nodeName.toLowerCase(); + return (n === "input" || n === "textarea"); + } + }, + //method of tools for zTree + tools = { + apply: function (fun, param, defaultValue) { + if ((typeof fun) == "function") { + return fun.apply(zt, param ? param : []); + } + return defaultValue; + }, + canAsync: function (setting, node) { + var children = data.nodeChildren(setting, node); + var isParent = data.nodeIsParent(setting, node); + return (setting.async.enable && node && isParent && !(node.zAsync || (children && children.length > 0))); + }, + clone: function (obj) { + if (obj === null) return null; + var o = tools.isArray(obj) ? [] : {}; + for (var i in obj) { + o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? tools.clone(obj[i]) : obj[i]); + } + return o; + }, + eqs: function (str1, str2) { + return str1.toLowerCase() === str2.toLowerCase(); + }, + isArray: function (arr) { + return Object.prototype.toString.apply(arr) === "[object Array]"; + }, + isElement: function (o) { + return ( + typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2 + o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string" + ); + }, + $: function (node, exp, setting) { + if (!!exp && typeof exp != "string") { + setting = exp; + exp = ""; + } + if (typeof node == "string") { + return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); + } else { + return $("#" + node.tId + exp, setting ? setting.treeObj : null); + } + }, + getMDom: function (setting, curDom, targetExpr) { + if (!curDom) return null; + while (curDom && curDom.id !== setting.treeId) { + for (var i = 0, l = targetExpr.length; curDom.tagName && i < l; i++) { + if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) { + return curDom; + } + } + curDom = curDom.parentNode; + } + return null; + }, + getNodeMainDom: function (target) { + return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)); + }, + isChildOrSelf: function (dom, parentId) { + return ($(dom).closest("#" + parentId).length > 0); + }, + uCanDo: function (setting, e) { + return true; + } + }, + //method of operate ztree dom + view = { + addNodes: function (setting, parentNode, index, newNodes, isSilent) { + var isParent = data.nodeIsParent(setting, parentNode); + if (setting.data.keep.leaf && parentNode && !isParent) { + return; + } + if (!tools.isArray(newNodes)) { + newNodes = [newNodes]; + } + if (setting.data.simpleData.enable) { + newNodes = data.transformTozTreeFormat(setting, newNodes); + } + if (parentNode) { + var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), + target_icoObj = $$(parentNode, consts.id.ICON, setting), + target_ulObj = $$(parentNode, consts.id.UL, setting); + + if (!parentNode.open) { + view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); + view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); + parentNode.open = false; + target_ulObj.css({ + "display": "none" + }); + } + + data.addNodesData(setting, parentNode, index, newNodes); + view.createNodes(setting, parentNode.level + 1, newNodes, parentNode, index); + if (!isSilent) { + view.expandCollapseParentNode(setting, parentNode, true); + } + } else { + data.addNodesData(setting, data.getRoot(setting), index, newNodes); + view.createNodes(setting, 0, newNodes, null, index); + } + }, + appendNodes: function (setting, level, nodes, parentNode, index, initFlag, openFlag) { + if (!nodes) return []; + var html = []; + + var tmpPNode = (parentNode) ? parentNode : data.getRoot(setting), + tmpPChild = data.nodeChildren(setting, tmpPNode), + isFirstNode, isLastNode; + + if (!tmpPChild || index >= tmpPChild.length - nodes.length) { + index = -1; + } + + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + if (initFlag) { + isFirstNode = ((index === 0 || tmpPChild.length == nodes.length) && (i == 0)); + isLastNode = (index < 0 && i == (nodes.length - 1)); + data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); + data.addNodeCache(setting, node); + } + var isParent = data.nodeIsParent(setting, node); + + var childHtml = []; + var children = data.nodeChildren(setting, node); + if (children && children.length > 0) { + //make child html first, because checkType + childHtml = view.appendNodes(setting, level + 1, children, node, -1, initFlag, openFlag && node.open); + } + if (openFlag) { + view.makeDOMNodeMainBefore(html, setting, node); + view.makeDOMNodeLine(html, setting, node); + data.getBeforeA(setting, node, html); + view.makeDOMNodeNameBefore(html, setting, node); + data.getInnerBeforeA(setting, node, html); + view.makeDOMNodeIcon(html, setting, node); + data.getInnerAfterA(setting, node, html); + view.makeDOMNodeNameAfter(html, setting, node); + data.getAfterA(setting, node, html); + if (isParent && node.open) { + view.makeUlHtml(setting, node, html, childHtml.join('')); + } + view.makeDOMNodeMainAfter(html, setting, node); + data.addCreatedNode(setting, node); + } + } + return html; + }, + appendParentULDom: function (setting, node) { + var html = [], + nObj = $$(node, setting); + if (!nObj.get(0) && !!node.parentTId) { + view.appendParentULDom(setting, node.getParentNode()); + nObj = $$(node, setting); + } + var ulObj = $$(node, consts.id.UL, setting); + if (ulObj.get(0)) { + ulObj.remove(); + } + var children = data.nodeChildren(setting, node), + childHtml = view.appendNodes(setting, node.level + 1, children, node, -1, false, true); + view.makeUlHtml(setting, node, html, childHtml.join('')); + nObj.append(html.join('')); + }, + asyncNode: function (setting, node, isSilent, callback) { + var i, l; + var isParent = data.nodeIsParent(setting, node); + if (node && !isParent) { + tools.apply(callback); + return false; + } else if (node && node.isAjaxing) { + return false; + } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { + tools.apply(callback); + return false; + } + if (node) { + node.isAjaxing = true; + var icoObj = $$(node, consts.id.ICON, setting); + icoObj.attr({"style": "", "class": consts.className.BUTTON + " " + consts.className.ICO_LOADING}); + } + + var tmpParam = {}; + var autoParam = tools.apply(setting.async.autoParam, [setting.treeId, node], setting.async.autoParam); + for (i = 0, l = autoParam.length; node && i < l; i++) { + var pKey = autoParam[i].split("="), spKey = pKey; + if (pKey.length > 1) { + spKey = pKey[1]; + pKey = pKey[0]; + } + tmpParam[spKey] = node[pKey]; + } + var otherParam = tools.apply(setting.async.otherParam, [setting.treeId, node], setting.async.otherParam); + if (tools.isArray(otherParam)) { + for (i = 0, l = otherParam.length; i < l; i += 2) { + tmpParam[otherParam[i]] = otherParam[i + 1]; + } + } else { + for (var p in otherParam) { + tmpParam[p] = otherParam[p]; + } + } + + var _tmpV = data.getRoot(setting)._ver; + $.ajax({ + contentType: setting.async.contentType, + cache: false, + type: setting.async.type, + url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), + data: setting.async.contentType.indexOf('application/json') > -1 ? JSON.stringify(tmpParam) : tmpParam, + dataType: setting.async.dataType, + headers: setting.async.headers, + xhrFields: setting.async.xhrFields, + success: function (msg) { + if (_tmpV != data.getRoot(setting)._ver) { + return; + } + var newNodes = []; + try { + if (!msg || msg.length == 0) { + newNodes = []; + } else if (typeof msg == "string") { + newNodes = eval("(" + msg + ")"); + } else { + newNodes = msg; + } + } catch (err) { + newNodes = msg; + } + + if (node) { + node.isAjaxing = null; + node.zAsync = true; + } + view.setNodeLineIcos(setting, node); + if (newNodes && newNodes !== "") { + newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); + view.addNodes(setting, node, -1, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); + } else { + view.addNodes(setting, node, -1, [], !!isSilent); + } + setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); + tools.apply(callback); + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + if (_tmpV != data.getRoot(setting)._ver) { + return; + } + if (node) node.isAjaxing = null; + view.setNodeLineIcos(setting, node); + setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); + } + }); + return true; + }, + cancelPreSelectedNode: function (setting, node, excludeNode) { + var list = data.getRoot(setting).curSelectedList, + i, n; + for (i = list.length - 1; i >= 0; i--) { + n = list[i]; + if (node === n || (!node && (!excludeNode || excludeNode !== n))) { + $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); + if (node) { + data.removeSelectedNode(setting, node); + break; + } else { + list.splice(i, 1); + setting.treeObj.trigger(consts.event.UNSELECTED, [setting.treeId, n]); + } + } + } + }, + createNodeCallback: function (setting) { + if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { + var root = data.getRoot(setting); + while (root.createdNodes.length > 0) { + var node = root.createdNodes.shift(); + tools.apply(setting.view.addDiyDom, [setting.treeId, node]); + if (!!setting.callback.onNodeCreated) { + setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); + } + } + } + }, + createNodes: function (setting, level, nodes, parentNode, index) { + if (!nodes || nodes.length == 0) return; + var root = data.getRoot(setting), + openFlag = !parentNode || parentNode.open || !!$$(data.nodeChildren(setting, parentNode)[0], setting).get(0); + root.createdNodes = []; + var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, index, true, openFlag), + parentObj, nextObj; + + if (!parentNode) { + parentObj = setting.treeObj; + //setting.treeObj.append(zTreeHtml.join('')); + } else { + var ulObj = $$(parentNode, consts.id.UL, setting); + if (ulObj.get(0)) { + parentObj = ulObj; + //ulObj.append(zTreeHtml.join('')); + } + } + if (parentObj) { + if (index >= 0) { + nextObj = parentObj.children()[index]; + } + if (index >= 0 && nextObj) { + $(nextObj).before(zTreeHtml.join('')); + } else { + parentObj.append(zTreeHtml.join('')); + } + } + + view.createNodeCallback(setting); + }, + destroy: function (setting) { + if (!setting) return; + data.initCache(setting); + data.initRoot(setting); + event.unbindTree(setting); + event.unbindEvent(setting); + setting.treeObj.empty(); + delete settings[setting.treeId]; + }, + expandCollapseNode: function (setting, node, expandFlag, animateFlag, callback) { + var root = data.getRoot(setting); + var tmpCb, _callback; + if (!node) { + tools.apply(callback, []); + return; + } + var children = data.nodeChildren(setting, node); + var isParent = data.nodeIsParent(setting, node); + if (root.expandTriggerFlag) { + _callback = callback; + tmpCb = function () { + if (_callback) _callback(); + if (node.open) { + setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); + } else { + setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); + } + }; + callback = tmpCb; + root.expandTriggerFlag = false; + } + if (!node.open && isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (children && children.length > 0 && !$$(children[0], setting).get(0)))) { + view.appendParentULDom(setting, node); + view.createNodeCallback(setting); + } + if (node.open == expandFlag) { + tools.apply(callback, []); + return; + } + var ulObj = $$(node, consts.id.UL, setting), + switchObj = $$(node, consts.id.SWITCH, setting), + icoObj = $$(node, consts.id.ICON, setting); + + if (isParent) { + node.open = !node.open; + if (node.iconOpen && node.iconClose) { + icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); + } + + if (node.open) { + view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); + view.replaceIcoClass(node, icoObj, consts.folder.OPEN); + if (animateFlag == false || setting.view.expandSpeed == "") { + ulObj.show(); + tools.apply(callback, []); + } else { + if (children && children.length > 0) { + ulObj.slideDown(setting.view.expandSpeed, callback); + } else { + ulObj.show(); + tools.apply(callback, []); + } + } + } else { + view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); + view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); + if (animateFlag == false || setting.view.expandSpeed == "" || !(children && children.length > 0)) { + ulObj.hide(); + tools.apply(callback, []); + } else { + ulObj.slideUp(setting.view.expandSpeed, callback); + } + } + } else { + tools.apply(callback, []); + } + }, + expandCollapseParentNode: function (setting, node, expandFlag, animateFlag, callback) { + if (!node) return; + if (!node.parentTId) { + view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); + return; + } else { + view.expandCollapseNode(setting, node, expandFlag, animateFlag); + } + if (node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); + } + }, + expandCollapseSonNode: function (setting, node, expandFlag, animateFlag, callback) { + var root = data.getRoot(setting), + treeNodes = (node) ? data.nodeChildren(setting, node) : data.nodeChildren(setting, root), + selfAnimateSign = (node) ? false : animateFlag, + expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; + data.getRoot(setting).expandTriggerFlag = false; + if (treeNodes) { + for (var i = 0, l = treeNodes.length; i < l; i++) { + if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); + } + } + data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; + view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); + }, + isSelectedNode: function (setting, node) { + if (!node) { + return false; + } + var list = data.getRoot(setting).curSelectedList, + i; + for (i = list.length - 1; i >= 0; i--) { + if (node === list[i]) { + return true; + } + } + return false; + }, + makeDOMNodeIcon: function (html, setting, node) { + var nameStr = data.nodeName(setting, node), + name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g, '&').replace(//g, '>'); + html.push("", name, ""); + }, + makeDOMNodeLine: function (html, setting, node) { + html.push(""); + }, + makeDOMNodeMainAfter: function (html, setting, node) { + html.push(""); + }, + makeDOMNodeMainBefore: function (html, setting, node) { + html.push("
                                                                                                                                                                                                                                                                                                                  • "); + }, + makeDOMNodeNameAfter: function (html, setting, node) { + html.push(""); + }, + makeDOMNodeNameBefore: function (html, setting, node) { + var title = data.nodeTitle(setting, node), + url = view.makeNodeUrl(setting, node), + fontcss = view.makeNodeFontCss(setting, node), + fontStyle = []; + for (var f in fontcss) { + fontStyle.push(f, ":", fontcss[f], ";"); + } + html.push(" 0) ? "href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(''), + "'"); + if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) { + html.push("title='", title.replace(/'/g, "'").replace(//g, '>'), "'"); + } + html.push(">"); + }, + makeNodeFontCss: function (setting, node) { + var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); + return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; + }, + makeNodeIcoClass: function (setting, node) { + var icoCss = ["ico"]; + if (!node.isAjaxing) { + var isParent = data.nodeIsParent(setting, node); + icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; + if (isParent) { + icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); + } else { + icoCss.push(consts.folder.DOCU); + } + } + return consts.className.BUTTON + " " + icoCss.join('_'); + }, + makeNodeIcoStyle: function (setting, node) { + var icoStyle = []; + if (!node.isAjaxing) { + var isParent = data.nodeIsParent(setting, node); + var icon = (isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node[setting.data.key.icon]; + if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); + if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { + icoStyle.push("display:none;"); + } + } + return icoStyle.join(''); + }, + makeNodeLineClass: function (setting, node) { + var lineClass = []; + if (setting.view.showLine) { + if (node.level == 0 && node.isFirstNode && node.isLastNode) { + lineClass.push(consts.line.ROOT); + } else if (node.level == 0 && node.isFirstNode) { + lineClass.push(consts.line.ROOTS); + } else if (node.isLastNode) { + lineClass.push(consts.line.BOTTOM); + } else { + lineClass.push(consts.line.CENTER); + } + } else { + lineClass.push(consts.line.NOLINE); + } + if (data.nodeIsParent(setting, node)) { + lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); + } else { + lineClass.push(consts.folder.DOCU); + } + return view.makeNodeLineClassEx(node) + lineClass.join('_'); + }, + makeNodeLineClassEx: function (node) { + return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; + }, + makeNodeTarget: function (node) { + return (node.target || "_blank"); + }, + makeNodeUrl: function (setting, node) { + var urlKey = setting.data.key.url; + return node[urlKey] ? node[urlKey] : null; + }, + makeUlHtml: function (setting, node, html, content) { + html.push("
                                                                                                                                                                                                                                                                                                                      "); + html.push(content); + html.push("
                                                                                                                                                                                                                                                                                                                    "); + }, + makeUlLineClass: function (setting, node) { + return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); + }, + removeChildNodes: function (setting, node) { + if (!node) return; + var nodes = data.nodeChildren(setting, node); + if (!nodes) return; + + for (var i = 0, l = nodes.length; i < l; i++) { + data.removeNodeCache(setting, nodes[i]); + } + data.removeSelectedNode(setting); + delete node[setting.data.key.children]; + + if (!setting.data.keep.parent) { + data.nodeIsParent(setting, node, false); + node.open = false; + var tmp_switchObj = $$(node, consts.id.SWITCH, setting), + tmp_icoObj = $$(node, consts.id.ICON, setting); + view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); + view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); + $$(node, consts.id.UL, setting).remove(); + } else { + $$(node, consts.id.UL, setting).empty(); + } + }, + scrollIntoView: function (setting, dom) { + if (!dom) { + return; + } + // support IE 7 / 8 + if (typeof Element === 'undefined' || typeof HTMLElement === 'undefined') { + var contRect = setting.treeObj.get(0).getBoundingClientRect(), + findMeRect = dom.getBoundingClientRect(); + if (findMeRect.top < contRect.top || findMeRect.bottom > contRect.bottom + || findMeRect.right > contRect.right || findMeRect.left < contRect.left) { + dom.scrollIntoView(); + } + return; + } + // CC-BY jocki84@googlemail.com, https://gist.github.com/jocki84/6ffafd003387179a988e + if (!Element.prototype.scrollIntoViewIfNeeded) { + Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { + "use strict"; + + function makeRange(start, length) { + return {"start": start, "length": length, "end": start + length}; + } + + function coverRange(inner, outer) { + if ( + false === centerIfNeeded || + (outer.start < inner.end && inner.start < outer.end) + ) { + return Math.max( + inner.end - outer.length, + Math.min(outer.start, inner.start) + ); + } + return (inner.start + inner.end - outer.length) / 2; + } + + function makePoint(x, y) { + return { + "x": x, + "y": y, + "translate": function translate(dX, dY) { + return makePoint(x + dX, y + dY); + } + }; + } + + function absolute(elem, pt) { + while (elem) { + pt = pt.translate(elem.offsetLeft, elem.offsetTop); + elem = elem.offsetParent; + } + return pt; + } + + var target = absolute(this, makePoint(0, 0)), + extent = makePoint(this.offsetWidth, this.offsetHeight), + elem = this.parentNode, + origin; + + while (elem instanceof HTMLElement) { + // Apply desired scroll amount. + origin = absolute(elem, makePoint(elem.clientLeft, elem.clientTop)); + elem.scrollLeft = coverRange( + makeRange(target.x - origin.x, extent.x), + makeRange(elem.scrollLeft, elem.clientWidth) + ); + elem.scrollTop = coverRange( + makeRange(target.y - origin.y, extent.y), + makeRange(elem.scrollTop, elem.clientHeight) + ); + + // Determine actual scroll amount by reading back scroll properties. + target = target.translate(-elem.scrollLeft, -elem.scrollTop); + elem = elem.parentNode; + } + }; + } + dom.scrollIntoViewIfNeeded(); + }, + setFirstNode: function (setting, parentNode) { + var children = data.nodeChildren(setting, parentNode); + if (children.length > 0) { + children[0].isFirstNode = true; + } + }, + setLastNode: function (setting, parentNode) { + var children = data.nodeChildren(setting, parentNode); + if (children.length > 0) { + children[children.length - 1].isLastNode = true; + } + }, + removeNode: function (setting, node) { + var root = data.getRoot(setting), + parentNode = (node.parentTId) ? node.getParentNode() : root; + + node.isFirstNode = false; + node.isLastNode = false; + node.getPreNode = function () { + return null; + }; + node.getNextNode = function () { + return null; + }; + + if (!data.getNodeCache(setting, node.tId)) { + return; + } + + $$(node, setting).remove(); + data.removeNodeCache(setting, node); + data.removeSelectedNode(setting, node); + + var children = data.nodeChildren(setting, parentNode); + for (var i = 0, l = children.length; i < l; i++) { + if (children[i].tId == node.tId) { + children.splice(i, 1); + break; + } + } + view.setFirstNode(setting, parentNode); + view.setLastNode(setting, parentNode); + + var tmp_ulObj, tmp_switchObj, tmp_icoObj, + childLength = children.length; + + //repair nodes old parent + if (!setting.data.keep.parent && childLength == 0) { + //old parentNode has no child nodes + data.nodeIsParent(setting, parentNode, false); + parentNode.open = false; + delete parentNode[setting.data.key.children]; + tmp_ulObj = $$(parentNode, consts.id.UL, setting); + tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); + tmp_icoObj = $$(parentNode, consts.id.ICON, setting); + view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); + view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); + tmp_ulObj.css("display", "none"); + + } else if (setting.view.showLine && childLength > 0) { + //old parentNode has child nodes + var newLast = children[childLength - 1]; + tmp_ulObj = $$(newLast, consts.id.UL, setting); + tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); + tmp_icoObj = $$(newLast, consts.id.ICON, setting); + if (parentNode == root) { + if (children.length == 1) { + //node was root, and ztree has only one root after move node + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); + } else { + var tmp_first_switchObj = $$(children[0], consts.id.SWITCH, setting); + view.replaceSwitchClass(children[0], tmp_first_switchObj, consts.line.ROOTS); + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); + } + } else { + view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); + } + tmp_ulObj.removeClass(consts.line.LINE); + } + }, + replaceIcoClass: function (node, obj, newName) { + if (!obj || node.isAjaxing) return; + var tmpName = obj.attr("class"); + if (tmpName == undefined) return; + var tmpList = tmpName.split("_"); + switch (newName) { + case consts.folder.OPEN: + case consts.folder.CLOSE: + case consts.folder.DOCU: + tmpList[tmpList.length - 1] = newName; + break; + } + obj.attr("class", tmpList.join("_")); + }, + replaceSwitchClass: function (node, obj, newName) { + if (!obj) return; + var tmpName = obj.attr("class"); + if (tmpName == undefined) return; + var tmpList = tmpName.split("_"); + switch (newName) { + case consts.line.ROOT: + case consts.line.ROOTS: + case consts.line.CENTER: + case consts.line.BOTTOM: + case consts.line.NOLINE: + tmpList[0] = view.makeNodeLineClassEx(node) + newName; + break; + case consts.folder.OPEN: + case consts.folder.CLOSE: + case consts.folder.DOCU: + tmpList[1] = newName; + break; + } + obj.attr("class", tmpList.join("_")); + if (newName !== consts.folder.DOCU) { + obj.removeAttr("disabled"); + } else { + obj.attr("disabled", "disabled"); + } + }, + selectNode: function (setting, node, addFlag) { + if (!addFlag) { + view.cancelPreSelectedNode(setting, null, node); + } + $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); + data.addSelectedNode(setting, node); + setting.treeObj.trigger(consts.event.SELECTED, [setting.treeId, node]); + }, + setNodeFontCss: function (setting, treeNode) { + var aObj = $$(treeNode, consts.id.A, setting), + fontCss = view.makeNodeFontCss(setting, treeNode); + if (fontCss) { + aObj.css(fontCss); + } + }, + setNodeLineIcos: function (setting, node) { + if (!node) return; + var switchObj = $$(node, consts.id.SWITCH, setting), + ulObj = $$(node, consts.id.UL, setting), + icoObj = $$(node, consts.id.ICON, setting), + ulLine = view.makeUlLineClass(setting, node); + if (ulLine.length == 0) { + ulObj.removeClass(consts.line.LINE); + } else { + ulObj.addClass(ulLine); + } + switchObj.attr("class", view.makeNodeLineClass(setting, node)); + if (data.nodeIsParent(setting, node)) { + switchObj.removeAttr("disabled"); + } else { + switchObj.attr("disabled", "disabled"); + } + icoObj.removeAttr("style"); + icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); + icoObj.attr("class", view.makeNodeIcoClass(setting, node)); + }, + setNodeName: function (setting, node) { + var title = data.nodeTitle(setting, node), + nObj = $$(node, consts.id.SPAN, setting); + nObj.empty(); + if (setting.view.nameIsHTML) { + nObj.html(data.nodeName(setting, node)); + } else { + nObj.text(data.nodeName(setting, node)); + } + if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { + var aObj = $$(node, consts.id.A, setting); + aObj.attr("title", !title ? "" : title); + } + }, + setNodeTarget: function (setting, node) { + var aObj = $$(node, consts.id.A, setting); + aObj.attr("target", view.makeNodeTarget(node)); + }, + setNodeUrl: function (setting, node) { + var aObj = $$(node, consts.id.A, setting), + url = view.makeNodeUrl(setting, node); + if (url == null || url.length == 0) { + aObj.removeAttr("href"); + } else { + aObj.attr("href", url); + } + }, + switchNode: function (setting, node) { + if (node.open || !tools.canAsync(setting, node)) { + view.expandCollapseNode(setting, node, !node.open); + } else if (setting.async.enable) { + if (!view.asyncNode(setting, node)) { + view.expandCollapseNode(setting, node, !node.open); + return; + } + } else if (node) { + view.expandCollapseNode(setting, node, !node.open); + } + } + }; + // zTree defind + $.fn.zTree = { + consts: _consts, + _z: { + tools: tools, + view: view, + event: event, + data: data + }, + getZTreeObj: function (treeId) { + var o = data.getZTreeTools(treeId); + return o ? o : null; + }, + destroy: function (treeId) { + if (!!treeId && treeId.length > 0) { + view.destroy(data.getSetting(treeId)); + } else { + for (var s in settings) { + view.destroy(settings[s]); + } + } + }, + init: function (obj, zSetting, zNodes) { + var setting = tools.clone(_setting); + $.extend(true, setting, zSetting); + setting.treeId = obj.attr("id"); + setting.treeObj = obj; + setting.treeObj.empty(); + settings[setting.treeId] = setting; + //For some older browser,(e.g., ie6) + if (typeof document.body.style.maxHeight === "undefined") { + setting.view.expandSpeed = ""; + } + data.initRoot(setting); + var root = data.getRoot(setting); + zNodes = zNodes ? tools.clone(tools.isArray(zNodes) ? zNodes : [zNodes]) : []; + if (setting.data.simpleData.enable) { + data.nodeChildren(setting, root, data.transformTozTreeFormat(setting, zNodes)); + } else { + data.nodeChildren(setting, root, zNodes); + } + + data.initCache(setting); + event.unbindTree(setting); + event.bindTree(setting); + event.unbindEvent(setting); + event.bindEvent(setting); + + var zTreeTools = { + setting: setting, + addNodes: function (parentNode, index, newNodes, isSilent) { + if (!parentNode) parentNode = null; + var isParent = data.nodeIsParent(setting, parentNode); + if (parentNode && !isParent && setting.data.keep.leaf) return null; + + var i = parseInt(index, 10); + if (isNaN(i)) { + isSilent = !!newNodes; + newNodes = index; + index = -1; + } else { + index = i; + } + if (!newNodes) return null; + + + var xNewNodes = tools.clone(tools.isArray(newNodes) ? newNodes : [newNodes]); + + function addCallback() { + view.addNodes(setting, parentNode, index, xNewNodes, (isSilent == true)); + } + + if (tools.canAsync(setting, parentNode)) { + view.asyncNode(setting, parentNode, isSilent, addCallback); + } else { + addCallback(); + } + return xNewNodes; + }, + cancelSelectedNode: function (node) { + view.cancelPreSelectedNode(setting, node); + }, + destroy: function () { + view.destroy(setting); + }, + expandAll: function (expandFlag) { + expandFlag = !!expandFlag; + view.expandCollapseSonNode(setting, null, expandFlag, true); + return expandFlag; + }, + expandNode: function (node, expandFlag, sonSign, focus, callbackFlag) { + if (!node || !data.nodeIsParent(setting, node)) return null; + if (expandFlag !== true && expandFlag !== false) { + expandFlag = !node.open; + } + callbackFlag = !!callbackFlag; + + if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { + return null; + } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { + return null; + } + if (expandFlag && node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); + } + if (expandFlag === node.open && !sonSign) { + return null; + } + + data.getRoot(setting).expandTriggerFlag = callbackFlag; + if (!tools.canAsync(setting, node) && sonSign) { + view.expandCollapseSonNode(setting, node, expandFlag, true, showNodeFocus); + } else { + node.open = !expandFlag; + view.switchNode(this.setting, node); + showNodeFocus(); + } + return expandFlag; + + function showNodeFocus() { + var a = $$(node, setting).get(0); + if (a && focus !== false) { + view.scrollIntoView(setting, a); + } + } + }, + getNodes: function () { + return data.getNodes(setting); + }, + getNodeByParam: function (key, value, parentNode) { + if (!key) return null; + return data.getNodeByParam(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), key, value); + }, + getNodeByTId: function (tId) { + return data.getNodeCache(setting, tId); + }, + getNodesByParam: function (key, value, parentNode) { + if (!key) return null; + return data.getNodesByParam(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), key, value); + }, + getNodesByParamFuzzy: function (key, value, parentNode) { + if (!key) return null; + return data.getNodesByParamFuzzy(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), key, value); + }, + getNodesByFilter: function (filter, isSingle, parentNode, invokeParam) { + isSingle = !!isSingle; + if (!filter || (typeof filter != "function")) return (isSingle ? null : []); + return data.getNodesByFilter(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), filter, isSingle, invokeParam); + }, + getNodeIndex: function (node) { + if (!node) return null; + var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); + var children = data.nodeChildren(setting, parentNode); + for (var i = 0, l = children.length; i < l; i++) { + if (children[i] == node) return i; + } + return -1; + }, + getSelectedNodes: function () { + var r = [], list = data.getRoot(setting).curSelectedList; + for (var i = 0, l = list.length; i < l; i++) { + r.push(list[i]); + } + return r; + }, + isSelectedNode: function (node) { + return data.isSelectedNode(setting, node); + }, + reAsyncChildNodesPromise: function (parentNode, reloadType, isSilent) { + var promise = new Promise(function (resolve, reject) { + try { + zTreeTools.reAsyncChildNodes(parentNode, reloadType, isSilent, function () { + resolve(parentNode); + }); + } catch (e) { + reject(e); + } + }); + return promise; + }, + reAsyncChildNodes: function (parentNode, reloadType, isSilent, callback) { + if (!this.setting.async.enable) return; + var isRoot = !parentNode; + if (isRoot) { + parentNode = data.getRoot(setting); + } + if (reloadType == "refresh") { + var children = data.nodeChildren(setting, parentNode); + for (var i = 0, l = children ? children.length : 0; i < l; i++) { + data.removeNodeCache(setting, children[i]); + } + data.removeSelectedNode(setting); + data.nodeChildren(setting, parentNode, []); + if (isRoot) { + this.setting.treeObj.empty(); + } else { + var ulObj = $$(parentNode, consts.id.UL, setting); + ulObj.empty(); + } + } + view.asyncNode(this.setting, isRoot ? null : parentNode, !!isSilent, callback); + }, + refresh: function () { + this.setting.treeObj.empty(); + var root = data.getRoot(setting), + nodes = data.nodeChildren(setting, root); + data.initRoot(setting); + data.nodeChildren(setting, root, nodes); + data.initCache(setting); + view.createNodes(setting, 0, data.nodeChildren(setting, root), null, -1); + }, + removeChildNodes: function (node) { + if (!node) return null; + var nodes = data.nodeChildren(setting, node); + view.removeChildNodes(setting, node); + return nodes ? nodes : null; + }, + removeNode: function (node, callbackFlag) { + if (!node) return; + callbackFlag = !!callbackFlag; + if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return; + view.removeNode(setting, node); + if (callbackFlag) { + this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); + } + }, + selectNode: function (node, addFlag, isSilent) { + if (!node) return; + if (tools.uCanDo(setting)) { + addFlag = setting.view.selectedMulti && addFlag; + if (node.parentTId) { + view.expandCollapseParentNode(setting, node.getParentNode(), true, false, showNodeFocus); + } else if (!isSilent) { + try { + $$(node, setting).focus().blur(); + } catch (e) { + } + } + view.selectNode(setting, node, addFlag); + } + + function showNodeFocus() { + if (isSilent) { + return; + } + var a = $$(node, setting).get(0); + view.scrollIntoView(setting, a); + } + }, + transformTozTreeNodes: function (simpleNodes) { + return data.transformTozTreeFormat(setting, simpleNodes); + }, + transformToArray: function (nodes) { + return data.transformToArrayFormat(setting, nodes); + }, + updateNode: function (node, checkTypeFlag) { + if (!node) return; + var nObj = $$(node, setting); + if (nObj.get(0) && tools.uCanDo(setting)) { + view.setNodeName(setting, node); + view.setNodeTarget(setting, node); + view.setNodeUrl(setting, node); + view.setNodeLineIcos(setting, node); + view.setNodeFontCss(setting, node); + } + } + }; + root.treeTools = zTreeTools; + data.setZTreeTools(setting, zTreeTools); + var children = data.nodeChildren(setting, root); + if (children && children.length > 0) { + view.createNodes(setting, 0, children, null, -1); + } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { + view.asyncNode(setting); + } + return zTreeTools; + } + }; + + var zt = $.fn.zTree, + $$ = tools.$, + consts = zt.consts; +})(jQuery); +/* + * JQuery zTree excheck + * v3.5.42 + * http://treejs.cn/ + * + * Copyright (c) 2010 Hunter.z + * + * Licensed same as jquery - MIT License + * http://www.opensource.org/licenses/mit-license.php + * + * Date: 2020-01-19 + */ + +(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) { + event.srcEvent = srcEvent; + tools.apply(setting.callback.onCheck, [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 = tools.getNodeMainDom(target).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 = tools.getNodeMainDom(target).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 = tools.getNodeMainDom(target).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: nodeEventType === "checkNode", + 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 checked = data.nodeChecked(setting, n); + n.checkedOld = checked; + 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); + }; + + if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && checked) { + var r = data.getRoot(setting); + r.radioCheckedList.push(n); + } + }, + //add dom for check + _beforeA = function (setting, node, html) { + if (setting.check.enable) { + data.makeChkFlag(setting, node); + html.push(""); + } + }, + //update zTreeObj, add method of check + _zTreeTools = function (setting, zTreeTools) { + zTreeTools.checkNode = function (node, checked, checkTypeFlag, callbackFlag) { + var nodeChecked = data.nodeChecked(setting, node); + if (node.chkDisabled === true) return; + if (checked !== true && checked !== false) { + checked = !nodeChecked; + } + callbackFlag = !!callbackFlag; + + if (nodeChecked === 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) { + data.nodeChecked(setting, node, checked); + var checkObj = $$(node, consts.id.CHECK, this.setting); + 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) { + this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); + } + } + } + + zTreeTools.checkAllNodes = function (checked) { + view.repairAllChk(this.setting, !!checked); + } + + zTreeTools.getCheckedNodes = function (checked) { + checked = (checked !== false); + var children = data.nodeChildren(setting, data.getRoot(this.setting)); + return data.getTreeCheckedNodes(this.setting, children, checked); + } + + zTreeTools.getChangeCheckedNodes = function () { + var children = data.nodeChildren(setting, data.getRoot(this.setting)); + return data.getTreeChangeCheckedNodes(this.setting, children); + } + + 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, this.setting); + if (nObj.get(0) && tools.uCanDo(this.setting)) { + var checkObj = $$(node, consts.id.CHECK, this.setting); + 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 checked = data.nodeChecked(setting, node), + r = { + checked: checked, + half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (checked ? (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 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++) { + var node = nodes[i]; + var children = data.nodeChildren(setting, node); + var nodeChecked = data.nodeChecked(setting, node); + if (node.nocheck !== true && node.chkDisabled !== true && nodeChecked == checked) { + results.push(node); + if (onlyOne) { + break; + } + } + data.getTreeCheckedNodes(setting, children, checked, results); + if (onlyOne && results.length > 0) { + break; + } + } + return results; + }, + getTreeChangeCheckedNodes: function (setting, nodes, results) { + if (!nodes) return []; + results = !results ? [] : results; + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + var children = data.nodeChildren(setting, node); + var nodeChecked = data.nodeChecked(setting, node); + if (node.nocheck !== true && node.chkDisabled !== true && nodeChecked != node.checkedOld) { + results.push(node); + } + data.getTreeChangeCheckedNodes(setting, children, results); + } + return results; + }, + makeChkFlag: function (setting, node) { + if (!node) return; + var chkFlag = -1; + var children = data.nodeChildren(setting, node); + if (children) { + for (var i = 0, l = children.length; i < l; i++) { + var cNode = children[i]; + var nodeChecked = data.nodeChecked(setting, cNode); + 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 (nodeChecked) { + 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 (nodeChecked) { + 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); + if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; + var nodeChecked = data.nodeChecked(setting, node); + data.nodeChecked(setting, node, !nodeChecked); + view.checkNodeRelation(setting, node); + var checkObj = $$(node, consts.id.CHECK, setting); + 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, consts.id.CHECK, setting); + 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, consts.id.CHECK, setting); + 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, + r = consts.radio; + var nodeChecked = data.nodeChecked(setting, node); + if (setting.check.chkStyle == r.STYLE) { + var checkedList = data.getRadioCheckedList(setting); + if (nodeChecked) { + if (setting.check.radioType == r.TYPE_ALL) { + for (i = checkedList.length - 1; i >= 0; i--) { + pNode = checkedList[i]; + var pNodeChecked = data.nodeChecked(setting, pNode); + if (pNodeChecked && pNode != node) { + data.nodeChecked(setting, pNode, false); + checkedList.splice(i, 1); + + view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); + if (pNode.parentTId != node.parentTId) { + view.repairParentChkClassWithSelf(setting, pNode); + } + } + } + checkedList.push(node); + } else { + var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); + var children = data.nodeChildren(setting, parentNode); + for (i = 0, l = children.length; i < l; i++) { + pNode = children[i]; + var pNodeChecked = data.nodeChecked(setting, pNode); + if (pNodeChecked && pNode != node) { + data.nodeChecked(setting, pNode, false); + view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), 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 { + var children = data.nodeChildren(setting, node); + if (nodeChecked && (!children || children.length == 0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { + view.setSonNodeCheckBox(setting, node, true); + } + if (!nodeChecked && (!children || children.length == 0 || setting.check.chkboxType.N.indexOf("s") > -1)) { + view.setSonNodeCheckBox(setting, node, false); + } + if (nodeChecked && setting.check.chkboxType.Y.indexOf("p") > -1) { + view.setParentNodeCheckBox(setting, node, true); + } + if (!nodeChecked && setting.check.chkboxType.N.indexOf("p") > -1) { + view.setParentNodeCheckBox(setting, node, false); + } + } + }, + makeChkClass: function (setting, node) { + var c = consts.checkbox, r = consts.radio, + fullStyle = ""; + var nodeChecked = data.nodeChecked(setting, node); + 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 = nodeChecked ? ((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 + "_" + (nodeChecked ? 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 root = data.getRoot(setting); + var children = data.nodeChildren(setting, root); + for (var i = 0, l = children.length; i < l; i++) { + var node = children[i]; + if (node.nocheck !== true && node.chkDisabled !== true) { + data.nodeChecked(setting, node, checked); + } + view.setSonNodeCheckBox(setting, node, checked); + } + } + }, + repairChkClass: function (setting, node) { + if (!node) return; + data.makeChkFlag(setting, node); + if (node.nocheck !== true) { + var checkObj = $$(node, consts.id.CHECK, setting); + 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 children = data.nodeChildren(setting, node); + if (children && children.length > 0) { + view.repairParentChkClass(setting, children[0]); + } else { + view.repairParentChkClass(setting, node); + } + }, + repairSonChkDisabled: function (setting, node, chkDisabled, inherit) { + if (!node) return; + if (node.chkDisabled != chkDisabled) { + node.chkDisabled = chkDisabled; + } + view.repairChkClass(setting, node); + var children = data.nodeChildren(setting, node); + if (children && inherit) { + for (var i = 0, l = children.length; i < l; i++) { + var sNode = children[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.attr('class', view.makeChkClass(setting, node)); + }, + setParentNodeCheckBox: function (setting, node, value, srcNode) { + var checkObj = $$(node, consts.id.CHECK, setting); + if (!srcNode) srcNode = node; + data.makeChkFlag(setting, node); + if (node.nocheck !== true && node.chkDisabled !== true) { + data.nodeChecked(setting, node, 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 = data.nodeChildren(setting, node.getParentNode()); + for (var i = 0, l = pNodes.length; i < l; i++) { + var pNode = pNodes[i]; + var nodeChecked = data.nodeChecked(setting, pNode); + if ((pNode.nocheck !== true && pNode.chkDisabled !== true && nodeChecked) + || ((pNode.nocheck === true || pNode.chkDisabled === true) && pNode.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 checkObj = $$(node, consts.id.CHECK, setting); + if (!srcNode) srcNode = node; + + var hasDisable = false; + var children = data.nodeChildren(setting, node); + if (children) { + for (var i = 0, l = children.length; i < l; i++) { + var sNode = children[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) { + data.nodeChecked(setting, node, value); + if (!hasDisable) node.check_Child_State = (children && children.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, + $$ = tools.$; + + data.nodeChecked = function (setting, node, newChecked) { + if (!node) { + return false; + } + var key = setting.data.key.checked; + if (typeof newChecked !== 'undefined') { + if (typeof newChecked === "string") { + newChecked = tools.eqs(newChecked, "true"); + } + newChecked = !!newChecked; + node[key] = newChecked; + } else if (typeof node[key] == "string"){ + node[key] = tools.eqs(node[key], "true"); + } else { + node[key] = !!node[key]; + } + return node[key]; + }; + + data.exSetting(_setting); + data.addInitBind(_bindEvent); + data.addInitUnBind(_unbindEvent); + data.addInitCache(_initCache); + data.addInitNode(_initNode); + data.addInitProxy(_eventProxy, true); + data.addInitRoot(_initRoot); + data.addBeforeA(_beforeA); + data.addZTreeTools(_zTreeTools); + + var _createNodes = view.createNodes; + view.createNodes = function (setting, level, nodes, parentNode, index) { + 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, index, initFlag, openFlag) { + var html = ""; + if (_appendNodes) { + html = _appendNodes.apply(view, arguments); + } + if (parentNode) { + data.makeChkFlag(setting, parentNode); + } + return html; + } +})(jQuery); +/* + * JQuery zTree exedit + * v3.5.42 + * http://treejs.cn/ + * + * Copyright (c) 2010 Hunter.z + * + * Licensed same as jquery - MIT License + * http://www.opensource.org/licenses/mit-license.php + * + * Date: 2020-01-19 + */ + +(function ($) { + //default consts of exedit + var _consts = { + event: { + DRAG: "ztree_drag", + DROP: "ztree_drop", + RENAME: "ztree_rename", + DRAGMOVE: "ztree_dragmove" + }, + id: { + EDIT: "_edit", + INPUT: "_input", + REMOVE: "_remove" + }, + move: { + TYPE_INNER: "inner", + TYPE_PREV: "prev", + TYPE_NEXT: "next" + }, + node: { + CURSELECTED_EDIT: "curSelectedNode_Edit", + TMPTARGET_TREE: "tmpTargetzTree", + TMPTARGET_NODE: "tmpTargetNode" + } + }, + //default setting of exedit + _setting = { + edit: { + enable: false, + editNameSelectAll: false, + showRemoveBtn: true, + showRenameBtn: true, + removeTitle: "remove", + renameTitle: "rename", + drag: { + autoExpandTrigger: false, + isCopy: true, + isMove: true, + prev: true, + next: true, + inner: true, + minMoveSize: 5, + borderMax: 10, + borderMin: -5, + maxShowNodeNum: 5, + autoOpenTime: 500 + } + }, + view: { + addHoverDom: null, + removeHoverDom: null + }, + callback: { + beforeDrag: null, + beforeDragOpen: null, + beforeDrop: null, + beforeEditName: null, + beforeRename: null, + onDrag: null, + onDragMove: null, + onDrop: null, + onRename: null + } + }, + //default root of exedit + _initRoot = function (setting) { + var r = data.getRoot(setting), rs = data.getRoots(); + r.curEditNode = null; + r.curEditInput = null; + r.curHoverNode = null; + r.dragFlag = 0; + r.dragNodeShowBefore = []; + r.dragMaskList = new Array(); + rs.showHoverDom = true; + }, + //default cache of exedit + _initCache = function (treeId) { + }, + //default bind event of exedit + _bindEvent = function (setting) { + var o = setting.treeObj; + var c = consts.event; + o.bind(c.RENAME, function (event, treeId, treeNode, isCancel) { + tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]); + }); + + o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) { + tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]); + }); + + o.bind(c.DRAGMOVE, function (event, srcEvent, treeId, treeNodes) { + tools.apply(setting.callback.onDragMove, [srcEvent, treeId, treeNodes]); + }); + + o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) { + tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]); + }); + }, + _unbindEvent = function (setting) { + var o = setting.treeObj; + var c = consts.event; + o.unbind(c.RENAME); + o.unbind(c.DRAG); + o.unbind(c.DRAGMOVE); + o.unbind(c.DROP); + }, + //default event proxy of exedit + _eventProxy = function (e) { + var target = e.target, + setting = data.getSetting(e.data.treeId), + relatedTarget = e.relatedTarget, + tId = "", node = null, + nodeEventType = "", treeEventType = "", + nodeEventCallback = null, treeEventCallback = null, + tmp = null; + + if (tools.eqs(e.type, "mouseover")) { + tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "hoverOverNode"; + } + } else if (tools.eqs(e.type, "mouseout")) { + tmp = tools.getMDom(setting, relatedTarget, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); + if (!tmp) { + tId = "remove"; + nodeEventType = "hoverOutNode"; + } + } else if (tools.eqs(e.type, "mousedown")) { + tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); + if (tmp) { + tId = tools.getNodeMainDom(tmp).id; + nodeEventType = "mousedownNode"; + } + } + if (tId.length > 0) { + node = data.getNodeCache(setting, tId); + switch (nodeEventType) { + case "mousedownNode" : + nodeEventCallback = _handler.onMousedownNode; + break; + case "hoverOverNode" : + nodeEventCallback = _handler.onHoverOverNode; + break; + case "hoverOutNode" : + nodeEventCallback = _handler.onHoverOutNode; + break; + } + } + var proxyResult = { + stop: false, + node: node, + nodeEventType: nodeEventType, + nodeEventCallback: nodeEventCallback, + treeEventType: treeEventType, + treeEventCallback: treeEventCallback + }; + return proxyResult + }, + //default init node of exedit + _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { + if (!n) return; + n.isHover = false; + n.editNameFlag = false; + }, + //update zTreeObj, add method of edit + _zTreeTools = function (setting, zTreeTools) { + zTreeTools.cancelEditName = function (newName) { + var root = data.getRoot(this.setting); + if (!root.curEditNode) return; + view.cancelCurEditNode(this.setting, newName ? newName : null, true); + } + zTreeTools.copyNode = function (targetNode, node, moveType, isSilent) { + if (!node) return null; + var isParent = data.nodeIsParent(setting, targetNode); + if (targetNode && !isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null; + var _this = this, + newNode = tools.clone(node); + if (!targetNode) { + targetNode = null; + moveType = consts.move.TYPE_INNER; + } + if (moveType == consts.move.TYPE_INNER) { + function copyCallback() { + view.addNodes(_this.setting, targetNode, -1, [newNode], isSilent); + } + + if (tools.canAsync(this.setting, targetNode)) { + view.asyncNode(this.setting, targetNode, isSilent, copyCallback); + } else { + copyCallback(); + } + } else { + view.addNodes(this.setting, targetNode.parentNode, -1, [newNode], isSilent); + view.moveNode(this.setting, targetNode, newNode, moveType, false, isSilent); + } + return newNode; + } + zTreeTools.editName = function (node) { + if (!node || !node.tId || node !== data.getNodeCache(this.setting, node.tId)) return; + if (node.parentTId) view.expandCollapseParentNode(this.setting, node.getParentNode(), true); + view.editNode(this.setting, node) + } + zTreeTools.moveNode = function (targetNode, node, moveType, isSilent) { + if (!node) return node; + var isParent = data.nodeIsParent(setting, targetNode); + if (targetNode && !isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) { + return null; + } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $$(node, this.setting).find("#" + targetNode.tId).length > 0)) { + return null; + } else if (!targetNode) { + targetNode = null; + } + var _this = this; + + function moveCallback() { + view.moveNode(_this.setting, targetNode, node, moveType, false, isSilent); + } + + if (tools.canAsync(this.setting, targetNode) && moveType === consts.move.TYPE_INNER) { + view.asyncNode(this.setting, targetNode, isSilent, moveCallback); + } else { + moveCallback(); + } + return node; + } + zTreeTools.setEditable = function (editable) { + this.setting.edit.enable = editable; + return this.refresh(); + } + }, + //method of operate data + _data = { + setSonNodeLevel: function (setting, parentNode, node) { + if (!node) return; + var children = data.nodeChildren(setting, node); + node.level = (parentNode) ? parentNode.level + 1 : 0; + if (!children) return; + for (var i = 0, l = children.length; i < l; i++) { + if (children[i]) data.setSonNodeLevel(setting, node, children[i]); + } + } + }, + //method of event proxy + _event = {}, + //method of event handler + _handler = { + onHoverOverNode: function (event, node) { + var setting = data.getSetting(event.data.treeId), + root = data.getRoot(setting); + if (root.curHoverNode != node) { + _handler.onHoverOutNode(event); + } + root.curHoverNode = node; + view.addHoverDom(setting, node); + }, + onHoverOutNode: function (event, node) { + var setting = data.getSetting(event.data.treeId), + root = data.getRoot(setting); + if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) { + view.removeTreeDom(setting, root.curHoverNode); + root.curHoverNode = null; + } + }, + onMousedownNode: function (eventMouseDown, _node) { + var i, l, + setting = data.getSetting(eventMouseDown.data.treeId), + root = data.getRoot(setting), roots = data.getRoots(); + //right click can't drag & drop + if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true; + + //input of edit node name can't drag & drop + var target = eventMouseDown.target, + _nodes = data.getRoot(setting).curSelectedList, + nodes = []; + if (!data.isSelectedNode(setting, _node)) { + nodes = [_node]; + } else { + for (i = 0, l = _nodes.length; i < l; i++) { + if (_nodes[i].editNameFlag && tools.eqs(target.tagName, "input") && target.getAttribute("treeNode" + consts.id.INPUT) !== null) { + return true; + } + nodes.push(_nodes[i]); + if (nodes[0].parentTId !== _nodes[i].parentTId) { + nodes = [_node]; + break; + } + } + } + + view.editNodeBlur = true; + view.cancelCurEditNode(setting); + + var doc = $(setting.treeObj.get(0).ownerDocument), + body = $(setting.treeObj.get(0).ownerDocument.body), curNode, tmpArrow, tmpTarget, + isOtherTree = false, + targetSetting = setting, + sourceSetting = setting, + preNode, nextNode, + preTmpTargetNodeId = null, + preTmpMoveType = null, + tmpTargetNodeId = null, + moveType = consts.move.TYPE_INNER, + mouseDownX = eventMouseDown.clientX, + mouseDownY = eventMouseDown.clientY, + startTime = (new Date()).getTime(); + + if (tools.uCanDo(setting)) { + doc.bind("mousemove", _docMouseMove); + } + + function _docMouseMove(event) { + //avoid start drag after click node + if (root.dragFlag == 0 && Math.abs(mouseDownX - event.clientX) < setting.edit.drag.minMoveSize + && Math.abs(mouseDownY - event.clientY) < setting.edit.drag.minMoveSize) { + return true; + } + var i, l, tmpNode, tmpDom, tmpNodes; + body.css("cursor", "pointer"); + + if (root.dragFlag == 0) { + if (tools.apply(setting.callback.beforeDrag, [setting.treeId, nodes], true) == false) { + _docMouseUp(event); + return true; + } + + for (i = 0, l = nodes.length; i < l; i++) { + if (i == 0) { + root.dragNodeShowBefore = []; + } + tmpNode = nodes[i]; + if (data.nodeIsParent(setting, tmpNode) && tmpNode.open) { + view.expandCollapseNode(setting, tmpNode, !tmpNode.open); + root.dragNodeShowBefore[tmpNode.tId] = true; + } else { + root.dragNodeShowBefore[tmpNode.tId] = false; + } + } + + root.dragFlag = 1; + roots.showHoverDom = false; + tools.showIfameMask(setting, true); + + //sort + var isOrder = true, lastIndex = -1; + if (nodes.length > 1) { + var pNodes = nodes[0].parentTId ? data.nodeChildren(setting, nodes[0].getParentNode()) : data.getNodes(setting); + tmpNodes = []; + for (i = 0, l = pNodes.length; i < l; i++) { + if (root.dragNodeShowBefore[pNodes[i].tId] !== undefined) { + if (isOrder && lastIndex > -1 && (lastIndex + 1) !== i) { + isOrder = false; + } + tmpNodes.push(pNodes[i]); + lastIndex = i; + } + if (nodes.length === tmpNodes.length) { + nodes = tmpNodes; + break; + } + } + } + if (isOrder) { + preNode = nodes[0].getPreNode(); + nextNode = nodes[nodes.length - 1].getNextNode(); + } + + //set node in selected + curNode = $$("
                                                                                                                                                                                                                                                                                                                      ", setting); + for (i = 0, l = nodes.length; i < l; i++) { + tmpNode = nodes[i]; + tmpNode.editNameFlag = false; + view.selectNode(setting, tmpNode, i > 0); + view.removeTreeDom(setting, tmpNode); + + if (i > setting.edit.drag.maxShowNodeNum - 1) { + continue; + } + + tmpDom = $$("
                                                                                                                                                                                                                                                                                                                    • ", setting); + tmpDom.append($$(tmpNode, consts.id.A, setting).clone()); + tmpDom.css("padding", "0"); + tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED); + curNode.append(tmpDom); + if (i == setting.edit.drag.maxShowNodeNum - 1) { + tmpDom = $$("
                                                                                                                                                                                                                                                                                                                    • ...
                                                                                                                                                                                                                                                                                                                    • ", setting); + curNode.append(tmpDom); + } + } + curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp"); + curNode.addClass(setting.treeObj.attr("class")); + curNode.appendTo(body); + + tmpArrow = $$("", setting); + tmpArrow.attr("id", "zTreeMove_arrow_tmp"); + tmpArrow.appendTo(body); + + setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]); + } + + if (root.dragFlag == 1) { + if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft() + 2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) { + var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget); + event.target = (xT.length > 0) ? xT.get(0) : event.target; + } else if (tmpTarget) { + tmpTarget.removeClass(consts.node.TMPTARGET_TREE); + if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) + .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); + } + tmpTarget = null; + tmpTargetNodeId = null; + + //judge drag & drop in multi ztree + isOtherTree = false; + targetSetting = setting; + var settings = data.getSettings(); + for (var s in settings) { + if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId + && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length > 0)) { + isOtherTree = true; + targetSetting = settings[s]; + } + } + + var docScrollTop = doc.scrollTop(), + docScrollLeft = doc.scrollLeft(), + treeOffset = targetSetting.treeObj.offset(), + scrollHeight = targetSetting.treeObj.get(0).scrollHeight, + scrollWidth = targetSetting.treeObj.get(0).scrollWidth, + dTop = (event.clientY + docScrollTop - treeOffset.top), + dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop), + dLeft = (event.clientX + docScrollLeft - treeOffset.left), + dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft), + isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin), + isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin), + isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin), + isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin), + isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin, + isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0), + isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height() + 10) >= scrollHeight), + isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0), + isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width() + 10) >= scrollWidth); + + if (event.target && tools.isChildOrSelf(event.target, targetSetting.treeId)) { + //get node
                                                                                                                                                                                                                                                                                                                    • dom + var targetObj = event.target; + while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) { + targetObj = targetObj.parentNode; + } + + var canMove = true; + //don't move to self or children of self + for (i = 0, l = nodes.length; i < l; i++) { + tmpNode = nodes[i]; + if (targetObj.id === tmpNode.tId) { + canMove = false; + break; + } else if ($$(tmpNode, setting).find("#" + targetObj.id).length > 0) { + canMove = false; + break; + } + } + if (canMove && event.target && tools.isChildOrSelf(event.target, targetObj.id + consts.id.A)) { + tmpTarget = $(targetObj); + tmpTargetNodeId = targetObj.id; + } + } + + //the mouse must be in zTree + tmpNode = nodes[0]; + if (isTreeInner && tools.isChildOrSelf(event.target, targetSetting.treeId)) { + //judge mouse move in root of ztree + if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) { + tmpTarget = targetSetting.treeObj; + } + //auto scroll top + if (isTop) { + targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop() - 10); + } else if (isBottom) { + targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop() + 10); + } + if (isLeft) { + targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft() - 10); + } else if (isRight) { + targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft() + 10); + } + //auto scroll left + if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) { + targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft() + tmpTarget.offset().left - targetSetting.treeObj.offset().left); + } + } + + curNode.css({ + "top": (event.clientY + docScrollTop + 3) + "px", + "left": (event.clientX + docScrollLeft + 3) + "px" + }); + + var dX = 0; + var dY = 0; + if (tmpTarget && tmpTarget.attr("id") != targetSetting.treeId) { + var tmpTargetNode = tmpTargetNodeId == null ? null : data.getNodeCache(targetSetting, tmpTargetNodeId), + isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy), + isPrev = !!(preNode && tmpTargetNodeId === preNode.tId), + isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId), + isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId), + canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev), + canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next), + canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !data.nodeIsParent(setting, tmpTargetNode)) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner); + + function clearMove() { + tmpTarget = null; + tmpTargetNodeId = ""; + moveType = consts.move.TYPE_INNER; + tmpArrow.css({ + "display": "none" + }); + if (window.zTreeMoveTimer) { + clearTimeout(window.zTreeMoveTimer); + window.zTreeMoveTargetNodeTId = null + } + } + + if (!canPrev && !canNext && !canInner) { + clearMove(); + } else { + var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget), + tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()), + tmpTop = tmpTargetA.offset().top, + tmpLeft = tmpTargetA.offset().left, + prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1)) : -1, + nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0)) : -1, + dY_percent = (event.clientY + docScrollTop - tmpTop) / tmpTargetA.height(); + + if ((prevPercent == 1 || dY_percent <= prevPercent && dY_percent >= -.2) && canPrev) { + dX = 1 - tmpArrow.width(); + dY = tmpTop - tmpArrow.height() / 2; + moveType = consts.move.TYPE_PREV; + } else if ((nextPercent == 0 || dY_percent >= nextPercent && dY_percent <= 1.2) && canNext) { + dX = 1 - tmpArrow.width(); + dY = (tmpNextA == null || (data.nodeIsParent(setting, tmpTargetNode) && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height() / 2) : (tmpNextA.offset().top - tmpArrow.height() / 2); + moveType = consts.move.TYPE_NEXT; + } else if (canInner) { + dX = 5 - tmpArrow.width(); + dY = tmpTop; + moveType = consts.move.TYPE_INNER; + } else { + clearMove(); + } + + if (tmpTarget) { + tmpArrow.css({ + "display": "block", + "top": dY + "px", + "left": (tmpLeft + dX) + "px" + }); + tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType); + + if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) { + startTime = (new Date()).getTime(); + } + if (tmpTargetNode && data.nodeIsParent(setting, tmpTargetNode) && moveType == consts.move.TYPE_INNER) { + var startTimer = true; + if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) { + clearTimeout(window.zTreeMoveTimer); + window.zTreeMoveTargetNodeTId = null; + } else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) { + startTimer = false; + } + if (startTimer) { + window.zTreeMoveTimer = setTimeout(function () { + if (moveType != consts.move.TYPE_INNER) return; + if (tmpTargetNode && data.nodeIsParent(setting, tmpTargetNode) && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime + && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) { + view.switchNode(targetSetting, tmpTargetNode); + if (targetSetting.edit.drag.autoExpandTrigger) { + targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]); + } + } + }, targetSetting.edit.drag.autoOpenTime + 50); + window.zTreeMoveTargetNodeTId = tmpTargetNode.tId; + } + } + } + } + } else { + moveType = consts.move.TYPE_INNER; + if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) { + tmpTarget.addClass(consts.node.TMPTARGET_TREE); + } else { + tmpTarget = null; + } + tmpArrow.css({ + "display": "none" + }); + if (window.zTreeMoveTimer) { + clearTimeout(window.zTreeMoveTimer); + window.zTreeMoveTargetNodeTId = null; + } + } + preTmpTargetNodeId = tmpTargetNodeId; + preTmpMoveType = moveType; + + setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]); + } + return false; + } + + doc.bind("mouseup", _docMouseUp); + + function _docMouseUp(event) { + if (window.zTreeMoveTimer) { + clearTimeout(window.zTreeMoveTimer); + window.zTreeMoveTargetNodeTId = null; + } + preTmpTargetNodeId = null; + preTmpMoveType = null; + doc.unbind("mousemove", _docMouseMove); + doc.unbind("mouseup", _docMouseUp); + doc.unbind("selectstart", _docSelect); + body.css("cursor", ""); + if (tmpTarget) { + tmpTarget.removeClass(consts.node.TMPTARGET_TREE); + if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) + .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); + } + tools.showIfameMask(setting, false); + + roots.showHoverDom = true; + if (root.dragFlag == 0) return; + root.dragFlag = 0; + + var i, l, tmpNode; + for (i = 0, l = nodes.length; i < l; i++) { + tmpNode = nodes[i]; + if (data.nodeIsParent(setting, tmpNode) && root.dragNodeShowBefore[tmpNode.tId] && !tmpNode.open) { + view.expandCollapseNode(setting, tmpNode, !tmpNode.open); + delete root.dragNodeShowBefore[tmpNode.tId]; + } + } + + if (curNode) curNode.remove(); + if (tmpArrow) tmpArrow.remove(); + + var isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy); + if (!isCopy && tmpTarget && tmpTargetNodeId && nodes[0].parentTId && tmpTargetNodeId == nodes[0].parentTId && moveType == consts.move.TYPE_INNER) { + tmpTarget = null; + } + if (tmpTarget) { + var dragTargetNode = tmpTargetNodeId == null ? null : data.getNodeCache(targetSetting, tmpTargetNodeId); + if (tools.apply(setting.callback.beforeDrop, [targetSetting.treeId, nodes, dragTargetNode, moveType, isCopy], true) == false) { + view.selectNodes(sourceSetting, nodes); + return; + } + var newNodes = isCopy ? tools.clone(nodes) : nodes; + + function dropCallback() { + if (isOtherTree) { + if (!isCopy) { + for (var i = 0, l = nodes.length; i < l; i++) { + view.removeNode(setting, nodes[i]); + } + } + if (moveType == consts.move.TYPE_INNER) { + view.addNodes(targetSetting, dragTargetNode, -1, newNodes); + } else { + view.addNodes(targetSetting, dragTargetNode.getParentNode(), moveType == consts.move.TYPE_PREV ? dragTargetNode.getIndex() : dragTargetNode.getIndex() + 1, newNodes); + } + } else { + if (isCopy && moveType == consts.move.TYPE_INNER) { + view.addNodes(targetSetting, dragTargetNode, -1, newNodes); + } else if (isCopy) { + view.addNodes(targetSetting, dragTargetNode.getParentNode(), moveType == consts.move.TYPE_PREV ? dragTargetNode.getIndex() : dragTargetNode.getIndex() + 1, newNodes); + } else { + if (moveType != consts.move.TYPE_NEXT) { + for (i = 0, l = newNodes.length; i < l; i++) { + view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false); + } + } else { + for (i = -1, l = newNodes.length - 1; i < l; l--) { + view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false); + } + } + } + } + view.selectNodes(targetSetting, newNodes); + + var a = $$(newNodes[0], setting).get(0); + view.scrollIntoView(setting, a); + + setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]); + } + + if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) { + view.asyncNode(targetSetting, dragTargetNode, false, dropCallback); + } else { + dropCallback(); + } + + } else { + view.selectNodes(sourceSetting, nodes); + setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]); + } + } + + doc.bind("selectstart", _docSelect); + + function _docSelect() { + return false; + } + + // 2018-03-30 FireFox has fixed this issue. + //Avoid FireFox's Bug + //If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error. + // if(eventMouseDown.preventDefault) { + // eventMouseDown.preventDefault(); + // } + return true; + } + }, + //method of tools for zTree + _tools = { + getAbs: function (obj) { + var oRect = obj.getBoundingClientRect(), + scrollTop = document.body.scrollTop + document.documentElement.scrollTop, + scrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft; + return [oRect.left + scrollLeft, oRect.top + scrollTop]; + }, + inputFocus: function (inputObj) { + if (inputObj.get(0)) { + inputObj.focus(); + tools.setCursorPosition(inputObj.get(0), inputObj.val().length); + } + }, + inputSelect: function (inputObj) { + if (inputObj.get(0)) { + inputObj.focus(); + inputObj.select(); + } + }, + setCursorPosition: function (obj, pos) { + if (obj.setSelectionRange) { + obj.focus(); + obj.setSelectionRange(pos, pos); + } else if (obj.createTextRange) { + var range = obj.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }, + showIfameMask: function (setting, showSign) { + var root = data.getRoot(setting); + //clear full mask + while (root.dragMaskList.length > 0) { + root.dragMaskList[0].remove(); + root.dragMaskList.shift(); + } + if (showSign) { + //show mask + var iframeList = $$("iframe", setting); + for (var i = 0, l = iframeList.length; i < l; i++) { + var obj = iframeList.get(i), + r = tools.getAbs(obj), + dragMask = $$("
                                                                                                                                                                                                                                                                                                                      ", setting); + dragMask.appendTo($$("body", setting)); + root.dragMaskList.push(dragMask); + } + } + } + }, + //method of operate ztree dom + _view = { + addEditBtn: function (setting, node) { + if (node.editNameFlag || $$(node, consts.id.EDIT, setting).length > 0) { + return; + } + if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) { + return; + } + var aObj = $$(node, consts.id.A, setting), + editStr = ""; + aObj.append(editStr); + + $$(node, consts.id.EDIT, setting).bind('click', + function () { + if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false; + view.editNode(setting, node); + return false; + } + ).show(); + }, + addRemoveBtn: function (setting, node) { + if (node.editNameFlag || $$(node, consts.id.REMOVE, setting).length > 0) { + return; + } + if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) { + return; + } + var aObj = $$(node, consts.id.A, setting), + removeStr = ""; + aObj.append(removeStr); + + $$(node, consts.id.REMOVE, setting).bind('click', + function () { + if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false; + view.removeNode(setting, node); + setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); + return false; + } + ).bind('mousedown', + function (eventMouseDown) { + return true; + } + ).show(); + }, + addHoverDom: function (setting, node) { + if (data.getRoots().showHoverDom) { + node.isHover = true; + if (setting.edit.enable) { + view.addEditBtn(setting, node); + view.addRemoveBtn(setting, node); + } + tools.apply(setting.view.addHoverDom, [setting.treeId, node]); + } + }, + cancelCurEditNode: function (setting, forceName, isCancel) { + var root = data.getRoot(setting), + node = root.curEditNode; + + if (node) { + var inputObj = root.curEditInput, + newName = forceName ? forceName : (isCancel ? data.nodeName(setting, node) : inputObj.val()); + if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) { + return false; + } + data.nodeName(setting, node, newName); + var aObj = $$(node, consts.id.A, setting); + aObj.removeClass(consts.node.CURSELECTED_EDIT); + inputObj.unbind(); + view.setNodeName(setting, node); + node.editNameFlag = false; + root.curEditNode = null; + root.curEditInput = null; + view.selectNode(setting, node, false); + setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); + } + root.noSelection = true; + return true; + }, + editNode: function (setting, node) { + var root = data.getRoot(setting); + view.editNodeBlur = false; + if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) { + setTimeout(function () { + tools.inputFocus(root.curEditInput); + }, 0); + return; + } + node.editNameFlag = true; + view.removeTreeDom(setting, node); + view.cancelCurEditNode(setting); + view.selectNode(setting, node, false); + $$(node, consts.id.SPAN, setting).html(""); + var inputObj = $$(node, consts.id.INPUT, setting); + inputObj.attr("value", data.nodeName(setting, node)); + if (setting.edit.editNameSelectAll) { + tools.inputSelect(inputObj); + } else { + tools.inputFocus(inputObj); + } + + inputObj.bind('blur', function (event) { + if (!view.editNodeBlur) { + view.cancelCurEditNode(setting); + } + }).bind('keydown', function (event) { + if (event.keyCode == "13") { + view.editNodeBlur = true; + view.cancelCurEditNode(setting); + } else if (event.keyCode == "27") { + view.cancelCurEditNode(setting, null, true); + } + }).bind('click', function (event) { + return false; + }).bind('dblclick', function (event) { + return false; + }); + + $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED_EDIT); + root.curEditInput = inputObj; + root.noSelection = false; + root.curEditNode = node; + }, + moveNode: function (setting, targetNode, node, moveType, animateFlag, isSilent) { + var root = data.getRoot(setting); + if (targetNode == node) return; + if (setting.data.keep.leaf && targetNode && !data.nodeIsParent(setting, targetNode) && moveType == consts.move.TYPE_INNER) return; + var oldParentNode = (node.parentTId ? node.getParentNode() : root), + targetNodeIsRoot = (targetNode === null || targetNode == root); + if (targetNodeIsRoot && targetNode === null) targetNode = root; + if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER; + var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root); + + if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) { + moveType = consts.move.TYPE_INNER; + } + + if (moveType == consts.move.TYPE_INNER) { + if (targetNodeIsRoot) { + //parentTId of root node is null + node.parentTId = null; + } else { + if (!data.nodeIsParent(setting, targetNode)) { + data.nodeIsParent(setting, targetNode, true); + targetNode.open = !!targetNode.open; + view.setNodeLineIcos(setting, targetNode); + } + node.parentTId = targetNode.tId; + } + } + + //move node Dom + var targetObj, target_ulObj; + if (targetNodeIsRoot) { + targetObj = setting.treeObj; + target_ulObj = targetObj; + } else { + if (!isSilent && moveType == consts.move.TYPE_INNER) { + view.expandCollapseNode(setting, targetNode, true, false); + } else if (!isSilent) { + view.expandCollapseNode(setting, targetNode.getParentNode(), true, false); + } + targetObj = $$(targetNode, setting); + target_ulObj = $$(targetNode, consts.id.UL, setting); + if (!!targetObj.get(0) && !target_ulObj.get(0)) { + var ulstr = []; + view.makeUlHtml(setting, targetNode, ulstr, ''); + targetObj.append(ulstr.join('')); + } + target_ulObj = $$(targetNode, consts.id.UL, setting); + } + var nodeDom = $$(node, setting); + if (!nodeDom.get(0)) { + nodeDom = view.appendNodes(setting, node.level, [node], null, -1, false, true).join(''); + } else if (!targetObj.get(0)) { + nodeDom.remove(); + } + if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) { + target_ulObj.append(nodeDom); + } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) { + targetObj.before(nodeDom); + } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) { + targetObj.after(nodeDom); + } + + //repair the data after move + var i, l, + tmpSrcIndex = -1, + tmpTargetIndex = 0, + oldNeighbor = null, + newNeighbor = null, + oldLevel = node.level; + var oldChildren = data.nodeChildren(setting, oldParentNode); + var targetParentChildren = data.nodeChildren(setting, targetParentNode); + var targetChildren = data.nodeChildren(setting, targetNode); + if (node.isFirstNode) { + tmpSrcIndex = 0; + if (oldChildren.length > 1) { + oldNeighbor = oldChildren[1]; + oldNeighbor.isFirstNode = true; + } + } else if (node.isLastNode) { + tmpSrcIndex = oldChildren.length - 1; + oldNeighbor = oldChildren[tmpSrcIndex - 1]; + oldNeighbor.isLastNode = true; + } else { + for (i = 0, l = oldChildren.length; i < l; i++) { + if (oldChildren[i].tId == node.tId) { + tmpSrcIndex = i; + break; + } + } + } + if (tmpSrcIndex >= 0) { + oldChildren.splice(tmpSrcIndex, 1); + } + if (moveType != consts.move.TYPE_INNER) { + for (i = 0, l = targetParentChildren.length; i < l; i++) { + if (targetParentChildren[i].tId == targetNode.tId) tmpTargetIndex = i; + } + } + if (moveType == consts.move.TYPE_INNER) { + if (!targetChildren) { + targetChildren = data.nodeChildren(setting, targetNode, []); + } + if (targetChildren.length > 0) { + newNeighbor = targetChildren[targetChildren.length - 1]; + newNeighbor.isLastNode = false; + } + targetChildren.splice(targetChildren.length, 0, node); + node.isLastNode = true; + node.isFirstNode = (targetChildren.length == 1); + } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) { + targetParentChildren.splice(tmpTargetIndex, 0, node); + newNeighbor = targetNode; + newNeighbor.isFirstNode = false; + node.parentTId = targetNode.parentTId; + node.isFirstNode = true; + node.isLastNode = false; + + } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) { + targetParentChildren.splice(tmpTargetIndex + 1, 0, node); + newNeighbor = targetNode; + newNeighbor.isLastNode = false; + node.parentTId = targetNode.parentTId; + node.isFirstNode = false; + node.isLastNode = true; + + } else { + if (moveType == consts.move.TYPE_PREV) { + targetParentChildren.splice(tmpTargetIndex, 0, node); + } else { + targetParentChildren.splice(tmpTargetIndex + 1, 0, node); + } + node.parentTId = targetNode.parentTId; + node.isFirstNode = false; + node.isLastNode = false; + } + data.fixPIdKeyValue(setting, node); + data.setSonNodeLevel(setting, node.getParentNode(), node); + + //repair node what been moved + view.setNodeLineIcos(setting, node); + view.repairNodeLevelClass(setting, node, oldLevel); + + //repair node's old parentNode dom + if (!setting.data.keep.parent && oldChildren.length < 1) { + //old parentNode has no child nodes + data.nodeIsParent(setting, oldParentNode, false); + oldParentNode.open = false; + var tmp_ulObj = $$(oldParentNode, consts.id.UL, setting), + tmp_switchObj = $$(oldParentNode, consts.id.SWITCH, setting), + tmp_icoObj = $$(oldParentNode, consts.id.ICON, setting); + view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU); + view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU); + tmp_ulObj.css("display", "none"); + + } else if (oldNeighbor) { + //old neigbor node + view.setNodeLineIcos(setting, oldNeighbor); + } + + //new neigbor node + if (newNeighbor) { + view.setNodeLineIcos(setting, newNeighbor); + } + + //repair checkbox / radio + if (!!setting.check && setting.check.enable && view.repairChkClass) { + view.repairChkClass(setting, oldParentNode); + view.repairParentChkClassWithSelf(setting, oldParentNode); + if (oldParentNode != node.parent) + view.repairParentChkClassWithSelf(setting, node); + } + + //expand parents after move + if (!isSilent) { + view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag); + } + }, + removeEditBtn: function (setting, node) { + $$(node, consts.id.EDIT, setting).unbind().remove(); + }, + removeRemoveBtn: function (setting, node) { + $$(node, consts.id.REMOVE, setting).unbind().remove(); + }, + removeTreeDom: function (setting, node) { + node.isHover = false; + view.removeEditBtn(setting, node); + view.removeRemoveBtn(setting, node); + tools.apply(setting.view.removeHoverDom, [setting.treeId, node]); + }, + repairNodeLevelClass: function (setting, node, oldLevel) { + if (oldLevel === node.level) return; + var liObj = $$(node, setting), + aObj = $$(node, consts.id.A, setting), + ulObj = $$(node, consts.id.UL, setting), + oldClass = consts.className.LEVEL + oldLevel, + newClass = consts.className.LEVEL + node.level; + liObj.removeClass(oldClass); + liObj.addClass(newClass); + aObj.removeClass(oldClass); + aObj.addClass(newClass); + ulObj.removeClass(oldClass); + ulObj.addClass(newClass); + }, + selectNodes: function (setting, nodes) { + for (var i = 0, l = nodes.length; i < l; i++) { + view.selectNode(setting, nodes[i], i > 0); + } + } + }, + + _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, + $$ = tools.$; + + data.exSetting(_setting); + data.addInitBind(_bindEvent); + data.addInitUnBind(_unbindEvent); + data.addInitCache(_initCache); + data.addInitNode(_initNode); + data.addInitProxy(_eventProxy); + data.addInitRoot(_initRoot); + data.addZTreeTools(_zTreeTools); + + var _cancelPreSelectedNode = view.cancelPreSelectedNode; + view.cancelPreSelectedNode = function (setting, node) { + var list = data.getRoot(setting).curSelectedList; + for (var i = 0, j = list.length; i < j; i++) { + if (!node || node === list[i]) { + view.removeTreeDom(setting, list[i]); + if (node) break; + } + } + if (_cancelPreSelectedNode) _cancelPreSelectedNode.apply(view, arguments); + } + + var _createNodes = view.createNodes; + view.createNodes = function (setting, level, nodes, parentNode, index) { + if (_createNodes) { + _createNodes.apply(view, arguments); + } + if (!nodes) return; + if (view.repairParentChkClassWithSelf) { + view.repairParentChkClassWithSelf(setting, parentNode); + } + } + + var _makeNodeUrl = view.makeNodeUrl; + view.makeNodeUrl = function (setting, node) { + return setting.edit.enable ? null : (_makeNodeUrl.apply(view, arguments)); + } + + var _removeNode = view.removeNode; + view.removeNode = function (setting, node) { + var root = data.getRoot(setting); + if (root.curEditNode === node) root.curEditNode = null; + if (_removeNode) { + _removeNode.apply(view, arguments); + } + } + + var _selectNode = view.selectNode; + view.selectNode = function (setting, node, addFlag) { + var root = data.getRoot(setting); + if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) { + return false; + } + if (_selectNode) _selectNode.apply(view, arguments); + view.addHoverDom(setting, node); + return true; + } + + var _uCanDo = tools.uCanDo; + tools.uCanDo = function (setting, e) { + var root = data.getRoot(setting); + if (e && (tools.eqs(e.type, "mouseover") || tools.eqs(e.type, "mouseout") || tools.eqs(e.type, "mousedown") || tools.eqs(e.type, "mouseup"))) { + return true; + } + if (root.curEditNode) { + view.editNodeBlur = false; + root.curEditInput.focus(); + } + return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true); + } +})(jQuery); \ No newline at end of file diff --git a/pccenter/src/main/resources/static/src/zTree_v3/js/jquery.ztree.all.min.js b/pccenter/src/main/resources/static/src/zTree_v3/js/jquery.ztree.all.min.js new file mode 100644 index 0000000000000000000000000000000000000000..274165d44f0658c3738744e4019a6fc3fb0c6f99 --- /dev/null +++ b/pccenter/src/main/resources/static/src/zTree_v3/js/jquery.ztree.all.min.js @@ -0,0 +1,3 @@ +!function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),data.nodeChildren(e,t,[]),t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(d){var e=d.treeObj,t=consts.event;e.bind(t.NODECREATED,function(e,t,n){tools.apply(d.callback.onNodeCreated,[e,t,n])}),e.bind(t.CLICK,function(e,t,n,o,a){tools.apply(d.callback.onClick,[t,n,o,a])}),e.bind(t.EXPAND,function(e,t,n){tools.apply(d.callback.onExpand,[e,t,n])}),e.bind(t.COLLAPSE,function(e,t,n){tools.apply(d.callback.onCollapse,[e,t,n])}),e.bind(t.ASYNC_SUCCESS,function(e,t,n,o){tools.apply(d.callback.onAsyncSuccess,[e,t,n,o])}),e.bind(t.ASYNC_ERROR,function(e,t,n,o,a,r){tools.apply(d.callback.onAsyncError,[e,t,n,o,a,r])}),e.bind(t.REMOVE,function(e,t,n){tools.apply(d.callback.onRemove,[e,t,n])}),e.bind(t.SELECTED,function(e,t,n){tools.apply(d.callback.onSelected,[t,n])}),e.bind(t.UNSELECTED,function(e,t,n){tools.apply(d.callback.onUnSelected,[t,n])})},_unbindEvent=function(e){var t=e.treeObj,n=consts.event;t.unbind(n.NODECREATED).unbind(n.CLICK).unbind(n.EXPAND).unbind(n.COLLAPSE).unbind(n.ASYNC_SUCCESS).unbind(n.ASYNC_ERROR).unbind(n.REMOVE).unbind(n.SELECTED).unbind(n.UNSELECTED)},_eventProxy=function(e){var t=e.target,n=data.getSetting(e.data.treeId),o="",a=null,r="",d="",i=null,s=null,l=null;if(tools.eqs(e.type,"mousedown")?d="mousedown":tools.eqs(e.type,"mouseup")?d="mouseup":tools.eqs(e.type,"contextmenu")?d="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(o=tools.getNodeMainDom(t).id,r="switchNode"):(l=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(o=tools.getNodeMainDom(l).id,r="clickNode"):tools.eqs(e.type,"dblclick")&&(d="dblclick",(l=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(o=tools.getNodeMainDom(l).id,r="switchNode")),0=r.length&&(n=-1):(r=data.nodeChildren(e,t,[]),n=-1),0=u.length-n.length)&&(a=-1);for(var p=0,f=n.length;p/g,">");e.push("",a,"")},makeDOMNodeLine:function(e,t,n){e.push("")},makeDOMNodeMainAfter:function(e,t,n){e.push("
                                                                                                                                                                                                                                                                                                                    • ")},makeDOMNodeMainBefore:function(e,t,n){e.push("
                                                                                                                                                                                                                                                                                                                    • ")},makeDOMNodeNameAfter:function(e,t,n){e.push("")},makeDOMNodeNameBefore:function(e,t,n){var o=data.nodeTitle(t,n),a=view.makeNodeUrl(t,n),r=view.makeNodeFontCss(t,n),d=[];for(var i in r)d.push(i,":",r[i],";");e.push("/g,">"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var n=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return n&&"function"!=typeof n?n:{}},makeNodeIcoClass:function(e,t){var n=["ico"];if(!t.isAjaxing){var o=data.nodeIsParent(e,t);n[0]=(t.iconSkin?t.iconSkin+"_":"")+n[0],o?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU)}return consts.className.BUTTON+" "+n.join("_")},makeNodeIcoStyle:function(e,t){var n=[];if(!t.isAjaxing){var o=data.nodeIsParent(e,t)&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t[e.data.key.icon];o&&n.push("background:url(",o,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("display:none;")}return n.join("")},makeNodeLineClass:function(e,t){var n=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?n.push(consts.line.ROOT):0==t.level&&t.isFirstNode?n.push(consts.line.ROOTS):t.isLastNode?n.push(consts.line.BOTTOM):n.push(consts.line.CENTER):n.push(consts.line.NOLINE),data.nodeIsParent(e,t)?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+n.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var n=e.data.key.url;return t[n]?t[n]:null},makeUlHtml:function(e,t,n,o){n.push("
                                                                                                                                                                                                                                                                                                                        "),n.push(o),n.push("
                                                                                                                                                                                                                                                                                                                      ")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var n=data.nodeChildren(e,t);if(n){for(var o=0,a=n.length;on.bottom||o.right>n.right||o.left
                                                                                                                                                                                                                                                                                                                    • ",Z)).append(Pe(d,he.id.A,Z).clone()),r.css("padding","0"),r.children("#"+d.tId+he.id.A).removeClass(he.node.CURSELECTED),te.append(r),t==Z.edit.drag.maxShowNodeNum-1&&(r=Pe("
                                                                                                                                                                                                                                                                                                                    • ...
                                                                                                                                                                                                                                                                                                                    • ",Z),te.append(r)));te.attr("id",ee[0].tId+he.id.UL+"_tmp"),te.addClass(Z.treeObj.attr("class")),te.appendTo(ie),(oe=Pe("",Z)).attr("id","zTreeMove_arrow_tmp"),oe.appendTo(ie),Z.treeObj.trigger(he.event.DRAG,[e,Z.treeId,ee])}if(1==$.dragFlag){if(de&&oe.attr("id")==e.target.id&&ue&&e.clientX+ae.scrollLeft()+2>fe("#"+ue+he.id.A,de).offset().left){var s=fe("#"+ue+he.id.A,de);e.target=0Z.edit.drag.borderMin,b=fZ.edit.drag.borderMin,R=EZ.edit.drag.borderMin,P=IZ.edit.drag.borderMin,C=T>Z.edit.drag.borderMin&&f>Z.edit.drag.borderMin&&E>Z.edit.drag.borderMin&&I>Z.edit.drag.borderMin,w=h&&se.treeObj.scrollTop()<=0,M=b&&se.treeObj.scrollTop()+se.treeObj.height()+10>=m,_=R&&se.treeObj.scrollLeft()<=0,O=P&&se.treeObj.scrollLeft()+se.treeObj.width()+10>=p;if(e.target&&Ie.isChildOrSelf(e.target,se.treeId)){for(var D=e.target;D&&D.tagName&&!Ie.eqs(D.tagName,"li")&&D.id!=se.treeId;)D=D.parentNode;var y=!0;for(t=0,o=ee.length;tse.edit.drag.autoOpenTime&&Ie.apply(se.callback.beforeDragOpen,[se.treeId,A],!0)&&(be.switchNode(se,A),se.edit.drag.autoExpandTrigger&&se.treeObj.trigger(he.event.EXPAND,[se.treeId,A]))},se.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=A.tId)}}else F()}else ge=he.move.TYPE_INNER,de&&Ie.apply(se.edit.drag.inner,[se.treeId,ee,null],!!se.edit.drag.inner)?de.addClass(he.node.TMPTARGET_TREE):de=null,oe.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null);ce=ue,Ne=ge,Z.treeObj.trigger(he.event.DRAGMOVE,[e,Z.treeId,ee])}return!1}function Te(d){if(window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null),Ne=ce=null,ae.unbind("mousemove",s),ae.unbind("mouseup",Te),ae.unbind("selectstart",c),ie.css("cursor",""),de&&(de.removeClass(he.node.TMPTARGET_TREE),ue&&fe("#"+ue+he.id.A,de).removeClass(he.node.TMPTARGET_NODE+"_"+he.move.TYPE_PREV).removeClass(he.node.TMPTARGET_NODE+"_"+Ee.move.TYPE_NEXT).removeClass(he.node.TMPTARGET_NODE+"_"+Ee.move.TYPE_INNER)),Ie.showIfameMask(Z,!1),J.showHoverDom=!0,0!=$.dragFlag){var e,t,o;for(e=$.dragFlag=0,t=ee.length;e
                                                                                                                                                                                                                                                                                                                      ",e);l.appendTo(Pe("body",e)),o.dragMaskList.push(l)}}},view:{addEditBtn:function(e,t){if(!(t.editNameFlag||0
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/sys/editAdmin.html b/pccenter/src/main/resources/templates/sys/editAdmin.html new file mode 100644 index 0000000000000000000000000000000000000000..9cbfe6bb23692daa5f2f00190f6259b8179daf7f --- /dev/null +++ b/pccenter/src/main/resources/templates/sys/editAdmin.html @@ -0,0 +1,122 @@ + + + + + 编辑管理员 + + + +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/sys/index.html b/pccenter/src/main/resources/templates/sys/index.html new file mode 100644 index 0000000000000000000000000000000000000000..47fcf32ef3ded84627953cd3b611c2aa3c531366 --- /dev/null +++ b/pccenter/src/main/resources/templates/sys/index.html @@ -0,0 +1,87 @@ + + + + + 后台首页 + + + + + +
                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                      • 后台首页
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/sys/main.html b/pccenter/src/main/resources/templates/sys/main.html new file mode 100644 index 0000000000000000000000000000000000000000..fc32d8b0e4a9217e15e85e71473c5fa416cbac67 --- /dev/null +++ b/pccenter/src/main/resources/templates/sys/main.html @@ -0,0 +1,92 @@ + + + + + Title + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + 信息统计 +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      统计用户
                                                                                                                                                                                                                                                                                                                      总数
                                                                                                                                                                                                                                                                                                                      今日
                                                                                                                                                                                                                                                                                                                      昨日
                                                                                                                                                                                                                                                                                                                      本周
                                                                                                                                                                                                                                                                                                                      本月
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      系统基本参数
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      当前版本
                                                                                                                                                                                                                                                                                                                      开发作者
                                                                                                                                                                                                                                                                                                                      网站首页
                                                                                                                                                                                                                                                                                                                      服务器环境
                                                                                                                                                                                                                                                                                                                      数据库版本
                                                                                                                                                                                                                                                                                                                      最大上传限制
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/sys/roleList.html b/pccenter/src/main/resources/templates/sys/roleList.html new file mode 100644 index 0000000000000000000000000000000000000000..c688159c0623bbfa1bea6b44121c0b8d05701602 --- /dev/null +++ b/pccenter/src/main/resources/templates/sys/roleList.html @@ -0,0 +1,62 @@ + + + + + 角色 + + + + +
                                                                                                                                                                                                                                                                                                                      + + + + + + \ No newline at end of file diff --git a/pccenter/src/test/java/com/woniu/happycommunity/pccenter/PccenterApplicationTests.java b/pccenter/src/test/java/com/woniu/happycommunity/pccenter/PccenterApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..617cfba7e507aa5acc992b9d23a248b56b21b70d --- /dev/null +++ b/pccenter/src/test/java/com/woniu/happycommunity/pccenter/PccenterApplicationTests.java @@ -0,0 +1,13 @@ +package com.woniu.happycommunity.pccenter; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class PccenterApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/propertydemo/.gitignore b/propertydemo/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a2a3040aa86debfd8826d9c2b5c816314c17d9fe --- /dev/null +++ b/propertydemo/.gitignore @@ -0,0 +1,31 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ diff --git a/propertydemo/.mvn/wrapper/MavenWrapperDownloader.java b/propertydemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000000000000000000000000000000000000..a45eb6ba269cd38f8965cef786729790945d9537 --- /dev/null +++ b/propertydemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,118 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if (mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if (mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if (!outputFile.getParentFile().exists()) { + if (!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/propertydemo/.mvn/wrapper/maven-wrapper.jar b/propertydemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2cc7d4a55c0cd0092912bf49ae38b3a9e3fd0054 Binary files /dev/null and b/propertydemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/propertydemo/.mvn/wrapper/maven-wrapper.properties b/propertydemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..642d572ce90e5085986bdd9c9204b9404f028084 --- /dev/null +++ b/propertydemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/propertydemo/pom.xml b/propertydemo/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..c93e61c74709ca23359540584ca1b1d746daf307 --- /dev/null +++ b/propertydemo/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + com.woniu + propertydemo + 0.0.1-SNAPSHOT + propertydemo + Demo project for Spring Boot + + + 1.8 + Hoxton.SR3 + + + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.1 + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + mysql + mysql-connector-java + runtime + + + org.projectlombok + lombok + true + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.2.10 + + + + org.apache.shiro + shiro-spring-boot-web-starter + 1.4.1 + + + + com.github.theborakompanioni + thymeleaf-extras-shiro + 2.0.0 + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + ${basedir}/src/main/resources/generatorConfig.xml + + + + mysql + mysql-connector-java + 5.1.47 + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/propertydemo/src/main/java/com/woniu/PropertydemoApplication.java b/propertydemo/src/main/java/com/woniu/PropertydemoApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..4702bca9aba943e5270b244806e783d29f85b0ae --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/PropertydemoApplication.java @@ -0,0 +1,15 @@ +package com.woniu; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +@MapperScan(value = {"com.woniu.dao"}) +public class PropertydemoApplication { + + public static void main(String[] args) { + SpringApplication.run(PropertydemoApplication.class, args); + } + +} diff --git a/propertydemo/src/main/java/com/woniu/common/CommonResult.java b/propertydemo/src/main/java/com/woniu/common/CommonResult.java new file mode 100644 index 0000000000000000000000000000000000000000..8676ad67bfe1370216b1aabe420164c0ff9e52ea --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/common/CommonResult.java @@ -0,0 +1,103 @@ +package com.woniu.common; + +import java.io.Serializable; + +public class CommonResult implements Serializable { + + //状态码 + private Long code; + //提示消息 + private String message; + //响应数据 + private T data; + + public CommonResult(){} + public CommonResult(Long code,String message){ + this.code = code; + this.message = message; + } + + public CommonResult(Long code ,String message,T data){ + this.code = code; + this.message = message; + this.data = data; + } + + /** + * 响应成功的结果 + * @return 状态码 200 + */ + public static CommonResult success(){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),ResultUtil.SUCCESS.getMessage()); + } + + public static CommonResult success(String message){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),message); + } + + public static CommonResult success(T data){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),ResultUtil.SUCCESS.getMessage(),data); + } + public static CommonResult success(String message, T data){ + return new CommonResult(ResultUtil.SUCCESS.getCode(),message,data); + } + + /** + * 响应失败 + * @return 状态码500 + */ + public static CommonResult failed(){ + return new CommonResult(ResultUtil.FAILED.getCode(),ResultUtil.FAILED.getMessage()); + } + + public static CommonResult failed(String message){ + return new CommonResult(ResultUtil.FAILED.getCode(),message); + } + /** + * 参数验证失败 + * @return 状态码 400 + */ + public static CommonResult valetateFailed(){ + return new CommonResult(ResultUtil.VALIDATE_FAILED.getCode(),ResultUtil.VALIDATE_FAILED.getMessage()); + } + + /** + * 未认证 + * @return 状态码401 + */ + public static CommonResult unathorizedFailed(){ + return new CommonResult(ResultUtil.UNAUTORIED.getCode(), ResultUtil.UNAUTORIED.getMessage()); + } + + /** + * 未授权 + * @return 状态码403 + */ + public static CommonResult forbiddenFailed(){ + return new CommonResult(ResultUtil.FORBIDDEN.getCode(),ResultUtil.FORBIDDEN.getMessage()); + } + + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } +} diff --git a/propertydemo/src/main/java/com/woniu/common/ResultUtil.java b/propertydemo/src/main/java/com/woniu/common/ResultUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..36aabc043f22423b6de11eba73462e628458a092 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/common/ResultUtil.java @@ -0,0 +1,32 @@ +package com.woniu.common; + +public enum ResultUtil { + SUCCESS(200L,"操作成功"), + FAILED(500L,"操作失败"), + VALIDATE_FAILED(400L,"参数验证失败"), + UNAUTORIED(401L,"未认证或token过期"), + FORBIDDEN(403L,"未授权"); + private Long code; + private String message; + + private ResultUtil(Long code,String message){ + this.code = code; + this.message = message; + } + + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/propertydemo/src/main/java/com/woniu/controller/PayController.java b/propertydemo/src/main/java/com/woniu/controller/PayController.java new file mode 100644 index 0000000000000000000000000000000000000000..4149c9be44c6114514bc5872f09610b1a699382b --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/controller/PayController.java @@ -0,0 +1,63 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.pojo.Pay; +import com.woniu.pojo.ServiceImg; +import com.woniu.service.PayService; +import com.woniu.service.ServiceImgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import java.util.List; +import java.util.Map; + +@Controller +@RequestMapping("/propertypay") +public class PayController { + + @Autowired + private PayService payService; + + private ServiceImgService serviceImgService; + + //通过物业id获取物业服务列表 + @RequestMapping("/list/{propertyid}") + @ResponseBody + public ModelAndView propertylist(@PathVariable("propertyid")Integer propertyid){ + List propertypays=payService.findserviceByPropertyId(propertyid); + ModelAndView modelAndView=new ModelAndView("servicelist/list"); + modelAndView.addObject("propertypays",propertypays); + return modelAndView; + } + + //通过商家id获取商家服务列表 + //@RequestMapping("/list/{shopid}") + //@ResponseBody + //public ModelAndView shoplist(@PathVariable("shopid")Integer shopid) + //{ + //List shoppays=payService.findserviceByShopId(shopid); + //ModelAndView modelAndView=new ModelAndView("servicelist/list"); + //modelAndView.addObject("shoppays",shoppays); + //return modelAndView; + //} + + //根据服务id获取服务详细信息 + @RequestMapping("/detail/{serviceid}") + @ResponseBody + public ModelAndView details(@PathVariable("serviceid")Integer serviceid) + { + Pay pay=payService.finddetailByPayId(serviceid); + ServiceImg serviceImg=serviceImgService.findServiceImgByServiceId(serviceid); + ModelAndView modelAndView=new ModelAndView("servicedetail/detail"); + modelAndView.addObject("Pay",pay); + modelAndView.addObject("serviceImg",serviceImg); + return modelAndView; + } + +} diff --git a/propertydemo/src/main/java/com/woniu/dao/BusinessMapper.java b/propertydemo/src/main/java/com/woniu/dao/BusinessMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..c9a3bf6eb7873a2d3dcb5a68acd59f085110e54e --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/BusinessMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.Business; + +public interface BusinessMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Business record); + + int insertSelective(Business record); + + Business selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Business record); + + int updateByPrimaryKey(Business record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/CollectServiceMapper.java b/propertydemo/src/main/java/com/woniu/dao/CollectServiceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..31423b24e7154784aa8ce63c3e05b447b4df6ae1 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/CollectServiceMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.CollectService; + +public interface CollectServiceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(CollectService record); + + int insertSelective(CollectService record); + + CollectService selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(CollectService record); + + int updateByPrimaryKey(CollectService record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/EvaluateServiceMapper.java b/propertydemo/src/main/java/com/woniu/dao/EvaluateServiceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..ef0ba7f2996f8b268d65befb0d19569e3efc3948 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/EvaluateServiceMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.EvaluateService; + +public interface EvaluateServiceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(EvaluateService record); + + int insertSelective(EvaluateService record); + + EvaluateService selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(EvaluateService record); + + int updateByPrimaryKey(EvaluateService record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/PayMapper.java b/propertydemo/src/main/java/com/woniu/dao/PayMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..1e62e160f494acc0ff8b41ea192698632e7141bc --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/PayMapper.java @@ -0,0 +1,23 @@ +package com.woniu.dao; + +import com.woniu.pojo.Pay; + +import java.util.List; + +public interface PayMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Pay record); + + int insertSelective(Pay record); + + Pay selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Pay record); + + int updateByPrimaryKey(Pay record); + + List selectByPropertyId(Integer propertyid); + + List selectByShopId(Integer shopid); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/PropertyMapper.java b/propertydemo/src/main/java/com/woniu/dao/PropertyMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..e0db7812361b5e337d75a6885697d9fb3493176e --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/PropertyMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.Property; + +public interface PropertyMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Property record); + + int insertSelective(Property record); + + Property selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Property record); + + int updateByPrimaryKey(Property record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/Property_imgMapper.java b/propertydemo/src/main/java/com/woniu/dao/Property_imgMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..15e7560082e7495e35d2d1272fe1aa7ead1c814d --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/Property_imgMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.Property_img; + +public interface Property_imgMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Property_img record); + + int insertSelective(Property_img record); + + Property_img selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Property_img record); + + int updateByPrimaryKey(Property_img record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/ServiceImgMapper.java b/propertydemo/src/main/java/com/woniu/dao/ServiceImgMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..b40eb888650760901bceddc7bada12bb992f9b20 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/ServiceImgMapper.java @@ -0,0 +1,21 @@ +package com.woniu.dao; + +import com.woniu.pojo.ServiceImg; +import org.apache.ibatis.annotations.Select; + +public interface ServiceImgMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ServiceImg record); + + int insertSelective(ServiceImg record); + + ServiceImg selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ServiceImg record); + + int updateByPrimaryKey(ServiceImg record); + + @Select("select * from service_img where serviceid=#{ServiceId}") + ServiceImg selectByServiceId(Integer ServiceId); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/ServiceOrderMapper.java b/propertydemo/src/main/java/com/woniu/dao/ServiceOrderMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..11c53783c28c234939fe015441902d53e266ef87 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/ServiceOrderMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.ServiceOrder; + +public interface ServiceOrderMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ServiceOrder record); + + int insertSelective(ServiceOrder record); + + ServiceOrder selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ServiceOrder record); + + int updateByPrimaryKey(ServiceOrder record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/StateServiceMapper.java b/propertydemo/src/main/java/com/woniu/dao/StateServiceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..c355d854a4425d7f8c9e7c0a8d70f16561a7c86d --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/StateServiceMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.StateService; + +public interface StateServiceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(StateService record); + + int insertSelective(StateService record); + + StateService selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(StateService record); + + int updateByPrimaryKey(StateService record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/dao/StopServiceMapper.java b/propertydemo/src/main/java/com/woniu/dao/StopServiceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..f4efd3c25e7a780dec60da2a50f4d17a6f506bb8 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/dao/StopServiceMapper.java @@ -0,0 +1,17 @@ +package com.woniu.dao; + +import com.woniu.pojo.StopService; + +public interface StopServiceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(StopService record); + + int insertSelective(StopService record); + + StopService selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(StopService record); + + int updateByPrimaryKey(StopService record); +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/Business.java b/propertydemo/src/main/java/com/woniu/pojo/Business.java new file mode 100644 index 0000000000000000000000000000000000000000..84fb5935c4659d5e0257a3c57864b625f6300f3a --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/Business.java @@ -0,0 +1,195 @@ +package com.woniu.pojo; + +import java.util.Date; + +public class Business { + private Integer id; + + private String idNumber; + + private String cellPhNumber; + + private String password; + + private String name; + + private Integer sex; + + private String nickname; + + private String mailbox; + + private Integer plotId; + + private String tag; + + private Integer mailboxStatus; + + private String code; + + private String passwordSalt; + + private Date createTime; + + private String authentication; + + private Date authTime; + + private Integer status; + + private String address; + + private String introduce; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getIdNumber() { + return idNumber; + } + + public void setIdNumber(String idNumber) { + this.idNumber = idNumber; + } + + public String getCellPhNumber() { + return cellPhNumber; + } + + public void setCellPhNumber(String cellPhNumber) { + this.cellPhNumber = cellPhNumber; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getSex() { + return sex; + } + + public void setSex(Integer sex) { + this.sex = sex; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public String getMailbox() { + return mailbox; + } + + public void setMailbox(String mailbox) { + this.mailbox = mailbox; + } + + public Integer getPlotId() { + return plotId; + } + + public void setPlotId(Integer plotId) { + this.plotId = plotId; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public Integer getMailboxStatus() { + return mailboxStatus; + } + + public void setMailboxStatus(Integer mailboxStatus) { + this.mailboxStatus = mailboxStatus; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getPasswordSalt() { + return passwordSalt; + } + + public void setPasswordSalt(String passwordSalt) { + this.passwordSalt = passwordSalt; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getAuthentication() { + return authentication; + } + + public void setAuthentication(String authentication) { + this.authentication = authentication; + } + + public Date getAuthTime() { + return authTime; + } + + public void setAuthTime(Date authTime) { + this.authTime = authTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getIntroduce() { + return introduce; + } + + public void setIntroduce(String introduce) { + this.introduce = introduce; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/CollectService.java b/propertydemo/src/main/java/com/woniu/pojo/CollectService.java new file mode 100644 index 0000000000000000000000000000000000000000..6b705b418e670ec3c8d53b7cf33b149f372f6b3c --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/CollectService.java @@ -0,0 +1,33 @@ +package com.woniu.pojo; + +public class CollectService { + private Integer id; + + private Integer userid; + + private Integer serviceid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getUserid() { + return userid; + } + + public void setUserid(Integer userid) { + this.userid = userid; + } + + public Integer getServiceid() { + return serviceid; + } + + public void setServiceid(Integer serviceid) { + this.serviceid = serviceid; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/EvaluateService.java b/propertydemo/src/main/java/com/woniu/pojo/EvaluateService.java new file mode 100644 index 0000000000000000000000000000000000000000..774e27d25290a5cf6c1e0aa3dd8cc7bd7c058ed5 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/EvaluateService.java @@ -0,0 +1,33 @@ +package com.woniu.pojo; + +public class EvaluateService { + private Integer id; + + private Integer serviceid2; + + private String evalute; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public String getEvalute() { + return evalute; + } + + public void setEvalute(String evalute) { + this.evalute = evalute; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/Pay.java b/propertydemo/src/main/java/com/woniu/pojo/Pay.java new file mode 100644 index 0000000000000000000000000000000000000000..9ba26f6e0a1ecd0036f6cfd710d7948a27233f51 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/Pay.java @@ -0,0 +1,95 @@ +package com.woniu.pojo; + +public class Pay { + private Integer id; + + private Integer propertyid; + + private Integer shopid; + + private String payname; + + private String payprice; + + private String paytime; + + private Integer status; + + private String icon; + + private Integer serviceType; + + private Property property; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getPropertyid() { + return propertyid; + } + + public void setPropertyid(Integer propertyid) { + this.propertyid = propertyid; + } + + public Integer getShopid() { + return shopid; + } + + public void setShopid(Integer shopid) { + this.shopid = shopid; + } + + public String getPayname() { + return payname; + } + + public void setPayname(String payname) { + this.payname = payname; + } + + public String getPayprice() { + return payprice; + } + + public void setPayprice(String payprice) { + this.payprice = payprice; + } + + public String getPaytime() { + return paytime; + } + + public void setPaytime(String paytime) { + this.paytime = paytime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public Integer getServiceType() { + return serviceType; + } + + public void setServiceType(Integer serviceType) { + this.serviceType = serviceType; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/Property.java b/propertydemo/src/main/java/com/woniu/pojo/Property.java new file mode 100644 index 0000000000000000000000000000000000000000..79bd49c47e2745828954c727282bb62acbac6add --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/Property.java @@ -0,0 +1,97 @@ +package com.woniu.pojo; + +import java.util.Date; + +public class Property { + private Integer id; + + private Integer villageId; + + private String username; + + private String password; + + private String saltValue; + + private String phone; + + private Integer status; + + private Date createTime; + + private Date passTime; + + private Pay pay; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getVillageId() { + return villageId; + } + + public void setVillageId(Integer villageId) { + this.villageId = villageId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSaltValue() { + return saltValue; + } + + public void setSaltValue(String saltValue) { + this.saltValue = saltValue; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getPassTime() { + return passTime; + } + + public void setPassTime(Date passTime) { + this.passTime = passTime; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/Property_img.java b/propertydemo/src/main/java/com/woniu/pojo/Property_img.java new file mode 100644 index 0000000000000000000000000000000000000000..662045e9b52a1322c434af7578d8e56b13daf194 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/Property_img.java @@ -0,0 +1,33 @@ +package com.woniu.pojo; + +public class Property_img { + private Integer id; + + private Integer propertyId; + + private String picUrl; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getPropertyId() { + return propertyId; + } + + public void setPropertyId(Integer propertyId) { + this.propertyId = propertyId; + } + + public String getPicUrl() { + return picUrl; + } + + public void setPicUrl(String picUrl) { + this.picUrl = picUrl; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/ServiceImg.java b/propertydemo/src/main/java/com/woniu/pojo/ServiceImg.java new file mode 100644 index 0000000000000000000000000000000000000000..61aa41a0f32714a984dcd2b0784a43f409dfc36f --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/ServiceImg.java @@ -0,0 +1,33 @@ +package com.woniu.pojo; + +public class ServiceImg { + private Integer id; + + private Integer serviceid; + + private String img; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid() { + return serviceid; + } + + public void setServiceid(Integer serviceid) { + this.serviceid = serviceid; + } + + public String getImg() { + return img; + } + + public void setImg(String img) { + this.img = img; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/ServiceOrder.java b/propertydemo/src/main/java/com/woniu/pojo/ServiceOrder.java new file mode 100644 index 0000000000000000000000000000000000000000..4458adfd9f26132ada5a489297a0995006a79f6e --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/ServiceOrder.java @@ -0,0 +1,65 @@ +package com.woniu.pojo; + +import java.util.Date; + +public class ServiceOrder { + private Integer id; + + private Integer serviceid2; + + private Integer userid; + + private String orderPrice; + + private Date starttime; + + private Date endtime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public Integer getUserid() { + return userid; + } + + public void setUserid(Integer userid) { + this.userid = userid; + } + + public String getOrderPrice() { + return orderPrice; + } + + public void setOrderPrice(String orderPrice) { + this.orderPrice = orderPrice; + } + + public Date getStarttime() { + return starttime; + } + + public void setStarttime(Date starttime) { + this.starttime = starttime; + } + + public Date getEndtime() { + return endtime; + } + + public void setEndtime(Date endtime) { + this.endtime = endtime; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/StateService.java b/propertydemo/src/main/java/com/woniu/pojo/StateService.java new file mode 100644 index 0000000000000000000000000000000000000000..538279035a997a662c42b26d8dc67609a70de46c --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/StateService.java @@ -0,0 +1,33 @@ +package com.woniu.pojo; + +public class StateService { + private Integer id; + + private Integer serviceid2; + + private String statecontext; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public String getStatecontext() { + return statecontext; + } + + public void setStatecontext(String statecontext) { + this.statecontext = statecontext; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/pojo/StopService.java b/propertydemo/src/main/java/com/woniu/pojo/StopService.java new file mode 100644 index 0000000000000000000000000000000000000000..b37c71b3b55095c3025701879ee64640ca44306e --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/pojo/StopService.java @@ -0,0 +1,33 @@ +package com.woniu.pojo; + +public class StopService { + private Integer id; + + private Integer serviceid2; + + private String reason; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } +} \ No newline at end of file diff --git a/propertydemo/src/main/java/com/woniu/service/PayService.java b/propertydemo/src/main/java/com/woniu/service/PayService.java new file mode 100644 index 0000000000000000000000000000000000000000..83cfd3fe87b38f822185cf968303da65561a42f8 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/service/PayService.java @@ -0,0 +1,15 @@ +package com.woniu.service; + +import com.woniu.pojo.Pay; + + +import java.util.List; + +public interface PayService { + + List findserviceByPropertyId(Integer propertyid); + + List findserviceByShopId(Integer shopid); + + Pay finddetailByPayId(Integer payid); +} diff --git a/propertydemo/src/main/java/com/woniu/service/ServiceImgService.java b/propertydemo/src/main/java/com/woniu/service/ServiceImgService.java new file mode 100644 index 0000000000000000000000000000000000000000..16ea144e9bd7f5f765123108ffad1d9d447add6a --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/service/ServiceImgService.java @@ -0,0 +1,8 @@ +package com.woniu.service; + +import com.woniu.pojo.ServiceImg; + +public interface ServiceImgService { + + ServiceImg findServiceImgByServiceId(Integer ServiceId); +} diff --git a/propertydemo/src/main/java/com/woniu/service/impl/PayServiceimpl.java b/propertydemo/src/main/java/com/woniu/service/impl/PayServiceimpl.java new file mode 100644 index 0000000000000000000000000000000000000000..d9fe543a77f50def3efa528df818a92e81c132f3 --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/service/impl/PayServiceimpl.java @@ -0,0 +1,32 @@ +package com.woniu.service.impl; + +import com.woniu.dao.PayMapper; +import com.woniu.pojo.Pay; +import com.woniu.service.PayService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class PayServiceimpl implements PayService { + + @Autowired + private PayMapper payMapper; + + + @Override + public List findserviceByPropertyId(Integer propertyid) { + return payMapper.selectByPropertyId(propertyid); + } + + @Override + public List findserviceByShopId(Integer shopid) { + return payMapper.selectByShopId(shopid); + } + + @Override + public Pay finddetailByPayId(Integer payid) { + return payMapper.selectByPrimaryKey(payid); + } +} diff --git a/propertydemo/src/main/java/com/woniu/service/impl/ServiceimgServiceimpl.java b/propertydemo/src/main/java/com/woniu/service/impl/ServiceimgServiceimpl.java new file mode 100644 index 0000000000000000000000000000000000000000..f92d112199f10bf1026aceff7cb4eba23427752d --- /dev/null +++ b/propertydemo/src/main/java/com/woniu/service/impl/ServiceimgServiceimpl.java @@ -0,0 +1,19 @@ +package com.woniu.service.impl; + +import com.woniu.dao.ServiceImgMapper; +import com.woniu.pojo.ServiceImg; +import com.woniu.service.ServiceImgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ServiceimgServiceimpl implements ServiceImgService { + + @Autowired + private ServiceImgMapper serviceImgMapper; + + @Override + public ServiceImg findServiceImgByServiceId(Integer ServiceId) { + return serviceImgMapper.selectByServiceId(ServiceId); + } +} diff --git a/propertydemo/src/main/resources/application.yml b/propertydemo/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..7af65eb1f2d788906c536b63a649cb590b813e9e --- /dev/null +++ b/propertydemo/src/main/resources/application.yml @@ -0,0 +1,19 @@ +spring: + datasource: + username: develop + data-password: 20200322 + url: jdbc:mysql://106.12.148.100:3307/happycommunity?serverTimezone=GMT%2B8 + driver-class-name: com.mysql.jdbc.Driver + thymeleaf: + cache: false +server: + port: 80 +mybatis: + mapper-locations: classpath:mapper/*.xml + configuration: + map-underscore-to-camel-case: true +pagehelper: + params: pageNum=currentPage,pageSize=pageSize + reasonable: true + support-methods-arguments: true + auto-dialect: mysql \ No newline at end of file diff --git a/propertydemo/src/main/resources/generatorConfig.xml b/propertydemo/src/main/resources/generatorConfig.xml new file mode 100644 index 0000000000000000000000000000000000000000..472b5d54dd29563ceea9edce6c8a8fc9179ea958 --- /dev/null +++ b/propertydemo/src/main/resources/generatorConfig.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/BusinessMapper.xml b/propertydemo/src/main/resources/mapper/BusinessMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..af155d3fa9b37579467f258437064daecb58f7ce --- /dev/null +++ b/propertydemo/src/main/resources/mapper/BusinessMapper.xml @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id, id_number, cell_ph_number, password, name, sex, nickname, mailbox, plot_id, tag, + mailbox_status, code, password_salt, create_time, authentication, auth_time, status, + address, introduce + + + + delete from business_info + where id = #{id,jdbcType=INTEGER} + + + insert into business_info (id, id_number, cell_ph_number, + password, name, sex, + nickname, mailbox, plot_id, + tag, mailbox_status, code, + password_salt, create_time, authentication, + auth_time, status, address, + introduce) + values (#{id,jdbcType=INTEGER}, #{idNumber,jdbcType=CHAR}, #{cellPhNumber,jdbcType=CHAR}, + #{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, + #{nickname,jdbcType=VARCHAR}, #{mailbox,jdbcType=VARCHAR}, #{plotId,jdbcType=INTEGER}, + #{tag,jdbcType=VARCHAR}, #{mailboxStatus,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, + #{passwordSalt,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{authentication,jdbcType=VARCHAR}, + #{authTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, + #{introduce,jdbcType=VARCHAR}) + + + insert into business_info + + + id, + + + id_number, + + + cell_ph_number, + + + password, + + + name, + + + sex, + + + nickname, + + + mailbox, + + + plot_id, + + + tag, + + + mailbox_status, + + + code, + + + password_salt, + + + create_time, + + + authentication, + + + auth_time, + + + status, + + + address, + + + introduce, + + + + + #{id,jdbcType=INTEGER}, + + + #{idNumber,jdbcType=CHAR}, + + + #{cellPhNumber,jdbcType=CHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{sex,jdbcType=INTEGER}, + + + #{nickname,jdbcType=VARCHAR}, + + + #{mailbox,jdbcType=VARCHAR}, + + + #{plotId,jdbcType=INTEGER}, + + + #{tag,jdbcType=VARCHAR}, + + + #{mailboxStatus,jdbcType=INTEGER}, + + + #{code,jdbcType=VARCHAR}, + + + #{passwordSalt,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{authentication,jdbcType=VARCHAR}, + + + #{authTime,jdbcType=TIMESTAMP}, + + + #{status,jdbcType=INTEGER}, + + + #{address,jdbcType=VARCHAR}, + + + #{introduce,jdbcType=VARCHAR}, + + + + + update business_info + + + id_number = #{idNumber,jdbcType=CHAR}, + + + cell_ph_number = #{cellPhNumber,jdbcType=CHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=INTEGER}, + + + nickname = #{nickname,jdbcType=VARCHAR}, + + + mailbox = #{mailbox,jdbcType=VARCHAR}, + + + plot_id = #{plotId,jdbcType=INTEGER}, + + + tag = #{tag,jdbcType=VARCHAR}, + + + mailbox_status = #{mailboxStatus,jdbcType=INTEGER}, + + + code = #{code,jdbcType=VARCHAR}, + + + password_salt = #{passwordSalt,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + authentication = #{authentication,jdbcType=VARCHAR}, + + + auth_time = #{authTime,jdbcType=TIMESTAMP}, + + + status = #{status,jdbcType=INTEGER}, + + + address = #{address,jdbcType=VARCHAR}, + + + introduce = #{introduce,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update business_info + set id_number = #{idNumber,jdbcType=CHAR}, + cell_ph_number = #{cellPhNumber,jdbcType=CHAR}, + password = #{password,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=INTEGER}, + nickname = #{nickname,jdbcType=VARCHAR}, + mailbox = #{mailbox,jdbcType=VARCHAR}, + plot_id = #{plotId,jdbcType=INTEGER}, + tag = #{tag,jdbcType=VARCHAR}, + mailbox_status = #{mailboxStatus,jdbcType=INTEGER}, + code = #{code,jdbcType=VARCHAR}, + password_salt = #{passwordSalt,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + authentication = #{authentication,jdbcType=VARCHAR}, + auth_time = #{authTime,jdbcType=TIMESTAMP}, + status = #{status,jdbcType=INTEGER}, + address = #{address,jdbcType=VARCHAR}, + introduce = #{introduce,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/CollectServiceMapper.xml b/propertydemo/src/main/resources/mapper/CollectServiceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..c4e134d148be1f9ae5ba4f2a4aa64e7acb6efafd --- /dev/null +++ b/propertydemo/src/main/resources/mapper/CollectServiceMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, userid, serviceid + + + + delete from collect_service + where id = #{id,jdbcType=INTEGER} + + + insert into collect_service (id, userid, serviceid + ) + values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{serviceid,jdbcType=INTEGER} + ) + + + insert into collect_service + + + id, + + + userid, + + + serviceid, + + + + + #{id,jdbcType=INTEGER}, + + + #{userid,jdbcType=INTEGER}, + + + #{serviceid,jdbcType=INTEGER}, + + + + + update collect_service + + + userid = #{userid,jdbcType=INTEGER}, + + + serviceid = #{serviceid,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update collect_service + set userid = #{userid,jdbcType=INTEGER}, + serviceid = #{serviceid,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/EvaluateServiceMapper.xml b/propertydemo/src/main/resources/mapper/EvaluateServiceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..c8a5675b194b7bc912263aa5f6f6f650e1848079 --- /dev/null +++ b/propertydemo/src/main/resources/mapper/EvaluateServiceMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid2, evalute + + + + delete from evaluate_service + where id = #{id,jdbcType=INTEGER} + + + insert into evaluate_service (id, serviceid2, evalute + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{evalute,jdbcType=VARCHAR} + ) + + + insert into evaluate_service + + + id, + + + serviceid2, + + + evalute, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{evalute,jdbcType=VARCHAR}, + + + + + update evaluate_service + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + evalute = #{evalute,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update evaluate_service + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + evalute = #{evalute,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/PayMapper.xml b/propertydemo/src/main/resources/mapper/PayMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..04cb68bb41e1c59444aacb2b573b955794d752da --- /dev/null +++ b/propertydemo/src/main/resources/mapper/PayMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + id, propertyid, shopid, payname, payprice, paytime, status, icon, service_type + + + + delete from pp_payservice + where id = #{id,jdbcType=INTEGER} + + + insert into pp_payservice (id, propertyid, shopid, + payname, payprice, paytime, + status, icon, service_type + ) + values (#{id,jdbcType=INTEGER}, #{propertyid,jdbcType=INTEGER}, #{shopid,jdbcType=INTEGER}, + #{payname,jdbcType=VARCHAR}, #{payprice,jdbcType=VARCHAR}, #{paytime,jdbcType=VARCHAR}, + #{status,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, #{serviceType,jdbcType=INTEGER} + ) + + + insert into pp_payservice + + + id, + + + propertyid, + + + shopid, + + + payname, + + + payprice, + + + paytime, + + + status, + + + icon, + + + service_type, + + + + + #{id,jdbcType=INTEGER}, + + + #{propertyid,jdbcType=INTEGER}, + + + #{shopid,jdbcType=INTEGER}, + + + #{payname,jdbcType=VARCHAR}, + + + #{payprice,jdbcType=VARCHAR}, + + + #{paytime,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{icon,jdbcType=VARCHAR}, + + + #{serviceType,jdbcType=INTEGER}, + + + + + update pp_payservice + + + propertyid = #{propertyid,jdbcType=INTEGER}, + + + shopid = #{shopid,jdbcType=INTEGER}, + + + payname = #{payname,jdbcType=VARCHAR}, + + + payprice = #{payprice,jdbcType=VARCHAR}, + + + paytime = #{paytime,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + icon = #{icon,jdbcType=VARCHAR}, + + + service_type = #{serviceType,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update pp_payservice + set propertyid = #{propertyid,jdbcType=INTEGER}, + shopid = #{shopid,jdbcType=INTEGER}, + payname = #{payname,jdbcType=VARCHAR}, + payprice = #{payprice,jdbcType=VARCHAR}, + paytime = #{paytime,jdbcType=VARCHAR}, + status = #{status,jdbcType=INTEGER}, + icon = #{icon,jdbcType=VARCHAR}, + service_type = #{serviceType,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/PropertyMapper.xml b/propertydemo/src/main/resources/mapper/PropertyMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..61d9e41db42f37d86a109ef3715b376f0f524853 --- /dev/null +++ b/propertydemo/src/main/resources/mapper/PropertyMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + id, village_id, username, password, salt_value, phone, status, create_time, pass_time + + + + delete from property_manage + where id = #{id,jdbcType=INTEGER} + + + insert into property_manage (id, village_id, username, + password, salt_value, phone, + status, create_time, pass_time + ) + values (#{id,jdbcType=INTEGER}, #{villageId,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, + #{password,jdbcType=VARCHAR}, #{saltValue,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, + #{status,jdbcType=INTEGER}, #{createTime,jdbcType=DATE}, #{passTime,jdbcType=DATE} + ) + + + insert into property_manage + + + id, + + + village_id, + + + username, + + + password, + + + salt_value, + + + phone, + + + status, + + + create_time, + + + pass_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{villageId,jdbcType=INTEGER}, + + + #{username,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{saltValue,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{createTime,jdbcType=DATE}, + + + #{passTime,jdbcType=DATE}, + + + + + update property_manage + + + village_id = #{villageId,jdbcType=INTEGER}, + + + username = #{username,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + salt_value = #{saltValue,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=DATE}, + + + pass_time = #{passTime,jdbcType=DATE}, + + + where id = #{id,jdbcType=INTEGER} + + + update property_manage + set village_id = #{villageId,jdbcType=INTEGER}, + username = #{username,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + salt_value = #{saltValue,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + status = #{status,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=DATE}, + pass_time = #{passTime,jdbcType=DATE} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/Property_imgMapper.xml b/propertydemo/src/main/resources/mapper/Property_imgMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7a775fc108e16ff0ae4e26d13f16ef417e24c37 --- /dev/null +++ b/propertydemo/src/main/resources/mapper/Property_imgMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, property_id, pic_url + + + + delete from property_img + where id = #{id,jdbcType=INTEGER} + + + insert into property_img (id, property_id, pic_url + ) + values (#{id,jdbcType=INTEGER}, #{propertyId,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR} + ) + + + insert into property_img + + + id, + + + property_id, + + + pic_url, + + + + + #{id,jdbcType=INTEGER}, + + + #{propertyId,jdbcType=INTEGER}, + + + #{picUrl,jdbcType=VARCHAR}, + + + + + update property_img + + + property_id = #{propertyId,jdbcType=INTEGER}, + + + pic_url = #{picUrl,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update property_img + set property_id = #{propertyId,jdbcType=INTEGER}, + pic_url = #{picUrl,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/ServiceImgMapper.xml b/propertydemo/src/main/resources/mapper/ServiceImgMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea29c2b229c569eb79b0aef6714c2ed8bdaa3074 --- /dev/null +++ b/propertydemo/src/main/resources/mapper/ServiceImgMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid, img + + + + delete from service_img + where id = #{id,jdbcType=INTEGER} + + + insert into service_img (id, serviceid, img + ) + values (#{id,jdbcType=INTEGER}, #{serviceid,jdbcType=INTEGER}, #{img,jdbcType=VARCHAR} + ) + + + insert into service_img + + + id, + + + serviceid, + + + img, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid,jdbcType=INTEGER}, + + + #{img,jdbcType=VARCHAR}, + + + + + update service_img + + + serviceid = #{serviceid,jdbcType=INTEGER}, + + + img = #{img,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update service_img + set serviceid = #{serviceid,jdbcType=INTEGER}, + img = #{img,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/ServiceOrderMapper.xml b/propertydemo/src/main/resources/mapper/ServiceOrderMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..d9e6f864fb9315cf3600d00109a973786373191c --- /dev/null +++ b/propertydemo/src/main/resources/mapper/ServiceOrderMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + id, serviceid2, userid, order_price, starttime, endtime + + + + delete from service_order + where id = #{id,jdbcType=INTEGER} + + + insert into service_order (id, serviceid2, userid, + order_price, starttime, endtime + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, + #{orderPrice,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP} + ) + + + insert into service_order + + + id, + + + serviceid2, + + + userid, + + + order_price, + + + starttime, + + + endtime, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{userid,jdbcType=INTEGER}, + + + #{orderPrice,jdbcType=VARCHAR}, + + + #{starttime,jdbcType=TIMESTAMP}, + + + #{endtime,jdbcType=TIMESTAMP}, + + + + + update service_order + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + userid = #{userid,jdbcType=INTEGER}, + + + order_price = #{orderPrice,jdbcType=VARCHAR}, + + + starttime = #{starttime,jdbcType=TIMESTAMP}, + + + endtime = #{endtime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update service_order + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + userid = #{userid,jdbcType=INTEGER}, + order_price = #{orderPrice,jdbcType=VARCHAR}, + starttime = #{starttime,jdbcType=TIMESTAMP}, + endtime = #{endtime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/StateServiceMapper.xml b/propertydemo/src/main/resources/mapper/StateServiceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..8d2693cf48f53455314aac89fd0eb5b0a8dfb2c7 --- /dev/null +++ b/propertydemo/src/main/resources/mapper/StateServiceMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid2, statecontext + + + + delete from state_service + where id = #{id,jdbcType=INTEGER} + + + insert into state_service (id, serviceid2, statecontext + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{statecontext,jdbcType=VARCHAR} + ) + + + insert into state_service + + + id, + + + serviceid2, + + + statecontext, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{statecontext,jdbcType=VARCHAR}, + + + + + update state_service + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + statecontext = #{statecontext,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update state_service + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + statecontext = #{statecontext,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/mapper/StopServiceMapper.xml b/propertydemo/src/main/resources/mapper/StopServiceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..74242b1bb6e16610c09c4b4134e5efc9645b7285 --- /dev/null +++ b/propertydemo/src/main/resources/mapper/StopServiceMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid2, reason + + + + delete from stop_service + where id = #{id,jdbcType=INTEGER} + + + insert into stop_service (id, serviceid2, reason + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR} + ) + + + insert into stop_service + + + id, + + + serviceid2, + + + reason, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{reason,jdbcType=VARCHAR}, + + + + + update stop_service + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + reason = #{reason,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update stop_service + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + reason = #{reason,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertydemo/src/main/resources/shiro.ini b/propertydemo/src/main/resources/shiro.ini new file mode 100644 index 0000000000000000000000000000000000000000..bb41767a0e9f900ebcfc519f6de4c85e6e29cb65 --- /dev/null +++ b/propertydemo/src/main/resources/shiro.ini @@ -0,0 +1,3 @@ +[users] +develop=20200322 +admin=admin \ No newline at end of file diff --git a/propertydemo/src/test/java/com/woniu/propertydemo/PropertydemoApplicationTests.java b/propertydemo/src/test/java/com/woniu/propertydemo/PropertydemoApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..358d6db27e00feecdc2170fff333690732af6fda --- /dev/null +++ b/propertydemo/src/test/java/com/woniu/propertydemo/PropertydemoApplicationTests.java @@ -0,0 +1,15 @@ +package com.woniu.propertydemo; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; + +@SpringBootTest +@EnableEurekaClient //启动Eureka客户端 +class PropertydemoApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/propertymanagement/.gitignore b/propertymanagement/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..77e3d03cb8fb0cae9c3024c3266456e8a169994f --- /dev/null +++ b/propertymanagement/.gitignore @@ -0,0 +1,32 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ +.mvn/* \ No newline at end of file diff --git a/propertymanagement/pom.xml b/propertymanagement/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5892b1db5b774a4d2ef3220d822313e74600e79 --- /dev/null +++ b/propertymanagement/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + com.team7.happycommunity + propertymanagement + 01 + propertymanagement + Demo project for Spring Boot + + + 1.8 + Hoxton.SR3 + + + + + org.springframework.boot + spring-boot-starter-amqp + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.2 + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + mysql + mysql-connector-java + runtime + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + org.springframework.amqp + spring-rabbit-test + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + ${basedir}/src/main/resources/generatorConfig.xml + + + + mysql + mysql-connector-java + 5.1.47 + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/PropertymanagementApplication.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/PropertymanagementApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..8750e8d5720e53b372638487c7ba9f123790b8e0 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/PropertymanagementApplication.java @@ -0,0 +1,15 @@ +package com.team7.happycommunity.propertymanagement; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; + +@SpringBootApplication +@EnableEurekaClient +public class PropertymanagementApplication { + + public static void main(String[] args) { + SpringApplication.run(PropertymanagementApplication.class, args); + } + +} diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/controller/UserController.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/controller/UserController.java new file mode 100644 index 0000000000000000000000000000000000000000..5d8269a46676e284a480984b789591f127a99a9c --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/controller/UserController.java @@ -0,0 +1,37 @@ +package com.team7.happycommunity.propertymanagement.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +@Controller +@RequestMapping("/user") +public class UserController { + + @GetMapping("/test") + @ResponseBody + public String test(HttpServletRequest hr,String username){ + HttpSession s = hr.getSession(); + s.setAttribute("username",username); + System.out.println(username); +// Cookie c = new Cookie("user",username); +// hp.addCookie(c); + return "测试成功!"; + } + + @GetMapping("/test2") + @ResponseBody + public String test(HttpServletRequest hr){ + HttpSession hs = hr.getSession(); + System.out.println(hs.getAttribute("username")); + String username = (String) hs.getAttribute("username"); + + return username == null? "未登录":username; + } +} diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/AnnouncementMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/AnnouncementMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..b6fb175a19ad4b910e7d179e4ad6a7809c673223 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/AnnouncementMapper.java @@ -0,0 +1,19 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.Announcement; + +public interface AnnouncementMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Announcement record); + + int insertSelective(Announcement record); + + Announcement selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Announcement record); + + int updateByPrimaryKeyWithBLOBs(Announcement record); + + int updateByPrimaryKey(Announcement record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/AreaInfoMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/AreaInfoMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..218a8a6988ab8cca5474bc0ed9087c43fd233254 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/AreaInfoMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.AreaInfo; + +public interface AreaInfoMapper { + int deleteByPrimaryKey(Integer id); + + int insert(AreaInfo record); + + int insertSelective(AreaInfo record); + + AreaInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(AreaInfo record); + + int updateByPrimaryKey(AreaInfo record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/EvaluateServiceMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/EvaluateServiceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..9b7a8cb7b64e6081b9dfd8a50602e0ce2b53185f --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/EvaluateServiceMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.EvaluateService; + +public interface EvaluateServiceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(EvaluateService record); + + int insertSelective(EvaluateService record); + + EvaluateService selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(EvaluateService record); + + int updateByPrimaryKey(EvaluateService record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/OwnerParkingApplyMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/OwnerParkingApplyMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..31e2ec391917641ac095181ecc22f05ed4f67730 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/OwnerParkingApplyMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.OwnerParkingApply; + +public interface OwnerParkingApplyMapper { + int deleteByPrimaryKey(Integer id); + + int insert(OwnerParkingApply record); + + int insertSelective(OwnerParkingApply record); + + OwnerParkingApply selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(OwnerParkingApply record); + + int updateByPrimaryKey(OwnerParkingApply record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingInfoMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingInfoMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..f83c603aa4adcc96d63e64217a584e895336cb33 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingInfoMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.ParkingInfo; + +public interface ParkingInfoMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ParkingInfo record); + + int insertSelective(ParkingInfo record); + + ParkingInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ParkingInfo record); + + int updateByPrimaryKey(ParkingInfo record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingRentRecordsMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingRentRecordsMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..cbca87fae9e3916121be8bd133a2ae5e9cc0943a --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingRentRecordsMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.ParkingRentRecords; + +public interface ParkingRentRecordsMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ParkingRentRecords record); + + int insertSelective(ParkingRentRecords record); + + ParkingRentRecords selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ParkingRentRecords record); + + int updateByPrimaryKey(ParkingRentRecords record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PpPayserviceMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PpPayserviceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..a569cc177ad217d570533aed4a2a50524c2e5b98 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PpPayserviceMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.PpPayservice; + +public interface PpPayserviceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(PpPayservice record); + + int insertSelective(PpPayservice record); + + PpPayservice selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(PpPayservice record); + + int updateByPrimaryKey(PpPayservice record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PropertyImgMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PropertyImgMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..ebf4106af944726cae3adf5b53ec81c03d733511 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PropertyImgMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.PropertyImgManage; + +public interface PropertyImgMapper { + int deleteByPrimaryKey(Integer id); + + int insert(PropertyImgManage record); + + int insertSelective(PropertyImgManage record); + + PropertyImgManage selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(PropertyImgManage record); + + int updateByPrimaryKey(PropertyImgManage record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PropertyManageMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PropertyManageMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..1839e1193711a93106377002ad6002be8fbf0f19 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/PropertyManageMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.PropertyManage; + +public interface PropertyManageMapper { + int deleteByPrimaryKey(Integer id); + + int insert(PropertyManage record); + + int insertSelective(PropertyManage record); + + PropertyManage selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(PropertyManage record); + + int updateByPrimaryKey(PropertyManage record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ServiceImgMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ServiceImgMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..c2fecf71e67ef8bc396e7bdacd7c7955e5aacc62 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ServiceImgMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.ServiceImg; + +public interface ServiceImgMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ServiceImg record); + + int insertSelective(ServiceImg record); + + ServiceImg selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ServiceImg record); + + int updateByPrimaryKey(ServiceImg record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ServiceOrderMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ServiceOrderMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..742585c17c60b9ad9e7b60be99f55fc2201db689 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ServiceOrderMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.ServiceOrder; + +public interface ServiceOrderMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ServiceOrder record); + + int insertSelective(ServiceOrder record); + + ServiceOrder selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ServiceOrder record); + + int updateByPrimaryKey(ServiceOrder record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/StateServiceMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/StateServiceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..8c2e019df4018be6e900831ce6134026a28a37cd --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/StateServiceMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.StateService; + +public interface StateServiceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(StateService record); + + int insertSelective(StateService record); + + StateService selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(StateService record); + + int updateByPrimaryKey(StateService record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/StopServiceMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/StopServiceMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..bad2c2f8553e0d4b0bfb7b170f1f1b298ac0bbfc --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/StopServiceMapper.java @@ -0,0 +1,17 @@ +package com.team7.happycommunity.propertymanagement.dao; + +import com.team7.happycommunity.propertymanagement.pojo.StopService; + +public interface StopServiceMapper { + int deleteByPrimaryKey(Integer id); + + int insert(StopService record); + + int insertSelective(StopService record); + + StopService selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(StopService record); + + int updateByPrimaryKey(StopService record); +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/Announcement.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/Announcement.java new file mode 100644 index 0000000000000000000000000000000000000000..bf82226feb86f64b284e42486f0d82d85a41c359 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/Announcement.java @@ -0,0 +1,45 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +import java.util.Date; + +public class Announcement { + private Integer id; + + private Integer areaId; + + private Date createTime; + + private String context; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getAreaId() { + return areaId; + } + + public void setAreaId(Integer areaId) { + this.areaId = areaId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/AreaInfo.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/AreaInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..9066fe6c5aa19d8150093b129a2a9000f98a8b0f --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/AreaInfo.java @@ -0,0 +1,43 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +public class AreaInfo { + private Integer id; + + private String areaName; + + private String areaAddress; + + private String detail1; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAreaAddress() { + return areaAddress; + } + + public void setAreaAddress(String areaAddress) { + this.areaAddress = areaAddress; + } + + public String getDetail1() { + return detail1; + } + + public void setDetail1(String detail1) { + this.detail1 = detail1; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/EvaluateService.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/EvaluateService.java new file mode 100644 index 0000000000000000000000000000000000000000..2d6a480549ff05b0abf527b827e8f925e73f7a2f --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/EvaluateService.java @@ -0,0 +1,33 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +public class EvaluateService { + private Integer id; + + private Integer serviceid2; + + private String evalute; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public String getEvalute() { + return evalute; + } + + public void setEvalute(String evalute) { + this.evalute = evalute; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/OwnerParkingApply.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/OwnerParkingApply.java new file mode 100644 index 0000000000000000000000000000000000000000..c3d50a5c0cfa95e4a97072a6fbaf8dcd29786022 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/OwnerParkingApply.java @@ -0,0 +1,75 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +import java.util.Date; + +public class OwnerParkingApply { + private Integer id; + + private Integer ownerId; + + private String parkingCode; + + private String parkingInfo; + + private Date beginTime; + + private Date endTime; + + private Integer communityId; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getOwnerId() { + return ownerId; + } + + public void setOwnerId(Integer ownerId) { + this.ownerId = ownerId; + } + + public String getParkingCode() { + return parkingCode; + } + + public void setParkingCode(String parkingCode) { + this.parkingCode = parkingCode; + } + + public String getParkingInfo() { + return parkingInfo; + } + + public void setParkingInfo(String parkingInfo) { + this.parkingInfo = parkingInfo; + } + + public Date getBeginTime() { + return beginTime; + } + + public void setBeginTime(Date beginTime) { + this.beginTime = beginTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public Integer getCommunityId() { + return communityId; + } + + public void setCommunityId(Integer communityId) { + this.communityId = communityId; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingInfo.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..51e9c8805ec32fcaae0aa1dad7a99a5816b2420c --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingInfo.java @@ -0,0 +1,95 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +import java.util.Date; + +public class ParkingInfo { + private Integer id; + + private Date beginTime; + + private Date endTime; + + private String parkingNumber; + + private String parkingInfos; + + private Integer costPerDay; + + private Integer communityId; + + private Integer ownerId; + + private Integer type; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Date getBeginTime() { + return beginTime; + } + + public void setBeginTime(Date beginTime) { + this.beginTime = beginTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public String getParkingNumber() { + return parkingNumber; + } + + public void setParkingNumber(String parkingNumber) { + this.parkingNumber = parkingNumber; + } + + public String getParkingInfos() { + return parkingInfos; + } + + public void setParkingInfos(String parkingInfos) { + this.parkingInfos = parkingInfos; + } + + public Integer getCostPerDay() { + return costPerDay; + } + + public void setCostPerDay(Integer costPerDay) { + this.costPerDay = costPerDay; + } + + public Integer getCommunityId() { + return communityId; + } + + public void setCommunityId(Integer communityId) { + this.communityId = communityId; + } + + public Integer getOwnerId() { + return ownerId; + } + + public void setOwnerId(Integer ownerId) { + this.ownerId = ownerId; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingRentRecords.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingRentRecords.java new file mode 100644 index 0000000000000000000000000000000000000000..fe555197177c3c47c21c1cba75cc5721c7e32ae3 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingRentRecords.java @@ -0,0 +1,75 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +import java.util.Date; + +public class ParkingRentRecords { + private Integer id; + + private String carid; + + private Date beginTime; + + private Date endTime; + + private Integer parkingInfoId; + + private Integer orderId; + + private Integer userId; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCarid() { + return carid; + } + + public void setCarid(String carid) { + this.carid = carid; + } + + public Date getBeginTime() { + return beginTime; + } + + public void setBeginTime(Date beginTime) { + this.beginTime = beginTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public Integer getParkingInfoId() { + return parkingInfoId; + } + + public void setParkingInfoId(Integer parkingInfoId) { + this.parkingInfoId = parkingInfoId; + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PpPayservice.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PpPayservice.java new file mode 100644 index 0000000000000000000000000000000000000000..91a240341206e2cf9cd34d0d2881f2ac239f32d6 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PpPayservice.java @@ -0,0 +1,93 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +public class PpPayservice { + private Integer id; + + private Integer propertyid; + + private Integer shopid; + + private String payname; + + private String payprice; + + private String paytime; + + private Integer status; + + private String icon; + + private Integer serviceType; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getPropertyid() { + return propertyid; + } + + public void setPropertyid(Integer propertyid) { + this.propertyid = propertyid; + } + + public Integer getShopid() { + return shopid; + } + + public void setShopid(Integer shopid) { + this.shopid = shopid; + } + + public String getPayname() { + return payname; + } + + public void setPayname(String payname) { + this.payname = payname; + } + + public String getPayprice() { + return payprice; + } + + public void setPayprice(String payprice) { + this.payprice = payprice; + } + + public String getPaytime() { + return paytime; + } + + public void setPaytime(String paytime) { + this.paytime = paytime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public Integer getServiceType() { + return serviceType; + } + + public void setServiceType(Integer serviceType) { + this.serviceType = serviceType; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PropertyImgManage.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PropertyImgManage.java new file mode 100644 index 0000000000000000000000000000000000000000..44573f15d15a936354a0945bd364b0a21e168f27 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PropertyImgManage.java @@ -0,0 +1,33 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +public class PropertyImgManage { + private Integer id; + + private Integer propertyId; + + private String picUrl; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getPropertyId() { + return propertyId; + } + + public void setPropertyId(Integer propertyId) { + this.propertyId = propertyId; + } + + public String getPicUrl() { + return picUrl; + } + + public void setPicUrl(String picUrl) { + this.picUrl = picUrl; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PropertyManage.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PropertyManage.java new file mode 100644 index 0000000000000000000000000000000000000000..aa425d69a0a24030259f99fdfe1f88b14cd569c3 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PropertyManage.java @@ -0,0 +1,95 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +import java.util.Date; + +public class PropertyManage { + private Integer id; + + private Integer villageId; + + private String username; + + private String password; + + private String saltValue; + + private String phone; + + private Integer status; + + private Date createTime; + + private Date passTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getVillageId() { + return villageId; + } + + public void setVillageId(Integer villageId) { + this.villageId = villageId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSaltValue() { + return saltValue; + } + + public void setSaltValue(String saltValue) { + this.saltValue = saltValue; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getPassTime() { + return passTime; + } + + public void setPassTime(Date passTime) { + this.passTime = passTime; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ServiceImg.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ServiceImg.java new file mode 100644 index 0000000000000000000000000000000000000000..85e0a4d45e1268530c954571b9bb62c76dccf12a --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ServiceImg.java @@ -0,0 +1,33 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +public class ServiceImg { + private Integer id; + + private Integer serviceid; + + private String img; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid() { + return serviceid; + } + + public void setServiceid(Integer serviceid) { + this.serviceid = serviceid; + } + + public String getImg() { + return img; + } + + public void setImg(String img) { + this.img = img; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ServiceOrder.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ServiceOrder.java new file mode 100644 index 0000000000000000000000000000000000000000..231ee9fb76605b55c3f5164868d95b6ea0ea905e --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ServiceOrder.java @@ -0,0 +1,65 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +import java.util.Date; + +public class ServiceOrder { + private Integer id; + + private Integer serviceid2; + + private Integer userid; + + private String orderPrice; + + private Date starttime; + + private Date endtime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public Integer getUserid() { + return userid; + } + + public void setUserid(Integer userid) { + this.userid = userid; + } + + public String getOrderPrice() { + return orderPrice; + } + + public void setOrderPrice(String orderPrice) { + this.orderPrice = orderPrice; + } + + public Date getStarttime() { + return starttime; + } + + public void setStarttime(Date starttime) { + this.starttime = starttime; + } + + public Date getEndtime() { + return endtime; + } + + public void setEndtime(Date endtime) { + this.endtime = endtime; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/StateService.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/StateService.java new file mode 100644 index 0000000000000000000000000000000000000000..6adec9c8f7013c5b0b35e6bf4ae6945b3519a53f --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/StateService.java @@ -0,0 +1,33 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +public class StateService { + private Integer id; + + private Integer serviceid2; + + private String statecontext; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public String getStatecontext() { + return statecontext; + } + + public void setStatecontext(String statecontext) { + this.statecontext = statecontext; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/StopService.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/StopService.java new file mode 100644 index 0000000000000000000000000000000000000000..3099358f824d3c0719b5198960656ee69611c5c6 --- /dev/null +++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/StopService.java @@ -0,0 +1,33 @@ +package com.team7.happycommunity.propertymanagement.pojo; + +public class StopService { + private Integer id; + + private Integer serviceid2; + + private String reason; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getServiceid2() { + return serviceid2; + } + + public void setServiceid2(Integer serviceid2) { + this.serviceid2 = serviceid2; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } +} \ No newline at end of file diff --git a/propertymanagement/src/main/resources/application.yml b/propertymanagement/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..cb979ed5331f6f007844e9770652d359bd1f0f6a --- /dev/null +++ b/propertymanagement/src/main/resources/application.yml @@ -0,0 +1,24 @@ +spring: + application: + name: propertymanagement + thymeleaf: + cache: false + datasource: + username: develop + password: 20200322 + url: jdbc:mysql://106.12.148.100:3307/happycommunity?serverTimezone=GMT%2B8 + mvc: + date-format: yyyy-MM-dd + jackson: + date-format: yyyy-MM-dd + time-zone: GMT+8 +mybatis: + configuration: + map-underscore-to-camel-case: true + mapper-locations: classpath:mapper/*.xml +server: + port: 8084 +eureka: + client: + service-url: + defaultZone: http://106.12.148.100:8081/registor-0.1/eureka diff --git a/propertymanagement/src/main/resources/generatorConfig.xml b/propertymanagement/src/main/resources/generatorConfig.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c01ea187d85adbcfe99fe981d8fc21934f93924 --- /dev/null +++ b/propertymanagement/src/main/resources/generatorConfig.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/AnnouncementMapper.xml b/propertymanagement/src/main/resources/mapper/AnnouncementMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..109481c9b01f26ab5ba6b467011a21cf5790ad63 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/AnnouncementMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + id, area_id, create_time + + + context + + + + delete from announcement + where id = #{id,jdbcType=INTEGER} + + + insert into announcement (id, area_id, create_time, + context) + values (#{id,jdbcType=INTEGER}, #{areaId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, + #{context,jdbcType=LONGVARCHAR}) + + + insert into announcement + + + id, + + + area_id, + + + create_time, + + + context, + + + + + #{id,jdbcType=INTEGER}, + + + #{areaId,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{context,jdbcType=LONGVARCHAR}, + + + + + update announcement + + + area_id = #{areaId,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + context = #{context,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update announcement + set area_id = #{areaId,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + context = #{context,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update announcement + set area_id = #{areaId,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/AreaInfoMapper.xml b/propertymanagement/src/main/resources/mapper/AreaInfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..66390a77ebc937e769e37e5a6a1fdb25ce65526e --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/AreaInfoMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + id, area_name, area_address, detail1 + + + + delete from areainfo + where id = #{id,jdbcType=INTEGER} + + + insert into areainfo (id, area_name, area_address, + detail1) + values (#{id,jdbcType=INTEGER}, #{areaName,jdbcType=VARCHAR}, #{areaAddress,jdbcType=VARCHAR}, + #{detail1,jdbcType=VARCHAR}) + + + insert into areainfo + + + id, + + + area_name, + + + area_address, + + + detail1, + + + + + #{id,jdbcType=INTEGER}, + + + #{areaName,jdbcType=VARCHAR}, + + + #{areaAddress,jdbcType=VARCHAR}, + + + #{detail1,jdbcType=VARCHAR}, + + + + + update areainfo + + + area_name = #{areaName,jdbcType=VARCHAR}, + + + area_address = #{areaAddress,jdbcType=VARCHAR}, + + + detail1 = #{detail1,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update areainfo + set area_name = #{areaName,jdbcType=VARCHAR}, + area_address = #{areaAddress,jdbcType=VARCHAR}, + detail1 = #{detail1,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/EvaluateServiceMapper.xml b/propertymanagement/src/main/resources/mapper/EvaluateServiceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..1ccc35082409adb50817b1f7a63d7d49f9c63ec3 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/EvaluateServiceMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid2, evalute + + + + delete from evaluate_service + where id = #{id,jdbcType=INTEGER} + + + insert into evaluate_service (id, serviceid2, evalute + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{evalute,jdbcType=VARCHAR} + ) + + + insert into evaluate_service + + + id, + + + serviceid2, + + + evalute, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{evalute,jdbcType=VARCHAR}, + + + + + update evaluate_service + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + evalute = #{evalute,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update evaluate_service + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + evalute = #{evalute,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/OwnerParkingApplyMapper.xml b/propertymanagement/src/main/resources/mapper/OwnerParkingApplyMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..e612db76a4a8199e4739d4f15a023740097639b2 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/OwnerParkingApplyMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + id, owner_id, parking_code, parking_info, begin_time, end_time, community_id + + + + delete from owner_parking_apply + where id = #{id,jdbcType=INTEGER} + + + insert into owner_parking_apply (id, owner_id, parking_code, + parking_info, begin_time, end_time, + community_id) + values (#{id,jdbcType=INTEGER}, #{ownerId,jdbcType=INTEGER}, #{parkingCode,jdbcType=VARCHAR}, + #{parkingInfo,jdbcType=VARCHAR}, #{beginTime,jdbcType=DATE}, #{endTime,jdbcType=DATE}, + #{communityId,jdbcType=INTEGER}) + + + insert into owner_parking_apply + + + id, + + + owner_id, + + + parking_code, + + + parking_info, + + + begin_time, + + + end_time, + + + community_id, + + + + + #{id,jdbcType=INTEGER}, + + + #{ownerId,jdbcType=INTEGER}, + + + #{parkingCode,jdbcType=VARCHAR}, + + + #{parkingInfo,jdbcType=VARCHAR}, + + + #{beginTime,jdbcType=DATE}, + + + #{endTime,jdbcType=DATE}, + + + #{communityId,jdbcType=INTEGER}, + + + + + update owner_parking_apply + + + owner_id = #{ownerId,jdbcType=INTEGER}, + + + parking_code = #{parkingCode,jdbcType=VARCHAR}, + + + parking_info = #{parkingInfo,jdbcType=VARCHAR}, + + + begin_time = #{beginTime,jdbcType=DATE}, + + + end_time = #{endTime,jdbcType=DATE}, + + + community_id = #{communityId,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update owner_parking_apply + set owner_id = #{ownerId,jdbcType=INTEGER}, + parking_code = #{parkingCode,jdbcType=VARCHAR}, + parking_info = #{parkingInfo,jdbcType=VARCHAR}, + begin_time = #{beginTime,jdbcType=DATE}, + end_time = #{endTime,jdbcType=DATE}, + community_id = #{communityId,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/ParkingInfoMapper.xml b/propertymanagement/src/main/resources/mapper/ParkingInfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ec14c22cbd9698157208210edf0bed04f852f96 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/ParkingInfoMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + id, begin_time, end_time, parking_number, parking_infos, cost_per_day, community_id, + owner_id, type + + + + delete from parking_info + where id = #{id,jdbcType=INTEGER} + + + insert into parking_info (id, begin_time, end_time, + parking_number, parking_infos, cost_per_day, + community_id, owner_id, type + ) + values (#{id,jdbcType=INTEGER}, #{beginTime,jdbcType=DATE}, #{endTime,jdbcType=DATE}, + #{parkingNumber,jdbcType=VARCHAR}, #{parkingInfos,jdbcType=VARCHAR}, #{costPerDay,jdbcType=INTEGER}, + #{communityId,jdbcType=INTEGER}, #{ownerId,jdbcType=INTEGER}, #{type,jdbcType=INTEGER} + ) + + + insert into parking_info + + + id, + + + begin_time, + + + end_time, + + + parking_number, + + + parking_infos, + + + cost_per_day, + + + community_id, + + + owner_id, + + + type, + + + + + #{id,jdbcType=INTEGER}, + + + #{beginTime,jdbcType=DATE}, + + + #{endTime,jdbcType=DATE}, + + + #{parkingNumber,jdbcType=VARCHAR}, + + + #{parkingInfos,jdbcType=VARCHAR}, + + + #{costPerDay,jdbcType=INTEGER}, + + + #{communityId,jdbcType=INTEGER}, + + + #{ownerId,jdbcType=INTEGER}, + + + #{type,jdbcType=INTEGER}, + + + + + update parking_info + + + begin_time = #{beginTime,jdbcType=DATE}, + + + end_time = #{endTime,jdbcType=DATE}, + + + parking_number = #{parkingNumber,jdbcType=VARCHAR}, + + + parking_infos = #{parkingInfos,jdbcType=VARCHAR}, + + + cost_per_day = #{costPerDay,jdbcType=INTEGER}, + + + community_id = #{communityId,jdbcType=INTEGER}, + + + owner_id = #{ownerId,jdbcType=INTEGER}, + + + type = #{type,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update parking_info + set begin_time = #{beginTime,jdbcType=DATE}, + end_time = #{endTime,jdbcType=DATE}, + parking_number = #{parkingNumber,jdbcType=VARCHAR}, + parking_infos = #{parkingInfos,jdbcType=VARCHAR}, + cost_per_day = #{costPerDay,jdbcType=INTEGER}, + community_id = #{communityId,jdbcType=INTEGER}, + owner_id = #{ownerId,jdbcType=INTEGER}, + type = #{type,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/ParkingRentRecordsMapper.xml b/propertymanagement/src/main/resources/mapper/ParkingRentRecordsMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..050611debceabed3fdb69b8602a0465d76ff3e93 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/ParkingRentRecordsMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + id, carid, begin_time, end_time, parking_info_id, order_id, user_id + + + + delete from parking_rent_records + where id = #{id,jdbcType=INTEGER} + + + insert into parking_rent_records (id, carid, begin_time, + end_time, parking_info_id, order_id, + user_id) + values (#{id,jdbcType=INTEGER}, #{carid,jdbcType=VARCHAR}, #{beginTime,jdbcType=DATE}, + #{endTime,jdbcType=DATE}, #{parkingInfoId,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, + #{userId,jdbcType=INTEGER}) + + + insert into parking_rent_records + + + id, + + + carid, + + + begin_time, + + + end_time, + + + parking_info_id, + + + order_id, + + + user_id, + + + + + #{id,jdbcType=INTEGER}, + + + #{carid,jdbcType=VARCHAR}, + + + #{beginTime,jdbcType=DATE}, + + + #{endTime,jdbcType=DATE}, + + + #{parkingInfoId,jdbcType=INTEGER}, + + + #{orderId,jdbcType=INTEGER}, + + + #{userId,jdbcType=INTEGER}, + + + + + update parking_rent_records + + + carid = #{carid,jdbcType=VARCHAR}, + + + begin_time = #{beginTime,jdbcType=DATE}, + + + end_time = #{endTime,jdbcType=DATE}, + + + parking_info_id = #{parkingInfoId,jdbcType=INTEGER}, + + + order_id = #{orderId,jdbcType=INTEGER}, + + + user_id = #{userId,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update parking_rent_records + set carid = #{carid,jdbcType=VARCHAR}, + begin_time = #{beginTime,jdbcType=DATE}, + end_time = #{endTime,jdbcType=DATE}, + parking_info_id = #{parkingInfoId,jdbcType=INTEGER}, + order_id = #{orderId,jdbcType=INTEGER}, + user_id = #{userId,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/PpPayserviceMapper.xml b/propertymanagement/src/main/resources/mapper/PpPayserviceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..6daac4700b97e42cf7e177c8871d426b6301a946 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/PpPayserviceMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + id, propertyid, shopid, payname, payprice, paytime, status, icon, service_type + + + + delete from pp_payservice + where id = #{id,jdbcType=INTEGER} + + + insert into pp_payservice (id, propertyid, shopid, + payname, payprice, paytime, + status, icon, service_type + ) + values (#{id,jdbcType=INTEGER}, #{propertyid,jdbcType=INTEGER}, #{shopid,jdbcType=INTEGER}, + #{payname,jdbcType=VARCHAR}, #{payprice,jdbcType=VARCHAR}, #{paytime,jdbcType=VARCHAR}, + #{status,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, #{serviceType,jdbcType=INTEGER} + ) + + + insert into pp_payservice + + + id, + + + propertyid, + + + shopid, + + + payname, + + + payprice, + + + paytime, + + + status, + + + icon, + + + service_type, + + + + + #{id,jdbcType=INTEGER}, + + + #{propertyid,jdbcType=INTEGER}, + + + #{shopid,jdbcType=INTEGER}, + + + #{payname,jdbcType=VARCHAR}, + + + #{payprice,jdbcType=VARCHAR}, + + + #{paytime,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{icon,jdbcType=VARCHAR}, + + + #{serviceType,jdbcType=INTEGER}, + + + + + update pp_payservice + + + propertyid = #{propertyid,jdbcType=INTEGER}, + + + shopid = #{shopid,jdbcType=INTEGER}, + + + payname = #{payname,jdbcType=VARCHAR}, + + + payprice = #{payprice,jdbcType=VARCHAR}, + + + paytime = #{paytime,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + icon = #{icon,jdbcType=VARCHAR}, + + + service_type = #{serviceType,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update pp_payservice + set propertyid = #{propertyid,jdbcType=INTEGER}, + shopid = #{shopid,jdbcType=INTEGER}, + payname = #{payname,jdbcType=VARCHAR}, + payprice = #{payprice,jdbcType=VARCHAR}, + paytime = #{paytime,jdbcType=VARCHAR}, + status = #{status,jdbcType=INTEGER}, + icon = #{icon,jdbcType=VARCHAR}, + service_type = #{serviceType,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/PropertyImgMapper.xml b/propertymanagement/src/main/resources/mapper/PropertyImgMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..cda9129987b807857c81a3ea6c4ec32b641112a5 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/PropertyImgMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, property_id, pic_url + + + + delete from property_img + where id = #{id,jdbcType=INTEGER} + + + insert into property_img (id, property_id, pic_url + ) + values (#{id,jdbcType=INTEGER}, #{propertyId,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR} + ) + + + insert into property_img + + + id, + + + property_id, + + + pic_url, + + + + + #{id,jdbcType=INTEGER}, + + + #{propertyId,jdbcType=INTEGER}, + + + #{picUrl,jdbcType=VARCHAR}, + + + + + update property_img + + + property_id = #{propertyId,jdbcType=INTEGER}, + + + pic_url = #{picUrl,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update property_img + set property_id = #{propertyId,jdbcType=INTEGER}, + pic_url = #{picUrl,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/PropertyManageMapper.xml b/propertymanagement/src/main/resources/mapper/PropertyManageMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..e62ac824a3b24ae43d6ab677a152a41cc888ff18 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/PropertyManageMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + id, village_id, username, password, salt_value, phone, status, create_time, pass_time + + + + delete from property_manage + where id = #{id,jdbcType=INTEGER} + + + insert into property_manage (id, village_id, username, + password, salt_value, phone, + status, create_time, pass_time + ) + values (#{id,jdbcType=INTEGER}, #{villageId,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, + #{password,jdbcType=VARCHAR}, #{saltValue,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, + #{status,jdbcType=INTEGER}, #{createTime,jdbcType=DATE}, #{passTime,jdbcType=DATE} + ) + + + insert into property_manage + + + id, + + + village_id, + + + username, + + + password, + + + salt_value, + + + phone, + + + status, + + + create_time, + + + pass_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{villageId,jdbcType=INTEGER}, + + + #{username,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{saltValue,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{createTime,jdbcType=DATE}, + + + #{passTime,jdbcType=DATE}, + + + + + update property_manage + + + village_id = #{villageId,jdbcType=INTEGER}, + + + username = #{username,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + salt_value = #{saltValue,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=DATE}, + + + pass_time = #{passTime,jdbcType=DATE}, + + + where id = #{id,jdbcType=INTEGER} + + + update property_manage + set village_id = #{villageId,jdbcType=INTEGER}, + username = #{username,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + salt_value = #{saltValue,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + status = #{status,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=DATE}, + pass_time = #{passTime,jdbcType=DATE} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/ServiceImgMapper.xml b/propertymanagement/src/main/resources/mapper/ServiceImgMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..58452e6ad0883c4d44920ec80bad1759d8d741b1 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/ServiceImgMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid, img + + + + delete from service_img + where id = #{id,jdbcType=INTEGER} + + + insert into service_img (id, serviceid, img + ) + values (#{id,jdbcType=INTEGER}, #{serviceid,jdbcType=INTEGER}, #{img,jdbcType=VARCHAR} + ) + + + insert into service_img + + + id, + + + serviceid, + + + img, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid,jdbcType=INTEGER}, + + + #{img,jdbcType=VARCHAR}, + + + + + update service_img + + + serviceid = #{serviceid,jdbcType=INTEGER}, + + + img = #{img,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update service_img + set serviceid = #{serviceid,jdbcType=INTEGER}, + img = #{img,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/ServiceOrderMapper.xml b/propertymanagement/src/main/resources/mapper/ServiceOrderMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7ea4d5df259ed76b1db624d7161c09ec96ab631 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/ServiceOrderMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + id, serviceid2, userid, order_price, starttime, endtime + + + + delete from service_order + where id = #{id,jdbcType=INTEGER} + + + insert into service_order (id, serviceid2, userid, + order_price, starttime, endtime + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, + #{orderPrice,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP} + ) + + + insert into service_order + + + id, + + + serviceid2, + + + userid, + + + order_price, + + + starttime, + + + endtime, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{userid,jdbcType=INTEGER}, + + + #{orderPrice,jdbcType=VARCHAR}, + + + #{starttime,jdbcType=TIMESTAMP}, + + + #{endtime,jdbcType=TIMESTAMP}, + + + + + update service_order + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + userid = #{userid,jdbcType=INTEGER}, + + + order_price = #{orderPrice,jdbcType=VARCHAR}, + + + starttime = #{starttime,jdbcType=TIMESTAMP}, + + + endtime = #{endtime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update service_order + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + userid = #{userid,jdbcType=INTEGER}, + order_price = #{orderPrice,jdbcType=VARCHAR}, + starttime = #{starttime,jdbcType=TIMESTAMP}, + endtime = #{endtime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/StateServiceMapper.xml b/propertymanagement/src/main/resources/mapper/StateServiceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..3f289bbdea9182757f52244af95d1d7bf89cc08d --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/StateServiceMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid2, statecontext + + + + delete from state_service + where id = #{id,jdbcType=INTEGER} + + + insert into state_service (id, serviceid2, statecontext + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{statecontext,jdbcType=VARCHAR} + ) + + + insert into state_service + + + id, + + + serviceid2, + + + statecontext, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{statecontext,jdbcType=VARCHAR}, + + + + + update state_service + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + statecontext = #{statecontext,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update state_service + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + statecontext = #{statecontext,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/main/resources/mapper/StopServiceMapper.xml b/propertymanagement/src/main/resources/mapper/StopServiceMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..22fe1aa571374c27d59a5f1c56375a668f40aef2 --- /dev/null +++ b/propertymanagement/src/main/resources/mapper/StopServiceMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + id, serviceid2, reason + + + + delete from stop_service + where id = #{id,jdbcType=INTEGER} + + + insert into stop_service (id, serviceid2, reason + ) + values (#{id,jdbcType=INTEGER}, #{serviceid2,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR} + ) + + + insert into stop_service + + + id, + + + serviceid2, + + + reason, + + + + + #{id,jdbcType=INTEGER}, + + + #{serviceid2,jdbcType=INTEGER}, + + + #{reason,jdbcType=VARCHAR}, + + + + + update stop_service + + + serviceid2 = #{serviceid2,jdbcType=INTEGER}, + + + reason = #{reason,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update stop_service + set serviceid2 = #{serviceid2,jdbcType=INTEGER}, + reason = #{reason,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/propertymanagement/src/test/java/com/team7/happycommunity/propertymanagement/PropertymanagementApplicationTests.java b/propertymanagement/src/test/java/com/team7/happycommunity/propertymanagement/PropertymanagementApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..42e2bc9bbc97e73a6035ff90184a20ac942ec299 --- /dev/null +++ b/propertymanagement/src/test/java/com/team7/happycommunity/propertymanagement/PropertymanagementApplicationTests.java @@ -0,0 +1,13 @@ +package com.team7.happycommunity.propertymanagement; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class PropertymanagementApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/test/src/test.java b/test/src/test.java new file mode 100644 index 0000000000000000000000000000000000000000..53ba7f6165767129b1514fd67ce079d48dcb40f7 --- /dev/null +++ b/test/src/test.java @@ -0,0 +1,2 @@ +public class test { +}