Merge branch 'master' of gitee.com:y_project/RuoYi into master
This commit is contained in:
commit
79847c58ce
64
README.md
64
README.md
|
|
@ -2,15 +2,14 @@
|
||||||
|
|
||||||
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||||
|
|
||||||
性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
|
性别男,若依是给女儿取的名字(寓意:你若不离不弃,我必生死相依)
|
||||||
|
|
||||||
若依参考后台模板。有需要可自行到群内下载。
|
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||||
|
|
||||||
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/#/standard/xmkz) `(不定时更新)`
|
* 前后端分离版本,请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
||||||
|
* 感谢 [hplus](https://gitee.com/hplus_admin/hplus) 后台主题 UI 框架。
|
||||||
> 阿里云通用云产品1888优惠券 :[点我领取](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof) 腾讯云通用云产品2860优惠券 :[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console) `(仅限新用户)`
|
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
||||||
|
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||||
> 阿里云Hi拼购 限量爆款 低至199元/年 [点我进入](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof) `(仅限新用户)`
|
|
||||||
|
|
||||||
## 内置功能
|
## 内置功能
|
||||||
|
|
||||||
|
|
@ -26,65 +25,66 @@
|
||||||
10. 登录日志:系统登录日志记录查询包含登录异常。
|
10. 登录日志:系统登录日志记录查询包含登录异常。
|
||||||
11. 在线用户:当前系统中活跃用户状态监控。
|
11. 在线用户:当前系统中活跃用户状态监控。
|
||||||
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
||||||
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
|
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
|
||||||
14. 系统接口:根据业务代码自动生成相关的api接口文档。
|
14. 系统接口:根据业务代码自动生成相关的api接口文档。
|
||||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
||||||
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
||||||
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
||||||
|
|
||||||
## 在线体验
|
## 在线体验
|
||||||
> admin/admin123
|
|
||||||
> 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
- admin/admin123
|
||||||
|
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
||||||
|
|
||||||
演示地址:http://ruoyi.vip
|
演示地址:http://ruoyi.vip
|
||||||
|
|
||||||
文档地址:http://doc.ruoyi.vip
|
文档地址:http://doc.ruoyi.vip
|
||||||
|
|
||||||
## 演示图
|
## 演示图
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-42e518aa72a24d228427a1261cb3679f395.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/e29fd81b2d43b517f99535564af41f9d1d5.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-7f20dd0edba25e5187c5c4dd3ec7d3d9797.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/629f1510fb6205f773c8c284863406b694f.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-2dae3d87f6a8ca05057db059cd9a411d51d.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/9124eda87df0e72427cd63f458b813e3363.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-ea4d98423471e55fba784694e45d12bd4bb.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/438c59467afd0097cfbe9c89db932661687.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-7f6c6e9f5873efca09bd2870ee8468b8fce.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/72a015041db6843aca7f7b273688cb346f8.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-c708b65f2c382a03f69fe1efa8d341e6cff.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/ecb5f1c9929f1933f733f796749b2df73d9.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-9ab586c47dd5c7b92bca0d727962c90e3b8.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/e4283d500eb10e8dd8701e7742f7facb065.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-ef954122a2080e02013112db21754b955c6.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/2531dbf419a1b114e1177f8d2a120b8a9c3.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-088edb4d531e122415a1e2342bccb1a9691.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/8b740a42dddc1e5a8a150d97c5060df258b.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-f886fe19bd820c0efae82f680223cac196c.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/00e642dc3515919b3760968cc496a12a849.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-c7a2eb71fa65d6e660294b4bccca613d638.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/f72d28a3e60413a4e1b5c7c2f45f962fd65.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-e60137fb0787defe613bd83331dc4755a70.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/19222e495869a2a99fc31c5d2bd4539e1e7.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-7c51c1b5758f0a0f92ed3c60469b7526f9f.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/264d25176f4e22b4b38e95fe6ce73775299.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-15181aed45bb2461aa97b594cbf2f86ea5f.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/d85fbb59be27fb33f68bdbb6e8bc967c97b.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-83326ad52ea63f67233d126226738054d98.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/bb902d2c54bad02a052e9a05e5f22a93df1.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-3bd6d31e913b70df00107db51d64ef81df7.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/30cda883bb9a7f74f1454314e64f949942d.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-70a2225836bc82042a6785edf6299e2586a.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/deebaaa8d6b14a419ed5911f49e3f222a6f.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-0184d6ab01fdc6667a14327fcaf8b46345d.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/bed2b98a44e7ae820c2885329e711965c28.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-64d8086dc2c02c8f71170290482f7640098.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/5f3d39a141f21f81b90536f391b8408f1fa.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-6d73c2140ce694e3de4c05035fdc1868d4c.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
## 若依交流群
|
## 若依交流群
|
||||||
|
|
||||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [](https://jq.qq.com/?_wv=1027&k=5g75dCU) [](https://jq.qq.com/?_wv=1027&k=58cPoHA) [](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [](https://jq.qq.com/?_wv=1027&k=5yugASz) 点击按钮入群。
|
QQ群: [](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [](https://jq.qq.com/?_wv=1027&k=5g75dCU) [](https://jq.qq.com/?_wv=1027&k=58cPoHA) [](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [](https://jq.qq.com/?_wv=1027&k=5yugASz) [](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [](https://jq.qq.com/?_wv=1027&k=5omzbKc) [](https://jq.qq.com/?_wv=1027&k=qPIKBb7s)
|
||||||
|
|
@ -18,8 +18,12 @@
|
||||||
2.2 导入工程
|
2.2 导入工程
|
||||||
通过Eclipse导入工程,步骤如下:
|
通过Eclipse导入工程,步骤如下:
|
||||||
(1)点击左侧项目区域 -- >Import...
|
(1)点击左侧项目区域 -- >Import...
|
||||||
|
|
||||||
(2)选择RuoYi
|
(2)选择RuoYi
|
||||||
(3)点击Finish(4)RuoYi的代码就被导出到Eclipse中了,此时可以在工程视图中看到。
|
|
||||||
|
(3)点击Finish
|
||||||
|
|
||||||
|
(4)RuoYi的代码就被导出到Eclipse中了,此时可以在工程视图中看到。
|
||||||
|
|
||||||
3. 运行若依系统
|
3. 运行若依系统
|
||||||
3.1 必要的配置
|
3.1 必要的配置
|
||||||
|
|
@ -33,18 +37,24 @@
|
||||||
3.1.3 代码生成配置
|
3.1.3 代码生成配置
|
||||||
编辑src/main/ resources目录下的application.yml 文件,
|
编辑src/main/ resources目录下的application.yml 文件,
|
||||||
|
|
||||||
默认为module,根据实际情况修改即可。生成的表要有注释注:如对模板有特殊需求,可自行修改。编辑src/main/ resources/templates/vm目录下
|
默认为module,根据实际情况修改即可。生成的表要有注释
|
||||||
|
|
||||||
|
注:如对模板有特殊需求,可自行修改。编辑src/main/ resources/templates/vm目录下
|
||||||
|
|
||||||
|
|
||||||
3.1.4 日志配置
|
3.1.4 日志配置
|
||||||
编辑src/main/ resources目录下的logback.yml 文件
|
编辑src/main/ resources目录下的logback.yml 文件
|
||||||
<property name="log.path" value="/home/ruoyi/logs" />
|
<property name="log.path" value="/home/ruoyi/logs" />
|
||||||
改为自己需要的路径
|
改为自己需要的路径
|
||||||
<property name="log.path" value="/Users/jyking/project/logs" />
|
|
||||||
3.2 启动及验证
|
3.2 启动及验证
|
||||||
启动RuoYiApplication.java 出现如下图表示启动成功
|
启动RuoYiApplication.java 出现如下图表示启动成功
|
||||||
打开浏览器,输入:http://localhost:80/若能正确展示登录页面,并能成功登录,登录后菜单及页面展示正常,则表明环境搭建成功。默认密码为 admin/admin123
|
|
||||||
|
|
||||||
演示地址:http://www.ruoyi.club
|
打开浏览器,输入:http://localhost:80/
|
||||||
|
若能正确展示登录页面,并能成功登录,登录后菜单及页面展示正常,则表明环境搭建成功。
|
||||||
|
默认密码为 admin/admin123
|
||||||
|
|
||||||
|
演示地址:http://ruoyi.vip
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -69,6 +79,7 @@
|
||||||
|
|
||||||
4.1.4 启动及验证
|
4.1.4 启动及验证
|
||||||
运行startup.bat 出现如下图即部署成功
|
运行startup.bat 出现如下图即部署成功
|
||||||
|
|
||||||
4.2 Jar方式部署
|
4.2 Jar方式部署
|
||||||
执行命令:java - jar RuoYi.jar
|
执行命令:java - jar RuoYi.jar
|
||||||
脚本执行:ry.sh start 启动stop 停止
|
脚本执行:ry.sh start 启动stop 停止
|
||||||
|
|
|
||||||
51
pom.xml
51
pom.xml
|
|
@ -1,36 +1,35 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>4.0.0</version>
|
<version>4.5.1</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>http://www.ruoyi.vip</url>
|
||||||
<description>若依管理系统</description>
|
<description>若依管理系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>4.0.0</ruoyi.version>
|
<ruoyi.version>4.5.1</ruoyi.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<shiro.version>1.4.0</shiro.version>
|
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||||
|
<shiro.version>1.7.0</shiro.version>
|
||||||
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
|
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
|
||||||
<mybatis.boot.version>1.3.2</mybatis.boot.version>
|
<druid.version>1.2.2</druid.version>
|
||||||
<druid.version>1.1.14</druid.version>
|
<bitwalker.version>1.21</bitwalker.version>
|
||||||
<bitwalker.version>1.19</bitwalker.version>
|
|
||||||
<kaptcha.version>2.3.2</kaptcha.version>
|
<kaptcha.version>2.3.2</kaptcha.version>
|
||||||
<swagger.version>2.9.2</swagger.version>
|
<swagger.version>2.9.2</swagger.version>
|
||||||
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
|
<pagehelper.boot.version>1.3.0</pagehelper.boot.version>
|
||||||
<fastjson.version>1.2.47</fastjson.version>
|
<fastjson.version>1.2.74</fastjson.version>
|
||||||
<oshi.version>3.9.1</oshi.version>
|
<oshi.version>5.3.6</oshi.version>
|
||||||
|
<jna.version>5.6.0</jna.version>
|
||||||
<commons.io.version>2.5</commons.io.version>
|
<commons.io.version>2.5</commons.io.version>
|
||||||
<commons.fileupload.version>1.3.3</commons.fileupload.version>
|
<commons.fileupload.version>1.3.3</commons.fileupload.version>
|
||||||
<jsoup.version>1.11.3</jsoup.version>
|
<poi.version>4.1.2</poi.version>
|
||||||
<poi.version>3.17</poi.version>
|
|
||||||
<velocity.version>1.7</velocity.version>
|
<velocity.version>1.7</velocity.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
@ -42,7 +41,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
<version>2.1.1.RELEASE</version>
|
<version>2.2.12.RELEASE</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
@ -68,7 +67,7 @@
|
||||||
<version>${shiro.version}</version>
|
<version>${shiro.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Shiro使用Srping框架 -->
|
<!-- Shiro使用Spring框架 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-spring</artifactId>
|
<artifactId>shiro-spring</artifactId>
|
||||||
|
|
@ -110,6 +109,18 @@
|
||||||
<version>${oshi.version}</version>
|
<version>${oshi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>jna</artifactId>
|
||||||
|
<version>${jna.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>jna-platform</artifactId>
|
||||||
|
<version>${jna.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger2-->
|
<!-- swagger2-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
|
|
@ -148,13 +159,6 @@
|
||||||
<version>${commons.fileupload.version}</version>
|
<version>${commons.fileupload.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- HTML解析器 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jsoup</groupId>
|
|
||||||
<artifactId>jsoup</artifactId>
|
|
||||||
<version>${jsoup.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- excel工具 -->
|
<!-- excel工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
|
|
@ -227,8 +231,6 @@
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
@ -236,6 +238,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>4.0.0</version>
|
<version>4.5.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
@ -55,6 +55,12 @@
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mysql驱动包 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 核心模块-->
|
<!-- 核心模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
|
|
@ -80,6 +86,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>2.1.1.RELEASE</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -97,11 +104,11 @@
|
||||||
<version>3.0.0</version>
|
<version>3.0.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
<warName>${artifactId}</warName>
|
<warName>${project.artifactId}</warName>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<finalName>${artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -5,13 +5,15 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.ruoyi.common.config.Global;
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
import com.ruoyi.common.config.ServerConfig;
|
import com.ruoyi.common.config.ServerConfig;
|
||||||
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
|
|
@ -41,17 +43,15 @@ public class CommonController
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!FileUtils.isValidFilename(fileName))
|
if (!FileUtils.checkAllowDownload(fileName))
|
||||||
{
|
{
|
||||||
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
|
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
|
||||||
}
|
}
|
||||||
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
|
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
|
||||||
String filePath = Global.getDownloadPath() + fileName;
|
String filePath = RuoYiConfig.getDownloadPath() + fileName;
|
||||||
|
|
||||||
response.setCharacterEncoding("utf-8");
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||||
response.setContentType("multipart/form-data");
|
FileUtils.setAttachmentResponseHeader(response, realFileName);
|
||||||
response.setHeader("Content-Disposition",
|
|
||||||
"attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName));
|
|
||||||
FileUtils.writeBytes(filePath, response.getOutputStream());
|
FileUtils.writeBytes(filePath, response.getOutputStream());
|
||||||
if (delete)
|
if (delete)
|
||||||
{
|
{
|
||||||
|
|
@ -74,7 +74,7 @@ public class CommonController
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 上传文件路径
|
// 上传文件路径
|
||||||
String filePath = Global.getUploadPath();
|
String filePath = RuoYiConfig.getUploadPath();
|
||||||
// 上传并返回新文件名称
|
// 上传并返回新文件名称
|
||||||
String fileName = FileUploadUtils.upload(filePath, file);
|
String fileName = FileUploadUtils.upload(filePath, file);
|
||||||
String url = serverConfig.getUrl() + fileName;
|
String url = serverConfig.getUrl() + fileName;
|
||||||
|
|
@ -88,4 +88,33 @@ public class CommonController
|
||||||
return AjaxResult.error(e.getMessage());
|
return AjaxResult.error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本地资源通用下载
|
||||||
|
*/
|
||||||
|
@GetMapping("/common/download/resource")
|
||||||
|
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!FileUtils.checkAllowDownload(resource))
|
||||||
|
{
|
||||||
|
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
|
||||||
|
}
|
||||||
|
// 本地资源路径
|
||||||
|
String localPath = RuoYiConfig.getProfile();
|
||||||
|
// 数据库资源地址
|
||||||
|
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
|
||||||
|
// 下载名称
|
||||||
|
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
|
||||||
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||||
|
FileUtils.setAttachmentResponseHeader(response, downloadName);
|
||||||
|
FileUtils.writeBytes(downloadPath, response.getOutputStream());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.error("下载文件失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -21,6 +21,7 @@ import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.exception.BusinessException;
|
import com.ruoyi.common.exception.BusinessException;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.web.controller.demo.domain.CustomerModel;
|
||||||
import com.ruoyi.web.controller.demo.domain.UserOperateModel;
|
import com.ruoyi.web.controller.demo.domain.UserOperateModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -103,6 +104,17 @@ public class DemoOperateController extends BaseController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (StringUtils.isNotEmpty(userModel.getUserName()))
|
||||||
|
{
|
||||||
|
userList.clear();
|
||||||
|
for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
|
||||||
|
{
|
||||||
|
if (entry.getValue().getUserName().equals(userModel.getUserName()))
|
||||||
|
{
|
||||||
|
userList.add(entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
|
if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
|
||||||
{
|
{
|
||||||
|
|
@ -142,6 +154,17 @@ public class DemoOperateController extends BaseController
|
||||||
return AjaxResult.success(users.put(userId, user));
|
return AjaxResult.success(users.put(userId, user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存主子表信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/customer/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(CustomerModel customerModel)
|
||||||
|
{
|
||||||
|
System.out.println(customerModel.toString());
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户
|
* 修改用户
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
@ -140,6 +141,16 @@ public class DemoTableController extends BaseController
|
||||||
return prefix + "/button";
|
return prefix + "/button";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直接加载表格数据
|
||||||
|
*/
|
||||||
|
@GetMapping("/data")
|
||||||
|
public String data(ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("users", users);
|
||||||
|
return prefix + "/data";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格冻结列
|
* 表格冻结列
|
||||||
*/
|
*/
|
||||||
|
|
@ -167,6 +178,15 @@ public class DemoTableController extends BaseController
|
||||||
return prefix + "/detail";
|
return prefix + "/detail";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格父子视图
|
||||||
|
*/
|
||||||
|
@GetMapping("/child")
|
||||||
|
public String child()
|
||||||
|
{
|
||||||
|
return prefix + "/child";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格图片预览
|
* 表格图片预览
|
||||||
*/
|
*/
|
||||||
|
|
@ -194,6 +214,60 @@ public class DemoTableController extends BaseController
|
||||||
return prefix + "/reorder";
|
return prefix + "/reorder";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格列宽拖动
|
||||||
|
*/
|
||||||
|
@GetMapping("/resizable")
|
||||||
|
public String resizable()
|
||||||
|
{
|
||||||
|
return prefix + "/resizable";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格行内编辑操作
|
||||||
|
*/
|
||||||
|
@GetMapping("/editable")
|
||||||
|
public String editable()
|
||||||
|
{
|
||||||
|
return prefix + "/editable";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主子表提交
|
||||||
|
*/
|
||||||
|
@GetMapping("/subdata")
|
||||||
|
public String subdata()
|
||||||
|
{
|
||||||
|
return prefix + "/subdata";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格自动刷新
|
||||||
|
*/
|
||||||
|
@GetMapping("/refresh")
|
||||||
|
public String refresh()
|
||||||
|
{
|
||||||
|
return prefix + "/refresh";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格打印配置
|
||||||
|
*/
|
||||||
|
@GetMapping("/print")
|
||||||
|
public String print()
|
||||||
|
{
|
||||||
|
return prefix + "/print";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格标题格式化
|
||||||
|
*/
|
||||||
|
@GetMapping("/headerStyle")
|
||||||
|
public String headerStyle()
|
||||||
|
{
|
||||||
|
return prefix + "/headerStyle";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格其他操作
|
* 表格其他操作
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.ruoyi.web.controller.demo.domain;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户测试信息
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public class CustomerModel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 客户姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户手机
|
||||||
|
*/
|
||||||
|
private String phonenumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户性别
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户生日
|
||||||
|
*/
|
||||||
|
private String birthday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品信息
|
||||||
|
*/
|
||||||
|
private List<GoodsModel> goods;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhonenumber()
|
||||||
|
{
|
||||||
|
return phonenumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhonenumber(String phonenumber)
|
||||||
|
{
|
||||||
|
this.phonenumber = phonenumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getSex()
|
||||||
|
{
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(String sex)
|
||||||
|
{
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBirthday()
|
||||||
|
{
|
||||||
|
return birthday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthday(String birthday)
|
||||||
|
{
|
||||||
|
this.birthday = birthday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark()
|
||||||
|
{
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark)
|
||||||
|
{
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GoodsModel> getGoods()
|
||||||
|
{
|
||||||
|
return goods;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoods(List<GoodsModel> goods)
|
||||||
|
{
|
||||||
|
this.goods = goods;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("name", getName())
|
||||||
|
.append("phonenumber", getPhonenumber())
|
||||||
|
.append("sex", getSex())
|
||||||
|
.append("birthday", getBirthday())
|
||||||
|
.append("goods", getGoods())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.ruoyi.web.controller.demo.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品测试信息
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public class GoodsModel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品重量
|
||||||
|
*/
|
||||||
|
private Integer weight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品价格
|
||||||
|
*/
|
||||||
|
private Double price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品日期
|
||||||
|
*/
|
||||||
|
private Date date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品种类
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getWeight()
|
||||||
|
{
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(Integer weight)
|
||||||
|
{
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getPrice()
|
||||||
|
{
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(Double price)
|
||||||
|
{
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDate()
|
||||||
|
{
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate(Date date)
|
||||||
|
{
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("name", getName())
|
||||||
|
.append("weight", getWeight())
|
||||||
|
.append("price", getPrice())
|
||||||
|
.append("date", getDate())
|
||||||
|
.append("type", getType())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -135,11 +135,13 @@ public class UserOperateModel extends BaseEntity
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Date getCreateTime()
|
public Date getCreateTime()
|
||||||
{
|
{
|
||||||
return createTime;
|
return createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setCreateTime(Date createTime)
|
public void setCreateTime(Date createTime)
|
||||||
{
|
{
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.framework.web.service.CacheService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存监控
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/monitor/cache")
|
||||||
|
public class CacheController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "monitor/cache";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CacheService cacheService;
|
||||||
|
|
||||||
|
@GetMapping()
|
||||||
|
public String cache(ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("cacheNames", cacheService.getCacheNames());
|
||||||
|
return prefix + "/cache";
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getNames")
|
||||||
|
public String getCacheNames(String fragment, ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("cacheNames", cacheService.getCacheNames());
|
||||||
|
return prefix + "/cache::" + fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getKeys")
|
||||||
|
public String getCacheKeys(String fragment, String cacheName, ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("cacheName", cacheName);
|
||||||
|
mmap.put("cacheKyes", cacheService.getCacheKeys(cacheName));
|
||||||
|
return prefix + "/cache::" + fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getValue")
|
||||||
|
public String getCacheValue(String fragment, String cacheName, String cacheKey, ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("cacheName", cacheName);
|
||||||
|
mmap.put("cacheKey", cacheKey);
|
||||||
|
mmap.put("cacheValue", cacheService.getCacheValue(cacheName, cacheKey));
|
||||||
|
return prefix + "/cache::" + fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/clearCacheName")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult clearCacheName(String cacheName, ModelMap mmap)
|
||||||
|
{
|
||||||
|
cacheService.clearCacheName(cacheName);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/clearCacheKey")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult clearCacheKey(String cacheName, String cacheKey, ModelMap mmap)
|
||||||
|
{
|
||||||
|
cacheService.clearCacheKey(cacheName, cacheKey);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/clearAll")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult clearAll(ModelMap mmap)
|
||||||
|
{
|
||||||
|
cacheService.clearAll();
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ruoyi.web.controller.monitor;
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
@ -31,6 +32,9 @@ public class SysLogininforController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysLogininforService logininforService;
|
private ISysLogininforService logininforService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
@RequiresPermissions("monitor:logininfor:view")
|
@RequiresPermissions("monitor:logininfor:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String logininfor()
|
public String logininfor()
|
||||||
|
|
@ -48,7 +52,7 @@ public class SysLogininforController extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "登陆日志", businessType = BusinessType.EXPORT)
|
@Log(title = "登录日志", businessType = BusinessType.EXPORT)
|
||||||
@RequiresPermissions("monitor:logininfor:export")
|
@RequiresPermissions("monitor:logininfor:export")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
@ -56,11 +60,11 @@ public class SysLogininforController extends BaseController
|
||||||
{
|
{
|
||||||
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
||||||
ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
|
ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
|
||||||
return util.exportExcel(list, "登陆日志");
|
return util.exportExcel(list, "登录日志");
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("monitor:logininfor:remove")
|
@RequiresPermissions("monitor:logininfor:remove")
|
||||||
@Log(title = "登陆日志", businessType = BusinessType.DELETE)
|
@Log(title = "登录日志", businessType = BusinessType.DELETE)
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult remove(String ids)
|
public AjaxResult remove(String ids)
|
||||||
|
|
@ -69,7 +73,7 @@ public class SysLogininforController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("monitor:logininfor:remove")
|
@RequiresPermissions("monitor:logininfor:remove")
|
||||||
@Log(title = "登陆日志", businessType = BusinessType.CLEAN)
|
@Log(title = "登录日志", businessType = BusinessType.CLEAN)
|
||||||
@PostMapping("/clean")
|
@PostMapping("/clean")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult clean()
|
public AjaxResult clean()
|
||||||
|
|
@ -77,4 +81,14 @@ public class SysLogininforController extends BaseController
|
||||||
logininforService.cleanLogininfor();
|
logininforService.cleanLogininfor();
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresPermissions("monitor:logininfor:unlock")
|
||||||
|
@Log(title = "账户解锁", businessType = BusinessType.OTHER)
|
||||||
|
@PostMapping("/unlock")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult unlock(String loginName)
|
||||||
|
{
|
||||||
|
passwordService.clearLoginRecordCache(loginName);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,24 @@
|
||||||
package com.ruoyi.web.controller.monitor;
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
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.bind.annotation.ResponseBody;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.enums.OnlineStatus;
|
import com.ruoyi.common.enums.OnlineStatus;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.framework.shiro.session.OnlineSession;
|
import com.ruoyi.framework.shiro.session.OnlineSession;
|
||||||
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysUserOnline;
|
import com.ruoyi.system.domain.SysUserOnline;
|
||||||
import com.ruoyi.system.service.ISysUserOnlineService;
|
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||||
|
|
||||||
|
|
@ -55,13 +56,13 @@ public class SysUserOnlineController extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("monitor:online:batchForceLogout")
|
@RequiresPermissions(value = { "monitor:online:batchForceLogout", "monitor:online:forceLogout" }, logical = Logical.OR)
|
||||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||||
@PostMapping("/batchForceLogout")
|
@PostMapping("/batchForceLogout")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult batchForceLogout(@RequestParam("ids[]") String[] ids)
|
public AjaxResult batchForceLogout(String ids)
|
||||||
{
|
{
|
||||||
for (String sessionId : ids)
|
for (String sessionId : Convert.toStrArray(ids))
|
||||||
{
|
{
|
||||||
SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
|
SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
|
||||||
if (online == null)
|
if (online == null)
|
||||||
|
|
@ -75,40 +76,13 @@ public class SysUserOnlineController extends BaseController
|
||||||
}
|
}
|
||||||
if (sessionId.equals(ShiroUtils.getSessionId()))
|
if (sessionId.equals(ShiroUtils.getSessionId()))
|
||||||
{
|
{
|
||||||
return error("当前登陆用户无法强退");
|
return error("当前登录用户无法强退");
|
||||||
}
|
}
|
||||||
onlineSession.setStatus(OnlineStatus.off_line);
|
onlineSessionDAO.delete(onlineSession);
|
||||||
onlineSessionDAO.update(onlineSession);
|
|
||||||
online.setStatus(OnlineStatus.off_line);
|
online.setStatus(OnlineStatus.off_line);
|
||||||
userOnlineService.saveOnline(online);
|
userOnlineService.saveOnline(online);
|
||||||
|
userOnlineService.removeUserCache(online.getLoginName(), sessionId);
|
||||||
}
|
}
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("monitor:online:forceLogout")
|
|
||||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
|
||||||
@PostMapping("/forceLogout")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult forceLogout(String sessionId)
|
|
||||||
{
|
|
||||||
SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
|
|
||||||
if (sessionId.equals(ShiroUtils.getSessionId()))
|
|
||||||
{
|
|
||||||
return error("当前登陆用户无法强退");
|
|
||||||
}
|
|
||||||
if (online == null)
|
|
||||||
{
|
|
||||||
return error("用户已下线");
|
|
||||||
}
|
|
||||||
OnlineSession onlineSession = (OnlineSession) onlineSessionDAO.readSession(online.getSessionId());
|
|
||||||
if (onlineSession == null)
|
|
||||||
{
|
|
||||||
return error("用户已下线");
|
|
||||||
}
|
|
||||||
onlineSession.setStatus(OnlineStatus.off_line);
|
|
||||||
onlineSessionDAO.update(onlineSession);
|
|
||||||
online.setStatus(OnlineStatus.off_line);
|
|
||||||
userOnlineService.saveOnline(online);
|
|
||||||
return success();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysConfig;
|
import com.ruoyi.system.domain.SysConfig;
|
||||||
import com.ruoyi.system.service.ISysConfigService;
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
|
||||||
|
|
@ -132,6 +132,19 @@ public class SysConfigController extends BaseController
|
||||||
return toAjax(configService.deleteConfigByIds(ids));
|
return toAjax(configService.deleteConfigByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空缓存
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:config:remove")
|
||||||
|
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
|
||||||
|
@GetMapping("/clearCache")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult clearCache()
|
||||||
|
{
|
||||||
|
configService.clearCache();
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验参数键名
|
* 校验参数键名
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.Ztree;
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysDept;
|
|
||||||
import com.ruoyi.system.domain.SysRole;
|
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -112,6 +112,11 @@ public class SysDeptController extends BaseController
|
||||||
{
|
{
|
||||||
return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
|
return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
|
||||||
}
|
}
|
||||||
|
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
|
||||||
|
&& deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0)
|
||||||
|
{
|
||||||
|
return AjaxResult.error("该部门包含未停用的子部门!");
|
||||||
|
}
|
||||||
dept.setUpdateBy(ShiroUtils.getLoginName());
|
dept.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
return toAjax(deptService.updateDept(dept));
|
return toAjax(deptService.updateDept(dept));
|
||||||
}
|
}
|
||||||
|
|
@ -148,11 +153,16 @@ public class SysDeptController extends BaseController
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择部门树
|
* 选择部门树
|
||||||
|
*
|
||||||
|
* @param deptId 部门ID
|
||||||
|
* @param excludeId 排除ID
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectDeptTree/{deptId}")
|
@GetMapping(value = { "/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}" })
|
||||||
public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap)
|
public String selectDeptTree(@PathVariable("deptId") Long deptId,
|
||||||
|
@PathVariable(value = "excludeId", required = false) String excludeId, ModelMap mmap)
|
||||||
{
|
{
|
||||||
mmap.put("dept", deptService.selectDeptById(deptId));
|
mmap.put("dept", deptService.selectDeptById(deptId));
|
||||||
|
mmap.put("excludeId", excludeId);
|
||||||
return prefix + "/tree";
|
return prefix + "/tree";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -167,6 +177,19 @@ public class SysDeptController extends BaseController
|
||||||
return ztrees;
|
return ztrees;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加载部门列表树(排除下级)
|
||||||
|
*/
|
||||||
|
@GetMapping("/treeData/{excludeId}")
|
||||||
|
@ResponseBody
|
||||||
|
public List<Ztree> treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId)
|
||||||
|
{
|
||||||
|
SysDept dept = new SysDept();
|
||||||
|
dept.setDeptId(excludeId);
|
||||||
|
List<Ztree> ztrees = deptService.selectDeptTreeExcludeChild(dept);
|
||||||
|
return ztrees;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载角色部门(数据权限)列表树
|
* 加载角色部门(数据权限)列表树
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysDictData;
|
|
||||||
import com.ruoyi.system.service.ISysDictDataService;
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.Ztree;
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysDictType;
|
|
||||||
import com.ruoyi.system.service.ISysDictTypeService;
|
import com.ruoyi.system.service.ISysDictTypeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -124,15 +124,21 @@ public class SysDictTypeController extends BaseController
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult remove(String ids)
|
public AjaxResult remove(String ids)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return toAjax(dictTypeService.deleteDictTypeByIds(ids));
|
return toAjax(dictTypeService.deleteDictTypeByIds(ids));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
|
/**
|
||||||
|
* 清空缓存
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:dict:remove")
|
||||||
|
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||||
|
@GetMapping("/clearCache")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult clearCache()
|
||||||
{
|
{
|
||||||
return error(e.getMessage());
|
dictTypeService.clearCache();
|
||||||
}
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,30 @@
|
||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.servlet.http.Cookie;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import com.ruoyi.common.config.Global;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
|
import com.ruoyi.common.constant.ShiroConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.system.domain.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
import com.ruoyi.system.domain.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.utils.CookieUtils;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,6 +38,12 @@ public class SysIndexController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysMenuService menuService;
|
private ISysMenuService menuService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysConfigService configService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
// 系统首页
|
// 系统首页
|
||||||
@GetMapping("/index")
|
@GetMapping("/index")
|
||||||
public String index(ModelMap mmap)
|
public String index(ModelMap mmap)
|
||||||
|
|
@ -33,16 +54,103 @@ public class SysIndexController extends BaseController
|
||||||
List<SysMenu> menus = menuService.selectMenusByUser(user);
|
List<SysMenu> menus = menuService.selectMenusByUser(user);
|
||||||
mmap.put("menus", menus);
|
mmap.put("menus", menus);
|
||||||
mmap.put("user", user);
|
mmap.put("user", user);
|
||||||
mmap.put("copyrightYear", Global.getCopyrightYear());
|
mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme"));
|
||||||
mmap.put("demoEnabled", Global.isDemoEnabled());
|
mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName"));
|
||||||
return "index";
|
mmap.put("ignoreFooter", configService.selectConfigByKey("sys.index.ignoreFooter"));
|
||||||
|
mmap.put("copyrightYear", RuoYiConfig.getCopyrightYear());
|
||||||
|
mmap.put("demoEnabled", RuoYiConfig.isDemoEnabled());
|
||||||
|
mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
|
||||||
|
mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
|
||||||
|
|
||||||
|
// 菜单导航显示风格
|
||||||
|
String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
|
||||||
|
// 移动端,默认使左侧导航菜单,否则取默认配置
|
||||||
|
String indexStyle = ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")) ? "index" : menuStyle;
|
||||||
|
|
||||||
|
// 优先Cookie配置导航菜单
|
||||||
|
Cookie[] cookies = ServletUtils.getRequest().getCookies();
|
||||||
|
for (Cookie cookie : cookies)
|
||||||
|
{
|
||||||
|
if (StringUtils.isNotEmpty(cookie.getName()) && "nav-style".equalsIgnoreCase(cookie.getName()))
|
||||||
|
{
|
||||||
|
indexStyle = cookie.getValue();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String webIndex = "topnav".equalsIgnoreCase(indexStyle) ? "index-topnav" : "index";
|
||||||
|
return webIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 锁定屏幕
|
||||||
|
@GetMapping("/lockscreen")
|
||||||
|
public String lockscreen(ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("user", ShiroUtils.getSysUser());
|
||||||
|
ServletUtils.getSession().setAttribute(ShiroConstants.LOCK_SCREEN, true);
|
||||||
|
return "lock";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解锁屏幕
|
||||||
|
@PostMapping("/unlockscreen")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult unlockscreen(String password)
|
||||||
|
{
|
||||||
|
SysUser user = ShiroUtils.getSysUser();
|
||||||
|
if (StringUtils.isNull(user))
|
||||||
|
{
|
||||||
|
return AjaxResult.error("服务器超时,请重新登陆");
|
||||||
|
}
|
||||||
|
if (passwordService.matches(user, password))
|
||||||
|
{
|
||||||
|
ServletUtils.getSession().removeAttribute(ShiroConstants.LOCK_SCREEN);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
return AjaxResult.error("密码不正确,请重新输入。");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换主题
|
||||||
|
@GetMapping("/system/switchSkin")
|
||||||
|
public String switchSkin()
|
||||||
|
{
|
||||||
|
return "skin";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换菜单
|
||||||
|
@GetMapping("/system/menuStyle/{style}")
|
||||||
|
public void menuStyle(@PathVariable String style, HttpServletResponse response)
|
||||||
|
{
|
||||||
|
CookieUtils.setCookie(response, "nav-style", style);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 系统介绍
|
// 系统介绍
|
||||||
@GetMapping("/system/main")
|
@GetMapping("/system/main")
|
||||||
public String main(ModelMap mmap)
|
public String main(ModelMap mmap)
|
||||||
{
|
{
|
||||||
mmap.put("version", Global.getVersion());
|
mmap.put("version", RuoYiConfig.getVersion());
|
||||||
return "main";
|
return "main";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查初始密码是否提醒修改
|
||||||
|
public boolean initPasswordIsModify(Date pwdUpdateDate)
|
||||||
|
{
|
||||||
|
Integer initPasswordModify = Convert.toInt(configService.selectConfigByKey("sys.account.initPasswordModify"));
|
||||||
|
return initPasswordModify != null && initPasswordModify == 1 && pwdUpdateDate == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查密码是否过期
|
||||||
|
public boolean passwordIsExpiration(Date pwdUpdateDate)
|
||||||
|
{
|
||||||
|
Integer passwordValidateDays = Convert.toInt(configService.selectConfigByKey("sys.account.passwordValidateDays"));
|
||||||
|
if (passwordValidateDays != null && passwordValidateDays > 0)
|
||||||
|
{
|
||||||
|
if (StringUtils.isNull(pwdUpdateDate))
|
||||||
|
{
|
||||||
|
// 如果从未修改过初始密码,直接提醒过期
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Date nowDate = DateUtils.getNowDate();
|
||||||
|
return DateUtils.differentDaysByMillisecond(nowDate, pwdUpdateDate) > passwordValidateDays;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.Ztree;
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.system.domain.SysMenu;
|
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
|
||||||
import com.ruoyi.system.domain.SysRole;
|
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -70,7 +71,7 @@ public class SysMenuController extends BaseController
|
||||||
{
|
{
|
||||||
return AjaxResult.warn("菜单已分配,不允许删除");
|
return AjaxResult.warn("菜单已分配,不允许删除");
|
||||||
}
|
}
|
||||||
ShiroUtils.clearCachedAuthorizationInfo();
|
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
return toAjax(menuService.deleteMenuById(menuId));
|
return toAjax(menuService.deleteMenuById(menuId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,7 +110,7 @@ public class SysMenuController extends BaseController
|
||||||
return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
||||||
}
|
}
|
||||||
menu.setCreateBy(ShiroUtils.getLoginName());
|
menu.setCreateBy(ShiroUtils.getLoginName());
|
||||||
ShiroUtils.clearCachedAuthorizationInfo();
|
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
return toAjax(menuService.insertMenu(menu));
|
return toAjax(menuService.insertMenu(menu));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,7 +138,7 @@ public class SysMenuController extends BaseController
|
||||||
return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
||||||
}
|
}
|
||||||
menu.setUpdateBy(ShiroUtils.getLoginName());
|
menu.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
ShiroUtils.clearCachedAuthorizationInfo();
|
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
return toAjax(menuService.updateMenu(menu));
|
return toAjax(menuService.updateMenu(menu));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
import com.ruoyi.system.service.ISysNoticeService;
|
import com.ruoyi.system.service.ISysNoticeService;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysPost;
|
import com.ruoyi.system.domain.SysPost;
|
||||||
import com.ruoyi.system.service.ISysPostService;
|
import com.ruoyi.system.service.ISysPostService;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,15 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.config.Global;
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysUser;
|
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -81,21 +81,23 @@ public class SysProfileController extends BaseController
|
||||||
public AjaxResult resetPwd(String oldPassword, String newPassword)
|
public AjaxResult resetPwd(String oldPassword, String newPassword)
|
||||||
{
|
{
|
||||||
SysUser user = ShiroUtils.getSysUser();
|
SysUser user = ShiroUtils.getSysUser();
|
||||||
if (StringUtils.isNotEmpty(newPassword) && passwordService.matches(user, oldPassword))
|
if (!passwordService.matches(user, oldPassword))
|
||||||
{
|
{
|
||||||
|
return error("修改密码失败,旧密码错误");
|
||||||
|
}
|
||||||
|
if (passwordService.matches(user, newPassword))
|
||||||
|
{
|
||||||
|
return error("新密码不能与旧密码相同");
|
||||||
|
}
|
||||||
user.setSalt(ShiroUtils.randomSalt());
|
user.setSalt(ShiroUtils.randomSalt());
|
||||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
|
user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
|
||||||
|
user.setPwdUpdateDate(DateUtils.getNowDate());
|
||||||
if (userService.resetUserPwd(user) > 0)
|
if (userService.resetUserPwd(user) > 0)
|
||||||
{
|
{
|
||||||
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
return error();
|
return error("修改密码异常,请联系管理员");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return error("修改密码失败,旧密码错误");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -154,7 +156,7 @@ public class SysProfileController extends BaseController
|
||||||
{
|
{
|
||||||
if (!file.isEmpty())
|
if (!file.isEmpty())
|
||||||
{
|
{
|
||||||
String avatar = FileUploadUtils.upload(Global.getAvatarPath(), file);
|
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file);
|
||||||
currentUser.setAvatar(avatar);
|
currentUser.setAvatar(avatar);
|
||||||
if (userService.updateUserInfo(currentUser) > 0)
|
if (userService.updateUserInfo(currentUser) > 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.framework.shiro.service.SysRegisterService;
|
||||||
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册验证
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class SysRegisterController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysRegisterService registerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysConfigService configService;
|
||||||
|
|
||||||
|
@GetMapping("/register")
|
||||||
|
public String register()
|
||||||
|
{
|
||||||
|
return "register";
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/register")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult ajaxRegister(SysUser user)
|
||||||
|
{
|
||||||
|
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
|
||||||
|
{
|
||||||
|
return error("当前系统没有开启注册功能!");
|
||||||
|
}
|
||||||
|
String msg = registerService.register(user);
|
||||||
|
return StringUtils.isEmpty(msg) ? success() : error(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -15,12 +15,13 @@ import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
|
||||||
import com.ruoyi.system.domain.SysRole;
|
|
||||||
import com.ruoyi.system.domain.SysUser;
|
|
||||||
import com.ruoyi.system.domain.SysUserRole;
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
|
@ -97,7 +98,7 @@ public class SysRoleController extends BaseController
|
||||||
return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||||
}
|
}
|
||||||
role.setCreateBy(ShiroUtils.getLoginName());
|
role.setCreateBy(ShiroUtils.getLoginName());
|
||||||
ShiroUtils.clearCachedAuthorizationInfo();
|
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
return toAjax(roleService.insertRole(role));
|
return toAjax(roleService.insertRole(role));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -121,6 +122,7 @@ public class SysRoleController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult editSave(@Validated SysRole role)
|
public AjaxResult editSave(@Validated SysRole role)
|
||||||
{
|
{
|
||||||
|
roleService.checkRoleAllowed(role);
|
||||||
if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
|
if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
|
||||||
{
|
{
|
||||||
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||||
|
|
@ -130,7 +132,7 @@ public class SysRoleController extends BaseController
|
||||||
return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||||
}
|
}
|
||||||
role.setUpdateBy(ShiroUtils.getLoginName());
|
role.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
ShiroUtils.clearCachedAuthorizationInfo();
|
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
return toAjax(roleService.updateRole(role));
|
return toAjax(roleService.updateRole(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,6 +155,7 @@ public class SysRoleController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult authDataScopeSave(SysRole role)
|
public AjaxResult authDataScopeSave(SysRole role)
|
||||||
{
|
{
|
||||||
|
roleService.checkRoleAllowed(role);
|
||||||
role.setUpdateBy(ShiroUtils.getLoginName());
|
role.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
if (roleService.authDataScope(role) > 0)
|
if (roleService.authDataScope(role) > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -167,16 +170,9 @@ public class SysRoleController extends BaseController
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult remove(String ids)
|
public AjaxResult remove(String ids)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return toAjax(roleService.deleteRoleByIds(ids));
|
return toAjax(roleService.deleteRoleByIds(ids));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
return error(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色名称
|
* 校验角色名称
|
||||||
|
|
@ -216,6 +212,7 @@ public class SysRoleController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult changeStatus(SysRole role)
|
public AjaxResult changeStatus(SysRole role)
|
||||||
{
|
{
|
||||||
|
roleService.checkRoleAllowed(role);
|
||||||
return toAjax(roleService.changeStatus(role));
|
return toAjax(roleService.changeStatus(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
@ -16,13 +17,14 @@ import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
|
||||||
import com.ruoyi.system.domain.SysUser;
|
|
||||||
import com.ruoyi.system.service.ISysPostService;
|
import com.ruoyi.system.service.ISysPostService;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
|
@ -106,7 +108,7 @@ public class SysUserController extends BaseController
|
||||||
@GetMapping("/add")
|
@GetMapping("/add")
|
||||||
public String add(ModelMap mmap)
|
public String add(ModelMap mmap)
|
||||||
{
|
{
|
||||||
mmap.put("roles", roleService.selectRoleAll());
|
mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||||
mmap.put("posts", postService.selectPostAll());
|
mmap.put("posts", postService.selectPostAll());
|
||||||
return prefix + "/add";
|
return prefix + "/add";
|
||||||
}
|
}
|
||||||
|
|
@ -124,11 +126,13 @@ public class SysUserController extends BaseController
|
||||||
{
|
{
|
||||||
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
||||||
}
|
}
|
||||||
else if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||||
|
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||||
{
|
{
|
||||||
return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
||||||
}
|
}
|
||||||
else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
else if (StringUtils.isNotEmpty(user.getEmail())
|
||||||
|
&& UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||||
{
|
{
|
||||||
return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
||||||
}
|
}
|
||||||
|
|
@ -144,8 +148,9 @@ public class SysUserController extends BaseController
|
||||||
@GetMapping("/edit/{userId}")
|
@GetMapping("/edit/{userId}")
|
||||||
public String edit(@PathVariable("userId") Long userId, ModelMap mmap)
|
public String edit(@PathVariable("userId") Long userId, ModelMap mmap)
|
||||||
{
|
{
|
||||||
|
List<SysRole> roles = roleService.selectRolesByUserId(userId);
|
||||||
mmap.put("user", userService.selectUserById(userId));
|
mmap.put("user", userService.selectUserById(userId));
|
||||||
mmap.put("roles", roleService.selectRolesByUserId(userId));
|
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||||
mmap.put("posts", postService.selectPostsByUserId(userId));
|
mmap.put("posts", postService.selectPostsByUserId(userId));
|
||||||
return prefix + "/edit";
|
return prefix + "/edit";
|
||||||
}
|
}
|
||||||
|
|
@ -159,15 +164,14 @@ public class SysUserController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult editSave(@Validated SysUser user)
|
public AjaxResult editSave(@Validated SysUser user)
|
||||||
{
|
{
|
||||||
if (StringUtils.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId()))
|
userService.checkUserAllowed(user);
|
||||||
{
|
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||||
return error("不允许修改超级管理员用户");
|
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||||
}
|
|
||||||
else if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
|
||||||
{
|
{
|
||||||
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
||||||
}
|
}
|
||||||
else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
else if (StringUtils.isNotEmpty(user.getEmail())
|
||||||
|
&& UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||||
{
|
{
|
||||||
return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
||||||
}
|
}
|
||||||
|
|
@ -176,7 +180,6 @@ public class SysUserController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("system:user:resetPwd")
|
@RequiresPermissions("system:user:resetPwd")
|
||||||
@Log(title = "重置密码", businessType = BusinessType.UPDATE)
|
|
||||||
@GetMapping("/resetPwd/{userId}")
|
@GetMapping("/resetPwd/{userId}")
|
||||||
public String resetPwd(@PathVariable("userId") Long userId, ModelMap mmap)
|
public String resetPwd(@PathVariable("userId") Long userId, ModelMap mmap)
|
||||||
{
|
{
|
||||||
|
|
@ -190,11 +193,12 @@ public class SysUserController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult resetPwdSave(SysUser user)
|
public AjaxResult resetPwdSave(SysUser user)
|
||||||
{
|
{
|
||||||
|
userService.checkUserAllowed(user);
|
||||||
user.setSalt(ShiroUtils.randomSalt());
|
user.setSalt(ShiroUtils.randomSalt());
|
||||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
||||||
if (userService.resetUserPwd(user) > 0)
|
if (userService.resetUserPwd(user) > 0)
|
||||||
{
|
{
|
||||||
if (ShiroUtils.getUserId() == user.getUserId())
|
if (ShiroUtils.getUserId().longValue() == user.getUserId().longValue())
|
||||||
{
|
{
|
||||||
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
||||||
}
|
}
|
||||||
|
|
@ -203,21 +207,41 @@ public class SysUserController extends BaseController
|
||||||
return error();
|
return error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进入授权角色页
|
||||||
|
*/
|
||||||
|
@GetMapping("/authRole/{userId}")
|
||||||
|
public String authRole(@PathVariable("userId") Long userId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
SysUser user = userService.selectUserById(userId);
|
||||||
|
// 获取用户所属的角色列表
|
||||||
|
List<SysRole> roles = roleService.selectRolesByUserId(userId);
|
||||||
|
mmap.put("user", user);
|
||||||
|
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||||
|
return prefix + "/authRole";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户授权角色
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:user:add")
|
||||||
|
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||||
|
@PostMapping("/authRole/insertAuthRole")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
||||||
|
{
|
||||||
|
userService.insertUserAuth(userId, roleIds);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
@RequiresPermissions("system:user:remove")
|
@RequiresPermissions("system:user:remove")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult remove(String ids)
|
public AjaxResult remove(String ids)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return toAjax(userService.deleteUserByIds(ids));
|
return toAjax(userService.deleteUserByIds(ids));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
return error(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验用户名
|
* 校验用户名
|
||||||
|
|
@ -258,6 +282,7 @@ public class SysUserController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult changeStatus(SysUser user)
|
public AjaxResult changeStatus(SysUser user)
|
||||||
{
|
{
|
||||||
|
userService.checkUserAllowed(user);
|
||||||
return toAjax(userService.changeStatus(user));
|
return toAjax(userService.changeStatus(user));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
package com.ruoyi.web.core.config;
|
package com.ruoyi.web.core.config;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import com.ruoyi.common.config.Global;
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import springfox.documentation.builders.ApiInfoBuilder;
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
import springfox.documentation.builders.PathSelectors;
|
import springfox.documentation.builders.PathSelectors;
|
||||||
|
|
@ -22,6 +23,10 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
@EnableSwagger2
|
@EnableSwagger2
|
||||||
public class SwaggerConfig
|
public class SwaggerConfig
|
||||||
{
|
{
|
||||||
|
/** 是否开启swagger */
|
||||||
|
@Value("${swagger.enabled}")
|
||||||
|
private boolean enabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建API
|
* 创建API
|
||||||
*/
|
*/
|
||||||
|
|
@ -29,6 +34,8 @@ public class SwaggerConfig
|
||||||
public Docket createRestApi()
|
public Docket createRestApi()
|
||||||
{
|
{
|
||||||
return new Docket(DocumentationType.SWAGGER_2)
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
// 是否启用Swagger
|
||||||
|
.enable(enabled)
|
||||||
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
||||||
.apiInfo(apiInfo())
|
.apiInfo(apiInfo())
|
||||||
// 设置哪些接口暴露给Swagger展示
|
// 设置哪些接口暴露给Swagger展示
|
||||||
|
|
@ -54,9 +61,9 @@ public class SwaggerConfig
|
||||||
// 描述
|
// 描述
|
||||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
||||||
// 作者信息
|
// 作者信息
|
||||||
.contact(new Contact(Global.getName(), null, null))
|
.contact(new Contact(RuoYiConfig.getName(), null, null))
|
||||||
// 版本
|
// 版本
|
||||||
.version("版本号:" + Global.getVersion())
|
.version("版本号:" + RuoYiConfig.getVersion())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ ruoyi:
|
||||||
# 名称
|
# 名称
|
||||||
name: RuoYi
|
name: RuoYi
|
||||||
# 版本
|
# 版本
|
||||||
version: 4.0.0
|
version: 4.5.1
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2019
|
copyrightYear: 2019
|
||||||
# 实例演示开关
|
# 实例演示开关
|
||||||
|
|
@ -11,7 +11,7 @@ ruoyi:
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
profile: D:/ruoyi/uploadPath
|
profile: D:/ruoyi/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: true
|
addressEnabled: false
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
|
|
@ -73,7 +73,7 @@ spring:
|
||||||
# MyBatis
|
# MyBatis
|
||||||
mybatis:
|
mybatis:
|
||||||
# 搜索指定包别名
|
# 搜索指定包别名
|
||||||
typeAliasesPackage: com.ruoyi
|
typeAliasesPackage: com.ruoyi.**.domain
|
||||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||||
# 加载全局的配置文件
|
# 加载全局的配置文件
|
||||||
|
|
@ -108,8 +108,10 @@ shiro:
|
||||||
httpOnly: true
|
httpOnly: true
|
||||||
# 设置Cookie的过期时间,天为单位
|
# 设置Cookie的过期时间,天为单位
|
||||||
maxAge: 30
|
maxAge: 30
|
||||||
|
# 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)KeyGenerator keygen = KeyGenerator.getInstance("AES"); SecretKey deskey = keygen.generateKey(); System.out.println(Base64.encodeToString(deskey.getEncoded()));
|
||||||
|
cipherKey: zSyK5Kp6PZAAjlT+eeNMlg==
|
||||||
session:
|
session:
|
||||||
# Session超时时间(默认30分钟)
|
# Session超时时间,-1代表永不过期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 30
|
||||||
# 同步session到数据库的周期(默认1分钟)
|
# 同步session到数据库的周期(默认1分钟)
|
||||||
dbSyncPeriod: 1
|
dbSyncPeriod: 1
|
||||||
|
|
@ -128,3 +130,8 @@ xss:
|
||||||
excludes: /system/notice/*
|
excludes: /system/notice/*
|
||||||
# 匹配链接
|
# 匹配链接
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
|
|
||||||
|
# Swagger配置
|
||||||
|
swagger:
|
||||||
|
# 是否开启swagger
|
||||||
|
enabled: true
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,14 @@
|
||||||
<!-- 磁盘缓存位置 -->
|
<!-- 磁盘缓存位置 -->
|
||||||
<diskStore path="java.io.tmpdir"/>
|
<diskStore path="java.io.tmpdir"/>
|
||||||
|
|
||||||
|
<!-- maxEntriesLocalHeap:堆内存中最大缓存对象数,0没有限制 -->
|
||||||
|
<!-- maxElementsInMemory: 在内存中缓存的element的最大数目。-->
|
||||||
|
<!-- eternal:elements是否永久有效,如果为true,timeouts将被忽略,element将永不过期 -->
|
||||||
|
<!-- timeToIdleSeconds:失效前的空闲秒数,当eternal为false时,这个属性才有效,0为不限制 -->
|
||||||
|
<!-- timeToLiveSeconds:失效前的存活秒数,创建时间到失效时间的间隔为存活时间,当eternal为false时,这个属性才有效,0为不限制 -->
|
||||||
|
<!-- overflowToDisk: 如果内存中数据超过内存限制,是否要缓存到磁盘上 -->
|
||||||
|
<!-- statistics:是否收集统计信息。如果需要监控缓存使用情况,应该打开这个选项。默认为关闭(统计会影响性能)。设置statistics="true"开启统计 -->
|
||||||
|
|
||||||
<!-- 默认缓存 -->
|
<!-- 默认缓存 -->
|
||||||
<defaultCache
|
<defaultCache
|
||||||
maxEntriesLocalHeap="1000"
|
maxEntriesLocalHeap="1000"
|
||||||
|
|
@ -20,7 +28,7 @@
|
||||||
timeToIdleSeconds="600"
|
timeToIdleSeconds="600"
|
||||||
timeToLiveSeconds="0"
|
timeToLiveSeconds="0"
|
||||||
overflowToDisk="false"
|
overflowToDisk="false"
|
||||||
statistics="true">
|
statistics="false">
|
||||||
</cache>
|
</cache>
|
||||||
|
|
||||||
<!-- 系统活跃用户缓存 -->
|
<!-- 系统活跃用户缓存 -->
|
||||||
|
|
@ -31,8 +39,53 @@
|
||||||
diskPersistent="false"
|
diskPersistent="false"
|
||||||
timeToLiveSeconds="0"
|
timeToLiveSeconds="0"
|
||||||
timeToIdleSeconds="0"
|
timeToIdleSeconds="0"
|
||||||
statistics="true">
|
statistics="false">
|
||||||
</cache>
|
</cache>
|
||||||
|
|
||||||
|
<!-- 系统用户授权缓存 没必要过期 -->
|
||||||
|
<cache name="sys-authCache"
|
||||||
|
maxEntriesLocalHeap="10000"
|
||||||
|
overflowToDisk="false"
|
||||||
|
eternal="false"
|
||||||
|
diskPersistent="false"
|
||||||
|
timeToLiveSeconds="0"
|
||||||
|
timeToIdleSeconds="0"
|
||||||
|
memoryStoreEvictionPolicy="LRU"
|
||||||
|
statistics="false"/>
|
||||||
|
|
||||||
|
<!-- 系统缓存 -->
|
||||||
|
<cache name="sys-cache"
|
||||||
|
maxEntriesLocalHeap="1000"
|
||||||
|
eternal="true"
|
||||||
|
overflowToDisk="true"
|
||||||
|
statistics="false">
|
||||||
|
</cache>
|
||||||
|
|
||||||
|
<!-- 系统参数缓存 -->
|
||||||
|
<cache name="sys-config"
|
||||||
|
maxEntriesLocalHeap="1000"
|
||||||
|
eternal="true"
|
||||||
|
overflowToDisk="true"
|
||||||
|
statistics="false">
|
||||||
|
</cache>
|
||||||
|
|
||||||
|
<!-- 系统字典缓存 -->
|
||||||
|
<cache name="sys-dict"
|
||||||
|
maxEntriesLocalHeap="1000"
|
||||||
|
eternal="true"
|
||||||
|
overflowToDisk="true"
|
||||||
|
statistics="false">
|
||||||
|
</cache>
|
||||||
|
|
||||||
|
<!-- 系统会话缓存 -->
|
||||||
|
<cache name="shiro-activeSessionCache"
|
||||||
|
maxEntriesLocalHeap="10000"
|
||||||
|
overflowToDisk="false"
|
||||||
|
eternal="false"
|
||||||
|
diskPersistent="false"
|
||||||
|
timeToLiveSeconds="0"
|
||||||
|
timeToIdleSeconds="0"
|
||||||
|
statistics="false"/>
|
||||||
|
|
||||||
</ehcache>
|
</ehcache>
|
||||||
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/*!
|
/*!
|
||||||
* bootstrap-fileinput v5.0.4
|
* bootstrap-fileinput v5.1.3
|
||||||
* http://plugins.krajee.com/file-input
|
* http://plugins.krajee.com/file-input
|
||||||
*
|
*
|
||||||
* Krajee default styling for bootstrap-fileinput.
|
* Krajee default styling for bootstrap-fileinput.
|
||||||
*
|
*
|
||||||
* Author: Kartik Visweswaran
|
* Author: Kartik Visweswaran
|
||||||
* Copyright: 2014 - 2019, Kartik Visweswaran, Krajee.com
|
* Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
|
||||||
*
|
*
|
||||||
* Licensed under the BSD-3-Clause
|
* Licensed under the BSD-3-Clause
|
||||||
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
|
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
|
||||||
|
|
@ -60,10 +60,9 @@
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default .file-thumb-progress .progress, .krajee-default .file-thumb-progress .progress-bar {
|
.file-thumb-progress .progress, .file-thumb-progress .progress-bar {
|
||||||
height: 11px;
|
|
||||||
font-family: Verdana, Helvetica, sans-serif;
|
font-family: Verdana, Helvetica, sans-serif;
|
||||||
font-size: 9px;
|
font-size: 0.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default .file-thumb-progress .progress, .kv-upload-progress .progress {
|
.krajee-default .file-thumb-progress .progress, .kv-upload-progress .progress {
|
||||||
|
|
@ -201,12 +200,16 @@
|
||||||
.file-preview-image {
|
.file-preview-image {
|
||||||
font: 40px Impact, Charcoal, sans-serif;
|
font: 40px Impact, Charcoal, sans-serif;
|
||||||
color: #008000;
|
color: #008000;
|
||||||
|
width:auto;
|
||||||
|
height:auto;
|
||||||
|
max-width:100%;
|
||||||
|
max-height:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default.file-preview-frame {
|
.krajee-default.file-preview-frame {
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
border: 1px solid rgba(0,0,0,0.2);
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
box-shadow: 0 0 10px 0 rgba(0,0,0,0.2);
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -237,24 +240,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default.file-preview-frame:not(.file-preview-error):hover {
|
.krajee-default.file-preview-frame:not(.file-preview-error):hover {
|
||||||
border: 1px solid rgba(0,0,0,0.3);
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||||
box-shadow: 0 0 10px 0 rgba(0,0,0,0.4);
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default .file-preview-text {
|
.krajee-default .file-preview-text {
|
||||||
display: block;
|
|
||||||
color: #428bca;
|
color: #428bca;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
||||||
outline: none;
|
outline: none;
|
||||||
padding: 8px;
|
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default .file-preview-html {
|
.krajee-default .file-preview-html {
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
padding: 8px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default .file-other-icon {
|
.krajee-default .file-other-icon {
|
||||||
|
|
@ -292,7 +290,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.krajee-default .file-thumb-progress {
|
.krajee-default .file-thumb-progress {
|
||||||
height: 11px;
|
|
||||||
top: 37px;
|
top: 37px;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
@ -340,13 +337,13 @@
|
||||||
|
|
||||||
.file-zoom-dialog .btn-navigate {
|
.file-zoom-dialog .btn-navigate {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: -60px 0 0;
|
||||||
|
font-size: 60px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
top: 45%;
|
top: 50%;
|
||||||
font-size: 4em;
|
|
||||||
color: #1c94c4;
|
color: #1c94c4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -402,6 +399,7 @@
|
||||||
|
|
||||||
.file-drop-zone {
|
.file-drop-zone {
|
||||||
border: 1px dashed #aaa;
|
border: 1px dashed #aaa;
|
||||||
|
min-height: 260px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
@ -424,6 +422,7 @@
|
||||||
.file-drop-zone-title {
|
.file-drop-zone-title {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
font-size: 1.6em;
|
font-size: 1.6em;
|
||||||
|
text-align:center;
|
||||||
padding: 85px 10px;
|
padding: 85px 10px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
@ -434,7 +433,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-uploading {
|
.file-uploading {
|
||||||
background: url(loading-sm.gif) no-repeat center bottom 10px;
|
background: url(../img/loading-sm.gif) no-repeat center bottom 10px;
|
||||||
opacity: 0.65;
|
opacity: 0.65;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -467,8 +466,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-zoom-content {
|
.file-zoom-content {
|
||||||
height: 480px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
min-height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-zoom-content .file-preview-image {
|
.file-zoom-content .file-preview-image {
|
||||||
|
|
@ -532,19 +531,33 @@
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-sortable .file-drag-handle {
|
.clickable .file-drop-zone-title {
|
||||||
cursor: move;
|
cursor: pointer;
|
||||||
opacity: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-sortable .file-drag-handle:hover {
|
.file-sortable .file-drag-handle:hover {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clickable .file-drop-zone-title {
|
.file-sortable .file-drag-handle {
|
||||||
cursor: pointer;
|
cursor: grab;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-preview-initial.sortable-chosen {
|
.file-grabbing, .file-grabbing * {
|
||||||
background-color: #d9edf7;
|
cursor: not-allowed !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-grabbing .file-preview-thumbnails * {
|
||||||
|
cursor: grabbing !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-preview-frame.sortable-chosen {
|
||||||
|
background-color: #d9edf7;
|
||||||
|
border-color: #17a2b8;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-preview .kv-zoom-cache {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,297 +0,0 @@
|
||||||
/**
|
|
||||||
* 基于bootstrap-table-fixed-columns修改
|
|
||||||
* 支持左右列冻结、支持固定高度
|
|
||||||
* Copyright (c) 2019 ruoyi
|
|
||||||
*/
|
|
||||||
(function ($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.defaults, {
|
|
||||||
fixedColumns: false,
|
|
||||||
fixedNumber: 1,
|
|
||||||
rightFixedColumns: false,
|
|
||||||
rightFixedNumber: 1
|
|
||||||
});
|
|
||||||
|
|
||||||
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
|
||||||
_initHeader = BootstrapTable.prototype.initHeader,
|
|
||||||
_initBody = BootstrapTable.prototype.initBody,
|
|
||||||
_resetView = BootstrapTable.prototype.resetView;
|
|
||||||
|
|
||||||
BootstrapTable.prototype.initFixedColumns = function () {
|
|
||||||
this.timeoutHeaderColumns_ = 0;
|
|
||||||
this.timeoutBodyColumns_ = 0;
|
|
||||||
if (this.options.fixedColumns) {
|
|
||||||
this.$fixedHeader = $([
|
|
||||||
'<div class="left-fixed-table-columns">',
|
|
||||||
'<table>',
|
|
||||||
'<thead></thead>',
|
|
||||||
'</table>',
|
|
||||||
'</div>'].join(''));
|
|
||||||
|
|
||||||
this.$fixedHeader.find('table').attr('class', this.$el.attr('class'));
|
|
||||||
this.$fixedHeaderColumns = this.$fixedHeader.find('thead');
|
|
||||||
this.$tableHeader.before(this.$fixedHeader);
|
|
||||||
|
|
||||||
this.$fixedBody = $([
|
|
||||||
'<div class="left-fixed-body-columns">',
|
|
||||||
'<table>',
|
|
||||||
'<tbody></tbody>',
|
|
||||||
'</table>',
|
|
||||||
'</div>'].join(''));
|
|
||||||
|
|
||||||
this.$fixedBody.find('table').attr('class', this.$el.attr('class'));
|
|
||||||
this.$fixedBodyColumns = this.$fixedBody.find('tbody');
|
|
||||||
this.$tableBody.before(this.$fixedBody);
|
|
||||||
}
|
|
||||||
if (this.options.rightFixedColumns) {
|
|
||||||
this.$rightfixedBody = $([
|
|
||||||
'<div class="right-fixed-table-columns">',
|
|
||||||
'<table>',
|
|
||||||
'<thead></thead>',
|
|
||||||
'<tbody style="background-color: #fff;"></tbody>',
|
|
||||||
'</table>',
|
|
||||||
'</div>'].join(''));
|
|
||||||
this.$rightfixedBody.find('table').attr('class', this.$el.attr('class'));
|
|
||||||
this.$rightfixedHeaderColumns = this.$rightfixedBody.find('thead');
|
|
||||||
this.$rightfixedBodyColumns = this.$rightfixedBody.find('tbody');
|
|
||||||
this.$tableBody.before(this.$rightfixedBody);
|
|
||||||
if (this.options.fixedColumns) {
|
|
||||||
$('.right-fixed-table-columns').attr('style','right:0px');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.initHeader = function () {
|
|
||||||
_initHeader.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.fixedColumns && !this.options.rightFixedColumns){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.initFixedColumns();
|
|
||||||
|
|
||||||
var $ltr = this.$header.find('tr:eq(0)').clone(true),
|
|
||||||
$rtr = this.$header.find('tr:eq(0)').clone(),
|
|
||||||
$lths = $ltr.clone(true).find('th'),
|
|
||||||
$rths = $rtr.clone().find('th');
|
|
||||||
|
|
||||||
$ltr.html('');
|
|
||||||
$rtr.html('');
|
|
||||||
//右边列冻结
|
|
||||||
if (this.options.rightFixedColumns) {
|
|
||||||
for (var i = 0; i < this.options.rightFixedNumber; i++) {
|
|
||||||
$rtr.append($rths.eq($rths.length - this.options.rightFixedNumber + i).clone());
|
|
||||||
}
|
|
||||||
this.$rightfixedHeaderColumns.html('').append($rtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
//左边列冻结
|
|
||||||
if (this.options.fixedColumns) {
|
|
||||||
for (var i = 0; i < this.options.fixedNumber; i++) {
|
|
||||||
$ltr.append($lths.eq(i).clone(true));
|
|
||||||
}
|
|
||||||
this.$fixedHeaderColumns.html('').append($ltr);
|
|
||||||
this.$selectAll = $ltr.find('[name="btSelectAll"]');
|
|
||||||
this.$selectAll.on('click', function () {
|
|
||||||
var checked = $(this).prop('checked');
|
|
||||||
$(".left-fixed-body-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked);
|
|
||||||
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.initBody = function () {
|
|
||||||
_initBody.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.fixedColumns && !this.options.rightFixedColumns) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var that = this;
|
|
||||||
if (this.options.fixedColumns) {
|
|
||||||
this.$fixedBodyColumns.html('');
|
|
||||||
this.$body.find('> tr[data-index]').each(function () {
|
|
||||||
var $tr = $(this).clone(true),
|
|
||||||
$tds = $tr.clone(true).find('td');
|
|
||||||
|
|
||||||
$tr.html('');
|
|
||||||
for (var i = 0; i < that.options.fixedNumber; i++) {
|
|
||||||
$tr.append($tds.eq(i).clone(true));
|
|
||||||
}
|
|
||||||
that.$fixedBodyColumns.append($tr);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.options.rightFixedColumns) {
|
|
||||||
this.$rightfixedBodyColumns.html('');
|
|
||||||
this.$body.find('> tr[data-index]').each(function () {
|
|
||||||
var $tr = $(this).clone(),
|
|
||||||
$tds = $tr.clone().find('td');
|
|
||||||
|
|
||||||
$tr.html('');
|
|
||||||
for (var i = 0; i < that.options.rightFixedNumber; i++) {
|
|
||||||
var indexTd = $tds.length - that.options.rightFixedNumber + i;
|
|
||||||
var oldTd = $tds.eq(indexTd);
|
|
||||||
var fixTd = oldTd.clone();
|
|
||||||
var buttons = fixTd.find('button');
|
|
||||||
//事件转移:冻结列里面的事件转移到实际按钮的事件
|
|
||||||
buttons.each(function (key, item) {
|
|
||||||
$(item).click(function () {
|
|
||||||
that.$body.find("tr[data-index=" + $tr.attr('data-index') + "] td:eq(" + indexTd + ") button:eq(" + key + ")").click();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$tr.append(fixTd);
|
|
||||||
}
|
|
||||||
that.$rightfixedBodyColumns.append($tr);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.resetView = function () {
|
|
||||||
_resetView.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.fixedColumns && !this.options.rightFixedColumns) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
clearTimeout(this.timeoutHeaderColumns_);
|
|
||||||
this.timeoutHeaderColumns_ = setTimeout($.proxy(this.fitHeaderColumns, this), this.$el.is(':hidden') ? 100 : 0);
|
|
||||||
|
|
||||||
clearTimeout(this.timeoutBodyColumns_);
|
|
||||||
this.timeoutBodyColumns_ = setTimeout($.proxy(this.fitBodyColumns, this), this.$el.is(':hidden') ? 100 : 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.fitHeaderColumns = function () {
|
|
||||||
var that = this,
|
|
||||||
visibleFields = this.getVisibleFields(),
|
|
||||||
headerWidth = 0;
|
|
||||||
if (that.options.fixedColumns) {
|
|
||||||
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
|
|
||||||
var $this = $(this),
|
|
||||||
index = i;
|
|
||||||
|
|
||||||
if (i >= that.options.fixedNumber) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (that.options.detailView && !that.options.cardView) {
|
|
||||||
index = i - 1;
|
|
||||||
}
|
|
||||||
that.$fixedHeader.find('thead th[data-field="' + visibleFields[index] + '"]')
|
|
||||||
.find('.fht-cell').width($this.innerWidth());
|
|
||||||
headerWidth += $this.outerWidth();
|
|
||||||
});
|
|
||||||
this.$fixedHeader.width(headerWidth + 2).show();
|
|
||||||
}
|
|
||||||
if (that.options.rightFixedColumns) {
|
|
||||||
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
|
|
||||||
var $this = $(this),
|
|
||||||
index = i;
|
|
||||||
|
|
||||||
if (i >= visibleFields.length - that.options.rightFixedNumber) {
|
|
||||||
return false;
|
|
||||||
|
|
||||||
|
|
||||||
if (that.options.detailView && !that.options.cardView) {
|
|
||||||
index = i - 1;
|
|
||||||
}
|
|
||||||
that.$rightfixedBody.find('thead th[data-field="' + visibleFields[index] + '"]')
|
|
||||||
.find('.fht-cell').width($this.innerWidth() - 1);
|
|
||||||
headerWidth += $this.outerWidth();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.$rightfixedBody.width(headerWidth - 1).show();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.fitBodyColumns = function () {
|
|
||||||
var that = this,
|
|
||||||
top = -(parseInt(this.$el.css('margin-top'))),
|
|
||||||
height = this.$tableBody.height();
|
|
||||||
|
|
||||||
if (that.options.fixedColumns) {
|
|
||||||
if (!this.$body.find('> tr[data-index]').length) {
|
|
||||||
this.$fixedBody.hide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.options.height) {
|
|
||||||
top = this.$fixedHeader.height()- 1;
|
|
||||||
height = height - top;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$fixedBody.css({
|
|
||||||
width: this.$fixedHeader.width(),
|
|
||||||
height: height,
|
|
||||||
top: top + 1
|
|
||||||
}).show();
|
|
||||||
|
|
||||||
this.$body.find('> tr').each(function (i) {
|
|
||||||
that.$fixedBody.find('tr:eq(' + i + ')').height($(this).height() - 0.5);
|
|
||||||
var thattds = this;
|
|
||||||
that.$fixedBody.find('tr:eq(' + i + ')').find('td').each(function (j) {
|
|
||||||
$(this).width($($(thattds).find('td')[j]).width() + 1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$.btTable.on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
|
|
||||||
var index= $element.data('index');
|
|
||||||
$(this).find('.bs-checkbox').find('input[data-index="' + index + '"]').prop("checked", true);
|
|
||||||
var selectFixedItem = $('.left-fixed-body-columns input[name=btSelectItem]');
|
|
||||||
var checkAll = selectFixedItem.filter(':enabled').length &&
|
|
||||||
selectFixedItem.filter(':enabled').length ===
|
|
||||||
selectFixedItem.filter(':enabled').filter(':checked').length;
|
|
||||||
$(".left-fixed-table-columns input[name=btSelectAll]").prop('checked', checkAll);
|
|
||||||
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
|
||||||
});
|
|
||||||
|
|
||||||
//// events
|
|
||||||
this.$tableBody.on('scroll', function () {
|
|
||||||
that.$fixedBody.find('table').css('top', -$(this).scrollTop());
|
|
||||||
});
|
|
||||||
this.$body.find('> tr[data-index]').off('hover').hover(function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$fixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
|
|
||||||
}, function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$fixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
|
|
||||||
});
|
|
||||||
this.$fixedBody.find('tr[data-index]').off('hover').hover(function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
|
|
||||||
}, function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (that.options.rightFixedColumns) {
|
|
||||||
if (!this.$body.find('> tr[data-index]').length) {
|
|
||||||
this.$rightfixedBody.hide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$body.find('> tr').each(function (i) {
|
|
||||||
that.$rightfixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
|
|
||||||
});
|
|
||||||
|
|
||||||
//// events
|
|
||||||
this.$tableBody.on('scroll', function () {
|
|
||||||
that.$rightfixedBody.find('table').css('top', -$(this).scrollTop());
|
|
||||||
});
|
|
||||||
this.$body.find('> tr[data-index]').off('hover').hover(function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$rightfixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
|
|
||||||
}, function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$rightfixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
|
|
||||||
});
|
|
||||||
this.$rightfixedBody.find('tr[data-index]').off('hover').hover(function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
|
|
||||||
}, function () {
|
|
||||||
var index = $(this).data('index');
|
|
||||||
that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,663 @@
|
||||||
|
/*! X-editable - v1.5.1
|
||||||
|
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
|
||||||
|
* http://github.com/vitalets/x-editable
|
||||||
|
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
|
||||||
|
.editableform {
|
||||||
|
margin-bottom: 0; /* overwrites bootstrap margin */
|
||||||
|
}
|
||||||
|
|
||||||
|
.editableform .control-group {
|
||||||
|
margin-bottom: 0; /* overwrites bootstrap margin */
|
||||||
|
white-space: nowrap; /* prevent wrapping buttons on new line */
|
||||||
|
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
BS3 width:1005 for inputs breaks editable form in popup
|
||||||
|
See: https://github.com/vitalets/x-editable/issues/393
|
||||||
|
*/
|
||||||
|
.editableform .form-control {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-buttons {
|
||||||
|
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
|
||||||
|
vertical-align: top;
|
||||||
|
margin-left: 7px;
|
||||||
|
/* inline-block emulation for IE7*/
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-buttons.editable-buttons-bottom {
|
||||||
|
display: block;
|
||||||
|
margin-top: 7px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-input {
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
|
||||||
|
width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
|
||||||
|
white-space: normal; /* reset white-space decalred in parent*/
|
||||||
|
/* display-inline emulation for IE7*/
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-buttons .editable-cancel {
|
||||||
|
margin-left: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*for jquery-ui buttons need set height to look more pretty*/
|
||||||
|
.editable-buttons button.ui-button-icon-only {
|
||||||
|
height: 24px;
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editableform-loading {
|
||||||
|
background: url('loading.gif') center center no-repeat;
|
||||||
|
height: 25px;
|
||||||
|
width: auto;
|
||||||
|
min-width: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-inline .editableform-loading {
|
||||||
|
background-position: left 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-error-block {
|
||||||
|
max-width: 300px;
|
||||||
|
margin: 5px 0 0 0;
|
||||||
|
width: auto;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*add padding for jquery ui*/
|
||||||
|
.editable-error-block.ui-state-error {
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-error {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- For specific types ---- */
|
||||||
|
|
||||||
|
.editableform .editable-date {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
|
||||||
|
.editable-inline .add-on .icon-th {
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-left: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* checklist vertical alignment */
|
||||||
|
.editable-checklist label input[type="checkbox"],
|
||||||
|
.editable-checklist label span {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-checklist label {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* set exact width of textarea to fit buttons toolbar */
|
||||||
|
.editable-wysihtml5 {
|
||||||
|
width: 566px;
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* clear button shown as link in date inputs */
|
||||||
|
.editable-clear {
|
||||||
|
clear: both;
|
||||||
|
font-size: 0.9em;
|
||||||
|
text-decoration: none;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* IOS-style clear button for text inputs */
|
||||||
|
.editable-clear-x {
|
||||||
|
background: url('clear.png') center center no-repeat;
|
||||||
|
display: block;
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0.6;
|
||||||
|
z-index: 100;
|
||||||
|
|
||||||
|
top: 50%;
|
||||||
|
right: 6px;
|
||||||
|
margin-top: -6px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-clear-x:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-pre-wrapped {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
.editable-container.editable-popup {
|
||||||
|
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-container.popover {
|
||||||
|
width: auto; /* without this rule popover does not stretch */
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-container.editable-inline {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: auto;
|
||||||
|
/* inline-block emulation for IE7*/
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-container.ui-widget {
|
||||||
|
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
|
||||||
|
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
|
||||||
|
}
|
||||||
|
.editable-click,
|
||||||
|
a.editable-click,
|
||||||
|
a.editable-click:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: dashed 1px #0088cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-click.editable-disabled,
|
||||||
|
a.editable-click.editable-disabled,
|
||||||
|
a.editable-click.editable-disabled:hover {
|
||||||
|
color: #585858;
|
||||||
|
cursor: default;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-empty, .editable-empty:hover, .editable-empty:focus{
|
||||||
|
font-style: italic;
|
||||||
|
color: #DD1144;
|
||||||
|
/* border-bottom: none; */
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-unsaved {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-unsaved:after {
|
||||||
|
/* content: '*'*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-bg-transition {
|
||||||
|
-webkit-transition: background-color 1400ms ease-out;
|
||||||
|
-moz-transition: background-color 1400ms ease-out;
|
||||||
|
-o-transition: background-color 1400ms ease-out;
|
||||||
|
-ms-transition: background-color 1400ms ease-out;
|
||||||
|
transition: background-color 1400ms ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*see https://github.com/vitalets/x-editable/issues/139 */
|
||||||
|
.form-horizontal .editable
|
||||||
|
{
|
||||||
|
padding-top: 5px;
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Datepicker for Bootstrap
|
||||||
|
*
|
||||||
|
* Copyright 2012 Stefan Petre
|
||||||
|
* Improvements by Andrew Rowls
|
||||||
|
* Licensed under the Apache License v2.0
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
.datepicker {
|
||||||
|
padding: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
direction: ltr;
|
||||||
|
/*.dow {
|
||||||
|
border-top: 1px solid #ddd !important;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
.datepicker-inline {
|
||||||
|
width: 220px;
|
||||||
|
}
|
||||||
|
.datepicker.datepicker-rtl {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
.datepicker.datepicker-rtl table tr td span {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown:before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 7px solid transparent;
|
||||||
|
border-right: 7px solid transparent;
|
||||||
|
border-bottom: 7px solid #ccc;
|
||||||
|
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||||
|
position: absolute;
|
||||||
|
top: -7px;
|
||||||
|
left: 6px;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown:after {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 6px solid transparent;
|
||||||
|
border-right: 6px solid transparent;
|
||||||
|
border-bottom: 6px solid #ffffff;
|
||||||
|
position: absolute;
|
||||||
|
top: -6px;
|
||||||
|
left: 7px;
|
||||||
|
}
|
||||||
|
.datepicker > div {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.datepicker.days div.datepicker-days {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker.months div.datepicker-months {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker.years div.datepicker-years {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker table {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.datepicker td,
|
||||||
|
.datepicker th {
|
||||||
|
text-align: center;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.table-striped .datepicker table tr td,
|
||||||
|
.table-striped .datepicker table tr th {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.day:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.old,
|
||||||
|
.datepicker table tr td.new {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.disabled,
|
||||||
|
.datepicker table tr td.disabled:hover {
|
||||||
|
background: none;
|
||||||
|
color: #999999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today,
|
||||||
|
.datepicker table tr td.today:hover,
|
||||||
|
.datepicker table tr td.today.disabled,
|
||||||
|
.datepicker table tr td.today.disabled:hover {
|
||||||
|
background-color: #fde19a;
|
||||||
|
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
|
||||||
|
border-color: #fdf59a #fdf59a #fbed50;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:hover,
|
||||||
|
.datepicker table tr td.today:hover:hover,
|
||||||
|
.datepicker table tr td.today.disabled:hover,
|
||||||
|
.datepicker table tr td.today.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.today:active,
|
||||||
|
.datepicker table tr td.today:hover:active,
|
||||||
|
.datepicker table tr td.today.disabled:active,
|
||||||
|
.datepicker table tr td.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.today.active,
|
||||||
|
.datepicker table tr td.today:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled.active,
|
||||||
|
.datepicker table tr td.today.disabled:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled,
|
||||||
|
.datepicker table tr td.today:hover.disabled,
|
||||||
|
.datepicker table tr td.today.disabled.disabled,
|
||||||
|
.datepicker table tr td.today.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.today[disabled],
|
||||||
|
.datepicker table tr td.today:hover[disabled],
|
||||||
|
.datepicker table tr td.today.disabled[disabled],
|
||||||
|
.datepicker table tr td.today.disabled:hover[disabled] {
|
||||||
|
background-color: #fdf59a;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:active,
|
||||||
|
.datepicker table tr td.today:hover:active,
|
||||||
|
.datepicker table tr td.today.disabled:active,
|
||||||
|
.datepicker table tr td.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.today.active,
|
||||||
|
.datepicker table tr td.today:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled.active,
|
||||||
|
.datepicker table tr td.today.disabled:hover.active {
|
||||||
|
background-color: #fbf069 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:hover:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today.active:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range,
|
||||||
|
.datepicker table tr td.range:hover,
|
||||||
|
.datepicker table tr td.range.disabled,
|
||||||
|
.datepicker table tr td.range.disabled:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today,
|
||||||
|
.datepicker table tr td.range.today:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover {
|
||||||
|
background-color: #f3d17a;
|
||||||
|
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
|
||||||
|
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
|
||||||
|
border-color: #f3e97a #f3e97a #edde34;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today:hover,
|
||||||
|
.datepicker table tr td.range.today:hover:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.range.today:active,
|
||||||
|
.datepicker table tr td.range.today:hover:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.range.today.active,
|
||||||
|
.datepicker table tr td.range.today:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled.active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled,
|
||||||
|
.datepicker table tr td.range.today:hover.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.range.today[disabled],
|
||||||
|
.datepicker table tr td.range.today:hover[disabled],
|
||||||
|
.datepicker table tr td.range.today.disabled[disabled],
|
||||||
|
.datepicker table tr td.range.today.disabled:hover[disabled] {
|
||||||
|
background-color: #f3e97a;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today:active,
|
||||||
|
.datepicker table tr td.range.today:hover:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.range.today.active,
|
||||||
|
.datepicker table tr td.range.today:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled.active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.active {
|
||||||
|
background-color: #efe24b \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected,
|
||||||
|
.datepicker table tr td.selected:hover,
|
||||||
|
.datepicker table tr td.selected.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled:hover {
|
||||||
|
background-color: #9e9e9e;
|
||||||
|
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
|
||||||
|
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
|
||||||
|
border-color: #808080 #808080 #595959;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected:hover,
|
||||||
|
.datepicker table tr td.selected:hover:hover,
|
||||||
|
.datepicker table tr td.selected.disabled:hover,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.selected:active,
|
||||||
|
.datepicker table tr td.selected:hover:active,
|
||||||
|
.datepicker table tr td.selected.disabled:active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:active,
|
||||||
|
.datepicker table tr td.selected.active,
|
||||||
|
.datepicker table tr td.selected:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled.active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled,
|
||||||
|
.datepicker table tr td.selected:hover.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.selected[disabled],
|
||||||
|
.datepicker table tr td.selected:hover[disabled],
|
||||||
|
.datepicker table tr td.selected.disabled[disabled],
|
||||||
|
.datepicker table tr td.selected.disabled:hover[disabled] {
|
||||||
|
background-color: #808080;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected:active,
|
||||||
|
.datepicker table tr td.selected:hover:active,
|
||||||
|
.datepicker table tr td.selected.disabled:active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:active,
|
||||||
|
.datepicker table tr td.selected.active,
|
||||||
|
.datepicker table tr td.selected:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled.active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.active {
|
||||||
|
background-color: #666666 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active,
|
||||||
|
.datepicker table tr td.active:hover,
|
||||||
|
.datepicker table tr td.active.disabled,
|
||||||
|
.datepicker table tr td.active.disabled:hover {
|
||||||
|
background-color: #006dcc;
|
||||||
|
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||||
|
border-color: #0044cc #0044cc #002a80;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active:hover,
|
||||||
|
.datepicker table tr td.active:hover:hover,
|
||||||
|
.datepicker table tr td.active.disabled:hover,
|
||||||
|
.datepicker table tr td.active.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.active:active,
|
||||||
|
.datepicker table tr td.active:hover:active,
|
||||||
|
.datepicker table tr td.active.disabled:active,
|
||||||
|
.datepicker table tr td.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td.active.active,
|
||||||
|
.datepicker table tr td.active:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled.active,
|
||||||
|
.datepicker table tr td.active.disabled:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled,
|
||||||
|
.datepicker table tr td.active:hover.disabled,
|
||||||
|
.datepicker table tr td.active.disabled.disabled,
|
||||||
|
.datepicker table tr td.active.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.active[disabled],
|
||||||
|
.datepicker table tr td.active:hover[disabled],
|
||||||
|
.datepicker table tr td.active.disabled[disabled],
|
||||||
|
.datepicker table tr td.active.disabled:hover[disabled] {
|
||||||
|
background-color: #0044cc;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active:active,
|
||||||
|
.datepicker table tr td.active:hover:active,
|
||||||
|
.datepicker table tr td.active.disabled:active,
|
||||||
|
.datepicker table tr td.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td.active.active,
|
||||||
|
.datepicker table tr td.active:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled.active,
|
||||||
|
.datepicker table tr td.active.disabled:hover.active {
|
||||||
|
background-color: #003399 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span {
|
||||||
|
display: block;
|
||||||
|
width: 23%;
|
||||||
|
height: 54px;
|
||||||
|
line-height: 54px;
|
||||||
|
float: left;
|
||||||
|
margin: 1%;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.disabled,
|
||||||
|
.datepicker table tr td span.disabled:hover {
|
||||||
|
background: none;
|
||||||
|
color: #999999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active,
|
||||||
|
.datepicker table tr td span.active:hover,
|
||||||
|
.datepicker table tr td span.active.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled:hover {
|
||||||
|
background-color: #006dcc;
|
||||||
|
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||||
|
border-color: #0044cc #0044cc #002a80;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active:hover,
|
||||||
|
.datepicker table tr td span.active:hover:hover,
|
||||||
|
.datepicker table tr td span.active.disabled:hover,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:hover,
|
||||||
|
.datepicker table tr td span.active:active,
|
||||||
|
.datepicker table tr td span.active:hover:active,
|
||||||
|
.datepicker table tr td span.active.disabled:active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td span.active.active,
|
||||||
|
.datepicker table tr td span.active:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled.active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled,
|
||||||
|
.datepicker table tr td span.active:hover.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td span.active[disabled],
|
||||||
|
.datepicker table tr td span.active:hover[disabled],
|
||||||
|
.datepicker table tr td span.active.disabled[disabled],
|
||||||
|
.datepicker table tr td span.active.disabled:hover[disabled] {
|
||||||
|
background-color: #0044cc;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active:active,
|
||||||
|
.datepicker table tr td span.active:hover:active,
|
||||||
|
.datepicker table tr td span.active.disabled:active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td span.active.active,
|
||||||
|
.datepicker table tr td span.active:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled.active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.active {
|
||||||
|
background-color: #003399 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.old,
|
||||||
|
.datepicker table tr td span.new {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.datepicker th.datepicker-switch {
|
||||||
|
width: 145px;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th,
|
||||||
|
.datepicker tfoot tr th {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th:hover,
|
||||||
|
.datepicker tfoot tr th:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.datepicker .cw {
|
||||||
|
font-size: 10px;
|
||||||
|
width: 12px;
|
||||||
|
padding: 0 2px 0 5px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th.cw {
|
||||||
|
cursor: default;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.input-append.date .add-on i,
|
||||||
|
.input-prepend.date .add-on i {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.input-daterange input {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.input-daterange input:first-child {
|
||||||
|
-webkit-border-radius: 3px 0 0 3px;
|
||||||
|
-moz-border-radius: 3px 0 0 3px;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
.input-daterange input:last-child {
|
||||||
|
-webkit-border-radius: 0 3px 3px 0;
|
||||||
|
-moz-border-radius: 0 3px 3px 0;
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
}
|
||||||
|
.input-daterange .add-on {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
min-width: 16px;
|
||||||
|
height: 18px;
|
||||||
|
padding: 4px 5px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: 0 1px 0 #ffffff;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin-left: -5px;
|
||||||
|
margin-right: -5px;
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,146 +0,0 @@
|
||||||
/**
|
|
||||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
|
||||||
* extensions: https://github.com/vitalets/x-editable
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function($) {
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.defaults, {
|
|
||||||
editable: true,
|
|
||||||
onEditableInit: function() {
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
onEditableSave: function(field, row, oldValue, $el) {
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
onEditableShown: function(field, row, $el, editable) {
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
onEditableHidden: function(field, row, $el, reason) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
|
||||||
'editable-init.bs.table': 'onEditableInit',
|
|
||||||
'editable-save.bs.table': 'onEditableSave',
|
|
||||||
'editable-shown.bs.table': 'onEditableShown',
|
|
||||||
'editable-hidden.bs.table': 'onEditableHidden'
|
|
||||||
});
|
|
||||||
|
|
||||||
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
|
||||||
_initTable = BootstrapTable.prototype.initTable,
|
|
||||||
_initBody = BootstrapTable.prototype.initBody;
|
|
||||||
|
|
||||||
BootstrapTable.prototype.initTable = function() {
|
|
||||||
var that = this;
|
|
||||||
_initTable.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.editable) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$.each(this.columns, function(i, column) {
|
|
||||||
if (!column.editable) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var editableOptions = {},
|
|
||||||
editableDataMarkup = [],
|
|
||||||
editableDataPrefix = 'editable-';
|
|
||||||
|
|
||||||
var processDataOptions = function(key, value) {
|
|
||||||
// Replace camel case with dashes.
|
|
||||||
var dashKey = key.replace(/([A-Z])/g, function($1) {
|
|
||||||
return "-" + $1.toLowerCase();
|
|
||||||
});
|
|
||||||
if (dashKey.slice(0, editableDataPrefix.length) == editableDataPrefix) {
|
|
||||||
var dataKey = dashKey.replace(editableDataPrefix, 'data-');
|
|
||||||
editableOptions[dataKey] = value;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$.each(that.options, processDataOptions);
|
|
||||||
|
|
||||||
column.formatter = column.formatter || function(value, row, index) {
|
|
||||||
return value;
|
|
||||||
};
|
|
||||||
column._formatter = column._formatter ? column._formatter : column.formatter;
|
|
||||||
column.formatter = function(value, row, index) {
|
|
||||||
var result = column._formatter ? column._formatter(value, row, index) : value;
|
|
||||||
|
|
||||||
$.each(column, processDataOptions);
|
|
||||||
|
|
||||||
$.each(editableOptions, function(key, value) {
|
|
||||||
editableDataMarkup.push(' ' + key + '="' + value + '"');
|
|
||||||
});
|
|
||||||
|
|
||||||
var _dont_edit_formatter = false;
|
|
||||||
if (column.editable.hasOwnProperty('noeditFormatter')) {
|
|
||||||
_dont_edit_formatter = column.editable.noeditFormatter(value, row, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_dont_edit_formatter === false) {
|
|
||||||
return ['<a href="javascript:void(0)"',
|
|
||||||
' data-name="' + column.field + '"',
|
|
||||||
' data-pk="' + row[that.options.idField] + '"',
|
|
||||||
' data-value="' + result + '"',
|
|
||||||
editableDataMarkup.join(''),
|
|
||||||
'>' + '</a>'
|
|
||||||
].join('');
|
|
||||||
} else {
|
|
||||||
return _dont_edit_formatter;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.initBody = function() {
|
|
||||||
var that = this;
|
|
||||||
_initBody.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.editable) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$.each(this.columns, function(i, column) {
|
|
||||||
if (!column.editable) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable)
|
|
||||||
.off('save').on('save', function(e, params) {
|
|
||||||
var data = that.getData(),
|
|
||||||
index = $(this).parents('tr[data-index]').data('index'),
|
|
||||||
row = data[index],
|
|
||||||
oldValue = row[column.field];
|
|
||||||
|
|
||||||
$(this).data('value', params.submitValue);
|
|
||||||
row[column.field] = params.submitValue;
|
|
||||||
that.trigger('editable-save', column.field, row, oldValue, $(this));
|
|
||||||
that.resetFooter();
|
|
||||||
});
|
|
||||||
that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable)
|
|
||||||
.off('shown').on('shown', function(e, editable) {
|
|
||||||
var data = that.getData(),
|
|
||||||
index = $(this).parents('tr[data-index]').data('index'),
|
|
||||||
row = data[index];
|
|
||||||
|
|
||||||
that.trigger('editable-shown', column.field, row, $(this), editable);
|
|
||||||
});
|
|
||||||
that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable)
|
|
||||||
.off('hidden').on('hidden', function(e, reason) {
|
|
||||||
var data = that.getData(),
|
|
||||||
index = $(this).parents('tr[data-index]').data('index'),
|
|
||||||
row = data[index];
|
|
||||||
|
|
||||||
that.trigger('editable-hidden', column.field, row, $(this), reason);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.trigger('editable-init');
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 244 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.locales, {
|
$.extend($.fn.bootstrapTable.locales, {
|
||||||
formatExport: function () {
|
formatExport: function () {
|
||||||
return 'Export data';
|
return '导出';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
||||||
|
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
/**
|
|
||||||
* 基于bootstrap-table-mobile修改
|
|
||||||
* 修正部分iPhone手机不显示卡片视图
|
|
||||||
* Copyright (c) 2019 ruoyi
|
|
||||||
*/
|
|
||||||
!function ($) {
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var resetView = function (that) {
|
|
||||||
if (that.options.height || that.options.showFooter) {
|
|
||||||
setTimeout(that.resetView(), 1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 判断是否 iphone
|
|
||||||
var isIPhone = function () {
|
|
||||||
var browserName = navigator.userAgent.toLowerCase();
|
|
||||||
return /(iPhone|iPad|iPod|iOS)/i.test(browserName);
|
|
||||||
};
|
|
||||||
|
|
||||||
var changeView = function (that, width, height) {
|
|
||||||
if (that.options.minHeight) {
|
|
||||||
if (checkValuesLessEqual(width, that.options.minWidth) && checkValuesLessEqual(height, that.options.minHeight)) {
|
|
||||||
conditionCardView(that);
|
|
||||||
} else if (checkValuesGreater(width, that.options.minWidth) && checkValuesGreater(height, that.options.minHeight)) {
|
|
||||||
conditionFullView(that);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (checkValuesLessEqual(width, that.options.minWidth) || isIPhone()) {
|
|
||||||
conditionCardView(that);
|
|
||||||
} else if (checkValuesGreater(width, that.options.minWidth)) {
|
|
||||||
conditionFullView(that);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resetView(that);
|
|
||||||
};
|
|
||||||
|
|
||||||
var checkValuesLessEqual = function (currentValue, targetValue) {
|
|
||||||
return currentValue <= targetValue;
|
|
||||||
};
|
|
||||||
|
|
||||||
var checkValuesGreater = function (currentValue, targetValue) {
|
|
||||||
return currentValue > targetValue;
|
|
||||||
};
|
|
||||||
|
|
||||||
var conditionCardView = function (that) {
|
|
||||||
changeTableView(that, false);
|
|
||||||
};
|
|
||||||
|
|
||||||
var conditionFullView = function (that) {
|
|
||||||
changeTableView(that, true);
|
|
||||||
};
|
|
||||||
|
|
||||||
var changeTableView = function (that, cardViewState) {
|
|
||||||
that.options.cardView = cardViewState;
|
|
||||||
that.toggleView();
|
|
||||||
};
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.defaults, {
|
|
||||||
mobileResponsive: false,
|
|
||||||
minWidth: 562,
|
|
||||||
minHeight: undefined,
|
|
||||||
checkOnInit: true,
|
|
||||||
toggled: false
|
|
||||||
});
|
|
||||||
|
|
||||||
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
|
||||||
_init = BootstrapTable.prototype.init;
|
|
||||||
|
|
||||||
BootstrapTable.prototype.init = function () {
|
|
||||||
_init.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.mobileResponsive) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.options.minWidth) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var that = this;
|
|
||||||
$(window).resize(function () {
|
|
||||||
changeView(that, $(this).width(), $(this).height())
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.options.checkOnInit) {
|
|
||||||
changeView(this, $(window).width(), $(window).height());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}(jQuery);
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,211 +0,0 @@
|
||||||
/**
|
|
||||||
* @author: aperez <aperez@datadec.es>
|
|
||||||
* @version: v2.0.0
|
|
||||||
*
|
|
||||||
* @update Dennis Hernández <http://djhvscf.github.io/Blog>
|
|
||||||
*/
|
|
||||||
|
|
||||||
!function($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var firstLoad = false;
|
|
||||||
|
|
||||||
var sprintf = $.fn.bootstrapTable.utils.sprintf;
|
|
||||||
|
|
||||||
var showAvdSearch = function(pColumns, searchTitle, searchText, that) {
|
|
||||||
if (!$("#avdSearchModal" + "_" + that.options.idTable).hasClass("modal")) {
|
|
||||||
var vModal = sprintf("<div id=\"avdSearchModal%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">", "_" + that.options.idTable);
|
|
||||||
vModal += "<div class=\"modal-dialog modal-xs\">";
|
|
||||||
vModal += " <div class=\"modal-content\">";
|
|
||||||
vModal += " <div class=\"modal-header\">";
|
|
||||||
vModal += " <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" >×</button>";
|
|
||||||
vModal += sprintf(" <h4 class=\"modal-title\">%s</h4>", searchTitle);
|
|
||||||
vModal += " </div>";
|
|
||||||
vModal += " <div class=\"modal-body modal-body-custom\">";
|
|
||||||
vModal += sprintf(" <div class=\"container-fluid\" id=\"avdSearchModalContent%s\" style=\"padding-right: 0px;padding-left: 0px;\" >", "_" + that.options.idTable);
|
|
||||||
vModal += " </div>";
|
|
||||||
vModal += " </div>";
|
|
||||||
vModal += " </div>";
|
|
||||||
vModal += " </div>";
|
|
||||||
vModal += "</div>";
|
|
||||||
|
|
||||||
$("body").append($(vModal));
|
|
||||||
|
|
||||||
var vFormAvd = createFormAvd(pColumns, searchText, that),
|
|
||||||
timeoutId = 0;;
|
|
||||||
|
|
||||||
$('#avdSearchModalContent' + "_" + that.options.idTable).append(vFormAvd.join(''));
|
|
||||||
|
|
||||||
$('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) {
|
|
||||||
clearTimeout(timeoutId);
|
|
||||||
timeoutId = setTimeout(function () {
|
|
||||||
that.onColumnAdvancedSearch(event);
|
|
||||||
}, that.options.searchTimeOut);
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#btnCloseAvd" + "_" + that.options.idTable).click(function() {
|
|
||||||
$("#avdSearchModal" + "_" + that.options.idTable).modal('hide');
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#avdSearchModal" + "_" + that.options.idTable).modal();
|
|
||||||
} else {
|
|
||||||
$("#avdSearchModal" + "_" + that.options.idTable).modal();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var createFormAvd = function(pColumns, searchText, that) {
|
|
||||||
var htmlForm = [];
|
|
||||||
htmlForm.push(sprintf('<form class="form-horizontal" id="%s" action="%s" >', that.options.idForm, that.options.actionForm));
|
|
||||||
for (var i in pColumns) {
|
|
||||||
var vObjCol = pColumns[i];
|
|
||||||
if (!vObjCol.checkbox && vObjCol.visible && vObjCol.searchable) {
|
|
||||||
htmlForm.push('<div class="form-group">');
|
|
||||||
htmlForm.push(sprintf('<label class="col-sm-4 control-label">%s</label>', vObjCol.title));
|
|
||||||
htmlForm.push('<div class="col-sm-6">');
|
|
||||||
htmlForm.push(sprintf('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">', vObjCol.field, vObjCol.title, vObjCol.field));
|
|
||||||
htmlForm.push('</div>');
|
|
||||||
htmlForm.push('</div>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
htmlForm.push('<div class="form-group">');
|
|
||||||
htmlForm.push('<div class="col-sm-offset-9 col-sm-3">');
|
|
||||||
htmlForm.push(sprintf('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>', "_" + that.options.idTable, searchText));
|
|
||||||
htmlForm.push('</div>');
|
|
||||||
htmlForm.push('</div>');
|
|
||||||
htmlForm.push('</form>');
|
|
||||||
|
|
||||||
return htmlForm;
|
|
||||||
};
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.defaults, {
|
|
||||||
advancedSearch: false,
|
|
||||||
idForm: 'advancedSearch',
|
|
||||||
actionForm: '',
|
|
||||||
idTable: undefined,
|
|
||||||
onColumnAdvancedSearch: function (field, text) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.defaults.icons, {
|
|
||||||
advancedSearchIcon: 'glyphicon-chevron-down'
|
|
||||||
});
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
|
||||||
'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
|
|
||||||
});
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.locales, {
|
|
||||||
formatAdvancedSearch: function() {
|
|
||||||
return 'Advanced search';
|
|
||||||
},
|
|
||||||
formatAdvancedCloseButton: function() {
|
|
||||||
return "Close";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
|
||||||
|
|
||||||
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
|
||||||
_initToolbar = BootstrapTable.prototype.initToolbar,
|
|
||||||
_load = BootstrapTable.prototype.load,
|
|
||||||
_initSearch = BootstrapTable.prototype.initSearch;
|
|
||||||
|
|
||||||
BootstrapTable.prototype.initToolbar = function() {
|
|
||||||
_initToolbar.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.search) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.options.advancedSearch) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.options.idTable) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var that = this,
|
|
||||||
html = [];
|
|
||||||
|
|
||||||
html.push(sprintf('<div class="columns columns-%s btn-group pull-%s" role="group">', this.options.buttonsAlign, this.options.buttonsAlign));
|
|
||||||
html.push(sprintf('<button class="btn btn-default%s' + '" type="button" name="advancedSearch" title="%s">', that.options.iconSize === undefined ? '' : ' btn-' + that.options.iconSize, that.options.formatAdvancedSearch()));
|
|
||||||
html.push(sprintf('<i class="%s %s"></i>', that.options.iconsPrefix, that.options.icons.advancedSearchIcon))
|
|
||||||
html.push('</button></div>');
|
|
||||||
|
|
||||||
that.$toolbar.prepend(html.join(''));
|
|
||||||
|
|
||||||
that.$toolbar.find('button[name="advancedSearch"]')
|
|
||||||
.off('click').on('click', function() {
|
|
||||||
showAvdSearch(that.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedCloseButton(), that);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.load = function(data) {
|
|
||||||
_load.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.advancedSearch) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof this.options.idTable === 'undefined') {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
if (!firstLoad) {
|
|
||||||
var height = parseInt($(".bootstrap-table").height());
|
|
||||||
height += 10;
|
|
||||||
$("#" + this.options.idTable).bootstrapTable("resetView", {height: height});
|
|
||||||
firstLoad = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.initSearch = function () {
|
|
||||||
_initSearch.apply(this, Array.prototype.slice.apply(arguments));
|
|
||||||
|
|
||||||
if (!this.options.advancedSearch) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var that = this;
|
|
||||||
var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
|
|
||||||
|
|
||||||
this.data = fp ? $.grep(this.data, function (item, i) {
|
|
||||||
for (var key in fp) {
|
|
||||||
var fval = fp[key].toLowerCase();
|
|
||||||
var value = item[key];
|
|
||||||
value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header,
|
|
||||||
that.header.formatters[$.inArray(key, that.header.fields)],
|
|
||||||
[value, item, i], value);
|
|
||||||
|
|
||||||
if (!($.inArray(key, that.header.fields) !== -1 &&
|
|
||||||
(typeof value === 'string' || typeof value === 'number') &&
|
|
||||||
(value + '').toLowerCase().indexOf(fval) !== -1)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}) : this.data;
|
|
||||||
};
|
|
||||||
|
|
||||||
BootstrapTable.prototype.onColumnAdvancedSearch = function (event) {
|
|
||||||
var text = $.trim($(event.currentTarget).val());
|
|
||||||
var $field = $(event.currentTarget)[0].id;
|
|
||||||
|
|
||||||
if ($.isEmptyObject(this.filterColumnsPartial)) {
|
|
||||||
this.filterColumnsPartial = {};
|
|
||||||
}
|
|
||||||
if (text) {
|
|
||||||
this.filterColumnsPartial[$field] = text;
|
|
||||||
} else {
|
|
||||||
delete this.filterColumnsPartial[$field];
|
|
||||||
}
|
|
||||||
|
|
||||||
this.options.pageNumber = 1;
|
|
||||||
this.onSearch(event);
|
|
||||||
this.updatePagination();
|
|
||||||
this.trigger('column-advanced-search', $field, text);
|
|
||||||
};
|
|
||||||
}(jQuery);
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
/*
|
|
||||||
* bootstrap-table - v1.11.0 - 2016-07-02
|
|
||||||
* https://github.com/wenzhixin/bootstrap-table
|
|
||||||
* Copyright (c) 2016 zhixin wen
|
|
||||||
* Licensed MIT License
|
|
||||||
*/
|
|
||||||
!function(a){"use strict";var b=!1,c=a.fn.bootstrapTable.utils.sprintf,d=function(b,d,f,g){if(a("#avdSearchModal_"+g.options.idTable).hasClass("modal"))a("#avdSearchModal_"+g.options.idTable).modal();else{var h=c('<div id="avdSearchModal%s" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">',"_"+g.options.idTable);h+='<div class="modal-dialog modal-xs">',h+=' <div class="modal-content">',h+=' <div class="modal-header">',h+=' <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >×</button>',h+=c(' <h4 class="modal-title">%s</h4>',d),h+=" </div>",h+=' <div class="modal-body modal-body-custom">',h+=c(' <div class="container-fluid" id="avdSearchModalContent%s" style="padding-right: 0px;padding-left: 0px;" >',"_"+g.options.idTable),h+=" </div>",h+=" </div>",h+=" </div>",h+=" </div>",h+="</div>",a("body").append(a(h));var i=e(b,f,g),j=0;a("#avdSearchModalContent_"+g.options.idTable).append(i.join("")),a("#"+g.options.idForm).off("keyup blur","input").on("keyup blur","input",function(a){clearTimeout(j),j=setTimeout(function(){g.onColumnAdvancedSearch(a)},g.options.searchTimeOut)}),a("#btnCloseAvd_"+g.options.idTable).click(function(){a("#avdSearchModal_"+g.options.idTable).modal("hide")}),a("#avdSearchModal_"+g.options.idTable).modal()}},e=function(a,b,d){var e=[];e.push(c('<form class="form-horizontal" id="%s" action="%s" >',d.options.idForm,d.options.actionForm));for(var f in a){var g=a[f];!g.checkbox&&g.visible&&g.searchable&&(e.push('<div class="form-group">'),e.push(c('<label class="col-sm-4 control-label">%s</label>',g.title)),e.push('<div class="col-sm-6">'),e.push(c('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">',g.field,g.title,g.field)),e.push("</div>"),e.push("</div>"))}return e.push('<div class="form-group">'),e.push('<div class="col-sm-offset-9 col-sm-3">'),e.push(c('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>',"_"+d.options.idTable,b)),e.push("</div>"),e.push("</div>"),e.push("</form>"),e};a.extend(a.fn.bootstrapTable.defaults,{advancedSearch:!1,idForm:"advancedSearch",actionForm:"",idTable:void 0,onColumnAdvancedSearch:function(){return!1}}),a.extend(a.fn.bootstrapTable.defaults.icons,{advancedSearchIcon:"glyphicon-chevron-down"}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-advanced-search.bs.table":"onColumnAdvancedSearch"}),a.extend(a.fn.bootstrapTable.locales,{formatAdvancedSearch:function(){return"Advanced search"},formatAdvancedCloseButton:function(){return"Close"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var f=a.fn.bootstrapTable.Constructor,g=f.prototype.initToolbar,h=f.prototype.load,i=f.prototype.initSearch;f.prototype.initToolbar=function(){if(g.apply(this,Array.prototype.slice.apply(arguments)),this.options.search&&this.options.advancedSearch&&this.options.idTable){var a=this,b=[];b.push(c('<div class="columns columns-%s btn-group pull-%s" role="group">',this.options.buttonsAlign,this.options.buttonsAlign)),b.push(c('<button class="btn btn-default%s" type="button" name="advancedSearch" title="%s">',void 0===a.options.iconSize?"":" btn-"+a.options.iconSize,a.options.formatAdvancedSearch())),b.push(c('<i class="%s %s"></i>',a.options.iconsPrefix,a.options.icons.advancedSearchIcon)),b.push("</button></div>"),a.$toolbar.prepend(b.join("")),a.$toolbar.find('button[name="advancedSearch"]').off("click").on("click",function(){d(a.columns,a.options.formatAdvancedSearch(),a.options.formatAdvancedCloseButton(),a)})}},f.prototype.load=function(){if(h.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch&&"undefined"!=typeof this.options.idTable&&!b){var c=parseInt(a(".bootstrap-table").height());c+=10,a("#"+this.options.idTable).bootstrapTable("resetView",{height:c}),b=!0}},f.prototype.initSearch=function(){if(i.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=c[f].toLowerCase(),h=d[f];if(h=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[h,d,e],h),-1===a.inArray(f,b.header.fields)||"string"!=typeof h&&"number"!=typeof h||-1===(h+"").toLowerCase().indexOf(g))return!1}return!0}):this.data}},f.prototype.onColumnAdvancedSearch=function(b){var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget)[0].id;a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.options.pageNumber=1,this.onSearch(b),this.updatePagination(),this.trigger("column-advanced-search",d,c)}}(jQuery);
|
|
||||||
|
|
@ -1,42 +1,109 @@
|
||||||
(function ($) {
|
/**
|
||||||
'use strict';
|
* Bootstrap Table Chinese translation
|
||||||
|
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
|
||||||
$.fn.bootstrapTable.locales['zh-CN'] = {
|
*/
|
||||||
formatLoadingMessage: function () {
|
$.fn.bootstrapTable.locales['zh-CN'] = {
|
||||||
return '正在努力地加载数据中,请稍候……';
|
formatShowSearch: function formatShowSearch() {
|
||||||
|
return '隐藏/显示搜索';
|
||||||
},
|
},
|
||||||
formatRecordsPerPage: function (pageNumber) {
|
formatPageGo: function formatPageGo() {
|
||||||
return pageNumber + ' 条记录每页';
|
return '跳转';
|
||||||
},
|
},
|
||||||
formatShowingRows: function (pageFrom, pageTo, totalRows) {
|
formatCopyRows: function formatCopyRows() {
|
||||||
return '第 ' + pageFrom + ' 到 ' + pageTo + ' 条,共 ' + totalRows + ' 条记录。';
|
return '复制行';
|
||||||
},
|
},
|
||||||
formatSearch: function () {
|
formatPrint: function formatPrint() {
|
||||||
|
return '打印';
|
||||||
|
},
|
||||||
|
formatLoadingMessage: function formatLoadingMessage() {
|
||||||
|
return '正在努力地加载数据中,请稍候';
|
||||||
|
},
|
||||||
|
formatRecordsPerPage: function formatRecordsPerPage(pageNumber) {
|
||||||
|
return "每页显示 ".concat(pageNumber, " 条记录");
|
||||||
|
},
|
||||||
|
formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows, totalNotFiltered) {
|
||||||
|
if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered > totalRows) {
|
||||||
|
return "显示第 ".concat(pageFrom, " 到第 ").concat(pageTo, " 条记录,总共 ").concat(totalRows, " 条记录(从 ").concat(totalNotFiltered, " 总记录中过滤)");
|
||||||
|
}
|
||||||
|
return "显示第 ".concat(pageFrom, " 到第 ").concat(pageTo, " 条记录,总共 ").concat(totalRows, " 条记录");
|
||||||
|
},
|
||||||
|
formatSRPaginationPreText: function formatSRPaginationPreText() {
|
||||||
|
return '上一页';
|
||||||
|
},
|
||||||
|
formatSRPaginationPageText: function formatSRPaginationPageText(page) {
|
||||||
|
return "第".concat(page, "页");
|
||||||
|
},
|
||||||
|
formatSRPaginationNextText: function formatSRPaginationNextText() {
|
||||||
|
return '下一页';
|
||||||
|
},
|
||||||
|
formatDetailPagination: function formatDetailPagination(totalRows) {
|
||||||
|
return "总共 ".concat(totalRows, " 条记录");
|
||||||
|
},
|
||||||
|
formatClearSearch: function formatClearSearch() {
|
||||||
|
return '清空过滤';
|
||||||
|
},
|
||||||
|
formatSearch: function formatSearch() {
|
||||||
return '搜索';
|
return '搜索';
|
||||||
},
|
},
|
||||||
formatNoMatches: function () {
|
formatNoMatches: function formatNoMatches() {
|
||||||
return '没有找到匹配的记录';
|
return '没有找到匹配的记录';
|
||||||
},
|
},
|
||||||
formatPaginationSwitch: function () {
|
formatPaginationSwitch: function formatPaginationSwitch() {
|
||||||
return '隐藏/显示分页';
|
return '隐藏/显示分页';
|
||||||
},
|
},
|
||||||
formatRefresh: function () {
|
formatPaginationSwitchDown: function formatPaginationSwitchDown() {
|
||||||
|
return '显示分页';
|
||||||
|
},
|
||||||
|
formatPaginationSwitchUp: function formatPaginationSwitchUp() {
|
||||||
|
return '隐藏分页';
|
||||||
|
},
|
||||||
|
formatRefresh: function formatRefresh() {
|
||||||
return '刷新';
|
return '刷新';
|
||||||
},
|
},
|
||||||
formatToggle: function () {
|
formatToggle: function formatToggle() {
|
||||||
return '切换';
|
return '切换';
|
||||||
},
|
},
|
||||||
formatColumns: function () {
|
formatToggleOn: function formatToggleOn() {
|
||||||
|
return '显示卡片视图';
|
||||||
|
},
|
||||||
|
formatToggleOff: function formatToggleOff() {
|
||||||
|
return '隐藏卡片视图';
|
||||||
|
},
|
||||||
|
formatColumns: function formatColumns() {
|
||||||
return '列';
|
return '列';
|
||||||
},
|
},
|
||||||
formatExport: function () {
|
formatColumnsToggleAll: function formatColumnsToggleAll() {
|
||||||
|
return '切换所有';
|
||||||
|
},
|
||||||
|
formatFullscreen: function formatFullscreen() {
|
||||||
|
return '全屏';
|
||||||
|
},
|
||||||
|
formatAllRows: function formatAllRows() {
|
||||||
|
return '所有';
|
||||||
|
},
|
||||||
|
formatAutoRefresh: function formatAutoRefresh() {
|
||||||
|
return '自动刷新';
|
||||||
|
},
|
||||||
|
formatExport: function formatExport() {
|
||||||
return '导出数据';
|
return '导出数据';
|
||||||
},
|
},
|
||||||
formatClearFilters: function () {
|
formatJumpTo: function formatJumpTo() {
|
||||||
return '清空过滤';
|
return '跳转';
|
||||||
|
},
|
||||||
|
formatAdvancedSearch: function formatAdvancedSearch() {
|
||||||
|
return '高级搜索';
|
||||||
|
},
|
||||||
|
formatAdvancedCloseButton: function formatAdvancedCloseButton() {
|
||||||
|
return '关闭';
|
||||||
|
},
|
||||||
|
formatFilterControlSwitch: function formatFilterControlSwitch() {
|
||||||
|
return '隐藏/显示过滤控制';
|
||||||
|
},
|
||||||
|
formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
|
||||||
|
return '隐藏过滤控制';
|
||||||
|
},
|
||||||
|
formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
|
||||||
|
return '显示过滤控制';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
|
||||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(function($){$.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(pageNumber){return pageNumber+" 条记录每页"},formatShowingRows:function(pageFrom,pageTo,totalRows){return"第 "+pageFrom+" 到 "+pageTo+" 条,共 "+totalRows+" 条记录。"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"},formatExport:function(){return"导出数据"},formatClearFilters:function(){return"清空过滤"}};$.extend($.fn.bootstrapTable.defaults,$.fn.bootstrapTable.locales["zh-CN"])})(jQuery);
|
$.fn.bootstrapTable.locales["zh-CN"]={formatShowSearch:function formatShowSearch(){return"隐藏/显示搜索"},formatPageGo:function formatPageGo(){return"跳转"},formatCopyRows:function formatCopyRows(){return"复制行"},formatPrint:function formatPrint(){return"打印"},formatLoadingMessage:function formatLoadingMessage(){return"正在努力地加载数据中,请稍候"},formatRecordsPerPage:function formatRecordsPerPage(pageNumber){return"每页显示 ".concat(pageNumber," 条记录")},formatShowingRows:function formatShowingRows(pageFrom,pageTo,totalRows,totalNotFiltered){if(totalNotFiltered!==undefined&&totalNotFiltered>0&&totalNotFiltered>totalRows){return"显示第 ".concat(pageFrom," 到第 ").concat(pageTo," 条记录,总共 ").concat(totalRows," 条记录(从 ").concat(totalNotFiltered," 总记录中过滤)")}return"显示第 ".concat(pageFrom," 到第 ").concat(pageTo," 条记录,总共 ").concat(totalRows," 条记录")},formatSRPaginationPreText:function formatSRPaginationPreText(){return"上一页"},formatSRPaginationPageText:function formatSRPaginationPageText(page){return"第".concat(page,"页")},formatSRPaginationNextText:function formatSRPaginationNextText(){return"下一页"},formatDetailPagination:function formatDetailPagination(totalRows){return"总共 ".concat(totalRows," 条记录")},formatClearSearch:function formatClearSearch(){return"清空过滤"},formatSearch:function formatSearch(){return"搜索"},formatNoMatches:function formatNoMatches(){return"没有找到匹配的记录"},formatPaginationSwitch:function formatPaginationSwitch(){return"隐藏/显示分页"},formatPaginationSwitchDown:function formatPaginationSwitchDown(){return"显示分页"},formatPaginationSwitchUp:function formatPaginationSwitchUp(){return"隐藏分页"},formatRefresh:function formatRefresh(){return"刷新"},formatToggle:function formatToggle(){return"切换"},formatToggleOn:function formatToggleOn(){return"显示卡片视图"},formatToggleOff:function formatToggleOff(){return"隐藏卡片视图"},formatColumns:function formatColumns(){return"列"},formatColumnsToggleAll:function formatColumnsToggleAll(){return"切换所有"},formatFullscreen:function formatFullscreen(){return"全屏"},formatAllRows:function formatAllRows(){return"所有"},formatAutoRefresh:function formatAutoRefresh(){return"自动刷新"},formatExport:function formatExport(){return"导出数据"},formatJumpTo:function formatJumpTo(){return"跳转"},formatAdvancedSearch:function formatAdvancedSearch(){return"高级搜索"},formatAdvancedCloseButton:function formatAdvancedCloseButton(){return"关闭"},formatFilterControlSwitch:function formatFilterControlSwitch(){return"隐藏/显示过滤控制"},formatFilterControlSwitchHide:function formatFilterControlSwitchHide(){return"隐藏过滤控制"},formatFilterControlSwitchShow:function formatFilterControlSwitchShow(){return"显示过滤控制"}};$.extend($.fn.bootstrapTable.defaults,$.fn.bootstrapTable.locales["zh-CN"]);
|
||||||
|
|
@ -128,12 +128,12 @@
|
||||||
target.hasSelectItem = true;
|
target.hasSelectItem = true;
|
||||||
$th = $('<th style="width:36px"></th>');
|
$th = $('<th style="width:36px"></th>');
|
||||||
} else {
|
} else {
|
||||||
$th = $('<th style="' + ((column.width) ? ('width:' + column.width) : '') + '" class="' + column.field + '_cls"></th>');
|
$th = $('<th style="' + ((column.width) ? ('width:' + column.width + ((column.widthUnit) ? column.widthUnit : 'px')) : '') + '" class="' + column.field + '_cls"></th>');
|
||||||
}
|
}
|
||||||
if((!target.isFixWidth)&& column.width){
|
if((!target.isFixWidth)&& column.width){
|
||||||
target.isFixWidth = column.width.indexOf("px")>-1?true:false;
|
target.isFixWidth = column.width.indexOf("px")>-1?true:false;
|
||||||
}
|
}
|
||||||
$th.text(column.title);
|
$th.html(column.title);
|
||||||
$thr.append($th);
|
$thr.append($th);
|
||||||
});
|
});
|
||||||
var $thead = $('<thead class="treetable-thead"></thead>');
|
var $thead = $('<thead class="treetable-thead"></thead>');
|
||||||
|
|
@ -167,6 +167,7 @@
|
||||||
success: function(data, textStatus, jqXHR) {
|
success: function(data, textStatus, jqXHR) {
|
||||||
data = calculateObjectValue(options, options.responseHandler, [data], data);
|
data = calculateObjectValue(options, options.responseHandler, [data], data);
|
||||||
renderTable(data);
|
renderTable(data);
|
||||||
|
calculateObjectValue(options, options.onLoadSuccess, [data], data);
|
||||||
},
|
},
|
||||||
error: function(xhr, textStatus) {
|
error: function(xhr, textStatus) {
|
||||||
var _errorMsg = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">' + xhr.responseText + '</div></td></tr>'
|
var _errorMsg = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">' + xhr.responseText + '</div></td></tr>'
|
||||||
|
|
@ -241,18 +242,25 @@
|
||||||
// 缓存并格式化数据
|
// 缓存并格式化数据
|
||||||
var formatData = function(data) {
|
var formatData = function(data) {
|
||||||
var _root = options.rootIdValue ? options.rootIdValue : null;
|
var _root = options.rootIdValue ? options.rootIdValue : null;
|
||||||
var firstCode = data[0][options.parentCode];
|
// 父节点属性列表
|
||||||
|
var parentCodes = [];
|
||||||
|
var rootFlag = false;
|
||||||
|
$.each(data, function(index, item) {
|
||||||
|
if($.inArray(item[options.parentCode], parentCodes) == -1){
|
||||||
|
parentCodes.push(item[options.parentCode]);
|
||||||
|
}
|
||||||
|
});
|
||||||
$.each(data, function(index, item) {
|
$.each(data, function(index, item) {
|
||||||
// 添加一个默认属性,用来判断当前节点有没有被显示
|
// 添加一个默认属性,用来判断当前节点有没有被显示
|
||||||
item.isShow = false;
|
item.isShow = false;
|
||||||
// 这里兼容几种常见Root节点写法
|
// 顶级节点校验判断,兼容0,'0','',null
|
||||||
// 默认的几种判断
|
|
||||||
var _defaultRootFlag = item[options.parentCode] == '0' ||
|
var _defaultRootFlag = item[options.parentCode] == '0' ||
|
||||||
item[options.parentCode] == 0 ||
|
item[options.parentCode] == 0 ||
|
||||||
item[options.parentCode] == null ||
|
item[options.parentCode] == null ||
|
||||||
item[options.parentCode] == firstCode ||
|
item[options.parentCode] == '' ||
|
||||||
item[options.parentCode] == '';
|
$.inArray(item[options.code], parentCodes) > 0 && !rootFlag;
|
||||||
if (!item[options.parentCode] || (_root ? (item[options.parentCode] == options.rootIdValue) : _defaultRootFlag)) {
|
if (!item[options.parentCode] || (_root ? (item[options.parentCode] == options.rootIdValue) : _defaultRootFlag)) {
|
||||||
|
rootFlag = true;
|
||||||
if (!target.data_list["_root_"]) {
|
if (!target.data_list["_root_"]) {
|
||||||
target.data_list["_root_"] = [];
|
target.data_list["_root_"] = [];
|
||||||
}
|
}
|
||||||
|
|
@ -326,7 +334,7 @@
|
||||||
} else {
|
} else {
|
||||||
var $td = $('<td name="' + column.field + '" class="' + column.field + '_cls"></td>');
|
var $td = $('<td name="' + column.field + '" class="' + column.field + '_cls"></td>');
|
||||||
if(column.width){
|
if(column.width){
|
||||||
$td.css("width",column.width);
|
$td.css("width",column.width + (column.widthUnit ? column.widthUnit : 'px'));
|
||||||
}
|
}
|
||||||
if(column.align){
|
if(column.align){
|
||||||
$td.css("text-align",column.align);
|
$td.css("text-align",column.align);
|
||||||
|
|
@ -731,6 +739,9 @@
|
||||||
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right', // 缩起的按钮的图标
|
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right', // 缩起的按钮的图标
|
||||||
responseHandler: function(res) {
|
responseHandler: function(res) {
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
onLoadSuccess: function(res) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
@charset "utf-8";
|
|
||||||
.container {
|
|
||||||
margin: 10px auto 0 auto;
|
|
||||||
position: relative;
|
|
||||||
font-family: 微软雅黑;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.container p {
|
|
||||||
line-height: 12px;
|
|
||||||
line-height: 0px;
|
|
||||||
height: 0px;
|
|
||||||
margin: 10px;
|
|
||||||
color: #bbb
|
|
||||||
}
|
|
||||||
.action {
|
|
||||||
width: 400px;
|
|
||||||
height: 30px;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
.cropped {
|
|
||||||
position: absolute;
|
|
||||||
left: 500px;
|
|
||||||
top: 0;
|
|
||||||
width: 200px;
|
|
||||||
border: 1px #ddd solid;
|
|
||||||
height: 440px;
|
|
||||||
padding: 4px;
|
|
||||||
box-shadow: 0px 0px 12px #ddd;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.imageBox {
|
|
||||||
position: relative;
|
|
||||||
height: 400px;
|
|
||||||
width: 400px;
|
|
||||||
border: 1px solid #aaa;
|
|
||||||
background: #fff;
|
|
||||||
overflow: hidden;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
cursor: move;
|
|
||||||
box-shadow: 4px 4px 12px #B0B0B0;
|
|
||||||
}
|
|
||||||
.imageBox .thumbBox {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
width: 200px;
|
|
||||||
height: 200px;
|
|
||||||
margin-top: -100px;
|
|
||||||
margin-left: -100px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 1px solid rgb(102, 102, 102);
|
|
||||||
box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
|
|
||||||
background: none repeat scroll 0% 0% transparent;
|
|
||||||
}
|
|
||||||
.imageBox .spinner {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 400px;
|
|
||||||
background: rgba(0,0,0,0.7);
|
|
||||||
}
|
|
||||||
.Btnsty_peyton{ float: right;
|
|
||||||
width: 46px;
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
height: 37px;
|
|
||||||
line-height: 37px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
margin:0px 2px;
|
|
||||||
background-color: #f38e81;
|
|
||||||
border-radius: 3px;
|
|
||||||
text-decoration: none;
|
|
||||||
cursor: pointer;
|
|
||||||
box-shadow: 0px 0px 5px #B0B0B0;
|
|
||||||
border: 0px #fff solid;}
|
|
||||||
/*选择文件上传*/
|
|
||||||
.new-contentarea {
|
|
||||||
width: 165px;
|
|
||||||
overflow:hidden;
|
|
||||||
margin: 0 auto;
|
|
||||||
position:relative;float:left;
|
|
||||||
}
|
|
||||||
.new-contentarea label {
|
|
||||||
width:100%;
|
|
||||||
height:100%;
|
|
||||||
display:block;
|
|
||||||
}
|
|
||||||
.new-contentarea input[type=file] {
|
|
||||||
width:188px;
|
|
||||||
height:60px;
|
|
||||||
background:#333;
|
|
||||||
margin: 0 auto;
|
|
||||||
position:absolute;
|
|
||||||
right:50%;
|
|
||||||
margin-right:-94px;
|
|
||||||
top:0;
|
|
||||||
right/*\**/:0px\9;
|
|
||||||
margin-right/*\**/:0px\9;
|
|
||||||
width/*\**/:10px\9;
|
|
||||||
opacity:0;
|
|
||||||
filter:alpha(opacity=0);
|
|
||||||
z-index:2;
|
|
||||||
}
|
|
||||||
a.upload-img{
|
|
||||||
width:165px;
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
height:37px;
|
|
||||||
line-height: 37px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
background-color: #f38e81;
|
|
||||||
border-radius: 3px;
|
|
||||||
text-decoration:none;
|
|
||||||
cursor:pointer;
|
|
||||||
border: 0px #fff solid;
|
|
||||||
box-shadow: 0px 0px 5px #B0B0B0;
|
|
||||||
}
|
|
||||||
a.upload-img:hover{
|
|
||||||
background-color: #ec7e70;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tc{text-align:center;}
|
|
||||||
|
|
@ -1,136 +0,0 @@
|
||||||
"use strict";
|
|
||||||
(function (factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define(['jquery'], factory);
|
|
||||||
} else {
|
|
||||||
factory(jQuery);
|
|
||||||
}
|
|
||||||
}(function ($) {
|
|
||||||
var cropbox = function(options, el){
|
|
||||||
var el = el || $(options.imageBox),
|
|
||||||
obj =
|
|
||||||
{
|
|
||||||
state : {},
|
|
||||||
ratio : 1,
|
|
||||||
options : options,
|
|
||||||
imageBox : el,
|
|
||||||
thumbBox : el.find(options.thumbBox),
|
|
||||||
spinner : el.find(options.spinner),
|
|
||||||
image : new Image(),
|
|
||||||
getDataURL: function ()
|
|
||||||
{
|
|
||||||
var width = this.thumbBox.width(),
|
|
||||||
height = this.thumbBox.height(),
|
|
||||||
canvas = document.createElement("canvas"),
|
|
||||||
dim = el.css('background-position').split(' '),
|
|
||||||
size = el.css('background-size').split(' '),
|
|
||||||
dx = parseInt(dim[0]) - el.width()/2 + width/2,
|
|
||||||
dy = parseInt(dim[1]) - el.height()/2 + height/2,
|
|
||||||
dw = parseInt(size[0]),
|
|
||||||
dh = parseInt(size[1]),
|
|
||||||
sh = parseInt(this.image.height),
|
|
||||||
sw = parseInt(this.image.width);
|
|
||||||
|
|
||||||
canvas.width = width;
|
|
||||||
canvas.height = height;
|
|
||||||
var context = canvas.getContext("2d");
|
|
||||||
context.drawImage(this.image, 0, 0, sw, sh, dx, dy, dw, dh);
|
|
||||||
var imageData = canvas.toDataURL('image/png');
|
|
||||||
return imageData;
|
|
||||||
},
|
|
||||||
getBlob: function()
|
|
||||||
{
|
|
||||||
var imageData = this.getDataURL();
|
|
||||||
var b64 = imageData.replace('data:image/png;base64,','');
|
|
||||||
var binary = atob(b64);
|
|
||||||
var array = [];
|
|
||||||
for (var i = 0; i < binary.length; i++) {
|
|
||||||
array.push(binary.charCodeAt(i));
|
|
||||||
}
|
|
||||||
return new Blob([new Uint8Array(array)], {type: 'image/png'});
|
|
||||||
},
|
|
||||||
zoomIn: function ()
|
|
||||||
{
|
|
||||||
this.ratio*=1.1;
|
|
||||||
setBackground();
|
|
||||||
},
|
|
||||||
zoomOut: function ()
|
|
||||||
{
|
|
||||||
this.ratio*=0.9;
|
|
||||||
setBackground();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setBackground = function()
|
|
||||||
{
|
|
||||||
var w = parseInt(obj.image.width)*obj.ratio;
|
|
||||||
var h = parseInt(obj.image.height)*obj.ratio;
|
|
||||||
|
|
||||||
var pw = (el.width() - w) / 2;
|
|
||||||
var ph = (el.height() - h) / 2;
|
|
||||||
|
|
||||||
el.css({
|
|
||||||
'background-image': 'url(' + obj.image.src + ')',
|
|
||||||
'background-size': w +'px ' + h + 'px',
|
|
||||||
'background-position': pw + 'px ' + ph + 'px',
|
|
||||||
'background-repeat': 'no-repeat'});
|
|
||||||
},
|
|
||||||
imgMouseDown = function(e)
|
|
||||||
{
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
|
|
||||||
obj.state.dragable = true;
|
|
||||||
obj.state.mouseX = e.clientX;
|
|
||||||
obj.state.mouseY = e.clientY;
|
|
||||||
},
|
|
||||||
imgMouseMove = function(e)
|
|
||||||
{
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
|
|
||||||
if (obj.state.dragable)
|
|
||||||
{
|
|
||||||
var x = e.clientX - obj.state.mouseX;
|
|
||||||
var y = e.clientY - obj.state.mouseY;
|
|
||||||
|
|
||||||
var bg = el.css('background-position').split(' ');
|
|
||||||
|
|
||||||
var bgX = x + parseInt(bg[0]);
|
|
||||||
var bgY = y + parseInt(bg[1]);
|
|
||||||
|
|
||||||
el.css('background-position', bgX +'px ' + bgY + 'px');
|
|
||||||
|
|
||||||
obj.state.mouseX = e.clientX;
|
|
||||||
obj.state.mouseY = e.clientY;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
imgMouseUp = function(e)
|
|
||||||
{
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
obj.state.dragable = false;
|
|
||||||
},
|
|
||||||
zoomImage = function(e)
|
|
||||||
{
|
|
||||||
e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0 ? obj.ratio*=1.1 : obj.ratio*=0.9;
|
|
||||||
setBackground();
|
|
||||||
}
|
|
||||||
|
|
||||||
obj.spinner.show();
|
|
||||||
obj.image.onload = function() {
|
|
||||||
obj.spinner.hide();
|
|
||||||
setBackground();
|
|
||||||
|
|
||||||
el.bind('mousedown', imgMouseDown);
|
|
||||||
el.bind('mousemove', imgMouseMove);
|
|
||||||
$(window).bind('mouseup', imgMouseUp);
|
|
||||||
el.bind('mousewheel DOMMouseScroll', zoomImage);
|
|
||||||
};
|
|
||||||
obj.image.crossOrigin = 'Anonymous';
|
|
||||||
obj.image.src = options.imgSrc;
|
|
||||||
el.on('remove', function(){$(window).unbind('mouseup', imgMouseUp)});
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
};
|
|
||||||
|
|
||||||
jQuery.fn.cropbox = function(options){
|
|
||||||
return new cropbox(options, this);
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
|
|
@ -0,0 +1,304 @@
|
||||||
|
/*!
|
||||||
|
* Cropper.js v1.5.7
|
||||||
|
* https://fengyuanchen.github.io/cropperjs
|
||||||
|
*
|
||||||
|
* Copyright 2015-present Chen Fengyuan
|
||||||
|
* Released under the MIT license
|
||||||
|
*
|
||||||
|
* Date: 2020-05-23T05:22:57.283Z
|
||||||
|
*/
|
||||||
|
|
||||||
|
.cropper-container {
|
||||||
|
direction: ltr;
|
||||||
|
font-size: 0;
|
||||||
|
line-height: 0;
|
||||||
|
position: relative;
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-container img {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
image-orientation: 0deg;
|
||||||
|
max-height: none !important;
|
||||||
|
max-width: none !important;
|
||||||
|
min-height: 0 !important;
|
||||||
|
min-width: 0 !important;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-wrap-box,
|
||||||
|
.cropper-canvas,
|
||||||
|
.cropper-drag-box,
|
||||||
|
.cropper-crop-box,
|
||||||
|
.cropper-modal {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-wrap-box,
|
||||||
|
.cropper-canvas {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-drag-box {
|
||||||
|
background-color: #fff;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-modal {
|
||||||
|
background-color: #000;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-view-box {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
outline: 1px solid #39f;
|
||||||
|
outline-color: rgba(51, 153, 255, 0.75);
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-dashed {
|
||||||
|
border: 0 dashed #eee;
|
||||||
|
display: block;
|
||||||
|
opacity: 0.5;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-dashed.dashed-h {
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
height: calc(100% / 3);
|
||||||
|
left: 0;
|
||||||
|
top: calc(100% / 3);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-dashed.dashed-v {
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
height: 100%;
|
||||||
|
left: calc(100% / 3);
|
||||||
|
top: 0;
|
||||||
|
width: calc(100% / 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-center {
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
left: 50%;
|
||||||
|
opacity: 0.75;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-center::before,
|
||||||
|
.cropper-center::after {
|
||||||
|
background-color: #eee;
|
||||||
|
content: ' ';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-center::before {
|
||||||
|
height: 1px;
|
||||||
|
left: -3px;
|
||||||
|
top: 0;
|
||||||
|
width: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-center::after {
|
||||||
|
height: 7px;
|
||||||
|
left: 0;
|
||||||
|
top: -3px;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-face,
|
||||||
|
.cropper-line,
|
||||||
|
.cropper-point {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 0.1;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-face {
|
||||||
|
background-color: #fff;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-line {
|
||||||
|
background-color: #39f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-line.line-e {
|
||||||
|
cursor: ew-resize;
|
||||||
|
right: -3px;
|
||||||
|
top: 0;
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-line.line-n {
|
||||||
|
cursor: ns-resize;
|
||||||
|
height: 5px;
|
||||||
|
left: 0;
|
||||||
|
top: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-line.line-w {
|
||||||
|
cursor: ew-resize;
|
||||||
|
left: -3px;
|
||||||
|
top: 0;
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-line.line-s {
|
||||||
|
bottom: -3px;
|
||||||
|
cursor: ns-resize;
|
||||||
|
height: 5px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point {
|
||||||
|
background-color: #39f;
|
||||||
|
height: 5px;
|
||||||
|
opacity: 0.75;
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-e {
|
||||||
|
cursor: ew-resize;
|
||||||
|
margin-top: -3px;
|
||||||
|
right: -3px;
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-n {
|
||||||
|
cursor: ns-resize;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -3px;
|
||||||
|
top: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-w {
|
||||||
|
cursor: ew-resize;
|
||||||
|
left: -3px;
|
||||||
|
margin-top: -3px;
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-s {
|
||||||
|
bottom: -3px;
|
||||||
|
cursor: s-resize;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-ne {
|
||||||
|
cursor: nesw-resize;
|
||||||
|
right: -3px;
|
||||||
|
top: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-nw {
|
||||||
|
cursor: nwse-resize;
|
||||||
|
left: -3px;
|
||||||
|
top: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-sw {
|
||||||
|
bottom: -3px;
|
||||||
|
cursor: nesw-resize;
|
||||||
|
left: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-se {
|
||||||
|
bottom: -3px;
|
||||||
|
cursor: nwse-resize;
|
||||||
|
height: 20px;
|
||||||
|
opacity: 1;
|
||||||
|
right: -3px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.cropper-point.point-se {
|
||||||
|
height: 15px;
|
||||||
|
width: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.cropper-point.point-se {
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.cropper-point.point-se {
|
||||||
|
height: 5px;
|
||||||
|
opacity: 0.75;
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-point.point-se::before {
|
||||||
|
background-color: #39f;
|
||||||
|
bottom: -50%;
|
||||||
|
content: ' ';
|
||||||
|
display: block;
|
||||||
|
height: 200%;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: -50%;
|
||||||
|
width: 200%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-invisible {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-bg {
|
||||||
|
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-hide {
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-move {
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-crop {
|
||||||
|
cursor: crosshair;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropper-disabled .cropper-drag-box,
|
||||||
|
.cropper-disabled .cropper-face,
|
||||||
|
.cropper-disabled .cropper-line,
|
||||||
|
.cropper-disabled .cropper-point {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,9 @@
|
||||||
|
/*!
|
||||||
|
* Cropper.js v1.5.7
|
||||||
|
* https://fengyuanchen.github.io/cropperjs
|
||||||
|
*
|
||||||
|
* Copyright 2015-present Chen Fengyuan
|
||||||
|
* Released under the MIT license
|
||||||
|
*
|
||||||
|
* Date: 2020-05-23T05:22:57.283Z
|
||||||
|
*/.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75);overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC")}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,406 @@
|
||||||
|
/*!
|
||||||
|
* jQuery cxSelect
|
||||||
|
* @name jquery.cxselect.js
|
||||||
|
* @version 1.4.2
|
||||||
|
* @date 2017-09-26
|
||||||
|
* @author ciaoca
|
||||||
|
* @email ciaoca@gmail.com
|
||||||
|
* @site https://github.com/ciaoca/cxSelect
|
||||||
|
* @license Released under the MIT license
|
||||||
|
*/
|
||||||
|
(function(factory) {
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define(['jquery'], factory);
|
||||||
|
} else {
|
||||||
|
factory(window.jQuery || window.Zepto || window.$);
|
||||||
|
};
|
||||||
|
}(function($) {
|
||||||
|
var cxSelect = function() {
|
||||||
|
var self = this;
|
||||||
|
var dom, settings, callback;
|
||||||
|
|
||||||
|
// 分配参数
|
||||||
|
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||||
|
if (cxSelect.isJquery(arguments[i]) || cxSelect.isZepto(arguments[i])) {
|
||||||
|
dom = arguments[i];
|
||||||
|
} else if (cxSelect.isElement(arguments[i])) {
|
||||||
|
dom = $(arguments[i]);
|
||||||
|
} else if (typeof arguments[i] === 'function') {
|
||||||
|
callback = arguments[i];
|
||||||
|
} else if (typeof arguments[i] === 'object') {
|
||||||
|
settings = arguments[i];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var api = new cxSelect.init(dom, settings);
|
||||||
|
|
||||||
|
if (typeof callback === 'function') {
|
||||||
|
callback(api);
|
||||||
|
};
|
||||||
|
|
||||||
|
return api;
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.isElement = function(o){
|
||||||
|
if (o && (typeof HTMLElement === 'function' || typeof HTMLElement === 'object') && o instanceof HTMLElement) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return (o && o.nodeType && o.nodeType === 1) ? true : false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.isJquery = function(o){
|
||||||
|
return (o && o.length && (typeof jQuery === 'function' || typeof jQuery === 'object') && o instanceof jQuery) ? true : false;
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.isZepto = function(o){
|
||||||
|
return (o && o.length && (typeof Zepto === 'function' || typeof Zepto === 'object') && Zepto.zepto.isZ(o)) ? true : false;
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.getIndex = function(n, required) {
|
||||||
|
return required ? n : n - 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.getData = function(data, space) {
|
||||||
|
if (typeof space === 'string' && space.length) {
|
||||||
|
space = space.split('.');
|
||||||
|
for (var i = 0, l = space.length; i < l; i++) {
|
||||||
|
data = data[space[i]];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.init = function(dom, settings) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if (!cxSelect.isJquery(dom) && !cxSelect.isZepto(dom)) {return};
|
||||||
|
|
||||||
|
var theSelect = {
|
||||||
|
dom: {
|
||||||
|
box: dom
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
self.attach = cxSelect.attach.bind(theSelect);
|
||||||
|
self.detach = cxSelect.detach.bind(theSelect);
|
||||||
|
self.setOptions = cxSelect.setOptions.bind(theSelect);
|
||||||
|
self.clear = cxSelect.clear.bind(theSelect);
|
||||||
|
|
||||||
|
theSelect.changeEvent = function() {
|
||||||
|
cxSelect.selectChange.call(theSelect, this.className);
|
||||||
|
};
|
||||||
|
|
||||||
|
theSelect.settings = $.extend({}, $.cxSelect.defaults, settings, {
|
||||||
|
url: theSelect.dom.box.data('url'),
|
||||||
|
emptyStyle: theSelect.dom.box.data('emptyStyle'),
|
||||||
|
required: theSelect.dom.box.data('required'),
|
||||||
|
firstTitle: theSelect.dom.box.data('firstTitle'),
|
||||||
|
firstValue: theSelect.dom.box.data('firstValue'),
|
||||||
|
jsonSpace: theSelect.dom.box.data('jsonSpace'),
|
||||||
|
jsonName: theSelect.dom.box.data('jsonName'),
|
||||||
|
jsonValue: theSelect.dom.box.data('jsonValue'),
|
||||||
|
jsonSub: theSelect.dom.box.data('jsonSub')
|
||||||
|
});
|
||||||
|
|
||||||
|
var _dataSelects = theSelect.dom.box.data('selects');
|
||||||
|
|
||||||
|
if (typeof _dataSelects === 'string' && _dataSelects.length) {
|
||||||
|
theSelect.settings.selects = _dataSelects.split(',');
|
||||||
|
};
|
||||||
|
|
||||||
|
self.setOptions();
|
||||||
|
self.attach();
|
||||||
|
|
||||||
|
// 使用独立接口获取数据
|
||||||
|
if (!theSelect.settings.url && !theSelect.settings.data) {
|
||||||
|
cxSelect.start.apply(theSelect);
|
||||||
|
|
||||||
|
// 设置自定义数据
|
||||||
|
} else if ($.isArray(theSelect.settings.data)) {
|
||||||
|
cxSelect.start.call(theSelect, theSelect.settings.data);
|
||||||
|
|
||||||
|
// 设置 URL,通过 Ajax 获取数据
|
||||||
|
} else if (typeof theSelect.settings.url === 'string' && theSelect.settings.url.length) {
|
||||||
|
$.getJSON(theSelect.settings.url, function(json) {
|
||||||
|
cxSelect.start.call(theSelect, json);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// 设置参数
|
||||||
|
cxSelect.setOptions = function(opts) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if (opts) {
|
||||||
|
$.extend(self.settings, opts);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 初次或重设选择器组
|
||||||
|
if (!$.isArray(self.selectArray) || !self.selectArray.length || (opts && opts.selects)) {
|
||||||
|
self.selectArray = [];
|
||||||
|
|
||||||
|
if ($.isArray(self.settings.selects) && self.settings.selects.length) {
|
||||||
|
var _tempSelect;
|
||||||
|
|
||||||
|
for (var i = 0, l = self.settings.selects.length; i < l; i++) {
|
||||||
|
_tempSelect = self.dom.box.find('select.' + self.settings.selects[i]);
|
||||||
|
|
||||||
|
if (!_tempSelect || !_tempSelect.length) {break};
|
||||||
|
|
||||||
|
self.selectArray.push(_tempSelect);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (opts) {
|
||||||
|
if (!$.isArray(opts.data) && typeof opts.url === 'string' && opts.url.length) {
|
||||||
|
$.getJSON(self.settings.url, function(json) {
|
||||||
|
cxSelect.start.call(self, json);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
cxSelect.start.call(self, opts.data);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// 绑定
|
||||||
|
cxSelect.attach = function() {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if (!self.attachStatus) {
|
||||||
|
self.dom.box.on('change', 'select', self.changeEvent);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof self.attachStatus === 'boolean') {
|
||||||
|
cxSelect.start.call(self);
|
||||||
|
};
|
||||||
|
|
||||||
|
self.attachStatus = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 移除绑定
|
||||||
|
cxSelect.detach = function() {
|
||||||
|
var self = this;
|
||||||
|
self.dom.box.off('change', 'select', self.changeEvent);
|
||||||
|
self.attachStatus = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 清空选项
|
||||||
|
cxSelect.clear = function(index) {
|
||||||
|
var self = this;
|
||||||
|
var _style = {
|
||||||
|
display: '',
|
||||||
|
visibility: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
index = isNaN(index) ? 0 : index;
|
||||||
|
|
||||||
|
// 清空后面的 select
|
||||||
|
for (var i = index, l = self.selectArray.length; i < l; i++) {
|
||||||
|
self.selectArray[i].empty().prop('disabled', true);
|
||||||
|
|
||||||
|
if (self.settings.emptyStyle === 'none') {
|
||||||
|
_style.display = 'none';
|
||||||
|
} else if (self.settings.emptyStyle === 'hidden') {
|
||||||
|
_style.visibility = 'hidden';
|
||||||
|
};
|
||||||
|
|
||||||
|
self.selectArray[i].css(_style);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.start = function(data) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if ($.isArray(data)) {
|
||||||
|
self.settings.data = cxSelect.getData(data, self.settings.jsonSpace);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!self.selectArray.length) {return};
|
||||||
|
|
||||||
|
// 保存默认值
|
||||||
|
for (var i = 0, l = self.selectArray.length; i < l; i++) {
|
||||||
|
if (typeof self.selectArray[i].attr('data-value') !== 'string' && self.selectArray[i][0].options.length) {
|
||||||
|
self.selectArray[i].attr('data-value', self.selectArray[i].val());
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (self.settings.data || (typeof self.selectArray[0].data('url') === 'string' && self.selectArray[0].data('url').length)) {
|
||||||
|
cxSelect.getOptionData.call(self, 0);
|
||||||
|
} else if (self.selectArray[0][0].options.length && typeof self.selectArray[0].attr('data-value') === 'string' && self.selectArray[0].attr('data-value').length) {
|
||||||
|
self.selectArray[0].val(self.selectArray[0].attr('data-value'));
|
||||||
|
cxSelect.getOptionData.call(self, 1);
|
||||||
|
} else {
|
||||||
|
self.selectArray[0].prop('disabled', false).css({
|
||||||
|
'display': '',
|
||||||
|
'visibility': ''
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取选项数据
|
||||||
|
cxSelect.getOptionData = function(index) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if (typeof index !== 'number' || isNaN(index) || index < 0 || index >= self.selectArray.length) {return};
|
||||||
|
|
||||||
|
var _indexPrev = index - 1;
|
||||||
|
var _select = self.selectArray[index];
|
||||||
|
var _selectData;
|
||||||
|
var _valueIndex;
|
||||||
|
var _dataUrl = _select.data('url');
|
||||||
|
var _jsonSpace = typeof _select.data('jsonSpace') === 'undefined' ? self.settings.jsonSpace : _select.data('jsonSpace');
|
||||||
|
var _query = {};
|
||||||
|
var _queryName;
|
||||||
|
var _selectName;
|
||||||
|
var _selectValue;
|
||||||
|
|
||||||
|
cxSelect.clear.call(self, index);
|
||||||
|
|
||||||
|
// 使用独立接口
|
||||||
|
if (typeof _dataUrl === 'string' && _dataUrl.length) {
|
||||||
|
if (index > 0) {
|
||||||
|
for (var i = 0, j = 1; i < index; i++, j++) {
|
||||||
|
_queryName = self.selectArray[j].data('queryName');
|
||||||
|
_selectName = self.selectArray[i].attr('name');
|
||||||
|
_selectValue = self.selectArray[i].val();
|
||||||
|
|
||||||
|
if (typeof _queryName === 'string' && _queryName.length) {
|
||||||
|
_query[_queryName] = _selectValue;
|
||||||
|
} else if (typeof _selectName === 'string' && _selectName.length) {
|
||||||
|
_query[_selectName] = _selectValue;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
$.getJSON(_dataUrl, _query, function(json) {
|
||||||
|
_selectData = cxSelect.getData(json, _jsonSpace);
|
||||||
|
|
||||||
|
cxSelect.buildOption.call(self, index, _selectData);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 使用整合数据
|
||||||
|
} else if (self.settings.data && typeof self.settings.data === 'object') {
|
||||||
|
_selectData = self.settings.data;
|
||||||
|
|
||||||
|
for (var i = 0; i < index; i++) {
|
||||||
|
_valueIndex = cxSelect.getIndex(self.selectArray[i][0].selectedIndex, typeof self.selectArray[i].data('required') === 'boolean' ? self.selectArray[i].data('required') : self.settings.required);
|
||||||
|
|
||||||
|
if (typeof _selectData[_valueIndex] === 'object' && $.isArray(_selectData[_valueIndex][self.settings.jsonSub]) && _selectData[_valueIndex][self.settings.jsonSub].length) {
|
||||||
|
_selectData = _selectData[_valueIndex][self.settings.jsonSub];
|
||||||
|
} else {
|
||||||
|
_selectData = null;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cxSelect.buildOption.call(self, index, _selectData);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// 构建选项列表
|
||||||
|
cxSelect.buildOption = function(index, data) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
var _select = self.selectArray[index];
|
||||||
|
var _required = typeof _select.data('required') === 'boolean' ? _select.data('required') : self.settings.required;
|
||||||
|
var _firstTitle = typeof _select.data('firstTitle') === 'undefined' ? self.settings.firstTitle : _select.data('firstTitle');
|
||||||
|
var _firstValue = typeof _select.data('firstValue') === 'undefined' ? self.settings.firstValue : _select.data('firstValue');
|
||||||
|
var _jsonName = typeof _select.data('jsonName') === 'undefined' ? self.settings.jsonName : _select.data('jsonName');
|
||||||
|
var _jsonValue = typeof _select.data('jsonValue') === 'undefined' ? self.settings.jsonValue : _select.data('jsonValue');
|
||||||
|
|
||||||
|
if (!$.isArray(data)) {return};
|
||||||
|
|
||||||
|
var _html = !_required ? '<option value="' + String(_firstValue) + '">' + String(_firstTitle) + '</option>' : '';
|
||||||
|
|
||||||
|
// 区分标题、值的数据
|
||||||
|
if (typeof _jsonName === 'string' && _jsonName.length) {
|
||||||
|
// 无值字段时使用标题作为值
|
||||||
|
if (typeof _jsonValue !== 'string' || !_jsonValue.length) {
|
||||||
|
_jsonValue = _jsonName;
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var i = 0, l = data.length; i < l; i++) {
|
||||||
|
_html += '<option value="' + String(data[i][_jsonValue]) + '">' + String(data[i][_jsonName]) + '</option>';
|
||||||
|
};
|
||||||
|
|
||||||
|
// 数组即为值的数据
|
||||||
|
} else {
|
||||||
|
for (var i = 0, l = data.length; i < l; i++) {
|
||||||
|
_html += '<option value="' + String(data[i]) + '">' + String(data[i]) + '</option>';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_select.html(_html).prop('disabled', false).css({
|
||||||
|
'display': '',
|
||||||
|
'visibility': ''
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初次加载设置默认值
|
||||||
|
if (typeof _select.attr('data-value') === 'string') {
|
||||||
|
_select.val(String(_select.attr('data-value'))).removeAttr('data-value');
|
||||||
|
|
||||||
|
if (_select[0].selectedIndex < 0) {
|
||||||
|
_select[0].options[0].selected = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_required || _select[0].selectedIndex > 0) {
|
||||||
|
_select.trigger('change');
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// 改变选择时的处理
|
||||||
|
cxSelect.selectChange = function(name) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if (typeof name !== 'string' || !name.length) {return};
|
||||||
|
|
||||||
|
var index;
|
||||||
|
|
||||||
|
name = name.replace(/\s+/g, ',');
|
||||||
|
name = ',' + name + ',';
|
||||||
|
|
||||||
|
// 获取当前 select 位置
|
||||||
|
for (var i = 0, l = self.selectArray.length; i < l; i++) {
|
||||||
|
if (name.indexOf(',' + self.settings.selects[i] + ',') > -1) {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof index === 'number' && index > -1) {
|
||||||
|
index += 1;
|
||||||
|
cxSelect.getOptionData.call(self, index);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
$.cxSelect = function() {
|
||||||
|
return cxSelect.apply(this, arguments);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 默认值
|
||||||
|
$.cxSelect.defaults = {
|
||||||
|
selects: [], // 下拉选框组
|
||||||
|
url: null, // 列表数据文件路径(URL)或数组数据
|
||||||
|
data: null, // 自定义数据
|
||||||
|
emptyStyle: null, // 无数据状态显示方式
|
||||||
|
required: false, // 是否为必选
|
||||||
|
firstTitle: '请选择', // 第一个选项的标题
|
||||||
|
firstValue: '', // 第一个选项的值
|
||||||
|
jsonSpace: '', // 数据命名空间
|
||||||
|
jsonName: 'n', // 数据标题字段名称
|
||||||
|
jsonValue: '', // 数据值字段名称
|
||||||
|
jsonSub: 's' // 子集数据字段名称
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.cxSelect = function(settings, callback) {
|
||||||
|
this.each(function(i) {
|
||||||
|
$.cxSelect(this, settings, callback);
|
||||||
|
});
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
}));
|
||||||
11
ruoyi-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.min.js
vendored
Normal file
11
ruoyi-admin/src/main/resources/static/ajax/libs/cxselect/jquery.cxselect.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,79 @@
|
||||||
|
/**
|
||||||
|
* GitHub Gist Theme
|
||||||
|
* Author : Anthony Attard - https://github.com/AnthonyAttard
|
||||||
|
* Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
|
||||||
|
*/
|
||||||
|
|
||||||
|
.hljs {
|
||||||
|
display: block;
|
||||||
|
background: white;
|
||||||
|
padding: 0.5em;
|
||||||
|
color: #333333;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-comment,
|
||||||
|
.hljs-meta {
|
||||||
|
color: #969896;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-variable,
|
||||||
|
.hljs-template-variable,
|
||||||
|
.hljs-strong,
|
||||||
|
.hljs-emphasis,
|
||||||
|
.hljs-quote {
|
||||||
|
color: #df5000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-keyword,
|
||||||
|
.hljs-selector-tag,
|
||||||
|
.hljs-type {
|
||||||
|
color: #d73a49;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-literal,
|
||||||
|
.hljs-symbol,
|
||||||
|
.hljs-bullet,
|
||||||
|
.hljs-attribute {
|
||||||
|
color: #0086b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-section,
|
||||||
|
.hljs-name {
|
||||||
|
color: #63a35c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-tag {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-title,
|
||||||
|
.hljs-attr,
|
||||||
|
.hljs-selector-id,
|
||||||
|
.hljs-selector-class,
|
||||||
|
.hljs-selector-attr,
|
||||||
|
.hljs-selector-pseudo {
|
||||||
|
color: #6f42c1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-addition {
|
||||||
|
color: #55a532;
|
||||||
|
background-color: #eaffea;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-deletion {
|
||||||
|
color: #bd2c00;
|
||||||
|
background-color: #ffecec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-link {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-number {
|
||||||
|
color: #005cc5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-string {
|
||||||
|
color: #032f62;
|
||||||
|
}
|
||||||
1102
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/highlight.min.js
vendored
Normal file
1102
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -4590,12 +4590,12 @@ S2.define('select2/i18n/en',[],function () {
|
||||||
// English
|
// English
|
||||||
return {
|
return {
|
||||||
errorLoading: function () {
|
errorLoading: function () {
|
||||||
return 'The results could not be loaded.';
|
return '无法载入结果';
|
||||||
},
|
},
|
||||||
inputTooLong: function (args) {
|
inputTooLong: function (args) {
|
||||||
var overChars = args.input.length - args.maximum;
|
var overChars = args.input.length - args.maximum;
|
||||||
|
|
||||||
var message = 'Please delete ' + overChars + ' character';
|
var message = '请删除' + overChars + '个字符';
|
||||||
|
|
||||||
if (overChars != 1) {
|
if (overChars != 1) {
|
||||||
message += 's';
|
message += 's';
|
||||||
|
|
@ -4606,15 +4606,15 @@ S2.define('select2/i18n/en',[],function () {
|
||||||
inputTooShort: function (args) {
|
inputTooShort: function (args) {
|
||||||
var remainingChars = args.minimum - args.input.length;
|
var remainingChars = args.minimum - args.input.length;
|
||||||
|
|
||||||
var message = 'Please enter ' + remainingChars + ' or more characters';
|
var message = '请再输入至少' + remainingChars + '个字符';
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
loadingMore: function () {
|
loadingMore: function () {
|
||||||
return 'Loading more results…';
|
return '载入更多结果…';
|
||||||
},
|
},
|
||||||
maximumSelected: function (args) {
|
maximumSelected: function (args) {
|
||||||
var message = 'You can only select ' + args.maximum + ' item';
|
var message = '最多只能' + args.maximum + '个选项';
|
||||||
|
|
||||||
if (args.maximum != 1) {
|
if (args.maximum != 1) {
|
||||||
message += 's';
|
message += 's';
|
||||||
|
|
@ -4623,13 +4623,13 @@ S2.define('select2/i18n/en',[],function () {
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
noResults: function () {
|
noResults: function () {
|
||||||
return 'No results found';
|
return '未找到结果';
|
||||||
},
|
},
|
||||||
searching: function () {
|
searching: function () {
|
||||||
return 'Searching…';
|
return '搜索中…';
|
||||||
},
|
},
|
||||||
removeAllItems: function () {
|
removeAllItems: function () {
|
||||||
return 'Remove all items';
|
return '删除所有项目';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
@ -5012,7 +5012,7 @@ S2.define('select2/defaults',[
|
||||||
return selection.text;
|
return selection.text;
|
||||||
},
|
},
|
||||||
theme: 'default',
|
theme: 'default',
|
||||||
width: 'resolve'
|
width: '100%'
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
13
ruoyi-admin/src/main/resources/static/ajax/libs/smartwizard/jquery.smartWizard.min.js
vendored
Normal file
13
ruoyi-admin/src/main/resources/static/ajax/libs/smartwizard/jquery.smartWizard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
ruoyi-admin/src/main/resources/static/ajax/libs/smartwizard/smart_wizard_all.min.css
vendored
Normal file
11
ruoyi-admin/src/main/resources/static/ajax/libs/smartwizard/smart_wizard_all.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,381 +0,0 @@
|
||||||
/*
|
|
||||||
Common
|
|
||||||
*/
|
|
||||||
|
|
||||||
.wizard,
|
|
||||||
.tabcontrol
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard a,
|
|
||||||
.tabcontrol a
|
|
||||||
{
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard ul,
|
|
||||||
.tabcontrol ul
|
|
||||||
{
|
|
||||||
list-style: none !important;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard ul > li,
|
|
||||||
.tabcontrol ul > li
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Accessibility */
|
|
||||||
.wizard > .steps .current-info,
|
|
||||||
.tabcontrol > .steps .current-info
|
|
||||||
{
|
|
||||||
position: absolute;
|
|
||||||
left: -999em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .title,
|
|
||||||
.tabcontrol > .content > .title
|
|
||||||
{
|
|
||||||
position: absolute;
|
|
||||||
left: -999em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Wizard
|
|
||||||
*/
|
|
||||||
|
|
||||||
.wizard > .steps
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard.vertical > .steps
|
|
||||||
{
|
|
||||||
display: inline;
|
|
||||||
float: left;
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .steps > ul > li
|
|
||||||
{
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .steps > ul > li,
|
|
||||||
.wizard > .actions > ul > li
|
|
||||||
{
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard.vertical > .steps > ul > li
|
|
||||||
{
|
|
||||||
float: none;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .steps a,
|
|
||||||
.wizard > .steps a:hover,
|
|
||||||
.wizard > .steps a:active
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
width: auto;
|
|
||||||
margin: 0 0.5em 0.5em;
|
|
||||||
padding: 8px;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .steps .disabled a,
|
|
||||||
.wizard > .steps .disabled a:hover,
|
|
||||||
.wizard > .steps .disabled a:active
|
|
||||||
{
|
|
||||||
background: #eee;
|
|
||||||
color: #aaa;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .steps .current a,
|
|
||||||
.wizard > .steps .current a:hover,
|
|
||||||
.wizard > .steps .current a:active
|
|
||||||
{
|
|
||||||
background: #1AB394;
|
|
||||||
color: #fff;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .steps .done a,
|
|
||||||
.wizard > .steps .done a:hover,
|
|
||||||
.wizard > .steps .done a:active
|
|
||||||
{
|
|
||||||
background: #6fd1bd;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .steps .error a,
|
|
||||||
.wizard > .steps .error a:hover,
|
|
||||||
.wizard > .steps .error a:active
|
|
||||||
{
|
|
||||||
background: #ED5565 ;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content
|
|
||||||
{
|
|
||||||
background: #eee;
|
|
||||||
display: block;
|
|
||||||
margin: 5px 5px 10px 5px;
|
|
||||||
min-height: 120px;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
width: auto;
|
|
||||||
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard-big.wizard > .content {
|
|
||||||
min-height: 320px;
|
|
||||||
}
|
|
||||||
.wizard.vertical > .content
|
|
||||||
{
|
|
||||||
display: inline;
|
|
||||||
float: left;
|
|
||||||
margin: 0 2.5% 0.5em 2.5%;
|
|
||||||
width: 65%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body
|
|
||||||
{
|
|
||||||
float: left;
|
|
||||||
position: absolute;
|
|
||||||
width: 95%;
|
|
||||||
height: 95%;
|
|
||||||
padding: 2.5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body ul
|
|
||||||
{
|
|
||||||
list-style: disc !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body ul > li
|
|
||||||
{
|
|
||||||
display: list-item;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body > iframe
|
|
||||||
{
|
|
||||||
border: 0 none;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body input
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body input[type="checkbox"]
|
|
||||||
{
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body input.error
|
|
||||||
{
|
|
||||||
background: rgb(251, 227, 228);
|
|
||||||
border: 1px solid #fbc2c4;
|
|
||||||
color: #8a1f11;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body label
|
|
||||||
{
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .content > .body label.error
|
|
||||||
{
|
|
||||||
color: #8a1f11;
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .actions
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
text-align: right;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard.vertical > .actions
|
|
||||||
{
|
|
||||||
display: inline;
|
|
||||||
float: right;
|
|
||||||
margin: 0 2.5%;
|
|
||||||
width: 95%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .actions > ul
|
|
||||||
{
|
|
||||||
display: inline-block;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .actions > ul > li
|
|
||||||
{
|
|
||||||
margin: 0 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard.vertical > .actions > ul > li
|
|
||||||
{
|
|
||||||
margin: 0 0 0 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .actions a,
|
|
||||||
.wizard > .actions a:hover,
|
|
||||||
.wizard > .actions a:active
|
|
||||||
{
|
|
||||||
background: #1AB394;
|
|
||||||
color: #fff;
|
|
||||||
display: block;
|
|
||||||
padding: 0.5em 1em;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .actions .disabled a,
|
|
||||||
.wizard > .actions .disabled a:hover,
|
|
||||||
.wizard > .actions .disabled a:active
|
|
||||||
{
|
|
||||||
background: #eee;
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .loading
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard > .loading .spinner
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Tabcontrol
|
|
||||||
*/
|
|
||||||
|
|
||||||
.tabcontrol > .steps
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .steps > ul
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
margin: 6px 0 0 0;
|
|
||||||
top: 1px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .steps > ul > li
|
|
||||||
{
|
|
||||||
float: left;
|
|
||||||
margin: 5px 2px 0 0;
|
|
||||||
padding: 1px;
|
|
||||||
|
|
||||||
-webkit-border-top-left-radius: 5px;
|
|
||||||
-webkit-border-top-right-radius: 5px;
|
|
||||||
-moz-border-radius-topleft: 5px;
|
|
||||||
-moz-border-radius-topright: 5px;
|
|
||||||
border-top-left-radius: 5px;
|
|
||||||
border-top-right-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .steps > ul > li:hover
|
|
||||||
{
|
|
||||||
background: #edecec;
|
|
||||||
border: 1px solid #bbb;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .steps > ul > li.current
|
|
||||||
{
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #bbb;
|
|
||||||
border-bottom: 0 none;
|
|
||||||
padding: 0 0 1px 0;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .steps > ul > li > a
|
|
||||||
{
|
|
||||||
color: #5f5f5f;
|
|
||||||
display: inline-block;
|
|
||||||
border: 0 none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 10px 30px;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .steps > ul > li > a:hover
|
|
||||||
{
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .steps > ul > li.current > a
|
|
||||||
{
|
|
||||||
padding: 15px 30px 10px 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .content
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
height: 35em;
|
|
||||||
overflow: hidden;
|
|
||||||
border-top: 1px solid #bbb;
|
|
||||||
padding-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .content > .body
|
|
||||||
{
|
|
||||||
float: left;
|
|
||||||
position: absolute;
|
|
||||||
width: 95%;
|
|
||||||
height: 95%;
|
|
||||||
padding: 2.5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .content > .body ul
|
|
||||||
{
|
|
||||||
list-style: disc !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabcontrol > .content > .body ul > li
|
|
||||||
{
|
|
||||||
display: list-item;
|
|
||||||
}
|
|
||||||
label.error { position:inherit; }
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -5778,7 +5778,7 @@ td.visible-lg {
|
||||||
display: table-cell !important;
|
display: table-cell !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hidden-xs {
|
.summernote .hidden-xs {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
tr.hidden-xs {
|
tr.hidden-xs {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
strikethrough: '删除线',
|
strikethrough: '删除线',
|
||||||
subscript: '下标',
|
subscript: '下标',
|
||||||
superscript: '上标',
|
superscript: '上标',
|
||||||
size: '字号'
|
size: '字号',
|
||||||
},
|
},
|
||||||
image: {
|
image: {
|
||||||
image: '图片',
|
image: '图片',
|
||||||
|
|
@ -33,14 +33,14 @@
|
||||||
maximumFileSizeError: '文件大小超出最大值。',
|
maximumFileSizeError: '文件大小超出最大值。',
|
||||||
url: '图片地址',
|
url: '图片地址',
|
||||||
remove: '移除图片',
|
remove: '移除图片',
|
||||||
original: '原始图片'
|
original: '原始图片',
|
||||||
},
|
},
|
||||||
video: {
|
video: {
|
||||||
video: '视频',
|
video: '视频',
|
||||||
videoLink: '视频链接',
|
videoLink: '视频链接',
|
||||||
insert: '插入视频',
|
insert: '插入视频',
|
||||||
url: '视频地址',
|
url: '视频地址',
|
||||||
providers: '(优酷, 腾讯, Instagram, DailyMotion, Youtube等)'
|
providers: '(优酷, 腾讯, Instagram, DailyMotion, Youtube等)',
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
link: '链接',
|
link: '链接',
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
edit: '编辑链接',
|
edit: '编辑链接',
|
||||||
textToDisplay: '显示文本',
|
textToDisplay: '显示文本',
|
||||||
url: '链接地址',
|
url: '链接地址',
|
||||||
openInNewWindow: '在新窗口打开'
|
openInNewWindow: '在新窗口打开',
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
table: '表格',
|
table: '表格',
|
||||||
|
|
@ -59,10 +59,10 @@
|
||||||
addColRight: '在右侧插入列',
|
addColRight: '在右侧插入列',
|
||||||
delRow: '删除行',
|
delRow: '删除行',
|
||||||
delCol: '删除列',
|
delCol: '删除列',
|
||||||
delTable: '删除表格'
|
delTable: '删除表格',
|
||||||
},
|
},
|
||||||
hr: {
|
hr: {
|
||||||
insert: '水平线'
|
insert: '水平线',
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
style: '样式',
|
style: '样式',
|
||||||
|
|
@ -74,16 +74,16 @@
|
||||||
h3: '标题 3',
|
h3: '标题 3',
|
||||||
h4: '标题 4',
|
h4: '标题 4',
|
||||||
h5: '标题 5',
|
h5: '标题 5',
|
||||||
h6: '标题 6'
|
h6: '标题 6',
|
||||||
},
|
},
|
||||||
lists: {
|
lists: {
|
||||||
unordered: '无序列表',
|
unordered: '无序列表',
|
||||||
ordered: '有序列表'
|
ordered: '有序列表',
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
help: '帮助',
|
help: '帮助',
|
||||||
fullscreen: '全屏',
|
fullscreen: '全屏',
|
||||||
codeview: '源代码'
|
codeview: '源代码',
|
||||||
},
|
},
|
||||||
paragraph: {
|
paragraph: {
|
||||||
paragraph: '段落',
|
paragraph: '段落',
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
left: '左对齐',
|
left: '左对齐',
|
||||||
center: '居中对齐',
|
center: '居中对齐',
|
||||||
right: '右对齐',
|
right: '右对齐',
|
||||||
justify: '两端对齐'
|
justify: '两端对齐',
|
||||||
},
|
},
|
||||||
color: {
|
color: {
|
||||||
recent: '最近使用',
|
recent: '最近使用',
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
transparent: '透明',
|
transparent: '透明',
|
||||||
setTransparent: '透明',
|
setTransparent: '透明',
|
||||||
reset: '重置',
|
reset: '重置',
|
||||||
resetToDefault: '默认'
|
resetToDefault: '默认',
|
||||||
},
|
},
|
||||||
shortcut: {
|
shortcut: {
|
||||||
shortcuts: '快捷键',
|
shortcuts: '快捷键',
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
action: '动作',
|
action: '动作',
|
||||||
paragraphFormatting: '段落格式',
|
paragraphFormatting: '段落格式',
|
||||||
documentStyle: '文档样式',
|
documentStyle: '文档样式',
|
||||||
extraKeys: '额外按键'
|
extraKeys: '额外按键',
|
||||||
},
|
},
|
||||||
help: {
|
help: {
|
||||||
insertParagraph: '插入段落',
|
insertParagraph: '插入段落',
|
||||||
|
|
@ -140,16 +140,16 @@
|
||||||
formatH5: '设置选中内容样式为 标题5',
|
formatH5: '设置选中内容样式为 标题5',
|
||||||
formatH6: '设置选中内容样式为 标题6',
|
formatH6: '设置选中内容样式为 标题6',
|
||||||
insertHorizontalRule: '插入水平线',
|
insertHorizontalRule: '插入水平线',
|
||||||
'linkDialog.show': '显示链接对话框'
|
'linkDialog.show': '显示链接对话框',
|
||||||
},
|
},
|
||||||
history: {
|
history: {
|
||||||
undo: '撤销',
|
undo: '撤销',
|
||||||
redo: '重做'
|
redo: '重做',
|
||||||
},
|
},
|
||||||
specialChar: {
|
specialChar: {
|
||||||
specialChar: '特殊字符',
|
specialChar: '特殊字符',
|
||||||
select: '选取特殊字符'
|
select: '选取特殊字符',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
/*! Summernote v0.8.11 | (c) 2013- Alan Hong and other contributors | MIT license */
|
|
||||||
|
|
||||||
!function(e){e.extend(e.summernote.lang,{"zh-CN":{font:{bold:"粗体",italic:"斜体",underline:"下划线",clear:"清除格式",height:"行高",name:"字体",strikethrough:"删除线",subscript:"下标",superscript:"上标",size:"字号"},image:{image:"图片",insert:"插入图片",resizeFull:"缩放至 100%",resizeHalf:"缩放至 50%",resizeQuarter:"缩放至 25%",floatLeft:"靠左浮动",floatRight:"靠右浮动",floatNone:"取消浮动",shapeRounded:"形状: 圆角",shapeCircle:"形状: 圆",shapeThumbnail:"形状: 缩略图",shapeNone:"形状: 无",dragImageHere:"将图片拖拽至此处",dropImage:"拖拽图片或文本",selectFromFiles:"从本地上传",maximumFileSize:"文件大小最大值",maximumFileSizeError:"文件大小超出最大值。",url:"图片地址",remove:"移除图片",original:"原始图片"},video:{video:"视频",videoLink:"视频链接",insert:"插入视频",url:"视频地址",providers:"(优酷, 腾讯, Instagram, DailyMotion, Youtube等)"},link:{link:"链接",insert:"插入链接",unlink:"去除链接",edit:"编辑链接",textToDisplay:"显示文本",url:"链接地址",openInNewWindow:"在新窗口打开"},table:{table:"表格",addRowAbove:"在上方插入行",addRowBelow:"在下方插入行",addColLeft:"在左侧插入列",addColRight:"在右侧插入列",delRow:"删除行",delCol:"删除列",delTable:"删除表格"},hr:{insert:"水平线"},style:{style:"样式",p:"普通",blockquote:"引用",pre:"代码",h1:"标题 1",h2:"标题 2",h3:"标题 3",h4:"标题 4",h5:"标题 5",h6:"标题 6"},lists:{unordered:"无序列表",ordered:"有序列表"},options:{help:"帮助",fullscreen:"全屏",codeview:"源代码"},paragraph:{paragraph:"段落",outdent:"减少缩进",indent:"增加缩进",left:"左对齐",center:"居中对齐",right:"右对齐",justify:"两端对齐"},color:{recent:"最近使用",more:"更多",background:"背景",foreground:"前景",transparent:"透明",setTransparent:"透明",reset:"重置",resetToDefault:"默认"},shortcut:{shortcuts:"快捷键",close:"关闭",textFormatting:"文本格式",action:"动作",paragraphFormatting:"段落格式",documentStyle:"文档样式",extraKeys:"额外按键"},help:{insertParagraph:"插入段落",undo:"撤销",redo:"重做",tab:"增加缩进",untab:"减少缩进",bold:"粗体",italic:"斜体",underline:"下划线",strikethrough:"删除线",removeFormat:"清除格式",justifyLeft:"左对齐",justifyCenter:"居中对齐",justifyRight:"右对齐",justifyFull:"两端对齐",insertUnorderedList:"无序列表",insertOrderedList:"有序列表",outdent:"减少缩进",indent:"增加缩进",formatPara:"设置选中内容样式为 普通",formatH1:"设置选中内容样式为 标题1",formatH2:"设置选中内容样式为 标题2",formatH3:"设置选中内容样式为 标题3",formatH4:"设置选中内容样式为 标题4",formatH5:"设置选中内容样式为 标题5",formatH6:"设置选中内容样式为 标题6",insertHorizontalRule:"插入水平线","linkDialog.show":"显示链接对话框"},history:{undo:"撤销",redo:"重做"},specialChar:{specialChar:"特殊字符",select:"选取特殊字符"}}})}(jQuery);
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,11 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* Super simple wysiwyg editor v0.8.11
|
* Super simple wysiwyg editor v0.8.12
|
||||||
* https://summernote.org
|
* https://summernote.org
|
||||||
*
|
*
|
||||||
* Copyright 2013- Alan Hong. and other contributors
|
* Copyright 2013- Alan Hong. and other contributors
|
||||||
* summernote may be freely distributed under the MIT license.
|
* summernote may be freely distributed under the MIT license.
|
||||||
*
|
*
|
||||||
* Date: 2018-12-22T04:42Z
|
* Date: 2019-05-16T08:16Z
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
create: function (markup, callback) {
|
create: function (markup, callback) {
|
||||||
return function () {
|
return function () {
|
||||||
var options = typeof arguments[1] === 'object' ? arguments[1] : arguments[0];
|
var options = typeof arguments[1] === 'object' ? arguments[1] : arguments[0];
|
||||||
var children = $$1.isArray(arguments[0]) ? arguments[0] : [];
|
var children = Array.isArray(arguments[0]) ? arguments[0] : [];
|
||||||
if (options && options.children) {
|
if (options && options.children) {
|
||||||
children = options.children;
|
children = options.children;
|
||||||
}
|
}
|
||||||
|
|
@ -92,13 +92,13 @@
|
||||||
].join(''));
|
].join(''));
|
||||||
var buttonGroup = renderer.create('<div class="note-btn-group btn-group">');
|
var buttonGroup = renderer.create('<div class="note-btn-group btn-group">');
|
||||||
var dropdown = renderer.create('<ul class="dropdown-menu" role="list">', function ($node, options) {
|
var dropdown = renderer.create('<ul class="dropdown-menu" role="list">', function ($node, options) {
|
||||||
var markup = $$1.isArray(options.items) ? options.items.map(function (item) {
|
var markup = Array.isArray(options.items) ? options.items.map(function (item) {
|
||||||
var value = (typeof item === 'string') ? item : (item.value || '');
|
var value = (typeof item === 'string') ? item : (item.value || '');
|
||||||
var content = options.template ? options.template(item) : item;
|
var content = options.template ? options.template(item) : item;
|
||||||
var option = (typeof item === 'object') ? item.option : undefined;
|
var option = (typeof item === 'object') ? item.option : undefined;
|
||||||
var dataValue = 'data-value="' + value + '"';
|
var dataValue = 'data-value="' + value + '"';
|
||||||
var dataOption = (option !== undefined) ? ' data-option="' + option + '"' : '';
|
var dataOption = (option !== undefined) ? ' data-option="' + option + '"' : '';
|
||||||
return '<li role="listitem" aria-label="' + item + '"><a href="#" ' + (dataValue + dataOption) + '>' + content + '</a></li>';
|
return '<li role="listitem" aria-label="' + value + '"><a href="#" ' + (dataValue + dataOption) + '>' + content + '</a></li>';
|
||||||
}).join('') : options.items;
|
}).join('') : options.items;
|
||||||
$node.html(markup).attr({ 'aria-label': options.title });
|
$node.html(markup).attr({ 'aria-label': options.title });
|
||||||
});
|
});
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
return contents + ' ' + icon(options.icons.caret, 'span');
|
return contents + ' ' + icon(options.icons.caret, 'span');
|
||||||
};
|
};
|
||||||
var dropdownCheck = renderer.create('<ul class="dropdown-menu note-check" role="list">', function ($node, options) {
|
var dropdownCheck = renderer.create('<ul class="dropdown-menu note-check" role="list">', function ($node, options) {
|
||||||
var markup = $$1.isArray(options.items) ? options.items.map(function (item) {
|
var markup = Array.isArray(options.items) ? options.items.map(function (item) {
|
||||||
var value = (typeof item === 'string') ? item : (item.value || '');
|
var value = (typeof item === 'string') ? item : (item.value || '');
|
||||||
var content = options.template ? options.template(item) : item;
|
var content = options.template ? options.template(item) : item;
|
||||||
return '<li role="listitem" aria-label="' + item + '"><a href="#" data-value="' + value + '">' + icon(options.checkClassName) + ' ' + content + '</a></li>';
|
return '<li role="listitem" aria-label="' + item + '"><a href="#" data-value="' + value + '">' + icon(options.checkClassName) + ' ' + content + '</a></li>';
|
||||||
|
|
@ -470,38 +470,6 @@
|
||||||
}
|
}
|
||||||
var isEdge = /Edge\/\d+/.test(userAgent);
|
var isEdge = /Edge\/\d+/.test(userAgent);
|
||||||
var hasCodeMirror = !!window.CodeMirror;
|
var hasCodeMirror = !!window.CodeMirror;
|
||||||
if (!hasCodeMirror && isSupportAmd) {
|
|
||||||
// Webpack
|
|
||||||
if (typeof __webpack_require__ === 'function') { // eslint-disable-line
|
|
||||||
try {
|
|
||||||
// If CodeMirror can't be resolved, `require.resolve` will throw an
|
|
||||||
// exception and `hasCodeMirror` won't be set to `true`.
|
|
||||||
require.resolve('codemirror');
|
|
||||||
hasCodeMirror = true;
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (typeof require !== 'undefined') {
|
|
||||||
// Browserify
|
|
||||||
if (typeof require.resolve !== 'undefined') {
|
|
||||||
try {
|
|
||||||
// If CodeMirror can't be resolved, `require.resolve` will throw an
|
|
||||||
// exception and `hasCodeMirror` won't be set to `true`.
|
|
||||||
require.resolve('codemirror');
|
|
||||||
hasCodeMirror = true;
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
// Almond/Require
|
|
||||||
}
|
|
||||||
else if (typeof require.specified !== 'undefined') {
|
|
||||||
hasCodeMirror = require.specified('codemirror');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var isSupportTouch = (('ontouchstart' in window) ||
|
var isSupportTouch = (('ontouchstart' in window) ||
|
||||||
(navigator.MaxTouchPoints > 0) ||
|
(navigator.MaxTouchPoints > 0) ||
|
||||||
(navigator.msMaxTouchPoints > 0));
|
(navigator.msMaxTouchPoints > 0));
|
||||||
|
|
@ -747,17 +715,14 @@
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* returns index of item
|
|
||||||
*/
|
|
||||||
function indexOf(array, item) {
|
|
||||||
return $$1.inArray(item, array);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* returns true if the value is present in the list.
|
* returns true if the value is present in the list.
|
||||||
*/
|
*/
|
||||||
function contains(array, item) {
|
function contains(array, item) {
|
||||||
return indexOf(array, item) !== -1;
|
if (array && array.length && item) {
|
||||||
|
return array.indexOf(item) !== -1;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* get sum from a list
|
* get sum from a list
|
||||||
|
|
@ -847,22 +812,22 @@
|
||||||
* @param {Array} array
|
* @param {Array} array
|
||||||
*/
|
*/
|
||||||
function next(array, item) {
|
function next(array, item) {
|
||||||
var idx = indexOf(array, item);
|
if (array && array.length && item) {
|
||||||
if (idx === -1) {
|
var idx = array.indexOf(item);
|
||||||
return null;
|
return idx === -1 ? null : array[idx + 1];
|
||||||
}
|
}
|
||||||
return array[idx + 1];
|
return null;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* returns prev item.
|
* returns prev item.
|
||||||
* @param {Array} array
|
* @param {Array} array
|
||||||
*/
|
*/
|
||||||
function prev(array, item) {
|
function prev(array, item) {
|
||||||
var idx = indexOf(array, item);
|
if (array && array.length && item) {
|
||||||
if (idx === -1) {
|
var idx = array.indexOf(item);
|
||||||
return null;
|
return idx === -1 ? null : array[idx - 1];
|
||||||
}
|
}
|
||||||
return array[idx - 1];
|
return null;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @class core.list
|
* @class core.list
|
||||||
|
|
@ -1156,10 +1121,9 @@
|
||||||
function commonAncestor(nodeA, nodeB) {
|
function commonAncestor(nodeA, nodeB) {
|
||||||
var ancestors = listAncestor(nodeA);
|
var ancestors = listAncestor(nodeA);
|
||||||
for (var n = nodeB; n; n = n.parentNode) {
|
for (var n = nodeB; n; n = n.parentNode) {
|
||||||
if ($$1.inArray(n, ancestors) > -1) {
|
if (ancestors.indexOf(n) > -1)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return null; // difference document area
|
return null; // difference document area
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -1762,7 +1726,7 @@
|
||||||
var isBlockNode = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);
|
var isBlockNode = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);
|
||||||
return match + ((isEndOfInlineContainer || isBlockNode) ? '\n' : '');
|
return match + ((isEndOfInlineContainer || isBlockNode) ? '\n' : '');
|
||||||
});
|
});
|
||||||
markup = $$1.trim(markup);
|
markup = markup.trim();
|
||||||
}
|
}
|
||||||
return markup;
|
return markup;
|
||||||
}
|
}
|
||||||
|
|
@ -2242,8 +2206,8 @@
|
||||||
WrappedRange.prototype.nativeRange = function () {
|
WrappedRange.prototype.nativeRange = function () {
|
||||||
if (env.isW3CRangeSupport) {
|
if (env.isW3CRangeSupport) {
|
||||||
var w3cRange = document.createRange();
|
var w3cRange = document.createRange();
|
||||||
w3cRange.setStart(this.sc, this.so);
|
w3cRange.setStart(this.sc, this.sc.data && this.so > this.sc.data.length ? 0 : this.so);
|
||||||
w3cRange.setEnd(this.ec, this.eo);
|
w3cRange.setEnd(this.ec, this.sc.data ? Math.min(this.eo, this.sc.data.length) : this.eo);
|
||||||
return w3cRange;
|
return w3cRange;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -2313,16 +2277,28 @@
|
||||||
WrappedRange.prototype.normalize = function () {
|
WrappedRange.prototype.normalize = function () {
|
||||||
/**
|
/**
|
||||||
* @param {BoundaryPoint} point
|
* @param {BoundaryPoint} point
|
||||||
* @param {Boolean} isLeftToRight
|
* @param {Boolean} isLeftToRight - true: prefer to choose right node
|
||||||
|
* - false: prefer to choose left node
|
||||||
* @return {BoundaryPoint}
|
* @return {BoundaryPoint}
|
||||||
*/
|
*/
|
||||||
var getVisiblePoint = function (point, isLeftToRight) {
|
var getVisiblePoint = function (point, isLeftToRight) {
|
||||||
if ((dom.isVisiblePoint(point) && !dom.isEdgePoint(point)) ||
|
// Just use the given point [XXX:Adhoc]
|
||||||
(dom.isVisiblePoint(point) && dom.isRightEdgePoint(point) && !isLeftToRight) ||
|
// - case 01. if the point is on the middle of the node
|
||||||
(dom.isVisiblePoint(point) && dom.isLeftEdgePoint(point) && isLeftToRight) ||
|
// - case 02. if the point is on the right edge and prefer to choose left node
|
||||||
(dom.isVisiblePoint(point) && dom.isBlock(point.node) && dom.isEmpty(point.node))) {
|
// - case 03. if the point is on the left edge and prefer to choose right node
|
||||||
|
// - case 04. if the point is on the right edge and prefer to choose right node but the node is void
|
||||||
|
// - case 05. if the point is on the left edge and prefer to choose left node but the node is void
|
||||||
|
// - case 06. if the point is on the block node and there is no children
|
||||||
|
if (dom.isVisiblePoint(point)) {
|
||||||
|
if (!dom.isEdgePoint(point) ||
|
||||||
|
(dom.isRightEdgePoint(point) && !isLeftToRight) ||
|
||||||
|
(dom.isLeftEdgePoint(point) && isLeftToRight) ||
|
||||||
|
(dom.isRightEdgePoint(point) && isLeftToRight && dom.isVoid(point.node.nextSibling)) ||
|
||||||
|
(dom.isLeftEdgePoint(point) && !isLeftToRight && dom.isVoid(point.node.previousSibling)) ||
|
||||||
|
(dom.isBlock(point.node) && dom.isEmpty(point.node))) {
|
||||||
return point;
|
return point;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// point on block's edge
|
// point on block's edge
|
||||||
var block = dom.ancestor(point.node, dom.isBlock);
|
var block = dom.ancestor(point.node, dom.isBlock);
|
||||||
if (((dom.isLeftEdgePointOf(point, block) || dom.isVoid(dom.prevPoint(point).node)) && !isLeftToRight) ||
|
if (((dom.isLeftEdgePointOf(point, block) || dom.isVoid(dom.prevPoint(point).node)) && !isLeftToRight) ||
|
||||||
|
|
@ -3164,7 +3140,7 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var orderedTypes = ['circle', 'disc', 'disc-leading-zero', 'square'];
|
var orderedTypes = ['circle', 'disc', 'disc-leading-zero', 'square'];
|
||||||
var isUnordered = $$1.inArray(styleInfo['list-style-type'], orderedTypes) > -1;
|
var isUnordered = orderedTypes.indexOf(styleInfo['list-style-type']) > -1;
|
||||||
styleInfo['list-style'] = isUnordered ? 'unordered' : 'ordered';
|
styleInfo['list-style'] = isUnordered ? 'unordered' : 'ordered';
|
||||||
}
|
}
|
||||||
var para = dom.ancestor(rng.sc, dom.isPara);
|
var para = dom.ancestor(rng.sc, dom.isPara);
|
||||||
|
|
@ -4723,9 +4699,13 @@
|
||||||
};
|
};
|
||||||
Editor.prototype.onFormatBlock = function (tagName, $target) {
|
Editor.prototype.onFormatBlock = function (tagName, $target) {
|
||||||
// [workaround] for MSIE, IE need `<`
|
// [workaround] for MSIE, IE need `<`
|
||||||
tagName = env.isMSIE ? '<' + tagName + '>' : tagName;
|
document.execCommand('FormatBlock', false, env.isMSIE ? '<' + tagName + '>' : tagName);
|
||||||
document.execCommand('FormatBlock', false, tagName);
|
|
||||||
// support custom class
|
// support custom class
|
||||||
|
if ($target && $target.length) {
|
||||||
|
// find the exact element has given tagName
|
||||||
|
if ($target[0].tagName.toUpperCase() !== tagName.toUpperCase()) {
|
||||||
|
$target = $target.find(tagName);
|
||||||
|
}
|
||||||
if ($target && $target.length) {
|
if ($target && $target.length) {
|
||||||
var className = $target[0].className || '';
|
var className = $target[0].className || '';
|
||||||
if (className) {
|
if (className) {
|
||||||
|
|
@ -4734,6 +4714,7 @@
|
||||||
$parent.addClass(className);
|
$parent.addClass(className);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
Editor.prototype.formatPara = function () {
|
Editor.prototype.formatPara = function () {
|
||||||
this.formatBlock('P');
|
this.formatBlock('P');
|
||||||
|
|
@ -5035,15 +5016,8 @@
|
||||||
|
|
||||||
var CodeMirror;
|
var CodeMirror;
|
||||||
if (env.hasCodeMirror) {
|
if (env.hasCodeMirror) {
|
||||||
if (env.isSupportAmd) {
|
|
||||||
require(['codemirror'], function (cm) {
|
|
||||||
CodeMirror = cm;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
CodeMirror = window.CodeMirror;
|
CodeMirror = window.CodeMirror;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* @class Codeview
|
* @class Codeview
|
||||||
*/
|
*/
|
||||||
|
|
@ -5099,7 +5073,7 @@
|
||||||
for (var _i = 0, whitelist_2 = whitelist_1; _i < whitelist_2.length; _i++) {
|
for (var _i = 0, whitelist_2 = whitelist_1; _i < whitelist_2.length; _i++) {
|
||||||
var src = whitelist_2[_i];
|
var src = whitelist_2[_i];
|
||||||
// pass if src is trusted
|
// pass if src is trusted
|
||||||
if ((new RegExp('src="(https?:)?\/\/' + src + '\/(.+)"')).test(tag)) {
|
if ((new RegExp('src="(https?:)?\/\/' + src.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '\/(.+)"')).test(tag)) {
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5273,7 +5247,7 @@
|
||||||
this.lang = this.options.langInfo;
|
this.lang = this.options.langInfo;
|
||||||
this.events = {
|
this.events = {
|
||||||
'summernote.mousedown': function (we, e) {
|
'summernote.mousedown': function (we, e) {
|
||||||
if (_this.update(e.target)) {
|
if (_this.update(e.target, e)) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -5339,13 +5313,13 @@
|
||||||
Handle.prototype.destroy = function () {
|
Handle.prototype.destroy = function () {
|
||||||
this.$handle.remove();
|
this.$handle.remove();
|
||||||
};
|
};
|
||||||
Handle.prototype.update = function (target) {
|
Handle.prototype.update = function (target, event) {
|
||||||
if (this.context.isDisabled()) {
|
if (this.context.isDisabled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var isImage = dom.isImg(target);
|
var isImage = dom.isImg(target);
|
||||||
var $selection = this.$handle.find('.note-control-selection');
|
var $selection = this.$handle.find('.note-control-selection');
|
||||||
this.context.invoke('imagePopover.update', target);
|
this.context.invoke('imagePopover.update', target, event);
|
||||||
if (isImage) {
|
if (isImage) {
|
||||||
var $image = $$1(target);
|
var $image = $$1(target);
|
||||||
var position = $image.position();
|
var position = $image.position();
|
||||||
|
|
@ -5621,7 +5595,7 @@
|
||||||
Buttons.prototype.isFontDeservedToAdd = function (name) {
|
Buttons.prototype.isFontDeservedToAdd = function (name) {
|
||||||
var genericFamilies = ['sans-serif', 'serif', 'monospace', 'cursive', 'fantasy'];
|
var genericFamilies = ['sans-serif', 'serif', 'monospace', 'cursive', 'fantasy'];
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
return ((name !== '') && this.isFontInstalled(name) && ($$1.inArray(name, genericFamilies) === -1));
|
return (name !== '' && this.isFontInstalled(name) && genericFamilies.indexOf(name) === -1);
|
||||||
};
|
};
|
||||||
Buttons.prototype.colorPalette = function (className, tooltip, backColor, foreColor) {
|
Buttons.prototype.colorPalette = function (className, tooltip, backColor, foreColor) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
@ -5886,7 +5860,7 @@
|
||||||
$$1.each(styleInfo['font-family'].split(','), function (idx, fontname) {
|
$$1.each(styleInfo['font-family'].split(','), function (idx, fontname) {
|
||||||
fontname = fontname.trim().replace(/['"]+/g, '');
|
fontname = fontname.trim().replace(/['"]+/g, '');
|
||||||
if (_this.isFontDeservedToAdd(fontname)) {
|
if (_this.isFontDeservedToAdd(fontname)) {
|
||||||
if ($$1.inArray(fontname, _this.options.fontNames) === -1) {
|
if (_this.options.fontNames.indexOf(fontname) === -1) {
|
||||||
_this.options.fontNames.push(fontname);
|
_this.options.fontNames.push(fontname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6284,8 +6258,8 @@
|
||||||
Buttons.prototype.build = function ($container, groups) {
|
Buttons.prototype.build = function ($container, groups) {
|
||||||
for (var groupIdx = 0, groupLen = groups.length; groupIdx < groupLen; groupIdx++) {
|
for (var groupIdx = 0, groupLen = groups.length; groupIdx < groupLen; groupIdx++) {
|
||||||
var group = groups[groupIdx];
|
var group = groups[groupIdx];
|
||||||
var groupName = $$1.isArray(group) ? group[0] : group;
|
var groupName = Array.isArray(group) ? group[0] : group;
|
||||||
var buttons = $$1.isArray(group) ? ((group.length === 1) ? [group[0]] : group[1]) : [group];
|
var buttons = Array.isArray(group) ? ((group.length === 1) ? [group[0]] : group[1]) : [group];
|
||||||
var $group = this.ui.buttonGroup({
|
var $group = this.ui.buttonGroup({
|
||||||
className: 'note-' + groupName
|
className: 'note-' + groupName
|
||||||
}).render();
|
}).render();
|
||||||
|
|
@ -6606,30 +6580,23 @@
|
||||||
.find('.sn-checkbox-open-in-new-window input[type=checkbox]');
|
.find('.sn-checkbox-open-in-new-window input[type=checkbox]');
|
||||||
_this.ui.onDialogShown(_this.$dialog, function () {
|
_this.ui.onDialogShown(_this.$dialog, function () {
|
||||||
_this.context.triggerEvent('dialog.shown');
|
_this.context.triggerEvent('dialog.shown');
|
||||||
// if no url was given and given text is valid URL then copy that into URL Field
|
// If no url was given and given text is valid URL then copy that into URL Field
|
||||||
if (!linkInfo.url && func.isValidUrl(linkInfo.text)) {
|
if (!linkInfo.url && func.isValidUrl(linkInfo.text)) {
|
||||||
linkInfo.url = linkInfo.text;
|
linkInfo.url = linkInfo.text;
|
||||||
}
|
}
|
||||||
$linkText.val(linkInfo.text);
|
$linkText.on('input paste propertychange', function () {
|
||||||
var handleLinkTextUpdate = function () {
|
// If linktext was modified by input events,
|
||||||
_this.toggleLinkBtn($linkBtn, $linkText, $linkUrl);
|
// cloning text from linkUrl will be stopped.
|
||||||
// if linktext was modified by keyup,
|
|
||||||
// stop cloning text from linkUrl
|
|
||||||
linkInfo.text = $linkText.val();
|
linkInfo.text = $linkText.val();
|
||||||
};
|
|
||||||
$linkText.on('input', handleLinkTextUpdate).on('paste', function () {
|
|
||||||
setTimeout(handleLinkTextUpdate, 0);
|
|
||||||
});
|
|
||||||
var handleLinkUrlUpdate = function () {
|
|
||||||
_this.toggleLinkBtn($linkBtn, $linkText, $linkUrl);
|
_this.toggleLinkBtn($linkBtn, $linkText, $linkUrl);
|
||||||
// display same link on `Text to display` input
|
}).val(linkInfo.text);
|
||||||
// when create a new link
|
$linkUrl.on('input paste propertychange', function () {
|
||||||
|
// Display same text on `Text to display` as default
|
||||||
|
// when linktext has no text
|
||||||
if (!linkInfo.text) {
|
if (!linkInfo.text) {
|
||||||
$linkText.val($linkUrl.val());
|
$linkText.val($linkUrl.val());
|
||||||
}
|
}
|
||||||
};
|
_this.toggleLinkBtn($linkBtn, $linkText, $linkUrl);
|
||||||
$linkUrl.on('input', handleLinkUrlUpdate).on('paste', function () {
|
|
||||||
setTimeout(handleLinkUrlUpdate, 0);
|
|
||||||
}).val(linkInfo.url);
|
}).val(linkInfo.url);
|
||||||
if (!env.isSupportTouch) {
|
if (!env.isSupportTouch) {
|
||||||
$linkUrl.trigger('focus');
|
$linkUrl.trigger('focus');
|
||||||
|
|
@ -6653,9 +6620,9 @@
|
||||||
});
|
});
|
||||||
_this.ui.onDialogHidden(_this.$dialog, function () {
|
_this.ui.onDialogHidden(_this.$dialog, function () {
|
||||||
// detach events
|
// detach events
|
||||||
$linkText.off('input paste keypress');
|
$linkText.off();
|
||||||
$linkUrl.off('input paste keypress');
|
$linkUrl.off();
|
||||||
$linkBtn.off('click');
|
$linkBtn.off();
|
||||||
if (deferred.state() === 'pending') {
|
if (deferred.state() === 'pending') {
|
||||||
deferred.reject();
|
deferred.reject();
|
||||||
}
|
}
|
||||||
|
|
@ -6833,23 +6800,22 @@
|
||||||
$imageInput.replaceWith($imageInput.clone().on('change', function (event) {
|
$imageInput.replaceWith($imageInput.clone().on('change', function (event) {
|
||||||
deferred.resolve(event.target.files || event.target.value);
|
deferred.resolve(event.target.files || event.target.value);
|
||||||
}).val(''));
|
}).val(''));
|
||||||
$imageBtn.click(function (event) {
|
$imageUrl.on('input paste propertychange', function () {
|
||||||
event.preventDefault();
|
_this.ui.toggleBtn($imageBtn, $imageUrl.val());
|
||||||
deferred.resolve($imageUrl.val());
|
|
||||||
});
|
|
||||||
$imageUrl.on('keyup paste', function () {
|
|
||||||
var url = $imageUrl.val();
|
|
||||||
_this.ui.toggleBtn($imageBtn, url);
|
|
||||||
}).val('');
|
}).val('');
|
||||||
if (!env.isSupportTouch) {
|
if (!env.isSupportTouch) {
|
||||||
$imageUrl.trigger('focus');
|
$imageUrl.trigger('focus');
|
||||||
}
|
}
|
||||||
|
$imageBtn.click(function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
deferred.resolve($imageUrl.val());
|
||||||
|
});
|
||||||
_this.bindEnterKey($imageUrl, $imageBtn);
|
_this.bindEnterKey($imageUrl, $imageBtn);
|
||||||
});
|
});
|
||||||
_this.ui.onDialogHidden(_this.$dialog, function () {
|
_this.ui.onDialogHidden(_this.$dialog, function () {
|
||||||
$imageInput.off('change');
|
$imageInput.off();
|
||||||
$imageUrl.off('keyup paste keypress');
|
$imageUrl.off();
|
||||||
$imageBtn.off('click');
|
$imageBtn.off();
|
||||||
if (deferred.state() === 'pending') {
|
if (deferred.state() === 'pending') {
|
||||||
deferred.reject();
|
deferred.reject();
|
||||||
}
|
}
|
||||||
|
|
@ -6891,7 +6857,7 @@
|
||||||
ImagePopover.prototype.destroy = function () {
|
ImagePopover.prototype.destroy = function () {
|
||||||
this.$popover.remove();
|
this.$popover.remove();
|
||||||
};
|
};
|
||||||
ImagePopover.prototype.update = function (target) {
|
ImagePopover.prototype.update = function (target, event) {
|
||||||
if (dom.isImg(target)) {
|
if (dom.isImg(target)) {
|
||||||
var pos = dom.posFromPlaceholder(target);
|
var pos = dom.posFromPlaceholder(target);
|
||||||
var posEditor = dom.posFromPlaceholder(this.editable);
|
var posEditor = dom.posFromPlaceholder(this.editable);
|
||||||
|
|
@ -7145,7 +7111,7 @@
|
||||||
var $videoBtn = _this.$dialog.find('.note-video-btn');
|
var $videoBtn = _this.$dialog.find('.note-video-btn');
|
||||||
_this.ui.onDialogShown(_this.$dialog, function () {
|
_this.ui.onDialogShown(_this.$dialog, function () {
|
||||||
_this.context.triggerEvent('dialog.shown');
|
_this.context.triggerEvent('dialog.shown');
|
||||||
$videoUrl.val(text).on('input', function () {
|
$videoUrl.on('input paste propertychange', function () {
|
||||||
_this.ui.toggleBtn($videoBtn, $videoUrl.val());
|
_this.ui.toggleBtn($videoBtn, $videoUrl.val());
|
||||||
});
|
});
|
||||||
if (!env.isSupportTouch) {
|
if (!env.isSupportTouch) {
|
||||||
|
|
@ -7158,8 +7124,8 @@
|
||||||
_this.bindEnterKey($videoUrl, $videoBtn);
|
_this.bindEnterKey($videoUrl, $videoBtn);
|
||||||
});
|
});
|
||||||
_this.ui.onDialogHidden(_this.$dialog, function () {
|
_this.ui.onDialogHidden(_this.$dialog, function () {
|
||||||
$videoUrl.off('input');
|
$videoUrl.off();
|
||||||
$videoBtn.off('click');
|
$videoBtn.off();
|
||||||
if (deferred.state() === 'pending') {
|
if (deferred.state() === 'pending') {
|
||||||
deferred.reject();
|
deferred.reject();
|
||||||
}
|
}
|
||||||
|
|
@ -7183,7 +7149,7 @@
|
||||||
var $container = this.options.dialogsInBody ? this.$body : this.$editor;
|
var $container = this.options.dialogsInBody ? this.$body : this.$editor;
|
||||||
var body = [
|
var body = [
|
||||||
'<p class="text-center">',
|
'<p class="text-center">',
|
||||||
'<a href="http://summernote.org/" target="_blank">Summernote 0.8.11</a> · ',
|
'<a href="http://summernote.org/" target="_blank">Summernote 0.8.12</a> · ',
|
||||||
'<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ',
|
'<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ',
|
||||||
'<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',
|
'<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',
|
||||||
'</p>',
|
'</p>',
|
||||||
|
|
@ -7316,7 +7282,7 @@
|
||||||
this.options = context.options;
|
this.options = context.options;
|
||||||
this.hint = this.options.hint || [];
|
this.hint = this.options.hint || [];
|
||||||
this.direction = this.options.hintDirection || 'bottom';
|
this.direction = this.options.hintDirection || 'bottom';
|
||||||
this.hints = $$1.isArray(this.hint) ? this.hint : [this.hint];
|
this.hints = Array.isArray(this.hint) ? this.hint : [this.hint];
|
||||||
this.events = {
|
this.events = {
|
||||||
'summernote.keyup': function (we, e) {
|
'summernote.keyup': function (we, e) {
|
||||||
if (!e.isDefaultPrevented()) {
|
if (!e.isDefaultPrevented()) {
|
||||||
|
|
@ -7507,7 +7473,7 @@
|
||||||
}());
|
}());
|
||||||
|
|
||||||
$$1.summernote = $$1.extend($$1.summernote, {
|
$$1.summernote = $$1.extend($$1.summernote, {
|
||||||
version: '0.8.11',
|
version: '0.8.12',
|
||||||
plugins: {},
|
plugins: {},
|
||||||
dom: dom,
|
dom: dom,
|
||||||
range: range,
|
range: range,
|
||||||
|
|
@ -7541,7 +7507,7 @@
|
||||||
},
|
},
|
||||||
buttons: {},
|
buttons: {},
|
||||||
lang: 'en-US',
|
lang: 'en-US',
|
||||||
followingToolbar: true,
|
followingToolbar: false,
|
||||||
otherStaticBar: '',
|
otherStaticBar: '',
|
||||||
// toolbar
|
// toolbar
|
||||||
toolbar: [
|
toolbar: [
|
||||||
|
|
@ -7667,7 +7633,8 @@
|
||||||
codeviewIframeFilter: true,
|
codeviewIframeFilter: true,
|
||||||
codeviewIframeWhitelistSrc: [],
|
codeviewIframeWhitelistSrc: [],
|
||||||
codeviewIframeWhitelistSrcBase: [
|
codeviewIframeWhitelistSrcBase: [
|
||||||
'www.youtube(?:-nocookie)?.com',
|
'www.youtube.com',
|
||||||
|
'www.youtube-nocookie.com',
|
||||||
'www.facebook.com',
|
'www.facebook.com',
|
||||||
'vine.co',
|
'vine.co',
|
||||||
'instagram.com',
|
'instagram.com',
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -145,3 +145,17 @@ body.signin {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control{
|
||||||
|
border-radius: 1px!important;
|
||||||
|
padding: 6px 12px!important;
|
||||||
|
height: 34px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:focus{
|
||||||
|
border-color: #1ab394 !important;
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
||||||
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}
|
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important}
|
||||||
|
|
@ -4,8 +4,16 @@
|
||||||
* NAME - blue/green/purple/red/yellow
|
* NAME - blue/green/purple/red/yellow
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
.nav-tabs {
|
||||||
|
border-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar .navbar-toolbar>li>a {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
/** 蓝色主题 skin-blue **/
|
/** 蓝色主题 skin-blue **/
|
||||||
.skin-blue .navbar {
|
.navbar, .skin-blue .navbar {
|
||||||
background-color: #3c8dbc
|
background-color: #3c8dbc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,7 +101,7 @@
|
||||||
background: #1a2226
|
background: #1a2226
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-blue .nav>li.active {
|
.skin-blue .nav:not(.navbar-toolbar)>li.active {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #293846;
|
background: #293846;
|
||||||
border-left: 3px solid #3c8dbc;
|
border-left: 3px solid #3c8dbc;
|
||||||
|
|
@ -103,9 +111,11 @@
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-blue .nav>li>.treeview-menu {
|
.skin-blue .dropdown-menu > .active > a, .skin-blue .dropdown-menu > .active > a:hover, .skin-blue .dropdown-menu > .active > a:focus {
|
||||||
margin: 0 1px;
|
color: #fff !important;
|
||||||
background: #2c3b41
|
text-decoration: none;
|
||||||
|
outline: 0;
|
||||||
|
background-color: #3c8dbc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-blue .sidebar a {
|
.skin-blue .sidebar a {
|
||||||
|
|
@ -116,15 +126,6 @@
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-blue .treeview-menu>li>a {
|
|
||||||
color: #8aa4af
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-blue .treeview-menu>li.active>a,
|
|
||||||
.skin-blue .treeview-menu>li>a:hover {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-blue .sidebar-form {
|
.skin-blue .sidebar-form {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #374850;
|
border: 1px solid #374850;
|
||||||
|
|
@ -282,7 +283,7 @@
|
||||||
background: #1a2226;
|
background: #1a2226;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-green .nav>li.active {
|
.skin-green .nav:not(.navbar-toolbar)>li.active {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #293846;
|
background: #293846;
|
||||||
border-left: 3px solid #00a65a;
|
border-left: 3px solid #00a65a;
|
||||||
|
|
@ -292,9 +293,11 @@
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-green .nav>li>.treeview-menu {
|
.skin-green .dropdown-menu > .active > a, .skin-green .dropdown-menu > .active > a:hover, .skin-green .dropdown-menu > .active > a:focus {
|
||||||
margin: 0 1px;
|
color: #fff !important;
|
||||||
background: #2c3b41
|
text-decoration: none;
|
||||||
|
outline: 0;
|
||||||
|
background-color: #00a65a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-green .sidebar a {
|
.skin-green .sidebar a {
|
||||||
|
|
@ -305,15 +308,6 @@
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-green .treeview-menu>li>a {
|
|
||||||
color: #8aa4af
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-green .treeview-menu>li.active>a,
|
|
||||||
.skin-green .treeview-menu>li>a:hover {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-green .sidebar-form {
|
.skin-green .sidebar-form {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #374850;
|
border: 1px solid #374850;
|
||||||
|
|
@ -443,7 +437,7 @@
|
||||||
background: #1a2226
|
background: #1a2226
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-red .nav>li.active {
|
.skin-red .nav:not(.navbar-toolbar)>li.active {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-left: 3px solid #dd4b39;
|
border-left: 3px solid #dd4b39;
|
||||||
background: #293846;
|
background: #293846;
|
||||||
|
|
@ -453,13 +447,15 @@
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-red .content-tabs {
|
.skin-red .dropdown-menu > .active > a, .skin-red .dropdown-menu > .active > a:hover, .skin-red .dropdown-menu > .active > a:focus {
|
||||||
border-bottom: 1px solid #e5e5e5;
|
color: #fff !important;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: 0;
|
||||||
|
background-color: #dd4b39;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-red .nav>li>.treeview-menu {
|
.skin-red .content-tabs {
|
||||||
margin: 0 1px;
|
border-bottom: 1px solid #e5e5e5;
|
||||||
background: #2c3b41
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-red .sidebar a {
|
.skin-red .sidebar a {
|
||||||
|
|
@ -470,15 +466,6 @@
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-red .treeview-menu>li>a {
|
|
||||||
color: #8aa4af
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-red .treeview-menu>li.active>a,
|
|
||||||
.skin-red .treeview-menu>li>a:hover {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-red .sidebar-form {
|
.skin-red .sidebar-form {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #374850;
|
border: 1px solid #374850;
|
||||||
|
|
@ -608,7 +595,7 @@
|
||||||
background: #1a2226
|
background: #1a2226
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-yellow .nav>li.active {
|
.skin-yellow .nav:not(.navbar-toolbar)>li.active {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #293846;
|
background: #293846;
|
||||||
border-left: 3px solid #f39c12;
|
border-left: 3px solid #f39c12;
|
||||||
|
|
@ -618,13 +605,15 @@
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-yellow .content-tabs {
|
.skin-yellow .dropdown-menu > .active > a, .skin-yellow .dropdown-menu > .active > a:hover, .skin-yellow .dropdown-menu > .active > a:focus {
|
||||||
border-bottom: 1px solid #e5e5e5;
|
color: #fff !important;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: 0;
|
||||||
|
background-color: #f39c12;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-yellow .nav>li>.treeview-menu {
|
.skin-yellow .content-tabs {
|
||||||
margin: 0 1px;
|
border-bottom: 1px solid #e5e5e5;
|
||||||
background: #2c3b41
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-yellow .sidebar a {
|
.skin-yellow .sidebar a {
|
||||||
|
|
@ -635,15 +624,6 @@
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-yellow .treeview-menu>li>a {
|
|
||||||
color: #8aa4af
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-yellow .treeview-menu>li.active>a,
|
|
||||||
.skin-yellow .treeview-menu>li>a:hover {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-yellow .sidebar-form {
|
.skin-yellow .sidebar-form {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #374850;
|
border: 1px solid #374850;
|
||||||
|
|
@ -773,7 +753,7 @@
|
||||||
background: #1a2226
|
background: #1a2226
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-purple .nav>li.active {
|
.skin-purple .nav:not(.navbar-toolbar)>li.active {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #293846;
|
background: #293846;
|
||||||
border-left: 3px solid #605ca8;
|
border-left: 3px solid #605ca8;
|
||||||
|
|
@ -783,13 +763,15 @@
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-purple .content-tabs {
|
.skin-purple .dropdown-menu > .active > a, .skin-purple .dropdown-menu > .active > a:hover, .skin-purple .dropdown-menu > .active > a:focus {
|
||||||
border-bottom: 1px solid #e5e5e5;
|
color: #fff !important;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: 0;
|
||||||
|
background-color: #605ca8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-purple .nav>li>.treeview-menu {
|
.skin-purple .content-tabs {
|
||||||
margin: 0 1px;
|
border-bottom: 1px solid #e5e5e5;
|
||||||
background: #2c3b41
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-purple .sidebar a {
|
.skin-purple .sidebar a {
|
||||||
|
|
@ -800,15 +782,6 @@
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-purple .treeview-menu>li>a {
|
|
||||||
color: #8aa4af
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-purple .treeview-menu>li.active>a,
|
|
||||||
.skin-purple .treeview-menu>li>a:hover {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.skin-purple .sidebar-form {
|
.skin-purple .sidebar-form {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #374850;
|
border: 1px solid #374850;
|
||||||
|
|
@ -855,12 +828,12 @@
|
||||||
* NAME - .theme-dark/theme-light
|
* NAME - .theme-dark/theme-light
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/** 深色主题 .theme-dark **/
|
/** 深黑主题 .theme-dark **/
|
||||||
.theme-dark .user-panel>.info>p, .theme-dark .user-panel>.info, .theme-dark .user-panel>.info>a{
|
.theme-dark .user-panel>.info>p, .theme-dark .user-panel>.info, .theme-dark .user-panel>.info>a{
|
||||||
color: #fff
|
color: #fff
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-dark .nav>li.active {
|
.theme-dark .nav:not(.navbar-toolbar)>li.active {
|
||||||
background: #293846;
|
background: #293846;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -882,7 +855,7 @@
|
||||||
color: #555
|
color: #555
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-light .nav>li.active{
|
.theme-light .nav:not(.navbar-toolbar)>li.active{
|
||||||
background: #f9fafc;
|
background: #f9fafc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -962,3 +935,94 @@
|
||||||
background-color: #f9fafc;
|
background-color: #f9fafc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 深蓝主题 theme-light **/
|
||||||
|
/**
|
||||||
|
.skin-blue.theme-blue .logo, .skin-white.theme-blue .logo {
|
||||||
|
background-color: rgba(15,41,80,1) !important;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
**/
|
||||||
|
.theme-blue .user-panel>.info>p, .theme-blue .user-panel>.info, .theme-blue .user-panel>.info>a{
|
||||||
|
color: #a3b1cc
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue .nav:not(.navbar-toolbar)>li.active{
|
||||||
|
background-color: rgba(15,41,80,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue .navbar-static-side {
|
||||||
|
background-color: rgba(15,41,80,1);
|
||||||
|
box-shadow: 2px 0 2px 0 rgba(29,35,41,.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue .user-panel {
|
||||||
|
background-color: rgba(15,41,80,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue .navbar-default .nav>li>a {
|
||||||
|
color: #a3b1cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-blue .navbar-default .nav>li.active>a {
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-blue .navbar-default .nav>li.selected>a,
|
||||||
|
.theme-blue.skin-blue .navbar-default .nav>li.selected>a:focus {
|
||||||
|
background-color: #1890ff;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-green .navbar-default .nav>li.active>a {
|
||||||
|
color: #52c41a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-green .navbar-default .nav>li.selected>a,
|
||||||
|
.theme-blue.skin-green .navbar-default .nav>li.selected>a:focus {
|
||||||
|
background-color: #52c41a;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-purple .navbar-default .nav>li.active>a {
|
||||||
|
color: rgb(114, 46, 209);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-purple .navbar-default .nav>li.selected>a,
|
||||||
|
.theme-blue.skin-purple .navbar-default .nav>li.selected>a:focus {
|
||||||
|
background-color: #722ed1;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-red .navbar-default .nav>li.active>a {
|
||||||
|
color: rgb(245, 34, 45);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-red .navbar-default .nav>li.selected>a,
|
||||||
|
.theme-blue.skin-red .navbar-default .nav>li.selected>a:focus {
|
||||||
|
background-color: #f5222d;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-yellow .navbar-default .nav>li.active>a {
|
||||||
|
color: rgb(250, 173, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue.skin-yellow .navbar-default .nav>li.selected>a,
|
||||||
|
.theme-blue.skin-yellow .navbar-default .nav>li.selected>a:focus {
|
||||||
|
background-color: #faad14;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-blue .navbar-default .nav>li>a:hover,
|
||||||
|
.theme-blue .navbar-default .nav>li>a:focus {
|
||||||
|
background-color: rgba(15,41,80,1);
|
||||||
|
box-shadow: 2px 0 2px 0 rgba(29,35,41,.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-sidebar.theme-blue.mini-navbar .nav li:hover>a> span.nav-label {
|
||||||
|
background-color: rgba(15,41,80,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-sidebar.theme-blue.mini-navbar .nav li:hover>.nav-second-level {
|
||||||
|
background-color: rgba(15,41,80,1);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,18 +46,18 @@ a:focus {
|
||||||
/*white-space: nowrap;*/
|
/*white-space: nowrap;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav.navbar-right>li>a {
|
.nav.navbar-right>li>a, .nav.navbar-left>li>a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
padding: 18px 15px;
|
padding: 15px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav>li.active>a {
|
.nav>li.active>a {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav.navbar-right>li>a>.label {
|
.nav.navbar-right>li>a>.label, .nav.navbar-left>li>a>.label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 9px;
|
top: 9px;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
|
|
@ -66,7 +66,7 @@ a:focus {
|
||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
line-height: .9;
|
line-height: .9;
|
||||||
}
|
}
|
||||||
.nav.navbar-right>li>a:hover {
|
.nav.navbar-right>li>a:hover, .nav.navbar-left>li>a:hover {
|
||||||
background-color: #367fa9;
|
background-color: #367fa9;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
@ -280,6 +280,8 @@ body.body-small .navbar-top-links li:last-child {
|
||||||
|
|
||||||
.nav-second-level li, .nav-third-level li {
|
.nav-second-level li, .nav-third-level li {
|
||||||
border-bottom: none !important;
|
border-bottom: none !important;
|
||||||
|
padding-left: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-second-level li a {
|
.nav-second-level li a {
|
||||||
|
|
@ -288,7 +290,7 @@ body.body-small .navbar-top-links li:last-child {
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-third-level li a {
|
.nav-third-level li a {
|
||||||
padding-left: 62px;
|
padding-left: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-second-level li:last-child {
|
.nav-second-level li:last-child {
|
||||||
|
|
@ -307,6 +309,10 @@ body.mini-navbar .navbar-default .nav>li>.nav-second-level li a {
|
||||||
border-radius: 0 2px 2px 0;
|
border-radius: 0 2px 2px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.mini-navbar .navbar-default .nav>li>.nav-third-level li a {
|
||||||
|
padding-left: 31px;
|
||||||
|
}
|
||||||
|
|
||||||
.fixed-nav .slimScrollDiv #side-menu {
|
.fixed-nav .slimScrollDiv #side-menu {
|
||||||
padding-bottom: 60px;
|
padding-bottom: 60px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -473,13 +479,12 @@ body.body-small.fixed-sidebar.mini-navbar .navbar-static-side {
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*伸缩菜单*/
|
/* 伸缩菜单 */
|
||||||
.fixed-sidebar.mini-navbar .nav li:hover>a> span.nav-label {
|
.fixed-sidebar.mini-navbar .nav li:hover>a> span.nav-label {
|
||||||
top: 0px;
|
top: 0px;
|
||||||
padding: 10px 10px 10px 10px;
|
padding: 10px 10px 10px 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #243747;
|
background-color: #243747;
|
||||||
border-bottom: dashed 1px #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-sidebar.mini-navbar .nav li:hover>.nav-second-level {
|
.fixed-sidebar.mini-navbar .nav li:hover>.nav-second-level {
|
||||||
|
|
@ -495,6 +500,15 @@ body.body-small.fixed-sidebar.mini-navbar .navbar-static-side {
|
||||||
min-width: 140px;
|
min-width: 140px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fixed-sidebar.mini-navbar .nav li.active:hover>.nav-second-level, .fixed-sidebar.mini-navbar .nav li.active:hover>a> span.nav-label {
|
||||||
|
left: 67px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-sidebar.mini-navbar .nav .nav-second-level a> span, .fixed-sidebar.mini-navbar .nav .nav-third-level a> span {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
/*伸缩菜单结束*/
|
/*伸缩菜单结束*/
|
||||||
|
|
||||||
body.fixed-sidebar.mini-navbar .navbar-default .nav>li>.nav-second-level li a {
|
body.fixed-sidebar.mini-navbar .navbar-default .nav>li>.nav-second-level li a {
|
||||||
|
|
@ -763,15 +777,15 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-default {
|
.btn-default {
|
||||||
background-color: #c2c2c2;
|
background-color: #f4f4f4;
|
||||||
border-color: #c2c2c2;
|
border-color: #ddd;
|
||||||
color: #FFFFFF;
|
color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
|
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
|
||||||
background-color: #bababa;
|
background-color: #e7e7e7;
|
||||||
border-color: #bababa;
|
border-color: #e7e7e7;
|
||||||
color: #FFFFFF;
|
color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
|
.btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
|
||||||
|
|
@ -865,7 +879,7 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
|
||||||
color: #cacaca;
|
color: #cacaca;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
|
.form-control, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1161,6 +1175,8 @@ button.dim:active:before {
|
||||||
/* TOOLTIPS */
|
/* TOOLTIPS */
|
||||||
.tooltip-inner {
|
.tooltip-inner {
|
||||||
background-color: #2F4050;
|
background-color: #2F4050;
|
||||||
|
word-break: break-all;
|
||||||
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip.top .tooltip-arrow {
|
.tooltip.top .tooltip-arrow {
|
||||||
|
|
@ -1818,18 +1834,23 @@ table.dataTable thead .sorting:after {
|
||||||
.form-control, .single-line {
|
.form-control, .single-line {
|
||||||
background: #FFFFFF none;
|
background: #FFFFFF none;
|
||||||
border: 1px solid #e5e6e7;
|
border: 1px solid #e5e6e7;
|
||||||
border-radius: 1px;
|
border-radius: 4px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 6px 12px;
|
padding: 3px 6px 4px;
|
||||||
-webkit-transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
|
-webkit-transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
|
||||||
transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
|
transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 31px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-control.kv-fileinput-caption {
|
||||||
|
height: 34px!important;
|
||||||
|
}
|
||||||
|
|
||||||
.form-control:focus, .single-line:focus {
|
.form-control:focus, .single-line:focus {
|
||||||
border-color: #1ab394 !important;
|
border-color: #3c8dbc !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.has-success .form-control {
|
.has-success .form-control {
|
||||||
|
|
@ -1858,8 +1879,8 @@ table.dataTable thead .sorting:after {
|
||||||
|
|
||||||
.input-group-addon {
|
.input-group-addon {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid #E5E6E7;
|
border: 1px solid #e5e6e7;
|
||||||
border-radius: 1px;
|
border-radius: 4px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
@ -3249,7 +3270,7 @@ body.body-small .footer.fixed {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 39px;
|
height: 39px;
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
line-height: 38px;
|
line-height: 39px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-tabs .roll-nav, .page-tabs-list {
|
.content-tabs .roll-nav, .page-tabs-list {
|
||||||
|
|
@ -4916,13 +4937,14 @@ dd.project-people {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chat view */
|
/* Chat view */
|
||||||
.message-input {
|
.message-input {
|
||||||
height: 90px !important;
|
height: 90px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-avatar {
|
.chat-avatar {
|
||||||
white: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
@ -4949,9 +4971,10 @@ dd.project-people {
|
||||||
margin-left: -30px;
|
margin-left: -30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media ( max-width : 992px) {
|
@media (max-width: 992px) {
|
||||||
.chat-users, .chat-statistic {
|
.chat-users,
|
||||||
margin-left: 0px;
|
.chat-statistic {
|
||||||
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4971,12 +4994,12 @@ dd.project-people {
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-discussion .chat-message:nth-child(2n+1) .message-avatar {
|
.chat-discussion .chat-message.left .message-avatar {
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-discussion .chat-message:nth-child(2n) .message-avatar {
|
.chat-discussion .chat-message.right .message-avatar {
|
||||||
float: right;
|
float: right;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
@ -4991,20 +5014,20 @@ dd.project-people {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-discussion .chat-message:nth-child(2n+1) .message-date {
|
.chat-discussion .chat-message.left .message-date {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-discussion .chat-message:nth-child(2n) .message-date {
|
.chat-discussion .chat-message.right .message-date {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-discussion .chat-message:nth-child(2n+1) .message {
|
.chat-discussion .chat-message.left .message {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin-left: 55px;
|
margin-left: 55px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-discussion .chat-message:nth-child(2n) .message {
|
.chat-discussion .chat-message.right .message {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-right: 55px;
|
margin-right: 55px;
|
||||||
}
|
}
|
||||||
|
|
@ -5033,6 +5056,7 @@ dd.project-people {
|
||||||
.chat-message-form .form-group {
|
.chat-message-form .form-group {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* jsTree */
|
/* jsTree */
|
||||||
.jstree-open>.jstree-anchor>.fa-folder:before {
|
.jstree-open>.jstree-anchor>.fa-folder:before {
|
||||||
content: "\f07c";
|
content: "\f07c";
|
||||||
|
|
@ -6865,7 +6889,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-header {
|
.navbar-header {
|
||||||
width: 10%;
|
/* width: 10%; */
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6939,7 +6963,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav .logo {
|
nav .logo {
|
||||||
background-color: #367fa9;
|
background-color: #367fa9;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-bottom: 0 solid transparent;
|
border-bottom: 0 solid transparent;
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ user.password.not.valid=* 5-50个字符
|
||||||
user.email.not.valid=邮箱格式错误
|
user.email.not.valid=邮箱格式错误
|
||||||
user.mobile.phone.number.not.valid=手机号格式错误
|
user.mobile.phone.number.not.valid=手机号格式错误
|
||||||
user.login.success=登录成功
|
user.login.success=登录成功
|
||||||
|
user.register.success=注册成功
|
||||||
user.notfound=请重新登录
|
user.notfound=请重新登录
|
||||||
user.forcelogout=管理员强制退出,请重新登录
|
user.forcelogout=管理员强制退出,请重新登录
|
||||||
user.unknown.error=未知错误,请重新登录
|
user.unknown.error=未知错误,请重新登录
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 137 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
||||||
|
(function(c,a,e){var b,d="resizeTabs",f={navSelector:".nav-tabs",itemSelector:">li",dropdownSelector:">.dropdown",dropdownItemSelector:"li",tabParentSelector:"",tabSelector:".tab-pane",activeClassName:"active",noNavClassName:".no-menu",fnCallback:""};b=function(j,i){var h=this.$tabs=e(j),k=this.options=e.extend(true,{},f,i),g=this.$nav=h.find(k.navSelector),l=this.$dropdown=g.find(k.dropdownSelector);this.$items=g.find(k.itemSelector).filter(function(){return !e(this).is(l)});this.$dropdownItems=l.find(k.dropdownItemSelector);if(k.tabParentSelector!==""){this.$tabPanel=e(k.tabParentSelector).find(k.tabSelector)}else{this.$tabPanel=h.find(k.tabSelector)}this.init()};b.prototype={init:function(){var j=this.itemsLenth=this.$items.length,h;if(j===0){throw"There should be some tags here "}if(this.$dropdown.length===0){this.flag=true;this.$nav.append('<li class="dropdown" role="presentation">'+'<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">'+'<i class="glyphicon glyphicon-align-justify"></i> <b class="caret"></b></a><ul class="dropdown-menu" role="menu"></ul></li>');this.$dropdown=this.$nav.find(this.options.dropdownSelector);this.$dropdown.css("opacity",0);h=this.$dropdown.width();h=h===0?90:h;this.$dropdown.addClass("hidden").css("opacity",1)}else{h=this.$dropdown.width()}this.breakpoints=[];for(var g=0;g<j+1;g++){var k=this.$items.eq(g).width(),l=0;switch(g){case 0:l=k+h;break;case j-1:l=this.breakpoints[g-1]+k-h;break;case j:l=this.breakpoints[g-1]+h;break;default:l=this.breakpoints[g-1]+k}this.breakpoints.push(l)}if(typeof this.options.fnCallback==="function"){this.options.fnCallback(this.$tabs)}this.bind();this.layout()},layout:function(){if(this.breakpoints.length<=0){return}var l=this.$tabs.width()-500,j=0,h=this,g=this.options.activeClassName,m=this.$tabPanel.filter("."+g).index(),k=function(p){var o=p;if(p===h.itemsLenth){o=p-1}for(;o<h.itemsLenth;o++){if(h.flag){h.$dropdown.find("ul").append(h.$items.eq(o).prop("outerHTML"))}else{h.$dropdown.find("ul>li"+h.options.noNavClassName+":first").before(h.$items.eq(o).prop("outerHTML"))}h.$items.eq(o).hide()}},n=function(p){for(var o=0;o<h.itemsLenth+1;o++){if(o<p){h.$items.eq(o).show()}else{k(p);h.$dropdown.find("ul>li").show();break}}h.$dropdownItems=h.$dropdown.find(h.options.dropdownItemSelector)};for(;j<this.breakpoints.length;j++){if(this.breakpoints[j]>l){break}}this.$items.removeClass(g);this.$dropdownItems.removeClass(g);this.$dropdown.removeClass(g);if(j===this.breakpoints.length){if(this.flag){this.$dropdown.addClass("hidden")}else{this.$dropdown.find("ul>li:not(li"+this.options.noNavClassName+")").remove()}this.$items.show();if(m!=-1){this.$items.eq(m-1).addClass(g)}}else{this.$dropdown.removeClass("hidden");if(this.flag){this.$dropdown.find("ul>li").remove()}else{this.$dropdown.find("ul>li:not(li"+this.options.noNavClassName+")").remove()}n(j);if(m<j){if(m!=-1){this.$items.eq(m-1).addClass(g)}}else{this.$dropdown.addClass(g);this.$dropdownItems.eq(m-j).addClass(g)}}},throttle:function(h,g){var k=h,j,i=true;return function(){var m=arguments,l=this;if(i){k.apply(l,m);i=false}if(j){return false}j=setInterval(function(){clearInterval(j);j=null;k.apply(l,m)},g||500)}},bind:function(){var g=this;e(c).resize(function(){g.throttle(function(){g.layout()},1000)()})}};e.fn[d]=function(g){if(typeof g==="string"){var i=g,h=Array.prototype.slice.call(arguments,1);if(/^_/.test(i)){console.error("No such method : "+g)}else{return this.each(function(){var j=e.data(this,d);if(j&&typeof j[i]==="function"){j[i].apply(j,h)}})}}else{return this.each(function(){if(!e.data(this,d)){e.data(this,d,new b(this,g))}else{e.data(this,d).init()}})}}})(window,document,jQuery);$("#navMenu").resizeTabs({tabParentSelector:"#side-menu"});
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -322,12 +322,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表单验证 样式布局 **/
|
/** 表单验证 样式布局 **/
|
||||||
|
.control-label.is-required:before {
|
||||||
|
content: '* ';
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
label.error {
|
label.error {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 18px;
|
right: 18px;
|
||||||
top: 10px;
|
top: 6px;
|
||||||
color: #ef392b;
|
color: #ef392b;
|
||||||
font-size: 12px
|
font-size: 12px;
|
||||||
|
z-index:99;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group label.error {
|
.input-group label.error {
|
||||||
|
|
@ -335,12 +341,16 @@ label.error {
|
||||||
right: 42px
|
right: 42px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group input.error + label.error + .input-group-addon>i {
|
||||||
|
color: #ed5565;
|
||||||
|
}
|
||||||
|
|
||||||
.input-group.date label.error {
|
.input-group.date label.error {
|
||||||
z-index:99;
|
z-index:99;
|
||||||
right: 3px
|
right: 3px
|
||||||
}
|
}
|
||||||
|
|
||||||
.Validform_error,input.error,select.error {
|
.Validform_error,input.error,textarea.error,select.error {
|
||||||
background-color: #fbe2e2;
|
background-color: #fbe2e2;
|
||||||
border-color: #c66161;
|
border-color: #c66161;
|
||||||
color: #c00
|
color: #c00
|
||||||
|
|
@ -433,6 +443,14 @@ label.error {
|
||||||
background-position: -180px 0
|
background-position: -180px 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ztree */
|
||||||
|
div.ztree-border {
|
||||||
|
margin-top: 10px;
|
||||||
|
border: 1px solid #e5e6e7;
|
||||||
|
background: #FFFFFF none;
|
||||||
|
border-radius:4px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 切换开关 */
|
/* 切换开关 */
|
||||||
.toggle-switch {
|
.toggle-switch {
|
||||||
display: -webkit-inline-box;
|
display: -webkit-inline-box;
|
||||||
|
|
@ -574,17 +592,17 @@ label.error {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表单查询条件 **/
|
/** 表单查询条件 **/
|
||||||
ul {
|
.select-list ul, .layui-layer-content ul {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
.select-list li, .layui-layer-content li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-input {
|
.select-time .time-input {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
|
@ -638,10 +656,10 @@ label {
|
||||||
margin: 5px 15px 5px 0px;
|
margin: 5px 15px 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-list li p{
|
.select-list li p, .select-list li label:not(.radio-box){
|
||||||
float: left;
|
float: left;
|
||||||
width: 80px;
|
width: 65px;
|
||||||
margin: 5px 15px 5px 0px;
|
margin: 5px 0px 0px 0px;
|
||||||
text-align:right;
|
text-align:right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -675,11 +693,11 @@ label {
|
||||||
|
|
||||||
.bootstrap-select.form-control .btn-default {
|
.bootstrap-select.form-control .btn-default {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
padding: 6px 12px;
|
padding: 4px 6px 4px;
|
||||||
border-radius: 1px;
|
border-radius: 4px;
|
||||||
border: 1px solid #e5e6e7;
|
border: 1px solid #e5e6e7;
|
||||||
outline: none;
|
outline: none;
|
||||||
height: 34px;
|
height: 31px;
|
||||||
background: #FFFFFF none
|
background: #FFFFFF none
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -737,6 +755,20 @@ label {
|
||||||
background-color: #12889a
|
background-color: #12889a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select-list .select2-container--bootstrap {
|
||||||
|
width: 200px!important;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-list .select2-container--bootstrap .select2-selection {
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-list .select2-container--bootstrap .select2-selection--single {
|
||||||
|
height: 30px!important;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.select-list .select-time input {
|
.select-list .select-time input {
|
||||||
width: 93px;
|
width: 93px;
|
||||||
}
|
}
|
||||||
|
|
@ -793,16 +825,34 @@ label {
|
||||||
min-height: 75%;
|
min-height: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-striped .bootstrap-table {
|
.table-striped .bootstrap-table, .table-striped .table-bordered {
|
||||||
border: 0px!important;
|
border: 0px!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-striped .table, .table-striped .table, .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
|
.table-bordered .table>thead>tr>th, .table-bordered .table>tbody>tr>th {
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 13px
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-striped table>thead>tr>th, .table-striped table>tbody>tr>th, .table-striped table>tfoot>tr>th, .table-striped table>thead>tr>td, .table-striped table>tbody>tr>td, .table-striped table>tfoot>tr>td {
|
||||||
border-bottom: 1px solid #e7eaec!important;
|
border-bottom: 1px solid #e7eaec!important;
|
||||||
background-color: transparent!important;
|
background-color: transparent;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-bordered table>thead>tr>th:first-child, .table-bordered table>tbody>tr>td:first-child {
|
||||||
|
border-left: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-bordered table>thead>tr>th:last-child, .table-bordered table>tbody>tr>td:last-child {
|
||||||
|
border-right: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-bordered table>thead>tr>th, .table-bordered table>tbody>tr>td {
|
||||||
|
border-top: 1px solid #ddd!important;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
.fixed-table-footer {
|
.fixed-table-footer {
|
||||||
border-top: 0px solid #ddd;
|
border-top: 0px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
@ -814,58 +864,72 @@ label {
|
||||||
.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th {
|
.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th {
|
||||||
border-bottom: 1px solid #ccc!important;
|
border-bottom: 1px solid #ccc!important;
|
||||||
border-top: 0px!important;
|
border-top: 0px!important;
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped .table>thead:first-child>tr:first-child>th {
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: 13px
|
font-size: 13px
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-striped table thead {
|
.table-striped table thead {
|
||||||
background-color: #eff3f8;
|
background-color: #eff3f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-bordered td,.table-bordered th {
|
|
||||||
border: 1px solid #ddd!important
|
|
||||||
}
|
|
||||||
|
|
||||||
.fixed-table-container thead th >.both{
|
.fixed-table-container thead th >.both{
|
||||||
display: inline-block
|
display: inline-block
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editable-input .input-sm {
|
||||||
|
height: 32px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 表格列宽拖动样式 **/
|
||||||
|
.rc-handle-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.rc-handle {
|
||||||
|
position: absolute;
|
||||||
|
width: 7px;
|
||||||
|
cursor: ew-resize;
|
||||||
|
margin-left: -3px;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
table.rc-table-resizing {
|
||||||
|
cursor: ew-resize;
|
||||||
|
}
|
||||||
|
table.rc-table-resizing thead,
|
||||||
|
table.rc-table-resizing thead > th,
|
||||||
|
table.rc-table-resizing thead > th > a {
|
||||||
|
cursor: ew-resize;
|
||||||
|
}
|
||||||
|
|
||||||
/** 表格冻结列样式 **/
|
/** 表格冻结列样式 **/
|
||||||
.left-fixed-table-columns, .left-fixed-body-columns {
|
.fixed-columns, .fixed-columns-right {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: none;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-fixed-table-columns .table, .left-fixed-body-columns .table {
|
.fixed-columns {
|
||||||
border-right: 1px solid #ddd;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-fixed-table-columns .table.table-no-bordered, .left-fixed-body-columns .table.table-no-bordered {
|
.fixed-columns .fixed-table-body {
|
||||||
border-right: 1px solid transparent;
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-fixed-body-columns table {
|
.fixed-columns-right {
|
||||||
position: absolute;
|
right: 0;
|
||||||
animation: none;
|
}
|
||||||
|
|
||||||
|
.fixed-columns-right .fixed-table-body {
|
||||||
|
overflow-x: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .table-hover > tbody > tr.hover > td {
|
.bootstrap-table .table-hover > tbody > tr.hover > td {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-fixed-table-columns{
|
|
||||||
position: absolute;
|
|
||||||
right:63px;
|
|
||||||
border-left:1px solid #ddd;
|
|
||||||
display: none;
|
|
||||||
z-index:100;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 表格树样式 **/
|
/** 表格树样式 **/
|
||||||
.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
|
.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
|
||||||
.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
|
.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
|
||||||
|
|
@ -875,7 +939,7 @@ label {
|
||||||
.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;}
|
.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;}
|
||||||
.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;}
|
.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;}
|
||||||
.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important}
|
.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important}
|
||||||
.bootstrap-tree-table .treetable-tbody td{overflow:hidden;border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;white-space: nowrap; text-overflow: ellipsis;}
|
.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;white-space: nowrap; text-overflow: ellipsis;}
|
||||||
.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important}
|
.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important}
|
||||||
.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;}
|
.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;}
|
||||||
.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
|
.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
|
||||||
|
|
@ -970,7 +1034,7 @@ label {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格选中样式 **/
|
/** 表格选中样式 **/
|
||||||
.fixed-table-container .selected {
|
.bootstrap-table .fixed-table-container .table tbody tr.selected td {
|
||||||
background-color: #E8F7FD;
|
background-color: #E8F7FD;
|
||||||
color: #1890ff;
|
color: #1890ff;
|
||||||
}
|
}
|
||||||
|
|
@ -980,13 +1044,98 @@ label {
|
||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 气泡弹出框样式 **/
|
||||||
|
.popover {
|
||||||
|
font-size: 13px;
|
||||||
|
max-width: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popover-title {
|
||||||
|
padding: 8px 14px;
|
||||||
|
margin: 0 !important;
|
||||||
|
font-size: 14px;
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
border-bottom: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px 5px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popover-content {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 向上滚动样式 **/
|
||||||
|
#scroll-up {
|
||||||
|
border-width: 0;
|
||||||
|
position: fixed;
|
||||||
|
right: 2px;
|
||||||
|
z-index: 99;
|
||||||
|
-webkit-transition-duration: .3s;
|
||||||
|
transition-duration: .3s;
|
||||||
|
opacity: 0;
|
||||||
|
filter: alpha(opacity=0);
|
||||||
|
bottom: -24px;
|
||||||
|
visibility: hidden;
|
||||||
|
background-color: #aaa;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll-up.display {
|
||||||
|
opacity: .7;
|
||||||
|
filter: alpha(opacity=70);
|
||||||
|
bottom: 2px;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置菜单样式 */
|
||||||
|
.menu-content {
|
||||||
|
padding: 10px 10px 10px 25px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content > .tab-pane {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content > .active {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.height-full {
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置滚动条样式 */
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 6px;
|
width:10px!important;
|
||||||
height: 10px;
|
height:10px!important;
|
||||||
background-color: #F5F5F5;
|
-webkit-appearance:none;
|
||||||
|
background:#f1f1f1
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
border-radius: 6px;
|
height:5px;
|
||||||
background-color: #999;
|
border:1px solid transparent;
|
||||||
|
border-top:0;
|
||||||
|
border-bottom:0;
|
||||||
|
border-radius:6px;
|
||||||
|
background-color:#ccc;
|
||||||
|
background-clip:padding-box
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置placeholder样式 */
|
||||||
|
::-webkit-input-placeholder {
|
||||||
|
color: #b3b3b3!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:-moz-placeholder {
|
||||||
|
color: #b3b3b3!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-moz-placeholder {
|
||||||
|
color: #b3b3b3!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:-ms-input-placeholder {
|
||||||
|
color: #b3b3b3!important;
|
||||||
}
|
}
|
||||||
|
|
@ -7,31 +7,37 @@ layer.config({
|
||||||
skin: 'layer-ext-moon'
|
skin: 'layer-ext-moon'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var isMobile = false;
|
||||||
|
var sidebarHeight = isMobile ? '100%' : '96%';
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
// MetsiMenu
|
// MetsiMenu
|
||||||
$('#side-menu').metisMenu();
|
$('#side-menu').metisMenu();
|
||||||
|
|
||||||
//固定菜单栏
|
// 固定菜单栏
|
||||||
$(function() {
|
|
||||||
$('.sidebar-collapse').slimScroll({
|
$('.sidebar-collapse').slimScroll({
|
||||||
height: '100%',
|
height: sidebarHeight,
|
||||||
railOpacity: 0.9,
|
railOpacity: 0.9,
|
||||||
alwaysVisible: false
|
alwaysVisible: false
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
// 菜单切换
|
// 菜单切换
|
||||||
$('.navbar-minimalize').click(function() {
|
$('.navbar-minimalize').click(function() {
|
||||||
|
if (isMobile) {
|
||||||
|
$("body").toggleClass("canvas-menu");
|
||||||
|
} else {
|
||||||
$("body").toggleClass("mini-navbar");
|
$("body").toggleClass("mini-navbar");
|
||||||
|
}
|
||||||
SmoothlyMenu();
|
SmoothlyMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#side-menu>li').click(function() {
|
$('#side-menu>li').click(function() {
|
||||||
if ($('body').hasClass('mini-navbar')) {
|
if ($('body').hasClass('canvas-menu mini-navbar')) {
|
||||||
NavToggle();
|
NavToggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
$('#side-menu>li li a').click(function() {
|
$('#side-menu>li li a:not(:has(span))').click(function() {
|
||||||
if ($(window).width() < 769) {
|
if ($(window).width() < 769) {
|
||||||
NavToggle();
|
NavToggle();
|
||||||
}
|
}
|
||||||
|
|
@ -46,35 +52,84 @@ $(function() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).bind("load resize",
|
$(window).bind("load resize", function() {
|
||||||
function() {
|
isMobile = $.common.isMobile() || $(window).width() < 769;
|
||||||
if ($(this).width() < 769) {
|
if (isMobile) {
|
||||||
$('body').addClass('mini-navbar');
|
$('body').addClass('canvas-menu');
|
||||||
|
$("body").removeClass("mini-navbar");
|
||||||
|
$("nav .logo").addClass("hide");
|
||||||
|
$(".slimScrollDiv").css({ "overflow": "hidden" });
|
||||||
|
$('.navbar-static-side').fadeOut();
|
||||||
|
} else {
|
||||||
|
if($('body').hasClass('canvas-menu')) {
|
||||||
|
$('body').addClass('fixed-sidebar');
|
||||||
|
$('body').removeClass('canvas-menu');
|
||||||
|
$("body").removeClass("mini-navbar");
|
||||||
|
$("nav .logo").removeClass("hide");
|
||||||
|
$(".slimScrollDiv").css({ "overflow": "visible" });
|
||||||
$('.navbar-static-side').fadeIn();
|
$('.navbar-static-side').fadeIn();
|
||||||
$(".sidebar-collapse .logo").addClass("hide");
|
}
|
||||||
$(".slimScrollDiv").css({ "overflow":"hidden" })
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function syncMenuTab(dataId) {
|
||||||
|
if(isLinkage) {
|
||||||
|
var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]');
|
||||||
|
if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) {
|
||||||
|
$('.nav ul').removeClass("in");
|
||||||
|
$dataObj.parents("ul").addClass("in")
|
||||||
|
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
|
||||||
|
$dataObj.parents("ul").css('height', 'auto').height();
|
||||||
|
$(".nav ul li, .nav li").removeClass("selected");
|
||||||
|
$dataObj.parent("li").addClass("selected");
|
||||||
|
setIframeUrl(dataId);
|
||||||
|
|
||||||
|
// 顶部菜单同步处理
|
||||||
|
var tabStr = $dataObj.parents(".tab-pane").attr("id");
|
||||||
|
if ($.common.isNotEmpty(tabStr)) {
|
||||||
|
var sepIndex = tabStr.lastIndexOf('_');
|
||||||
|
var menuId = tabStr.substring(sepIndex + 1, tabStr.length);
|
||||||
|
$("#tab_" + menuId + " a").click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function NavToggle() {
|
function NavToggle() {
|
||||||
$('.navbar-minimalize').trigger('click');
|
$('.navbar-minimalize').trigger('click');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fixedSidebar() {
|
||||||
|
$('#side-menu').hide();
|
||||||
|
$("nav .logo").addClass("hide");
|
||||||
|
setTimeout(function() {
|
||||||
|
$('#side-menu').fadeIn(500);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置锚点
|
||||||
|
function setIframeUrl(href) {
|
||||||
|
if($.common.equals("history", mode)) {
|
||||||
|
storage.set('publicPath', href);
|
||||||
|
} else {
|
||||||
|
var nowUrl = window.location.href;
|
||||||
|
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
|
||||||
|
window.location.href = newUrl + "#" + href;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function SmoothlyMenu() {
|
function SmoothlyMenu() {
|
||||||
if (!$('body').hasClass('mini-navbar')) {
|
if (isMobile && !$('body').hasClass('canvas-menu')) {
|
||||||
$('#side-menu').hide();
|
$('.navbar-static-side').fadeIn();
|
||||||
$(".sidebar-collapse .logo").removeClass("hide");
|
fixedSidebar();
|
||||||
setTimeout(function() {
|
} else if (!isMobile &&!$('body').hasClass('mini-navbar')) {
|
||||||
$('#side-menu').fadeIn(500);
|
fixedSidebar();
|
||||||
},
|
$("nav .logo").removeClass("hide");
|
||||||
100);
|
} else if (isMobile && $('body').hasClass('fixed-sidebar')) {
|
||||||
} else if ($('body').hasClass('fixed-sidebar')) {
|
$('.navbar-static-side').fadeOut();
|
||||||
$('#side-menu').hide();
|
fixedSidebar();
|
||||||
$(".sidebar-collapse .logo").addClass("hide");
|
} else if (!isMobile && $('body').hasClass('fixed-sidebar')) {
|
||||||
setTimeout(function() {
|
fixedSidebar();
|
||||||
$('#side-menu').fadeIn(500);
|
|
||||||
},
|
|
||||||
300);
|
|
||||||
} else {
|
} else {
|
||||||
$('#side-menu').removeAttr('style');
|
$('#side-menu').removeAttr('style');
|
||||||
}
|
}
|
||||||
|
|
@ -97,6 +152,7 @@ $(function() {
|
||||||
function setActiveTab(element) {
|
function setActiveTab(element) {
|
||||||
if (!$(element).hasClass('active')) {
|
if (!$(element).hasClass('active')) {
|
||||||
var currentId = $(element).data('id');
|
var currentId = $(element).data('id');
|
||||||
|
syncMenuTab(currentId);
|
||||||
// 显示tab对应的内容区
|
// 显示tab对应的内容区
|
||||||
$('.RuoYi_iframe').each(function() {
|
$('.RuoYi_iframe').each(function() {
|
||||||
if ($(this).data('id') == currentId) {
|
if ($(this).data('id') == currentId) {
|
||||||
|
|
@ -132,10 +188,7 @@ $(function() {
|
||||||
} else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
|
} else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
|
||||||
scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
|
scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
|
||||||
}
|
}
|
||||||
$('.page-tabs-content').animate({
|
$('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
|
||||||
marginLeft: 0 - scrollVal + 'px'
|
|
||||||
},
|
|
||||||
"fast");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//查看左侧隐藏的选项卡
|
//查看左侧隐藏的选项卡
|
||||||
|
|
@ -165,10 +218,7 @@ $(function() {
|
||||||
scrollVal = calSumWidth($(tabElement).prevAll());
|
scrollVal = calSumWidth($(tabElement).prevAll());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('.page-tabs-content').animate({
|
$('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
|
||||||
marginLeft: 0 - scrollVal + 'px'
|
|
||||||
},
|
|
||||||
"fast");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//查看右侧隐藏的选项卡
|
//查看右侧隐藏的选项卡
|
||||||
|
|
@ -196,10 +246,7 @@ $(function() {
|
||||||
}
|
}
|
||||||
scrollVal = calSumWidth($(tabElement).prevAll());
|
scrollVal = calSumWidth($(tabElement).prevAll());
|
||||||
if (scrollVal > 0) {
|
if (scrollVal > 0) {
|
||||||
$('.page-tabs-content').animate({
|
$('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
|
||||||
marginLeft: 0 - scrollVal + 'px'
|
|
||||||
},
|
|
||||||
"fast");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -216,9 +263,20 @@ $(function() {
|
||||||
var dataUrl = $(this).attr('href'),
|
var dataUrl = $(this).attr('href'),
|
||||||
dataIndex = $(this).data('index'),
|
dataIndex = $(this).data('index'),
|
||||||
menuName = $.trim($(this).text()),
|
menuName = $.trim($(this).text()),
|
||||||
|
isRefresh = $(this).data("refresh"),
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|
||||||
|
var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]');
|
||||||
|
if (!$dataObj.hasClass("noactive")) {
|
||||||
|
$('.tab-pane li').removeClass("active");
|
||||||
|
$('.nav ul').removeClass("in");
|
||||||
|
$dataObj.parents("ul").addClass("in")
|
||||||
|
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
|
||||||
|
$dataObj.parents("ul").css('height', 'auto').height();
|
||||||
$(".nav ul li, .nav li").removeClass("selected");
|
$(".nav ul li, .nav li").removeClass("selected");
|
||||||
$(this).parent("li").addClass("selected");
|
$(this).parent("li").addClass("selected");
|
||||||
|
}
|
||||||
|
setIframeUrl(dataUrl);
|
||||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
||||||
|
|
||||||
// 选项卡菜单已存在
|
// 选项卡菜单已存在
|
||||||
|
|
@ -235,6 +293,9 @@ $(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (isRefresh) {
|
||||||
|
refreshTab();
|
||||||
|
}
|
||||||
flag = false;
|
flag = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -295,10 +356,7 @@ $(function() {
|
||||||
|
|
||||||
var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left'));
|
var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left'));
|
||||||
if (marginLeftVal < 0) {
|
if (marginLeftVal < 0) {
|
||||||
$('.page-tabs-content').animate({
|
$('.page-tabs-content').animate({ marginLeft: (marginLeftVal + currentWidth) + 'px' }, "fast");
|
||||||
marginLeft: (marginLeftVal + currentWidth) + 'px'
|
|
||||||
},
|
|
||||||
"fast");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 移除当前选项卡
|
// 移除当前选项卡
|
||||||
|
|
@ -360,6 +418,7 @@ $(function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
scrollToTab($('.menuTab.active'));
|
scrollToTab($('.menuTab.active'));
|
||||||
|
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -375,6 +434,7 @@ $(function() {
|
||||||
function activeTab() {
|
function activeTab() {
|
||||||
if (!$(this).hasClass('active')) {
|
if (!$(this).hasClass('active')) {
|
||||||
var currentId = $(this).data('id');
|
var currentId = $(this).data('id');
|
||||||
|
syncMenuTab(currentId);
|
||||||
// 显示tab对应的内容区
|
// 显示tab对应的内容区
|
||||||
$('.mainContent .RuoYi_iframe').each(function() {
|
$('.mainContent .RuoYi_iframe').each(function() {
|
||||||
if ($(this).data('id') == currentId) {
|
if ($(this).data('id') == currentId) {
|
||||||
|
|
@ -398,6 +458,13 @@ $(function() {
|
||||||
target.attr('src', url).ready();
|
target.attr('src', url).ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 页签全屏
|
||||||
|
function fullScreenTab() {
|
||||||
|
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
|
||||||
|
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
|
||||||
|
target.fullScreen(true);
|
||||||
|
}
|
||||||
|
|
||||||
// 关闭当前选项卡
|
// 关闭当前选项卡
|
||||||
function tabCloseCurrent() {
|
function tabCloseCurrent() {
|
||||||
$('.page-tabs-content').find('.active i').trigger("click");
|
$('.page-tabs-content').find('.active i').trigger("click");
|
||||||
|
|
@ -409,7 +476,7 @@ $(function() {
|
||||||
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
$('.page-tabs-content').css("margin-left", "0");
|
$('.page-tabs-content').animate({ marginLeft: '0px' }, "fast");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭全部选项卡
|
// 关闭全部选项卡
|
||||||
|
|
@ -423,6 +490,7 @@ $(function() {
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
});
|
});
|
||||||
$('.page-tabs-content').css("margin-left", "0");
|
$('.page-tabs-content').css("margin-left", "0");
|
||||||
|
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -431,9 +499,17 @@ $(function() {
|
||||||
$(document).toggleFullScreen();
|
$(document).toggleFullScreen();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 刷新按钮
|
// 锁定屏幕
|
||||||
|
$('#lockScreen').on('click', function () {
|
||||||
|
location.href = ctx + "lockscreen";
|
||||||
|
});
|
||||||
|
|
||||||
|
// 页签刷新按钮
|
||||||
$('.tabReload').on('click', refreshTab);
|
$('.tabReload').on('click', refreshTab);
|
||||||
|
|
||||||
|
// 页签全屏按钮
|
||||||
|
$('.tabFullScreen').on('click', fullScreenTab);
|
||||||
|
|
||||||
// 双击选项卡全屏显示
|
// 双击选项卡全屏显示
|
||||||
$('.menuTabs').on('dblclick', '.menuTab', activeTabMax);
|
$('.menuTabs').on('dblclick', '.menuTab', activeTabMax);
|
||||||
|
|
||||||
|
|
@ -476,6 +552,12 @@ $(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.onhashchange = function() {
|
||||||
|
var hash = location.hash;
|
||||||
|
var url = hash.substring(1, hash.length);
|
||||||
|
$('a[href$="' + url + '"]').click();
|
||||||
|
};
|
||||||
|
|
||||||
// 右键菜单实现
|
// 右键菜单实现
|
||||||
$.contextMenu({
|
$.contextMenu({
|
||||||
selector: ".menuTab",
|
selector: ".menuTab",
|
||||||
|
|
@ -509,7 +591,7 @@ $(function() {
|
||||||
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
$('.page-tabs-content').css("margin-left", "0");
|
$('.page-tabs-content').animate({ marginLeft: '0px' }, "fast");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"close_right": {
|
"close_right": {
|
||||||
|
|
@ -547,7 +629,6 @@ $(function() {
|
||||||
setActiveTab(this);
|
setActiveTab(this);
|
||||||
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
||||||
var url = target.attr('src');
|
var url = target.attr('src');
|
||||||
target.attr('src', url).ready();
|
|
||||||
$.modal.loading("数据加载中,请稍后...");
|
$.modal.loading("数据加载中,请稍后...");
|
||||||
target.attr('src', url).load(function () {
|
target.attr('src', url).load(function () {
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,20 @@
|
||||||
* Copyright (c) 2019 ruoyi
|
* Copyright (c) 2019 ruoyi
|
||||||
*/
|
*/
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
// layer扩展皮肤
|
||||||
|
if (window.layer !== undefined) {
|
||||||
|
layer.config({
|
||||||
|
extend: 'moon/style.css',
|
||||||
|
skin: 'layer-ext-moon'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 回到顶部绑定
|
||||||
|
if ($.fn.toTop !== undefined) {
|
||||||
|
$('#scroll-up').toTop();
|
||||||
|
}
|
||||||
|
|
||||||
// select2复选框事件绑定
|
// select2复选框事件绑定
|
||||||
if ($.fn.select2 !== undefined) {
|
if ($.fn.select2 !== undefined) {
|
||||||
$.fn.select2.defaults.set( "theme", "bootstrap" );
|
$.fn.select2.defaults.set( "theme", "bootstrap" );
|
||||||
|
|
@ -23,6 +37,30 @@ $(function() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 气泡弹出框特效(移到元素时)
|
||||||
|
$(document).on("mouseenter", '.table [data-toggle="popover"]', function() {
|
||||||
|
var _this = this;
|
||||||
|
$(this).popover("show");
|
||||||
|
$(".popover").on("mouseleave", function() {
|
||||||
|
$(_this).popover('hide');
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
// 气泡弹出框特效(离开元素时)
|
||||||
|
$(document).on("mouseleave", '.table [data-toggle="popover"]', function() {
|
||||||
|
var _this = this;
|
||||||
|
setTimeout(function() {
|
||||||
|
if (!$(".popover:hover").length) $(_this).popover("hide");
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 取消回车自动提交表单
|
||||||
|
$(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) {
|
||||||
|
if (event.keyCode == 13) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// laydate 时间控件绑定
|
// laydate 时间控件绑定
|
||||||
if ($(".select-time").length > 0) {
|
if ($(".select-time").length > 0) {
|
||||||
layui.use('laydate', function() {
|
layui.use('laydate', function() {
|
||||||
|
|
@ -57,14 +95,15 @@ $(function() {
|
||||||
startDate.config.max.month = date.month - 1;
|
startDate.config.max.month = date.month - 1;
|
||||||
startDate.config.max.date = date.date;
|
startDate.config.max.date = date.date;
|
||||||
} else {
|
} else {
|
||||||
startDate.config.max.year = '';
|
startDate.config.max.year = '2099';
|
||||||
startDate.config.max.month = '';
|
startDate.config.max.month = '12';
|
||||||
startDate.config.max.date = '';
|
startDate.config.max.date = '31';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// laydate time-input 时间控件绑定
|
// laydate time-input 时间控件绑定
|
||||||
if ($(".time-input").length > 0) {
|
if ($(".time-input").length > 0) {
|
||||||
layui.use('laydate', function () {
|
layui.use('laydate', function () {
|
||||||
|
|
@ -112,6 +151,7 @@ $(function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// tree 关键字搜索绑定
|
// tree 关键字搜索绑定
|
||||||
if ($("#keyword").length > 0) {
|
if ($("#keyword").length > 0) {
|
||||||
$("#keyword").bind("focus", function focusKey(e) {
|
$("#keyword").bind("focus", function focusKey(e) {
|
||||||
|
|
@ -125,10 +165,11 @@ $(function() {
|
||||||
$.tree.searchNode(e);
|
$.tree.searchNode(e);
|
||||||
}).bind("input propertychange", $.tree.searchNode);
|
}).bind("input propertychange", $.tree.searchNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// tree表格树 展开/折叠
|
// tree表格树 展开/折叠
|
||||||
var expandFlag;
|
var expandFlag;
|
||||||
$("#expandAllBtn").click(function() {
|
$("#expandAllBtn").click(function() {
|
||||||
var dataExpand = $.common.isEmpty($.table._option.expandAll) ? true : $.table._option.expandAll;
|
var dataExpand = $.common.isEmpty(table.options.expandAll) ? true : table.options.expandAll;
|
||||||
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
|
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
|
||||||
if (!expandFlag) {
|
if (!expandFlag) {
|
||||||
$.bttTable.bootstrapTreeTable('expandAll');
|
$.bttTable.bootstrapTreeTable('expandAll');
|
||||||
|
|
@ -137,6 +178,7 @@ $(function() {
|
||||||
}
|
}
|
||||||
expandFlag = expandFlag ? false: true;
|
expandFlag = expandFlag ? false: true;
|
||||||
})
|
})
|
||||||
|
|
||||||
// 按下ESC按钮关闭弹层
|
// 按下ESC按钮关闭弹层
|
||||||
$('body', document).on('keyup', function(e) {
|
$('body', document).on('keyup', function(e) {
|
||||||
if (e.which === 27) {
|
if (e.which === 27) {
|
||||||
|
|
@ -145,6 +187,49 @@ $(function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
(function ($) {
|
||||||
|
'use strict';
|
||||||
|
$.fn.toTop = function(opt) {
|
||||||
|
var elem = this;
|
||||||
|
var win = (opt && opt.hasOwnProperty('win')) ? opt.win : $(window);
|
||||||
|
var doc = (opt && opt.hasOwnProperty('doc')) ? opt.doc : $('html, body');
|
||||||
|
var options = $.extend({
|
||||||
|
autohide: true,
|
||||||
|
offset: 50,
|
||||||
|
speed: 500,
|
||||||
|
position: true,
|
||||||
|
right: 15,
|
||||||
|
bottom: 5
|
||||||
|
}, opt);
|
||||||
|
elem.css({
|
||||||
|
'cursor': 'pointer'
|
||||||
|
});
|
||||||
|
if (options.autohide) {
|
||||||
|
elem.css('display', 'none');
|
||||||
|
}
|
||||||
|
if (options.position) {
|
||||||
|
elem.css({
|
||||||
|
'position': 'fixed',
|
||||||
|
'right': options.right,
|
||||||
|
'bottom': options.bottom,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
elem.click(function() {
|
||||||
|
doc.animate({
|
||||||
|
scrollTop: 0
|
||||||
|
}, options.speed);
|
||||||
|
});
|
||||||
|
win.scroll(function() {
|
||||||
|
var scrolling = win.scrollTop();
|
||||||
|
if (options.autohide) {
|
||||||
|
if (scrolling > options.offset) {
|
||||||
|
elem.fadeIn(options.speed);
|
||||||
|
} else elem.fadeOut(options.speed);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
/** 刷新选项卡 */
|
/** 刷新选项卡 */
|
||||||
var refreshItem = function(){
|
var refreshItem = function(){
|
||||||
var topWindow = $(window.parent.document);
|
var topWindow = $(window.parent.document);
|
||||||
|
|
@ -179,9 +264,9 @@ var closeItem = function(dataId){
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 创建选项卡 */
|
/** 创建选项卡 */
|
||||||
function createMenuItem(dataUrl, menuName) {
|
function createMenuItem(dataUrl, menuName, isRefresh) {
|
||||||
var panelUrl = window.frameElement.getAttribute('data-id');
|
var panelUrl = window.frameElement.getAttribute('data-id');
|
||||||
dataIndex = $.common.random(1,100),
|
dataIndex = $.common.random(1, 100),
|
||||||
flag = true;
|
flag = true;
|
||||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
||||||
var topWindow = $(window.parent.document);
|
var topWindow = $(window.parent.document);
|
||||||
|
|
@ -190,6 +275,7 @@ function createMenuItem(dataUrl, menuName) {
|
||||||
if ($(this).data('id') == dataUrl) {
|
if ($(this).data('id') == dataUrl) {
|
||||||
if (!$(this).hasClass('active')) {
|
if (!$(this).hasClass('active')) {
|
||||||
$(this).addClass('active').siblings('.menuTab').removeClass('active');
|
$(this).addClass('active').siblings('.menuTab').removeClass('active');
|
||||||
|
scrollToTab(this);
|
||||||
$('.page-tabs-content').animate({ marginLeft: ""}, "fast");
|
$('.page-tabs-content').animate({ marginLeft: ""}, "fast");
|
||||||
// 显示tab对应的内容区
|
// 显示tab对应的内容区
|
||||||
$('.mainContent .RuoYi_iframe', topWindow).each(function() {
|
$('.mainContent .RuoYi_iframe', topWindow).each(function() {
|
||||||
|
|
@ -199,13 +285,16 @@ function createMenuItem(dataUrl, menuName) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (isRefresh) {
|
||||||
|
refreshTab();
|
||||||
|
}
|
||||||
flag = false;
|
flag = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 选项卡菜单不存在
|
// 选项卡菜单不存在
|
||||||
if (flag) {
|
if (flag) {
|
||||||
var str = '<a href="javascript:;" class="active menuTab" data-id="' + dataUrl + '" data-panel="' + panelUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
|
var str = '<a href="javascript:;" class="active menuTab noactive" data-id="' + dataUrl + '" data-panel="' + panelUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
|
||||||
$('.menuTab', topWindow).removeClass('active');
|
$('.menuTab', topWindow).removeClass('active');
|
||||||
|
|
||||||
// 添加选项卡对应的iframe
|
// 添加选项卡对应的iframe
|
||||||
|
|
@ -219,13 +308,86 @@ function createMenuItem(dataUrl, menuName) {
|
||||||
|
|
||||||
// 添加选项卡
|
// 添加选项卡
|
||||||
$('.menuTabs .page-tabs-content', topWindow).append(str);
|
$('.menuTabs .page-tabs-content', topWindow).append(str);
|
||||||
|
scrollToTab($('.menuTab.active', topWindow));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//日志打印封装处理
|
// 刷新iframe
|
||||||
|
function refreshTab() {
|
||||||
|
var topWindow = $(window.parent.document);
|
||||||
|
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id');
|
||||||
|
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow);
|
||||||
|
var url = target.attr('src');
|
||||||
|
target.attr('src', url).ready();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 滚动到指定选项卡
|
||||||
|
function scrollToTab(element) {
|
||||||
|
var topWindow = $(window.parent.document);
|
||||||
|
var marginLeftVal = calSumWidth($(element).prevAll()),
|
||||||
|
marginRightVal = calSumWidth($(element).nextAll());
|
||||||
|
// 可视区域非tab宽度
|
||||||
|
var tabOuterWidth = calSumWidth($(".content-tabs", topWindow).children().not(".menuTabs"));
|
||||||
|
//可视区域tab宽度
|
||||||
|
var visibleWidth = $(".content-tabs", topWindow).outerWidth(true) - tabOuterWidth;
|
||||||
|
//实际滚动宽度
|
||||||
|
var scrollVal = 0;
|
||||||
|
if ($(".page-tabs-content", topWindow).outerWidth() < visibleWidth) {
|
||||||
|
scrollVal = 0;
|
||||||
|
} else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) {
|
||||||
|
if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) {
|
||||||
|
scrollVal = marginLeftVal;
|
||||||
|
var tabElement = element;
|
||||||
|
while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content", topWindow).outerWidth() - visibleWidth)) {
|
||||||
|
scrollVal -= $(tabElement).prev().outerWidth();
|
||||||
|
tabElement = $(tabElement).prev();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
|
||||||
|
scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
|
||||||
|
}
|
||||||
|
$('.page-tabs-content', topWindow).animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算元素集合的总宽度
|
||||||
|
function calSumWidth(elements) {
|
||||||
|
var width = 0;
|
||||||
|
$(elements).each(function() {
|
||||||
|
width += $(this).outerWidth(true);
|
||||||
|
});
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 密码规则范围验证 */
|
||||||
|
function checkpwd(chrtype, password) {
|
||||||
|
if (chrtype == 1) {
|
||||||
|
if(!$.common.numValid(password)){
|
||||||
|
$.modal.alertWarning("密码只能为0-9数字");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (chrtype == 2) {
|
||||||
|
if(!$.common.enValid(password)){
|
||||||
|
$.modal.alertWarning("密码只能为a-z和A-Z字母");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (chrtype == 3) {
|
||||||
|
if(!$.common.enNumValid(password)){
|
||||||
|
$.modal.alertWarning("密码必须包含字母以及数字");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (chrtype == 4) {
|
||||||
|
if(!$.common.charValid(password)){
|
||||||
|
$.modal.alertWarning("密码必须包含字母、数字、以及特殊符号<font color='red'>~!@#$%^&*()-=_+</font>");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日志打印封装处理
|
||||||
var log = {
|
var log = {
|
||||||
log: function (msg) {
|
log: function(msg) {
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
},
|
},
|
||||||
info: function(msg) {
|
info: function(msg) {
|
||||||
|
|
@ -239,6 +401,87 @@ var log = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 本地缓存处理
|
||||||
|
var storage = {
|
||||||
|
set: function(key, value) {
|
||||||
|
window.localStorage.setItem(key, value);
|
||||||
|
},
|
||||||
|
get: function(key) {
|
||||||
|
return window.localStorage.getItem(key);
|
||||||
|
},
|
||||||
|
remove: function(key) {
|
||||||
|
window.localStorage.removeItem(key);
|
||||||
|
},
|
||||||
|
clear: function() {
|
||||||
|
window.localStorage.clear();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 主子表操作封装处理
|
||||||
|
var sub = {
|
||||||
|
editColumn: function() {
|
||||||
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||||
|
var params = new Array();
|
||||||
|
for (var dataIndex = 0; dataIndex < count; dataIndex++) {
|
||||||
|
var columns = $('#' + table.options.id + ' tr[data-index="' + dataIndex + '"] td');
|
||||||
|
var obj = new Object();
|
||||||
|
for (var i = 0; i < columns.length; i++) {
|
||||||
|
var inputValue = $(columns[i]).find('input');
|
||||||
|
var selectValue = $(columns[i]).find('select');
|
||||||
|
var key = table.options.columns[i].field;
|
||||||
|
if ($.common.isNotEmpty(inputValue.val())) {
|
||||||
|
obj[key] = inputValue.val();
|
||||||
|
} else if ($.common.isNotEmpty(selectValue.val())) {
|
||||||
|
obj[key] = selectValue.val();
|
||||||
|
} else {
|
||||||
|
obj[key] = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
params.push({ index: dataIndex, row: obj });
|
||||||
|
}
|
||||||
|
$("#" + table.options.id).bootstrapTable("updateRow", params);
|
||||||
|
},
|
||||||
|
delColumn: function(column) {
|
||||||
|
sub.editColumn();
|
||||||
|
var subColumn = $.common.isEmpty(column) ? "index" : column;
|
||||||
|
var ids = $.table.selectColumns(subColumn);
|
||||||
|
if (ids.length == 0) {
|
||||||
|
$.modal.alertWarning("请至少选择一条记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
|
||||||
|
},
|
||||||
|
addColumn: function(row, tableId) {
|
||||||
|
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||||
|
table.set(currentId);
|
||||||
|
var count = $("#" + currentId).bootstrapTable('getData').length;
|
||||||
|
sub.editColumn();
|
||||||
|
$("#" + currentId).bootstrapTable('insertRow', {
|
||||||
|
index: count + 1,
|
||||||
|
row: row
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 动态加载css文件
|
||||||
|
function loadCss(file, headElem) {
|
||||||
|
var link = document.createElement('link');
|
||||||
|
link.href = file;
|
||||||
|
link.rel = 'stylesheet';
|
||||||
|
link.type = 'text/css';
|
||||||
|
if (headElem) headElem.appendChild(link);
|
||||||
|
else document.getElementsByTagName('head')[0].appendChild(link);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 动态加载js文件
|
||||||
|
function loadJs(file, headElem) {
|
||||||
|
var script = document.createElement('script');
|
||||||
|
script.src = file;
|
||||||
|
script.type = 'text/javascript';
|
||||||
|
if (headElem) headElem.appendChild(script);
|
||||||
|
else document.getElementsByTagName('head')[0].appendChild(script);
|
||||||
|
}
|
||||||
|
|
||||||
/** 设置全局ajax处理 */
|
/** 设置全局ajax处理 */
|
||||||
$.ajaxSetup({
|
$.ajaxSetup({
|
||||||
complete: function(XMLHttpRequest, textStatus) {
|
complete: function(XMLHttpRequest, textStatus) {
|
||||||
|
|
@ -253,7 +496,3 @@ $.ajaxSetup({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
layer.config({
|
|
||||||
extend: 'moon/style.css',
|
|
||||||
skin: 'layer-ext-moon'
|
|
||||||
});
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -26,11 +26,11 @@ function login() {
|
||||||
data: {
|
data: {
|
||||||
"username": username,
|
"username": username,
|
||||||
"password": password,
|
"password": password,
|
||||||
"validateCode" : validateCode,
|
"validateCode": validateCode,
|
||||||
"rememberMe": rememberMe
|
"rememberMe": rememberMe
|
||||||
},
|
},
|
||||||
success: function(r) {
|
success: function(r) {
|
||||||
if (r.code == 0) {
|
if (r.code == web_status.SUCCESS) {
|
||||||
location.href = ctx + 'index';
|
location.href = ctx + 'index';
|
||||||
} else {
|
} else {
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue